Throttle expo feature removed. If really needed, there are plenty of other ways to achieve it.

This commit is contained in:
bsongis
2011-12-03 21:51:20 +00:00
parent 352b04302a
commit 87dddbb773
4 changed files with 4 additions and 19 deletions
+1 -5
View File
@@ -280,13 +280,9 @@ void applyExpos(int16_t *anas, uint8_t phase)
if((v<0 && ed.mode&1) || (v>=0 && ed.mode&2)) {
cur_chn = ed.chn;
int16_t k = ed.expo;
if (IS_THROTTLE(cur_chn) && g_model.thrExpo)
v = 2*expo((v+RESX)/2, k);
else
v = expo(v, k);
v = expo(v, k);
if (ed.curve) v = applyCurve(v, ed.curve > 10 ? ed.curve + 4 : ed.curve, 0);
v = ((int32_t)v * ed.weight) / 100;
if (IS_THROTTLE(cur_chn) && g_model.thrExpo) v -= RESX;
anas[cur_chn] = v;
}
}
+2 -12
View File
@@ -386,7 +386,7 @@ void EditName(uint8_t x, uint8_t y, char *name, uint8_t size, uint8_t event, boo
void menuProcModel(uint8_t event)
{
lcd_outdezNAtt(7*FW,0,g_eeGeneral.currModel+1,INVERS+LEADING0,2);
MENU("SETUP", menuTabModel, e_Model, (g_model.protocol ? 10 : 11), {0,sizeof(g_model.name)-1,3,3,0,0,0,1,6,2,1});
MENU("SETUP", menuTabModel, e_Model, (g_model.protocol ? 10 : 11), {0,sizeof(g_model.name)-1,3,3,0,0,0,0,6,2,1});
uint8_t sub = m_posVert;
uint8_t y = 1*FH;
@@ -460,17 +460,7 @@ void menuProcModel(uint8_t event)
if(s_pgOfs<subN) {
lcd_puts_P( 0, y, PSTR("T-Trim"));
menu_lcd_onoff(PARAM_OFS, y, g_model.thrTrim, sub==subN && m_posHorz==0) ;
lcd_putsnAtt(PARAM_OFS+4*FW, y, PSTR("LinearExp ")+6*g_model.thrExpo,6,(sub==subN && m_posHorz==1) ? INVERS : 0);
if (sub==subN && (s_editMode>0 || p1valdiff)) {
switch (m_posHorz) {
case 0:
CHECK_INCDEC_MODELVAR(event,g_model.thrTrim,0,1);
break;
case 1:
CHECK_INCDEC_MODELVAR(event,g_model.thrExpo,0,1);
break;
}
}
if (sub==subN) CHECK_INCDEC_MODELVAR(event,g_model.thrTrim,0,1);
if((y+=FH)>7*FH) return;
}subN++;
+1 -1
View File
@@ -235,7 +235,7 @@ typedef struct t_ModelData {
uint8_t thrTrim:1; // Enable Throttle Trim
int8_t ppmNCH:4;
uint8_t trimInc:3; // Trim Increments
uint8_t thrExpo:1; // Enable Throttle Expo
uint8_t spare1:1;
uint8_t pulsePol:1;
uint8_t extendedLimits:1;
uint8_t extendedTrims:1;
-1
View File
@@ -107,7 +107,6 @@ uint8_t Translate()
g_model.protocol = v3->protocol;
g_model.ppmNCH = v3->ppmNCH;
g_model.thrTrim = v3->thrTrim;
g_model.thrExpo = v3->thrExpo;
g_model.trimInc = v3->trimInc;
g_model.pulsePol = v3->pulsePol;
if (g_eeGeneral.myVers == EEPROM_VER_r584)