From ad54506f8635b62ff09049f75fb296d45922e9b3 Mon Sep 17 00:00:00 2001 From: "gbirkus@gmail.com" Date: Tue, 4 Sep 2012 20:31:23 +0000 Subject: [PATCH] issue 69 T-Cut template replaced to Sticky-T-Cut --- src/open9x.h | 2 ++ src/templates.cpp | 11 ++++++++--- src/templates.h | 2 +- src/translations/cz.h | 2 +- src/translations/de.h | 2 +- src/translations/en.h | 2 +- src/translations/it.h | 2 +- 7 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/open9x.h b/src/open9x.h index cb2a4a32d..3fab6468b 100644 --- a/src/open9x.h +++ b/src/open9x.h @@ -477,6 +477,8 @@ enum CswFunctions { #define DSW_SW4 13 #define DSW_SW5 14 #define DSW_SW6 15 +#define DSW_SWB 20 +#define DSW_SWC 21 #define THRCHK_DEADBAND 16 #define SPLASH_TIMEOUT (4*100) // 4 seconds diff --git a/src/templates.cpp b/src/templates.cpp index 560bddcd5..c2eae13c2 100644 --- a/src/templates.cpp +++ b/src/templates.cpp @@ -144,9 +144,14 @@ void applyTemplate(uint8_t idx) setDest(ICC(STK_AIL), MIXSRC_Ail); break; - // T-Cut - case TMPL_THR_CUT: - md=setDest(ICC(STK_THR), MIXSRC_MAX); md->weight=-100; md->swtch=DSW_THR; md->mltpx=MLTPX_REP; + // Sticky-T-Cut + case TMPL_STI_THR_CUT: + md=setDest(ICC(STK_THR), MIXSRC_MAX); md->weight=-100; md->swtch=DSW_SWC; md->mltpx=MLTPX_REP; + md=setDest(13, MIXSRC_CH11+3); md->weight= 100; + md=setDest(13, MIXSRC_MAX); md->weight=-100; md->swtch=DSW_SWB; md->mltpx=MLTPX_REP; + md=setDest(13, MIXSRC_MAX); md->weight= 100; md->swtch=DSW_THR; md->mltpx=MLTPX_REP; + setSwitch(11, CS_VNEG, STK_THR, -99); + setSwitch(12, CS_VPOS, 38, 0); break; // V-Tail diff --git a/src/templates.h b/src/templates.h index e346ed1e6..3c05f1cb7 100644 --- a/src/templates.h +++ b/src/templates.h @@ -73,7 +73,7 @@ enum Templates { TMPL_CLEAR_MIXES, TMPL_SIMPLE_4CH, - TMPL_THR_CUT, + TMPL_STI_THR_CUT, TMPL_V_TAIL, TMPL_ELEVON_DELTA, TMPL_ECCPM, diff --git a/src/translations/cz.h b/src/translations/cz.h index 0b06af295..8d14b4000 100644 --- a/src/translations/cz.h +++ b/src/translations/cz.h @@ -191,7 +191,7 @@ #define LEN2_VTEMPLATES 13 #define LEN_VTEMPLATES "\015" -#define TR_VTEMPLATES "Smazat Mixy\0\0""Z\200kl. 4kan\200l\0""T-Cut \0""V-Ocas \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0" +#define TR_VTEMPLATES "Smazat Mixy\0\0""Z\200kl. 4kan\200l\0"Sticky-T-Cut\0"V-Ocas \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0" #define LEN_VSWASHTYPE "\004" #define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0" diff --git a/src/translations/de.h b/src/translations/de.h index 260696697..c9e6f5df1 100644 --- a/src/translations/de.h +++ b/src/translations/de.h @@ -191,7 +191,7 @@ #define LEN2_VTEMPLATES 13 #define LEN_VTEMPLATES "\015" -#define TR_VTEMPLATES "Clear Mixes\0\0""Simple 4-CH \0""T-Cut \0""V-Tail \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0" +#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 LEN_VSWASHTYPE "\004" #define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0" diff --git a/src/translations/en.h b/src/translations/en.h index 36a65e252..9563d16f5 100644 --- a/src/translations/en.h +++ b/src/translations/en.h @@ -192,7 +192,7 @@ #define LEN2_VTEMPLATES 13 #define LEN_VTEMPLATES "\015" -#define TR_VTEMPLATES "Clear Mixes\0\0""Simple 4-CH \0""T-Cut \0""V-Tail \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0" +#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 LEN_VSWASHTYPE "\004" #define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0" diff --git a/src/translations/it.h b/src/translations/it.h index 537d3c973..02275b97f 100644 --- a/src/translations/it.h +++ b/src/translations/it.h @@ -191,7 +191,7 @@ #define LEN2_VTEMPLATES 13 #define LEN_VTEMPLATES "\015" -#define TR_VTEMPLATES "Clear Mixes\0\0""Simple 4-CH \0""T-Cut \0""V-Tail \0""Elevon\\Delta\0""eCCPM \0""Heli Setup \0""Servo Test \0" +#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 LEN_VSWASHTYPE "\004" #define TR_VSWASHTYPE "--- ""120 ""120X""140 ""90\0"