New UI merged

This commit is contained in:
Bertrand Songis
2019-08-28 20:50:14 +02:00
parent 1f41076b0e
commit f4f8893ae9
806 changed files with 30836 additions and 11704 deletions
@@ -217,6 +217,23 @@ void drawGVarName(coord_t x, coord_t y, int8_t idx, LcdFlags flags)
lcdDrawText(x, y, s, flags);
}
void editStickHardwareSettings(coord_t x, coord_t y, int idx, event_t event, LcdFlags flags)
{
lcdDrawTextAtIndex(INDENT_WIDTH, y, STR_VSRCRAW, idx+1, 0);
if (ZEXIST(g_eeGeneral.anaNames[idx]) || (flags && s_editMode > 0))
editName(x, y, g_eeGeneral.anaNames[idx], LEN_ANA_NAME, event, flags);
else
lcdDrawMMM(x, y, flags);
}
bool isSwitchAvailableInCustomFunctions(int swtch)
{
if (menuHandlers[menuLevel] == menuModelSpecialFunctions)
return isSwitchAvailable(swtch, ModelCustomFunctionsContext);
else
return isSwitchAvailable(swtch, GeneralCustomFunctionsContext);
}
void drawPower(coord_t x, coord_t y, int8_t dBm, LcdFlags att)
{
float power_W_PREC1 = pow(10.0, (dBm - 30.0) / 10.0) * 10;
@@ -37,6 +37,8 @@ inline void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att = 0)
drawTimer(x, y, tme, att, att);
}
void drawFlightMode(coord_t x, coord_t y, int8_t idx, LcdFlags att = 0);
void drawStartupAnimation(uint32_t duration, uint32_t totalDuration);
void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char * message);
void drawSleepBitmap();
+1 -1
View File
@@ -183,7 +183,7 @@ void runPopupWarning(event_t event)
break;
case WARNING_TYPE_ASTERISK:
lcdDrawText(WARNING_LINE_X, WARNING_LINE_Y+2*FH+2, STR_EXIT);
lcdDrawText(WARNING_LINE_X, WARNING_LINE_Y+2*FH+2, BUTTON(TR_EXIT));
break;
default:
+2
View File
@@ -23,6 +23,7 @@
#include <inttypes.h>
#include "audio.h"
#include "lcd.h"
extern const char * warningText;
extern const char * warningInfoText;
@@ -57,6 +58,7 @@ void showAlertBox(const char * title, const char * text, const char * action , u
// Full screen with 2 lines and a progress bar
void drawProgressScreen(const char * title, const char * message, int num, int den);
typedef void (* ProgressHandler)(const char *, const char *, int, int);
enum
{
@@ -91,7 +91,7 @@ void onUpdateConfirmation(const char * result)
if (result == STR_OK) {
OtaUpdateInformation * destination = moduleState[EXTERNAL_MODULE].otaUpdateInformation;
Pxx2OtaUpdate otaUpdate(EXTERNAL_MODULE, destination->candidateReceiversNames[destination->selectedReceiverIndex]);
otaUpdate.flashFirmware(destination->filename);
otaUpdate.flashFirmware(destination->filename, drawProgressScreen);
}
else {
moduleState[EXTERNAL_MODULE].mode = MODULE_MODE_NORMAL;
@@ -202,30 +202,30 @@ void onSdManagerMenu(const char * result)
else if (result == STR_FLASH_INTERNAL_MODULE) {
getSelectionFullPath(lfn);
FrskyDeviceFirmwareUpdate device(INTERNAL_MODULE);
device.flashFirmware(lfn);
device.flashFirmware(lfn, drawProgressScreen);
}
else if (result == STR_FLASH_EXTERNAL_MODULE) {
// needed on X-Lite (as the R9M needs 2S while the external device flashing port only provides 5V)
getSelectionFullPath(lfn);
FrskyDeviceFirmwareUpdate device(EXTERNAL_MODULE);
device.flashFirmware(lfn);
device.flashFirmware(lfn, drawProgressScreen);
}
else if (result == STR_FLASH_EXTERNAL_DEVICE) {
getSelectionFullPath(lfn);
FrskyDeviceFirmwareUpdate device(SPORT_MODULE);
device.flashFirmware(lfn);
device.flashFirmware(lfn, drawProgressScreen);
}
#if defined(BLUETOOTH)
else if (result == STR_FLASH_BLUETOOTH_MODULE) {
getSelectionFullPath(lfn);
bluetooth.flashFirmware(lfn);
bluetooth.flashFirmware(lfn, drawProgressScreen);
}
#endif
#if defined(HARDWARE_POWER_MANAGEMENT_UNIT)
else if (result == STR_FLASH_POWER_MANAGEMENT_UNIT) {
getSelectionFullPath(lfn);
FrskyChipFirmwareUpdate device;
device.flashFirmware(lfn);
device.flashFirmware(lfn, drawProgressScreen);
}
#endif
#if defined(PXX2)