diff --git a/radio/src/templates.cpp b/radio/src/templates.cpp index 69910a8f3..ba72dfdbe 100644 --- a/radio/src/templates.cpp +++ b/radio/src/templates.cpp @@ -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: diff --git a/radio/src/templates.h b/radio/src/templates.h index aeec86261..2fe5a34fa 100644 --- a/radio/src/templates.h +++ b/radio/src/templates.h @@ -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 }; diff --git a/radio/src/translations.h b/radio/src/translations.h index fbe7cc953..41712ba2a 100644 --- a/radio/src/translations.h +++ b/radio/src/translations.h @@ -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) diff --git a/radio/src/translations/cz.h.txt b/radio/src/translations/cz.h.txt index 9f7eccdbe..5602bcffe 100644 --- a/radio/src/translations/cz.h.txt +++ b/radio/src/translations/cz.h.txt @@ -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" diff --git a/radio/src/translations/de.h.txt b/radio/src/translations/de.h.txt index 3f71815f0..d0eb8b23f 100644 --- a/radio/src/translations/de.h.txt +++ b/radio/src/translations/de.h.txt @@ -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" diff --git a/radio/src/translations/en.h.txt b/radio/src/translations/en.h.txt index fbee0dc25..66ef57446 100644 --- a/radio/src/translations/en.h.txt +++ b/radio/src/translations/en.h.txt @@ -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" diff --git a/radio/src/translations/es.h.txt b/radio/src/translations/es.h.txt index 8aa130101..8ad272b60 100644 --- a/radio/src/translations/es.h.txt +++ b/radio/src/translations/es.h.txt @@ -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" diff --git a/radio/src/translations/fi.h.txt b/radio/src/translations/fi.h.txt index 1a4a41c3d..08b55fd77 100644 --- a/radio/src/translations/fi.h.txt +++ b/radio/src/translations/fi.h.txt @@ -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" diff --git a/radio/src/translations/fr.h.txt b/radio/src/translations/fr.h.txt index 17fa5c4ef..e2c14a9b9 100644 --- a/radio/src/translations/fr.h.txt +++ b/radio/src/translations/fr.h.txt @@ -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" diff --git a/radio/src/translations/it.h.txt b/radio/src/translations/it.h.txt index 596e26560..a08a02500 100644 --- a/radio/src/translations/it.h.txt +++ b/radio/src/translations/it.h.txt @@ -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" diff --git a/radio/src/translations/nl.h.txt b/radio/src/translations/nl.h.txt index 738487f66..80a2de49f 100644 --- a/radio/src/translations/nl.h.txt +++ b/radio/src/translations/nl.h.txt @@ -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" diff --git a/radio/src/translations/pl.h.txt b/radio/src/translations/pl.h.txt index 76efcec0c..7aeeff7a2 100644 --- a/radio/src/translations/pl.h.txt +++ b/radio/src/translations/pl.h.txt @@ -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" diff --git a/radio/src/translations/pt.h.txt b/radio/src/translations/pt.h.txt index 892b99665..7e0c03368 100644 --- a/radio/src/translations/pt.h.txt +++ b/radio/src/translations/pt.h.txt @@ -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" diff --git a/radio/src/translations/se.h.txt b/radio/src/translations/se.h.txt index 6c2034a81..28ccf85df 100644 --- a/radio/src/translations/se.h.txt +++ b/radio/src/translations/se.h.txt @@ -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 "