1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-25 17:25:13 +03:00

One more rename

This commit is contained in:
Damjan Adamic 2014-05-17 17:06:29 +02:00
parent c2031934e0
commit 6e5f064c31
4 changed files with 10 additions and 10 deletions

View file

@ -668,7 +668,7 @@ void ConvertModel_215_to_216(ModelData &model)
sw.delay = oldModel.logicalSw[i].delay * 5;
sw.duration = oldModel.logicalSw[i].duration * 5;
sw.andsw = ConvertSwitch_215_to_216(oldModel.logicalSw[i].andsw);
uint8_t cstate = cswFamily(sw.func);
uint8_t cstate = lswFamily(sw.func);
if (cstate == LS_FAMILY_BOOL) {
sw.v1 = ConvertSwitch_215_to_216(sw.v1);
sw.v2 = ConvertSwitch_215_to_216(sw.v2);

View file

@ -4285,14 +4285,14 @@ void menuModelLogicalSwitchOne(uint8_t event)
uint8_t y = 1 + (k+1)*FH;
uint8_t i = k + s_pgOfs;
uint8_t attr = (sub==i ? (s_editMode>0 ? BLINK|INVERS : INVERS) : 0);
uint8_t cstate = cswFamily(cs->func);
uint8_t cstate = lswFamily(cs->func);
switch(i) {
case LS_FIELD_FUNCTION:
lcd_putsLeft(y, STR_FUNC);
lcd_putsiAtt(CSWONE_2ND_COLUMN, y, STR_VCSWFUNC, cs->func, attr);
if (attr) {
cs->func = checkIncDec(event, cs->func, 0, LS_FUNC_MAX, EE_MODEL, isLogicalSwitchFunctionAvailable);
uint8_t new_cstate = cswFamily(cs->func);
uint8_t new_cstate = lswFamily(cs->func);
if (cstate != new_cstate) {
if (new_cstate == LS_FAMILY_TIMER) {
cs->v1 = cs->v2 = 0;
@ -4448,7 +4448,7 @@ void menuModelLogicalSwitches(uint8_t event)
lcd_putsiAtt(CSW_1ST_COLUMN, y, STR_VCSWFUNC, cs->func, 0);
// CSW params
uint8_t cstate = cswFamily(cs->func);
uint8_t cstate = lswFamily(cs->func);
if (cstate == LS_FAMILY_BOOL || cstate == LS_FAMILY_STICKY) {
putsSwitches(CSW_2ND_COLUMN, y, cs->v1, 0);
@ -4576,7 +4576,7 @@ void menuModelLogicalSwitches(uint8_t event)
lcd_putsiAtt(CSW_1ST_COLUMN, y, STR_VCSWFUNC, cs->func, horz==0 ? attr : 0);
// CSW params
uint8_t cstate = cswFamily(cs->func);
uint8_t cstate = lswFamily(cs->func);
#if defined(CPUARM)
int16_t v1_val=cs->v1, v1_min=0, v1_max=MIXSRC_LAST_TELEM, v2_min=0, v2_max=MIXSRC_LAST_TELEM;
int16_t v3_min=0, v3_max=100;
@ -4736,7 +4736,7 @@ void menuModelLogicalSwitches(uint8_t event)
#else
CHECK_INCDEC_MODELVAR_ZERO(event, cs->func, LS_FUNC_MAX);
#endif
uint8_t new_cstate = cswFamily(cs->func);
uint8_t new_cstate = lswFamily(cs->func);
if (cstate != new_cstate) {
#if defined(CPUARM)
if (new_cstate == LS_FAMILY_TIMER) {

View file

@ -1198,7 +1198,7 @@ enum CswFunctionFamilies {
LS_FAMILY_STAY
};
uint8_t cswFamily(uint8_t func);
uint8_t lswFamily(uint8_t func);
int16_t lswTimerValue(delayval_t val);
#if defined(CPUARM)

View file

@ -242,7 +242,7 @@ bool getSwitch(int8_t swtch)
lsLastValue[cs_idx] = CS_LAST_VALUE_INIT;
result = false;
}
else if ((s=cswFamily(ls->func)) == LS_FAMILY_BOOL) {
else if ((s=lswFamily(ls->func)) == LS_FAMILY_BOOL) {
bool res1 = getSwitch(ls->v1);
bool res2 = getSwitch(ls->v2);
switch (ls->func) {
@ -672,7 +672,7 @@ LogicalSwitchData *lswAddress(uint8_t idx)
return &g_model.logicalSw[idx];
}
uint8_t cswFamily(uint8_t func)
uint8_t lswFamily(uint8_t func)
{
if (func <= LS_FUNC_ANEG)
return LS_FAMILY_OFS;
@ -707,7 +707,7 @@ getvalue_t convertLswTelemValue(LogicalSwitchData * ls)
#if defined(CPUARM)
val = convert16bitsTelemValue(ls->v1 - MIXSRC_FIRST_TELEM + 1, ls->v2);
#else
if (cswFamily(ls->func)==LS_FAMILY_OFS)
if (lswFamily(ls->func)==LS_FAMILY_OFS)
val = convert8bitsTelemValue(ls->v1 - MIXSRC_FIRST_TELEM + 1, 128+ls->v2);
else
val = convert8bitsTelemValue(ls->v1 - MIXSRC_FIRST_TELEM + 1, 128+ls->v2) - convert8bitsTelemValue(ls->v1 - MIXSRC_FIRST_TELEM + 1, 128);