small fixes
This commit is contained in:
@@ -2408,7 +2408,8 @@ OpenTxGeneralData::OpenTxGeneralData(GeneralSettings & generalData, Board::Type
|
||||
|
||||
if (version >= 219 && IS_HORUS_OR_TARANIS(board)) {
|
||||
internalField.Append(new UnsignedField<2>(this, generalData.pwrOnSpeed, "Power On Speed"));
|
||||
internalField.Append(new UnsignedField<4>(this, generalData.pwrOffSpeed, "Power Off Speed"));
|
||||
internalField.Append(new UnsignedField<2>(this, generalData.pwrOffSpeed, "Power Off Speed"));
|
||||
internalField.Append(new SpareBitsField<2>(this));
|
||||
}
|
||||
else {
|
||||
internalField.Append(new SpareBitsField<6>(this));
|
||||
|
||||
@@ -772,13 +772,9 @@ PACK(struct RadioData {
|
||||
NOBACKUP(uint8_t bluetoothBaudrate:4);
|
||||
NOBACKUP(uint8_t bluetoothMode:4);
|
||||
NOBACKUP(uint8_t countryCode:2);
|
||||
#if defined(PCBHORUS) || defined(PCBTARANIS)
|
||||
NOBACKUP(uint8_t pwrOnSpeed:2);
|
||||
NOBACKUP(uint8_t pwrOffSpeed:2);
|
||||
NOBACKUP(uint8_t spareCC:2);
|
||||
#else
|
||||
NOBACKUP(uint8_t spareCC:6);
|
||||
#endif
|
||||
NOBACKUP(uint8_t spare5:2);
|
||||
NOBACKUP(uint8_t imperial:1);
|
||||
NOBACKUP(uint8_t jitterFilter:1); /* 0 - active */
|
||||
NOBACKUP(uint8_t disableRssiPoweroffAlarm:1);
|
||||
|
||||
@@ -28,11 +28,11 @@ const unsigned char bmp_sleep[] = {
|
||||
#include "sleep.lbm"
|
||||
};
|
||||
|
||||
void drawStartupAnimation(uint32_t duration, uint32_t total_duration)
|
||||
void drawStartupAnimation(uint32_t duration, uint32_t totalDuration)
|
||||
{
|
||||
if (total_duration == 0) return;
|
||||
if (totalDuration == 0) return;
|
||||
|
||||
uint8_t index = limit<uint8_t>(0, duration / (total_duration / 5), 4);
|
||||
uint8_t index = limit<uint8_t>(0, duration / (totalDuration / 5), 4);
|
||||
|
||||
lcdRefreshWait();
|
||||
lcdClear();
|
||||
@@ -47,11 +47,11 @@ void drawStartupAnimation(uint32_t duration, uint32_t total_duration)
|
||||
lcdRefreshWait();
|
||||
}
|
||||
|
||||
void drawShutdownAnimation(uint32_t duration, uint32_t total_duration, const char * message)
|
||||
void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char * message)
|
||||
{
|
||||
if (total_duration == 0) return;
|
||||
if (totalDuration == 0) return;
|
||||
|
||||
uint8_t index = limit<uint8_t>(0, duration / (total_duration / 5), 4);
|
||||
uint8_t index = limit<uint8_t>(0, duration / (totalDuration / 5), 4);
|
||||
|
||||
lcdRefreshWait();
|
||||
lcdClear();
|
||||
|
||||
@@ -40,11 +40,11 @@ const unsigned char bmp_sleep[] = {
|
||||
#include "sleep.lbm"
|
||||
};
|
||||
|
||||
void drawStartupAnimation(uint32_t duration, uint32_t total_duration)
|
||||
void drawStartupAnimation(uint32_t duration, uint32_t totalDuration)
|
||||
{
|
||||
if (total_duration == 0) return;
|
||||
if (totalDuration == 0) return;
|
||||
|
||||
uint8_t index = limit<uint8_t>(0, duration / (total_duration / 5), 4);
|
||||
uint8_t index = limit<uint8_t>(0, duration / (totalDuration / 5), 4);
|
||||
|
||||
lcdRefreshWait();
|
||||
lcdClear();
|
||||
@@ -57,11 +57,11 @@ void drawStartupAnimation(uint32_t duration, uint32_t total_duration)
|
||||
lcdRefresh();
|
||||
}
|
||||
|
||||
void drawShutdownAnimation(uint32_t duration, uint32_t total_duration, const char * message)
|
||||
void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char * message)
|
||||
{
|
||||
if (total_duration == 0) return;
|
||||
if (totalDuration == 0) return;
|
||||
|
||||
uint8_t index = limit<uint8_t>(0, duration / (total_duration / 4), 3);
|
||||
uint8_t index = limit<uint8_t>(0, duration / (totalDuration / 4), 3);
|
||||
|
||||
lcdRefreshWait();
|
||||
lcdClear();
|
||||
|
||||
@@ -391,9 +391,9 @@ void drawSleepBitmap()
|
||||
}
|
||||
|
||||
#define SHUTDOWN_CIRCLE_DIAMETER 150
|
||||
void drawShutdownAnimation(uint32_t duration, uint32_t total_duration, const char * message)
|
||||
void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char * message)
|
||||
{
|
||||
if (total_duration == 0) return;
|
||||
if (totalDuration == 0) return;
|
||||
|
||||
static uint32_t lastDuration = 0xffffffff;
|
||||
static const BitmapBuffer * shutdown = BitmapBuffer::load(getThemePath("shutdown.bmp"));
|
||||
@@ -406,7 +406,7 @@ void drawShutdownAnimation(uint32_t duration, uint32_t total_duration, const cha
|
||||
}
|
||||
else {
|
||||
lcdRestoreBackupBuffer();
|
||||
int quarter = duration / (total_duration / 5);
|
||||
int quarter = duration / (totalDuration / 5);
|
||||
if (quarter >= 1) lcdDrawBitmapPattern(LCD_W/2, (LCD_H-SHUTDOWN_CIRCLE_DIAMETER)/2, LBM_SHUTDOWN_CIRCLE, TEXT_COLOR, 0, SHUTDOWN_CIRCLE_DIAMETER/2);
|
||||
if (quarter >= 2) lcdDrawBitmapPattern(LCD_W/2, LCD_H/2, LBM_SHUTDOWN_CIRCLE, TEXT_COLOR, SHUTDOWN_CIRCLE_DIAMETER/2, SHUTDOWN_CIRCLE_DIAMETER/2);
|
||||
if (quarter >= 3) lcdDrawBitmapPattern((LCD_W-SHUTDOWN_CIRCLE_DIAMETER)/2, LCD_H/2, LBM_SHUTDOWN_CIRCLE, TEXT_COLOR, SHUTDOWN_CIRCLE_DIAMETER, SHUTDOWN_CIRCLE_DIAMETER/2);
|
||||
@@ -415,7 +415,7 @@ void drawShutdownAnimation(uint32_t duration, uint32_t total_duration, const cha
|
||||
}
|
||||
else {
|
||||
lcd->clear();
|
||||
int quarter = duration / (total_duration / 5);
|
||||
int quarter = duration / (totalDuration / 5);
|
||||
for (int i=1; i<=4; i++) {
|
||||
if (quarter >= i) {
|
||||
lcd->drawSolidFilledRect(LCD_W / 2 - 70 + 24 * i, LCD_H / 2 - 10, 20, 20, TEXT_BGCOLOR);
|
||||
|
||||
@@ -36,8 +36,8 @@ inline void drawTimer(coord_t x, coord_t y, int32_t tme, LcdFlags att = 0)
|
||||
drawTimer(x, y, tme, att, att);
|
||||
}
|
||||
|
||||
void drawStartupAnimation(uint32_t duration, uint32_t total_duration);
|
||||
void drawShutdownAnimation(uint32_t duration, uint32_t total_duration, const char * message);
|
||||
void drawStartupAnimation(uint32_t duration, uint32_t totalDuration);
|
||||
void drawShutdownAnimation(uint32_t duration, uint32_t totalDuration, const char * message);
|
||||
void drawSleepBitmap();
|
||||
|
||||
#endif // _COMMON_DRAW_FUNCTIONS_H_
|
||||
|
||||
Reference in New Issue
Block a user