Fix failsafe for channelcount = 24
This commit is contained in:
@@ -68,13 +68,19 @@ void menuModelFailsafe(event_t event)
|
|||||||
const coord_t x = 1;
|
const coord_t x = 1;
|
||||||
coord_t y = FH + 1;
|
coord_t y = FH + 1;
|
||||||
uint8_t line = (menuVerticalPosition >= sentModuleChannels(g_moduleIdx) ? 2 : 0);
|
uint8_t line = (menuVerticalPosition >= sentModuleChannels(g_moduleIdx) ? 2 : 0);
|
||||||
uint8_t ch = (menuVerticalPosition >= 8 ? 8 : 0) + line;
|
uint8_t ch = (menuVerticalPosition >= 16 ? 16 : (menuVerticalPosition >= 8 ? 8 : 0)) + line;
|
||||||
|
|
||||||
// Channels
|
// Channels
|
||||||
for (; line < 8; line++) {
|
for (; line < 8; line++) {
|
||||||
const int32_t channelValue = channelOutputs[ch+channelStart];
|
const int32_t channelValue = channelOutputs[ch+channelStart];
|
||||||
int32_t failsafeValue = g_model.failsafeChannels[ch];
|
int32_t failsafeValue = g_model.failsafeChannels[ch];
|
||||||
|
|
||||||
|
if (menuVerticalPosition >= sentModuleChannels(g_moduleIdx)) {
|
||||||
|
// Outputs => Failsafe
|
||||||
|
lcdDrawText(CENTER_OFS, LCD_H - (FH + 1), STR_OUTPUTS2FAILSAFE, INVERS);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
// Channel
|
// Channel
|
||||||
putsChn(x+1, y, ch+1, SMLSIZE);
|
putsChn(x+1, y, ch+1, SMLSIZE);
|
||||||
|
|
||||||
@@ -130,9 +136,4 @@ void menuModelFailsafe(event_t event)
|
|||||||
if (++ch >= sentModuleChannels(g_moduleIdx))
|
if (++ch >= sentModuleChannels(g_moduleIdx))
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menuVerticalPosition >= sentModuleChannels(g_moduleIdx)) {
|
|
||||||
// Outputs => Failsafe
|
|
||||||
lcdDrawText(CENTER_OFS, LCD_H - (FH + 1), STR_OUTPUTS2FAILSAFE, INVERS);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user