[Taranis] Bug on voltage gauge when voltage < mininimum of the gauge
This commit is contained in:
+1
-1
@@ -883,7 +883,7 @@ getvalue_t getValue(uint8_t i)
|
|||||||
else if (i<MIXSRC_FIRST_TELEM-1+TELEM_RSSI_TX) return frskyData.rssi[1].value;
|
else if (i<MIXSRC_FIRST_TELEM-1+TELEM_RSSI_TX) return frskyData.rssi[1].value;
|
||||||
else if (i<MIXSRC_FIRST_TELEM-1+TELEM_RSSI_RX) return frskyData.rssi[0].value;
|
else if (i<MIXSRC_FIRST_TELEM-1+TELEM_RSSI_RX) return frskyData.rssi[0].value;
|
||||||
else if (i<MIXSRC_FIRST_TELEM-1+TELEM_A2) return frskyData.analog[i+1-MIXSRC_FIRST_TELEM+1-TELEM_A1].value;
|
else if (i<MIXSRC_FIRST_TELEM-1+TELEM_A2) return frskyData.analog[i+1-MIXSRC_FIRST_TELEM+1-TELEM_A1].value;
|
||||||
#if defined(PCBTARANIS)
|
#if defined(FRSKY_SPORT)
|
||||||
else if (i<MIXSRC_FIRST_TELEM-1+TELEM_ALT) return frskyData.hub.baroAltitude;
|
else if (i<MIXSRC_FIRST_TELEM-1+TELEM_ALT) return frskyData.hub.baroAltitude;
|
||||||
#elif defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
|
#elif defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
|
||||||
else if (i<MIXSRC_FIRST_TELEM-1+TELEM_ALT) return TELEMETRY_ALT_BP;
|
else if (i<MIXSRC_FIRST_TELEM-1+TELEM_ALT) return TELEMETRY_ALT_BP;
|
||||||
|
|||||||
+1
-1
@@ -453,7 +453,7 @@ uint16_t anaIn(uint8_t chan)
|
|||||||
{
|
{
|
||||||
#if defined(PCBTARANIS)
|
#if defined(PCBTARANIS)
|
||||||
if (chan == 8)
|
if (chan == 8)
|
||||||
return 2400;
|
return 1000;
|
||||||
#elif defined(PCBGRUVIN9X)
|
#elif defined(PCBGRUVIN9X)
|
||||||
if (chan == 7)
|
if (chan == 7)
|
||||||
return 150;
|
return 150;
|
||||||
|
|||||||
@@ -65,8 +65,7 @@ void rotencPoll()
|
|||||||
|
|
||||||
asm(" rjmp 1f") ;
|
asm(" rjmp 1f") ;
|
||||||
asm("1:") ;
|
asm("1:") ;
|
||||||
// asm(" nop") ;
|
|
||||||
// asm(" nop") ;
|
|
||||||
uint8_t rotary ;
|
uint8_t rotary ;
|
||||||
rotary = PINA ;
|
rotary = PINA ;
|
||||||
DDRA = 0xFF ; // Back to all outputs
|
DDRA = 0xFF ; // Back to all outputs
|
||||||
|
|||||||
+4
-4
@@ -217,12 +217,12 @@ void displaySliders()
|
|||||||
#define BAR_VOLUME_X BAR_X+147
|
#define BAR_VOLUME_X BAR_X+147
|
||||||
#define BAR_TIME_X BAR_X+168
|
#define BAR_TIME_X BAR_X+168
|
||||||
|
|
||||||
void displayTopBarGauge(xcoord_t x, uint8_t count, bool blinking=false)
|
void displayTopBarGauge(xcoord_t x, int count, bool blinking=false)
|
||||||
{
|
{
|
||||||
if (!blinking || BLINK_ON_PHASE)
|
if (!blinking || BLINK_ON_PHASE)
|
||||||
lcd_filled_rect(x+1, BAR_Y+2, 11, 5, SOLID, ERASE);
|
lcd_filled_rect(x+1, BAR_Y+2, 11, 5, SOLID, ERASE);
|
||||||
count = min((uint8_t)10, count);
|
count = min(10, count);
|
||||||
for (uint8_t i=0; i<count; i+=2)
|
for (int i=0; i<count; i+=2)
|
||||||
lcd_vline(x+2+i, BAR_Y+3, 3);
|
lcd_vline(x+2+i, BAR_Y+3, 3);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -302,7 +302,7 @@ void displayTopBar()
|
|||||||
lcd_filled_rect(BAR_X, BAR_Y, BAR_W, BAR_H, SOLID, FILL_WHITE|GREY_DEFAULT|ROUND);
|
lcd_filled_rect(BAR_X, BAR_Y, BAR_W, BAR_H, SOLID, FILL_WHITE|GREY_DEFAULT|ROUND);
|
||||||
|
|
||||||
/* The inside of the Batt gauge */
|
/* The inside of the Batt gauge */
|
||||||
uint8_t count = 10 * (g_vbat100mV - g_eeGeneral.vBatMin - 90) / (30 + g_eeGeneral.vBatMax - g_eeGeneral.vBatMin);
|
int count = 10 * (g_vbat100mV - g_eeGeneral.vBatMin - 90) / (30 + g_eeGeneral.vBatMax - g_eeGeneral.vBatMin);
|
||||||
displayTopBarGauge(BAR_BATT_X+FW, count, g_vbat100mV <= g_eeGeneral.vBatWarn);
|
displayTopBarGauge(BAR_BATT_X+FW, count, g_vbat100mV <= g_eeGeneral.vBatWarn);
|
||||||
|
|
||||||
/* The inside of the RSSI gauge */
|
/* The inside of the RSSI gauge */
|
||||||
|
|||||||
Reference in New Issue
Block a user