Sky9x platform fixes

This commit is contained in:
Andre Bernet
2015-08-25 16:16:45 +02:00
parent 5e2fe112b0
commit c53ba92139
6 changed files with 14 additions and 7 deletions
+1 -1
View File
@@ -561,7 +561,7 @@ void menuModelTelemetry(uint8_t event)
lcd_putcAtt(lcdLastPos, y, ':', attr);
lcd_putsnAtt(3*FW, y, g_model.telemetrySensors[index].label, TELEM_LABEL_LEN, ZCHAR);
if (telemetryItems[index].isFresh()) {
lcd_putc(10*FW, y, '*');
lcd_putc(16*FW, y, '*');
}
TelemetryItem & telemetryItem = telemetryItems[index];
if (telemetryItem.isAvailable()) {
+1 -1
View File
@@ -81,7 +81,7 @@ INIT_STOPS(stopsSwitch, 15, SWSRC_FIRST, CATEGORY_END(-SWSRC_FIRST_LOGICAL_SWITC
int checkIncDec(unsigned int event, int val, int i_min, int i_max, unsigned int i_flags, IsValueAvailable isValueAvailable, const CheckIncDecStops &stops)
{
int16_t newval = val;
int newval = val;
#if defined(DBLKEYS)
uint8_t in = KEYS_PRESSED();
+4 -4
View File
@@ -223,15 +223,15 @@ void displayBattVoltage()
#if defined(PCBSKY9X)
void displayVoltageOrAlarm()
{
if (IS_TXBATT_WARNING()) {
displayBattVoltage();
}
else if (g_eeGeneral.temperatureWarn && getTemperature() >= g_eeGeneral.temperatureWarn) {
if (g_eeGeneral.temperatureWarn && getTemperature() >= g_eeGeneral.temperatureWarn) {
putsValueWithUnit(6*FW-1, 2*FH, getTemperature(), UNIT_TEMPERATURE, BLINK|INVERS|DBLSIZE);
}
else if (g_eeGeneral.mAhWarn && (g_eeGeneral.mAhUsed + Current_used * (488 + g_eeGeneral.currentCalib)/8192/36) / 500 >= g_eeGeneral.mAhWarn) {
putsValueWithUnit(7*FW-1, 2*FH, (g_eeGeneral.mAhUsed + Current_used*(488 + g_eeGeneral.currentCalib)/8192/36)/10, UNIT_MAH, BLINK|INVERS|DBLSIZE);
}
else {
displayBattVoltage();
}
}
#else
#define displayVoltageOrAlarm() displayBattVoltage()