Compilation fixes on all boards

This commit is contained in:
Bertrand Songis
2019-03-15 12:24:22 +01:00
parent 90959c8817
commit cb6ee5e0b0
7 changed files with 25 additions and 21 deletions
+2 -2
View File
@@ -244,7 +244,7 @@ uint8_t getTextWidth(const char * s, uint8_t len, LcdFlags flags)
{
uint8_t width = 0;
for (int i=0; len==0 || i<len; ++i) {
unsigned char c = (flags & ZCHAR) ? idx2char(*s) : *s;
unsigned char c = (flags & ZCHAR) ? zchar2char(*s) : *s;
if (!c) {
break;
}
@@ -274,7 +274,7 @@ void lcdDrawSizedText(coord_t x, coord_t y, const char * s, uint8_t len, LcdFlag
#if defined(BOOT)
unsigned char c = *s;
#else
unsigned char c = (flags & ZCHAR) ? idx2char(*s) : *s;
unsigned char c = (flags & ZCHAR) ? zchar2char(*s) : *s;
#endif
if (setx) {
+4 -4
View File
@@ -1280,11 +1280,11 @@ void menuModelFailsafe(event_t event)
if (menuVerticalPosition < sentModuleChannels(g_moduleIdx)) {
if (s_editMode) {
g_model.moduleData[g_moduleIdx].failsafeChannels[menuVerticalPosition] = channelOutputs[menuVerticalPosition+channelStart];
g_model.failsafeChannels[menuVerticalPosition] = channelOutputs[menuVerticalPosition+channelStart];
s_editMode = 0;
}
else {
int16_t & failsafe = g_model.moduleData[g_moduleIdx].failsafeChannels[menuVerticalPosition];
int16_t & failsafe = g_model.failsafeChannels[menuVerticalPosition];
if (failsafe < FAILSAFE_CHANNEL_HOLD)
failsafe = FAILSAFE_CHANNEL_HOLD;
else if (failsafe == FAILSAFE_CHANNEL_HOLD)
@@ -1330,7 +1330,7 @@ void menuModelFailsafe(event_t event)
for (; line < 8; line++) {
const int32_t channelValue = channelOutputs[ch+channelStart];
int32_t failsafeValue = g_model.moduleData[g_moduleIdx].failsafeChannels[8*col+line];
int32_t failsafeValue = g_model.failsafeChannels[8*col+line];
uint8_t lenLabel = ZLEN(g_model.limitData[ch+channelStart].name);
uint8_t barW = colW - FW * maxNameLen - FWNUM * 3; // default bar width
@@ -1359,7 +1359,7 @@ void menuModelFailsafe(event_t event)
}
else {
flags |= BLINK;
CHECK_INCDEC_MODELVAR(event, g_model.moduleData[g_moduleIdx].failsafeChannels[8*col+line], -lim, +lim);
CHECK_INCDEC_MODELVAR(event, g_model.failsafeChannels[8*col+line], -lim, +lim);
}
}
}