mirror of
https://github.com/opentx/opentx.git
synced 2025-07-25 09:15:38 +03:00
Compilation fix (PCB=9X CURVES=NO HELI=NO TEMPLATES=YES) (#4983)
* Compilation fix (PCB=9X CURVES=NO HELI=NO TEMPLATES=YES) * String length fixes
This commit is contained in:
parent
e4135a9adb
commit
42d66bb2c1
14 changed files with 113 additions and 30 deletions
|
@ -102,6 +102,7 @@ void clearCurves()
|
|||
memclear(g_model.curves, sizeof(g_model.curves) + sizeof(g_model.points)); // clear all curves
|
||||
}
|
||||
|
||||
#if defined(CURVES)
|
||||
void setCurve(uint8_t c, const pm_int8_t ar[])
|
||||
{
|
||||
int8_t * cv = curveAddress(c);
|
||||
|
@ -109,6 +110,7 @@ void setCurve(uint8_t c, const pm_int8_t ar[])
|
|||
cv[i] = pgm_read_byte(&ar[i]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void setLogicalSwitch(uint8_t idx, uint8_t func, int8_t v1, int8_t v2)
|
||||
{
|
||||
|
@ -140,7 +142,9 @@ void applyTemplate(uint8_t idx)
|
|||
switch (idx) {
|
||||
case TMPL_CLEAR_MIXES:
|
||||
case TMPL_SIMPLE_4CH:
|
||||
#if defined(HELI) && defined(CURVES)
|
||||
case TMPL_HELI_SETUP:
|
||||
#endif
|
||||
clearMixes();
|
||||
break;
|
||||
}
|
||||
|
@ -195,6 +199,7 @@ void applyTemplate(uint8_t idx)
|
|||
md=setDest(5, MIXSRC_Thr); md->weight= 55;
|
||||
break;
|
||||
|
||||
#if defined(HELI) && defined(CURVES)
|
||||
// Heli Setup
|
||||
case TMPL_HELI_SETUP:
|
||||
clearCurves();
|
||||
|
@ -242,6 +247,7 @@ void applyTemplate(uint8_t idx)
|
|||
setCurve(4, heli_ar5);
|
||||
setCurve(5, heli_ar5);
|
||||
break;
|
||||
#endif
|
||||
|
||||
// Servo Test
|
||||
case TMPL_SERVO_TEST:
|
||||
|
|
|
@ -66,7 +66,9 @@ enum Templates {
|
|||
TMPL_V_TAIL,
|
||||
TMPL_ELEVON_DELTA,
|
||||
TMPL_ECCPM,
|
||||
#if defined(HELI) && defined(CURVES)
|
||||
TMPL_HELI_SETUP,
|
||||
#endif
|
||||
TMPL_SERVO_TEST,
|
||||
TMPL_COUNT
|
||||
};
|
||||
|
|
|
@ -173,6 +173,7 @@ extern const pm_char STR_OPEN9X[];
|
|||
#define OFS_VTEMPLATES (OFS_VTELEMCHNS + sizeof(TR_VTELEMCHNS))
|
||||
#endif
|
||||
#if defined(TEMPLATES)
|
||||
#define TR_VTEMPLATES TR_TEMPLATE_CLEAR_MIXES TR_TEMPLATE_SIMPLE_4CH TR_TEMPLATE_STICKY_TCUT TR_TEMPLATE_VTAIL TR_TEMPLATE_DELTA TR_TEMPLATE_ECCPM TR_TEMPLATE_HELI TR_TEMPLATE_SERVO_TEST
|
||||
#define OFS_VSWASHTYPE (OFS_VTEMPLATES + sizeof(TR_VTEMPLATES))
|
||||
#else
|
||||
#define OFS_VSWASHTYPE (OFS_VTEMPLATES)
|
||||
|
|
|
@ -404,9 +404,16 @@
|
|||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "DMS\0""NMEA"
|
||||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015"
|
||||
#define TR_VTEMPLATES "Smazat mixy\0\0""Zákl. 4kanál\0""Sticky-T-Cut\0""V-Tail \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0"
|
||||
#define LEN2_VTEMPLATES 12
|
||||
#define LEN_VTEMPLATES "\014"
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Smazat mixy "
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "Zákl. 4kanál"
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Sticky-T-Cut"
|
||||
#define TR_TEMPLATE_VTAIL "V-Tail "
|
||||
#define TR_TEMPLATE_DELTA "Elevon\\Delta"
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM "
|
||||
#define TR_TEMPLATE_HELI "Heli Setup "
|
||||
#define TR_TEMPLATE_SERVO_TEST "Servo Test "
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
|
|
@ -445,7 +445,14 @@
|
|||
|
||||
#define LEN2_VTEMPLATES 15 // max String Länge für Menü (original=13)
|
||||
#define LEN_VTEMPLATES "\017" // max String Länge 15+cr+lf
|
||||
#define TR_VTEMPLATES "Misch. Lösch.\0 ""Einfach. 4-CH\0 ""Fixe Gassperre\0""V-Leitwerk\0 ""Delta Mischer\0 ""eCCPM\0 ""Hubschrauber\0 ""Servo Tester\0 "
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Misch. Lösch.\0 "
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "Einfach. 4-CH\0 "
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Fixe Gassperre\0"
|
||||
#define TR_TEMPLATE_VTAIL "V-Leitwerk\0 "
|
||||
#define TR_TEMPLATE_DELTA "Delta Mischer\0 "
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM\0 "
|
||||
#define TR_TEMPLATE_HELI "Hubschrauber\0 "
|
||||
#define TR_TEMPLATE_SERVO_TEST "Servo Tester\0 "
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0"
|
||||
|
|
|
@ -413,9 +413,16 @@
|
|||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "DMS\0""NMEA"
|
||||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015"
|
||||
#define TR_VTEMPLATES "Clear Mixes\0\0""Simple 4-CH \0""Sticky-T-Cut\0""V-Tail \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0"
|
||||
#define LEN2_VTEMPLATES 12
|
||||
#define LEN_VTEMPLATES "\014"
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Clear Mixes "
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "Simple 4-CH "
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Sticky-T-Cut"
|
||||
#define TR_TEMPLATE_VTAIL "V-Tail "
|
||||
#define TR_TEMPLATE_DELTA "Elevon\\Delta"
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM "
|
||||
#define TR_TEMPLATE_HELI "Heli Setup "
|
||||
#define TR_TEMPLATE_SERVO_TEST "Servo Test "
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
|
|
@ -431,9 +431,16 @@
|
|||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "HMS NMEA"
|
||||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015"
|
||||
#define TR_VTEMPLATES "Elim Mezcla\0\0""Simple 4-CH \0""Anular Motor\0""Cola en V \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0"
|
||||
#define LEN2_VTEMPLATES 12
|
||||
#define LEN_VTEMPLATES "\014"
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Elim Mezcla\0"
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "Simple 4-CH "
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Anular Motor"
|
||||
#define TR_TEMPLATE_VTAIL "Cola en V "
|
||||
#define TR_TEMPLATE_DELTA "Elevon\\Delta"
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM "
|
||||
#define TR_TEMPLATE_HELI "Heli Setup "
|
||||
#define TR_TEMPLATE_SERVO_TEST "Servo Test "
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
|
|
@ -431,9 +431,16 @@
|
|||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "HMS NMEA"
|
||||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015"
|
||||
#define TR_VTEMPLATES "Clear Mixes\0\0""Simple 4-CH \0""Sticky-T-Cut\0""V-Tail \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0"
|
||||
#define LEN2_VTEMPLATES 12
|
||||
#define LEN_VTEMPLATES "\014"
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Clear Mixes "
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "Simple 4-CH "
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Sticky-T-Cut"
|
||||
#define TR_TEMPLATE_VTAIL "V-Tail "
|
||||
#define TR_TEMPLATE_DELTA "Elevon\\Delta"
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM "
|
||||
#define TR_TEMPLATE_HELI "Heli Setup "
|
||||
#define TR_TEMPLATE_SERVO_TEST "Servo Test "
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
|
|
@ -438,9 +438,16 @@
|
|||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "DMS\0""NMEA"
|
||||
|
||||
#define LEN2_VTEMPLATES 15
|
||||
#define LEN_VTEMPLATES "\017"
|
||||
#define TR_VTEMPLATES "Suppr Mixages\0 ""4 Voies simple\0""Coupure Gaz\0 ""Empennage V\0 ""Elevon\\Delta\0 ""eCCPM\0 ""Conf. Hélico\0 ""Test Servo\0 "
|
||||
#define LEN2_VTEMPLATES 14
|
||||
#define LEN_VTEMPLATES "\016"
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Suppr mixages\0"
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "4 voies simple"
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Coupure gaz\0 "
|
||||
#define TR_TEMPLATE_VTAIL "Empennage V\0 "
|
||||
#define TR_TEMPLATE_DELTA "Elevon\\Delta\0 "
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM\0 "
|
||||
#define TR_TEMPLATE_HELI "Conf. Hélico\0 "
|
||||
#define TR_TEMPLATE_SERVO_TEST "Test Servo\0 "
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0"
|
||||
|
|
|
@ -438,9 +438,16 @@
|
|||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "HMS NMEA"
|
||||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015"
|
||||
#define TR_VTEMPLATES "Canc. Mixer\0 ""Semplice 4CH\0""Sticky-T-Cut\0""Coda-V \0""Elevoni\0 ""Delta\0 ""eCCPM\0 ""Setup Heli\0 ""Test Servo\0 "
|
||||
#define LEN2_VTEMPLATES 12
|
||||
#define LEN_VTEMPLATES "\014"
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Canc. Mixer "
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "Semplice 4CH"
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Coda-V "
|
||||
#define TR_TEMPLATE_VTAIL "V-Tail "
|
||||
#define TR_TEMPLATE_DELTA "Elevon\\Delta"
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM "
|
||||
#define TR_TEMPLATE_HELI "Heli Setup "
|
||||
#define TR_TEMPLATE_SERVO_TEST "Test Servo "
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
|
|
@ -413,12 +413,16 @@
|
|||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "DMS\0""NMEA"
|
||||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015"
|
||||
#define TR_VTEMPLATES "Mix wissen\0\0\0""Simple 4-CH \0""Sticky-T-Cut\0""V-Tail \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0"
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
#define LEN2_VTEMPLATES 12
|
||||
#define LEN_VTEMPLATES "\014"
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Mix wissen "
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "Simple 4-CH "
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Sticky-T-Cut"
|
||||
#define TR_TEMPLATE_VTAIL "V-Tail "
|
||||
#define TR_TEMPLATE_DELTA "Elevon\\Delta"
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM "
|
||||
#define TR_TEMPLATE_HELI "Heli Setup "
|
||||
#define TR_TEMPLATE_SERVO_TEST "Servo Test "
|
||||
|
||||
#if defined(PCBHORUS)
|
||||
#define LEN_VKEYS "\006"
|
||||
|
|
|
@ -442,7 +442,14 @@
|
|||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015" /*13 decimal*/
|
||||
#define TR_VTEMPLATES "Usuń Miksy ""Prosty. 4kn\0 ""Przełą-T-Cut\0""V-Tail \0""Elevon-Delta\0""eCCPM \0""Ustaw Heli \0""Test serwa \0"
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Usuń Miksy "
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "Prosty. 4kn\0 "
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Przełą-T-Cut\0"
|
||||
#define TR_TEMPLATE_VTAIL "V-Tail "
|
||||
#define TR_TEMPLATE_DELTA "Elevon\\Delta "
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM "
|
||||
#define TR_TEMPLATE_HELI "Ustaw Heli \0"
|
||||
#define TR_TEMPLATE_SERVO_TEST "Test serwa \0"
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "---\0""120\0""120X""140\0""90\0"
|
||||
|
|
|
@ -430,7 +430,14 @@
|
|||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015"
|
||||
#define TR_VTEMPLATES "Tirar Mixagem""4CH Simples\0 ""Anular Motor\0""V-Tail\0 ""Elevon\\Zagi\0 ""eCCPM\0 ""Mixagem Heli\0""Testar Servos"
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Tirar Mixagem"
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "4CH Simples\0 "
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Anular Motor\0"
|
||||
#define TR_TEMPLATE_VTAIL "V-Tail\0 "
|
||||
#define TR_TEMPLATE_DELTA "Elevon\\Zagi\0 "
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM\0 "
|
||||
#define TR_TEMPLATE_HELI "Mixagem Heli\0"
|
||||
#define TR_TEMPLATE_SERVO_TEST "Testar Servos"
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0"
|
||||
|
|
|
@ -436,9 +436,16 @@
|
|||
#define LEN_GPSFORMAT "\004"
|
||||
#define TR_GPSFORMAT "HMS NMEA"
|
||||
|
||||
#define LEN2_VTEMPLATES 13
|
||||
#define LEN_VTEMPLATES "\015"
|
||||
#define TR_VTEMPLATES "Nolla Mixar\0\0""Enkel 4kanal\0""Gasklippning\0""V-Stjärt \0""Deltavinge \0""eCCPM \0""Helikopter \0""Servotest \0"
|
||||
#define LEN2_VTEMPLATES 12
|
||||
#define LEN_VTEMPLATES "\014"
|
||||
#define TR_TEMPLATE_CLEAR_MIXES "Nolla Mixar\0"
|
||||
#define TR_TEMPLATE_SIMPLE_4CH "Enkel 4kanal"
|
||||
#define TR_TEMPLATE_STICKY_TCUT "Gasklippning"
|
||||
#define TR_TEMPLATE_VTAIL "V-Stjärt "
|
||||
#define TR_TEMPLATE_DELTA "Deltavinge "
|
||||
#define TR_TEMPLATE_ECCPM "eCCPM "
|
||||
#define TR_TEMPLATE_HELI "Helikopter "
|
||||
#define TR_TEMPLATE_SERVO_TEST "Servotest "
|
||||
|
||||
#define LEN_VSWASHTYPE "\004"
|
||||
#define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0 "
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue