Compilation fixes

This commit is contained in:
Bertrand Songis
2019-03-19 18:29:32 +01:00
parent b3480f3d46
commit 5fc4d86ef5
12 changed files with 86 additions and 34 deletions
+1 -1
View File
@@ -387,7 +387,7 @@ void BitmapBuffer::drawSizedText(coord_t x, coord_t y, const char * s, uint8_t l
#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 (setpos) {
pos = c;
+1 -1
View File
@@ -130,7 +130,7 @@ int getTextWidth(const char * s, int len, LcdFlags flags)
for (int i=0; len==0 || i<len; ++i) {
#if !defined(BOOT)
char c = (flags & ZCHAR) ? idx2char(*s) : *s;
char c = (flags & ZCHAR) ? zchar2char(*s) : *s;
#else
char c = *s;
#endif
+4 -4
View File
@@ -1215,11 +1215,11 @@ bool 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)
@@ -1246,7 +1246,7 @@ bool menuModelFailsafe(event_t event)
coord_t x = col*(LCD_W/2);
const coord_t y = MENU_CONTENT_TOP - FH + line*(FH+2);
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];
// Channel name if present, number if not
if (g_model.limitData[ch+channelStart].name[0] != '\0') {
@@ -1267,7 +1267,7 @@ bool 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);
}
}
}
+7 -3
View File
@@ -19,6 +19,7 @@
*/
#include <stdio.h>
#include <io/frsky_device_firmware_update.h>
#include "opentx.h"
#include "storage/modelslist.h"
@@ -141,15 +142,18 @@ void onSdManagerMenu(const char * result)
}
else if (result == STR_FLASH_INTERNAL_MODULE) {
getSelectionFullPath(lfn);
sportFlashDevice(INTERNAL_MODULE, lfn);
DeviceFirmwareUpdate device(INTERNAL_MODULE);
device.flashFile(lfn);
}
else if (result == STR_FLASH_EXTERNAL_MODULE) {
getSelectionFullPath(lfn);
sportFlashDevice(EXTERNAL_MODULE, lfn);
DeviceFirmwareUpdate device(EXTERNAL_MODULE);
device.flashFile(lfn);
}
else if (result == STR_FLASH_EXTERNAL_DEVICE) {
getSelectionFullPath(lfn);
sportFlashDevice(FLASHING_MODULE, lfn);
DeviceFirmwareUpdate device(FLASHING_MODULE);
device.flashFile(lfn);
}
#if defined(LUA)
else if (result == STR_EXECUTE_FILE) {