[Taranis] SWR implemented with popup when SWR > 0x33 (Tx antenna problem)

[Taranis] RSSI/A1/A2 alarms
[Taranis] Better code when no pulses sent (internal or external module). Thanks Mike!
[Taranis] Correction on DEBUG serial code
This commit is contained in:
bsongis@gmail.com
2013-05-15 07:57:21 +00:00
parent a4cfa395a8
commit 90be0bae10
19 changed files with 356 additions and 302 deletions
+26 -14
View File
@@ -4338,20 +4338,16 @@ enum menuModelTelemetryItems {
ITEM_TELEMETRY_A1_LABEL,
ITEM_TELEMETRY_A1_RANGE,
ITEM_TELEMETRY_A1_OFFSET,
#if !defined(PCBTARANIS)
ITEM_TELEMETRY_A1_ALARM1,
ITEM_TELEMETRY_A1_ALARM2,
#endif
ITEM_TELEMETRY_A2_LABEL,
ITEM_TELEMETRY_A2_RANGE,
ITEM_TELEMETRY_A2_OFFSET,
#if !defined(PCBTARANIS)
ITEM_TELEMETRY_A2_ALARM1,
ITEM_TELEMETRY_A2_ALARM2,
ITEM_TELEMETRY_RSSI_LABEL,
ITEM_TELEMETRY_RSSI_ALARM1,
ITEM_TELEMETRY_RSSI_ALARM2,
#endif
#if defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
ITEM_TELEMETRY_USR_LABEL,
#if !defined(PCBTARANIS)
@@ -4395,10 +4391,11 @@ enum menuModelTelemetryItems {
#if defined(FRSKY)
#if LCD_W >= 212
#define TELEM_COL1 (1*FW)
#define TELEM_COL2 (13*FW)
#define TELEM_COL3 (25*FW)
#define TELEM_COL2 (16*FW)
#define TELEM_COL3 (28*FW)
#define TELEM_BARS_COLMIN (3*FW+56)
#define TELEM_BARS_COLMAX (20*FW-3)
#define TELEM_SCRTYPE_COL (10*FW)
#else
#define TELEM_COL1 INDENT_WIDTH
#if defined(TRANSLATIONS_FR) || defined(TRANSLATIONS_CZ)
@@ -4408,11 +4405,12 @@ enum menuModelTelemetryItems {
#endif
#define TELEM_BARS_COLMIN (56-3*FW)
#define TELEM_BARS_COLMAX (14*FW-3)
#define TELEM_SCRTYPE_COL (10*FW)
#endif
#if defined(PCBTARANIS)
#define CHANNEL_ROWS (uint8_t)-1, 1, 0,
#define RSSI_ROWS
#define CHANNEL_ROWS (uint8_t)-1, 1, 0, 0, 0,
#define RSSI_ROWS (uint8_t)-1, 0, 0,
#else
#define CHANNEL_ROWS (uint8_t)-1, 1, 0, 2, 2,
#define RSSI_ROWS (uint8_t)-1, 1, 1,
@@ -4424,17 +4422,17 @@ void menuModelTelemetry(uint8_t event)
uint8_t sub = m_posVert - 1;
#if !defined(PCBTARANIS)
switch (event) {
case EVT_KEY_BREAK(KEY_DOWN):
case EVT_KEY_BREAK(KEY_UP):
#if !defined(PCBTARANIS)
case EVT_KEY_BREAK(KEY_LEFT):
case EVT_KEY_BREAK(KEY_RIGHT):
if (s_editMode>0 && sub<=ITEM_TELEMETRY_RSSI_ALARM2)
frskySendAlarms(); // update FrSky module when edit mode exited
#endif
break;
}
#endif
for (uint8_t i=0; i<LCD_LINES-1; i++) {
uint8_t y = 1 + 1*FH + i*FH;
@@ -4485,13 +4483,19 @@ void menuModelTelemetry(uint8_t event)
if (attr) channel.offset = checkIncDec(event, channel.offset, -256, 256, EE_MODEL);
break;
#if !defined(PCBTARANIS)
case ITEM_TELEMETRY_A1_ALARM1:
case ITEM_TELEMETRY_A1_ALARM2:
case ITEM_TELEMETRY_A2_ALARM1:
case ITEM_TELEMETRY_A2_ALARM2:
{
uint8_t j = ((k==ITEM_TELEMETRY_A1_ALARM1 || k==ITEM_TELEMETRY_A2_ALARM1) ? 0 : 1);
#if defined(PCBTARANIS)
lcd_putsLeft(y, (j==0 ? INDENT "Low Alarm" : INDENT "Critical Alarm"));
putsTelemetryChannel(TELEM_COL2, y, dest, channel.alarms_value[j], LEFT|attr);
if (attr && (s_editMode>0 || p1valdiff)) {
channel.alarms_value[j] = checkIncDec(event, channel.alarms_value[j], 0, 255, EE_MODEL);
}
#else
lcd_putsLeft(y, STR_ALARM);
lcd_putsiAtt(TELEM_COL2, y, STR_VALARM, ALARM_LEVEL(ch, j), m_posHorz<=0 ? attr : 0);
lcd_putsiAtt(TELEM_COL2+4*FW, y, STR_VALARMFN, ALARM_GREATER(ch, j), (m_posHorz<0 || m_posHorz==1) ? attr : 0);
@@ -4516,6 +4520,7 @@ void menuModelTelemetry(uint8_t event)
break;
}
}
#endif
break;
}
@@ -4526,6 +4531,13 @@ void menuModelTelemetry(uint8_t event)
case ITEM_TELEMETRY_RSSI_ALARM1:
case ITEM_TELEMETRY_RSSI_ALARM2: {
uint8_t j = k-ITEM_TELEMETRY_RSSI_ALARM1;
#if defined(PCBTARANIS)
lcd_putsLeft(y, (j==0 ? INDENT "Low Alarm" : INDENT "Critical Alarm"));
lcd_outdezNAtt(TELEM_COL2, y, getRssiAlarmValue(j), LEFT|attr, 3);
if (attr && (s_editMode>0 || p1valdiff)) {
CHECK_INCDEC_MODELVAR(event, g_model.frsky.rssiAlarms[j].value, -30, 30);
}
#else
lcd_putsLeft(y, STR_ALARM);
lcd_putsiAtt(TELEM_COL2, y, STR_VALARM, ((2+j+g_model.frsky.rssiAlarms[j].level)%4), m_posHorz<=0 ? attr : 0);
lcd_putc(TELEM_COL2+4*FW, y, '<');
@@ -4541,9 +4553,9 @@ void menuModelTelemetry(uint8_t event)
break;
}
}
#endif
break;
}
#endif
#if defined(FRSKY_HUB) || defined(WS_HOW_HIGH)
case ITEM_TELEMETRY_USR_LABEL:
@@ -4624,7 +4636,7 @@ void menuModelTelemetry(uint8_t event)
uint8_t screenIndex = (k < ITEM_TELEMETRY_SCREEN_LABEL2 ? 0 : (k < ITEM_TELEMETRY_SCREEN_LABEL3 ? 1 : 2));
bool screenType = IS_BARS_SCREEN(screenIndex);
putsStrIdx(0*FW, y, STR_SCREEN, screenIndex+1);
if (screenType != selectMenuItem(10*FW, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event))
if (screenType != selectMenuItem(TELEM_SCRTYPE_COL, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event))
g_model.frsky.screensType ^= (1 << screenIndex);
break;
}
@@ -4633,7 +4645,7 @@ void menuModelTelemetry(uint8_t event)
uint8_t screenIndex = (k < ITEM_TELEMETRY_SCREEN_LABEL2 ? 1 : 2);
bool screenType = g_model.frsky.screensType & screenIndex;
putsStrIdx(0*FW, y, STR_SCREEN, screenIndex);
if (screenType != selectMenuItem(10*FW, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event))
if (screenType != selectMenuItem(TELEM_SCRTYPE_COL, y, PSTR(""), STR_VSCREEN, screenType, 0, 1, attr, event))
g_model.frsky.screensType ^= screenIndex;
break;
}
+183 -188
View File
@@ -54,7 +54,7 @@ static uint8_t s_frsky_view = e_frsky_custom_screen_1;
#if LCD_W >= 212
void displayRssiLine()
{
if (frskyStreaming > 0) {
if (TELEMETRY_STREAMING()) {
lcd_hline(0, 55, 212, 0); // separator
uint8_t rssi = min((uint8_t)99, frskyData.rssi[1].value);
lcd_putsLeft(7*FH+1, STR_TX); lcd_outdezNAtt(4*FW, 7*FH+1, rssi, LEADING0, 2);
@@ -74,7 +74,7 @@ void displayRssiLine()
#else
void displayRssiLine()
{
if (frskyStreaming > 0) {
if (TELEMETRY_STREAMING()) {
lcd_hline(0, 55, 128, 0); // separator
uint8_t rssi = min((uint8_t)99, frskyData.rssi[1].value);
lcd_putsLeft(7*FH+1, STR_TX); lcd_outdezNAtt(4*FW, 7*FH+1, rssi, LEADING0, 2);
@@ -97,7 +97,7 @@ void displayRssiLine()
void displayGpsTime()
{
#define TIME_LINE (7*FH+1)
uint8_t att = (frskyStreaming > 0 ? LEFT|LEADING0 : LEFT|LEADING0|BLINK);
uint8_t att = (TELEMETRY_STREAMING() ? LEFT|LEADING0 : LEFT|LEADING0|BLINK);
lcd_outdezNAtt(6*FW+5, TIME_LINE, frskyData.hub.hour, att, 2);
lcd_putcAtt(8*FW+2, TIME_LINE, ':', att);
lcd_outdezNAtt(9*FW+2, TIME_LINE, frskyData.hub.min, att, 2);
@@ -193,203 +193,198 @@ void menuTelemetryFrsky(uint8_t event)
lcdDrawTelemetryTopBar();
if (frskyStreaming >= 0) {
if (s_frsky_view < MAX_FRSKY_SCREENS) {
FrSkyScreenData & screen = g_model.frsky.screens[s_frsky_view];
if (g_model.frsky.screensType & (1<<s_frsky_view)) {
// Custom Screen with gauges
uint8_t barHeight = 5;
for (int8_t i=3; i>=0; i--) {
FrSkyBarData & bar = screen.bars[i];
uint8_t source = bar.source;
getvalue_t barMin = convertTelemValue(source, bar.barMin);
getvalue_t barMax = convertTelemValue(source, 255-bar.barMax);
if (source && barMax > barMin) {
uint8_t y = barHeight+6+i*(barHeight+6);
lcd_putsiAtt(0, y+barHeight-5, STR_VTELEMCHNS, source, 0);
lcd_rect(25, y, 101, barHeight+2);
getvalue_t value = getValue(MIXSRC_FIRST_TELEM+source-2);
getvalue_t threshold = 0;
uint8_t thresholdX = 0;
if (source <= TELEM_TM2)
threshold = 0;
else if (source <= TELEM_RSSI_RX)
threshold = getRssiAlarmValue(source-TELEM_RSSI_TX);
else if (source <= TELEM_A2)
threshold = g_model.frsky.channels[source-TELEM_A1].alarms_value[0];
if (s_frsky_view < MAX_FRSKY_SCREENS) {
FrSkyScreenData & screen = g_model.frsky.screens[s_frsky_view];
if (g_model.frsky.screensType & (1<<s_frsky_view)) {
// Custom Screen with gauges
uint8_t barHeight = 5;
for (int8_t i=3; i>=0; i--) {
FrSkyBarData & bar = screen.bars[i];
uint8_t source = bar.source;
getvalue_t barMin = convertTelemValue(source, bar.barMin);
getvalue_t barMax = convertTelemValue(source, 255-bar.barMax);
if (source && barMax > barMin) {
uint8_t y = barHeight+6+i*(barHeight+6);
lcd_putsiAtt(0, y+barHeight-5, STR_VTELEMCHNS, source, 0);
lcd_rect(25, y, 101, barHeight+2);
getvalue_t value = getValue(MIXSRC_FIRST_TELEM+source-2);
getvalue_t threshold = 0;
uint8_t thresholdX = 0;
if (source <= TELEM_TM2)
threshold = 0;
else if (source <= TELEM_RSSI_RX)
threshold = getRssiAlarmValue(source-TELEM_RSSI_TX);
else if (source <= TELEM_A2)
threshold = g_model.frsky.channels[source-TELEM_A1].alarms_value[0];
#if defined(FRSKY_HUB)
else
threshold = convertTelemValue(source, barsThresholds[source-TELEM_ALT]);
else
threshold = convertTelemValue(source, barsThresholds[source-TELEM_ALT]);
#endif
if (threshold) {
thresholdX = barCoord(threshold, barMin, barMax);
if (thresholdX == 100)
thresholdX = 0;
}
uint8_t width = barCoord(value, barMin, barMax);
// reversed barshade for T1/T2
uint8_t barShade = ((threshold > value) ? DOTTED : SOLID);
if (source == TELEM_T1 || source == TELEM_T2)
barShade = -barShade;
lcd_filled_rect(26, y+1, width, barHeight, barShade);
for (uint8_t j=50; j<125; j+=25)
if (j>26+thresholdX || j>26+width) lcd_vline(j, y+1, barHeight);
if (thresholdX) {
lcd_vlineStip(26+thresholdX, y-2, barHeight+3, DOTTED);
lcd_hline(25+thresholdX, y-2, 3);
}
if (threshold) {
thresholdX = barCoord(threshold, barMin, barMax);
if (thresholdX == 100)
thresholdX = 0;
}
else {
barHeight += 2;
uint8_t width = barCoord(value, barMin, barMax);
// reversed barshade for T1/T2
uint8_t barShade = ((threshold > value) ? DOTTED : SOLID);
if (source == TELEM_T1 || source == TELEM_T2)
barShade = -barShade;
lcd_filled_rect(26, y+1, width, barHeight, barShade);
for (uint8_t j=50; j<125; j+=25)
if (j>26+thresholdX || j>26+width) lcd_vline(j, y+1, barHeight);
if (thresholdX) {
lcd_vlineStip(26+thresholdX, y-2, barHeight+3, DOTTED);
lcd_hline(25+thresholdX, y-2, 3);
}
}
displayRssiLine();
}
else {
// Custom Screen with numbers
uint8_t fields_count = 0;
for (uint8_t i=0; i<4; i++) {
for (uint8_t j=0; j<NUM_LINE_ITEMS; j++) {
uint8_t field = screen.lines[i].sources[j];
if (i==3 && j==0) {
#if LCD_W >= 212
lcd_vline(69, 8, 48);
lcd_vline(141, 8, 48);
#else
lcd_vline(63, 8, 48);
#endif
if (frskyStreaming > 0) {
#if defined(FRSKY_HUB)
if (field == TELEM_ACC) {
lcd_putsLeft(7*FH+1, STR_ACCEL);
lcd_outdezNAtt(4*FW, 7*FH+1, frskyData.hub.accelX, LEFT|PREC2);
lcd_outdezNAtt(10*FW, 7*FH+1, frskyData.hub.accelY, LEFT|PREC2);
lcd_outdezNAtt(16*FW, 7*FH+1, frskyData.hub.accelZ, LEFT|PREC2);
break;
}
else if (field == TELEM_GPS_TIME) {
displayGpsTime();
return;
}
#endif
}
else {
displayRssiLine();
return;
}
}
if (field) {
fields_count++;
getvalue_t value = getValue(MIXSRC_FIRST_TELEM+field-2);
uint8_t att = (i==3 ? NO_UNIT : DBLSIZE|NO_UNIT);
#if LCD_W >= 212
xcoord_t pos[] = {0, 71, 143, 214};
#else
xcoord_t pos[] = {0, 65, 130};
#endif
putsTelemetryChannel(pos[j+1]-2, 1+FH+2*FH*i, field-1, value, att);
#if LCD_W < 212
if (field >= TELEM_TM1 && field <= TELEM_TM2 && i!=3) {
// there is not enough space on LCD for displaying "Tmr1" or "Tmr2", we write "T1" or "T2" instead
field = field-TELEM_TM1+TELEM_T1;
}
#endif
lcd_putsiAtt(pos[j], 1+FH+2*FH*i, STR_VTELEMCHNS, field, 0);
}
}
else {
barHeight += 2;
}
lcd_status_line();
if (fields_count == 0)
putEvent(event == EVT_KEY_BREAK(KEY_UP) ? event : EVT_KEY_BREAK(KEY_DOWN));
}
}
else if (s_frsky_view == e_frsky_voltages) {
// Volts / Amps / Watts / mAh
uint8_t analog = 0;
lcd_putsiAtt(0, 2*FH, STR_VOLTSRC, g_model.frsky.voltsSource+1, 0);
switch(g_model.frsky.voltsSource) {
case 0:
case 1:
displayVoltageScreenLine(2*FH, g_model.frsky.voltsSource);
analog = 1+g_model.frsky.voltsSource;
break;
#if defined(FRSKY_HUB)
case 2:
putsTelemetryChannel(3*FW+6*FW+4, FH+1, TELEM_VFAS-1, frskyData.hub.vfas, DBLSIZE);
break;
case 3:
putsTelemetryChannel(3*FW+6*FW+4, FH+1, TELEM_CELLS_SUM-1, frskyData.hub.cellsSum, DBLSIZE);
break;
#endif
}
if (g_model.frsky.currentSource) {
lcd_putsiAtt(0, 4*FH, STR_VOLTSRC, g_model.frsky.currentSource, 0);
switch(g_model.frsky.currentSource) {
case 1:
case 2:
displayVoltageScreenLine(4*FH, g_model.frsky.currentSource-1);
break;
#if defined(FRSKY_HUB)
case 3:
putsTelemetryChannel(3*FW+6*FW+4, 3*FH+1, TELEM_CURRENT-1, frskyData.hub.current, DBLSIZE);
break;
#endif
}
putsTelemetryChannel(4, 5*FH+1, TELEM_POWER-1, frskyData.power, LEFT|DBLSIZE);
putsTelemetryChannel(3*FW+4+4*FW+6*FW+FW, 5*FH+1, TELEM_CONSUMPTION-1, frskyData.currentConsumption, DBLSIZE);
}
else {
displayVoltageScreenLine(analog > 0 ? 5*FH : 4*FH, analog ? 2-analog : 0);
if (analog == 0) displayVoltageScreenLine(6*FH, 1);
}
#if defined(FRSKY_HUB)
// Cells voltage
if (frskyData.hub.cellsCount > 0) {
uint8_t y = 1*FH;
for (uint8_t k=0; k<frskyData.hub.cellsCount && k<6; k++) {
uint8_t attr = (barsThresholds[THLD_CELL] && frskyData.hub.cellVolts[k] < barsThresholds[THLD_CELL]) ? BLINK|PREC2 : PREC2;
lcd_outdezNAtt(LCD_W, y, frskyData.hub.cellVolts[k] * 2, attr, 4);
y += 1*FH;
}
lcd_vline(LCD_W-3*FW-2, 8, 47);
}
#endif
displayRssiLine();
}
else {
// Custom Screen with numbers
uint8_t fields_count = 0;
for (uint8_t i=0; i<4; i++) {
for (uint8_t j=0; j<NUM_LINE_ITEMS; j++) {
uint8_t field = screen.lines[i].sources[j];
if (i==3 && j==0) {
#if LCD_W >= 212
lcd_vline(69, 8, 48);
lcd_vline(141, 8, 48);
#else
lcd_vline(63, 8, 48);
#endif
if (TELEMETRY_STREAMING()) {
#if defined(FRSKY_HUB)
else if (s_frsky_view == e_frsky_after_flight) {
uint8_t line=1*FH+1;
if (IS_USR_PROTO_FRSKY_HUB()) {
// Latitude
lcd_putsLeft(line, STR_LATITUDE);
displayGpsCoord(line, frskyData.hub.gpsLatitudeNS, frskyData.hub.gpsLatitude_bp, frskyData.hub.gpsLatitude_ap);
// Longitude
line+=1*FH+1;
lcd_putsLeft(line, STR_LONGITUDE);
displayGpsCoord(line, frskyData.hub.gpsLongitudeEW, frskyData.hub.gpsLongitude_bp, frskyData.hub.gpsLongitude_ap);
displayGpsTime();
line+=1*FH+1;
if (field == TELEM_ACC) {
lcd_putsLeft(7*FH+1, STR_ACCEL);
lcd_outdezNAtt(4*FW, 7*FH+1, frskyData.hub.accelX, LEFT|PREC2);
lcd_outdezNAtt(10*FW, 7*FH+1, frskyData.hub.accelY, LEFT|PREC2);
lcd_outdezNAtt(16*FW, 7*FH+1, frskyData.hub.accelZ, LEFT|PREC2);
break;
}
else if (field == TELEM_GPS_TIME) {
displayGpsTime();
return;
}
#endif
}
else {
displayRssiLine();
return;
}
}
if (field) {
fields_count++;
getvalue_t value = getValue(MIXSRC_FIRST_TELEM+field-2);
uint8_t att = (i==3 ? NO_UNIT : DBLSIZE|NO_UNIT);
#if LCD_W >= 212
xcoord_t pos[] = {0, 71, 143, 214};
#else
xcoord_t pos[] = {0, 65, 130};
#endif
putsTelemetryChannel(pos[j+1]-2, 1+FH+2*FH*i, field-1, value, att);
#if LCD_W < 212
if (field >= TELEM_TM1 && field <= TELEM_TM2 && i!=3) {
// there is not enough space on LCD for displaying "Tmr1" or "Tmr2", we write "T1" or "T2" instead
field = field-TELEM_TM1+TELEM_T1;
}
#endif
lcd_putsiAtt(pos[j], 1+FH+2*FH*i, STR_VTELEMCHNS, field, 0);
}
}
}
// Rssi
lcd_putsLeft(line, STR_MINRSSI);
lcd_puts(10*FW, line, STR_TX);
lcd_outdezNAtt(lcdLastPos, line, frskyData.rssi[1].min, LEFT|LEADING0, 2);
lcd_puts(16*FW, line, STR_RX);
lcd_outdezNAtt(lcdLastPos, line, frskyData.rssi[0].min, LEFT|LEADING0, 2);
lcd_status_line();
if (fields_count == 0)
putEvent(event == EVT_KEY_BREAK(KEY_UP) ? event : EVT_KEY_BREAK(KEY_DOWN));
}
}
else if (s_frsky_view == e_frsky_voltages) {
// Volts / Amps / Watts / mAh
uint8_t analog = 0;
lcd_putsiAtt(0, 2*FH, STR_VOLTSRC, g_model.frsky.voltsSource+1, 0);
switch(g_model.frsky.voltsSource) {
case 0:
case 1:
displayVoltageScreenLine(2*FH, g_model.frsky.voltsSource);
analog = 1+g_model.frsky.voltsSource;
break;
#if defined(FRSKY_HUB)
case 2:
putsTelemetryChannel(3*FW+6*FW+4, FH+1, TELEM_VFAS-1, frskyData.hub.vfas, DBLSIZE);
break;
case 3:
putsTelemetryChannel(3*FW+6*FW+4, FH+1, TELEM_CELLS_SUM-1, frskyData.hub.cellsSum, DBLSIZE);
break;
#endif
}
if (g_model.frsky.currentSource) {
lcd_putsiAtt(0, 4*FH, STR_VOLTSRC, g_model.frsky.currentSource, 0);
switch(g_model.frsky.currentSource) {
case 1:
case 2:
displayVoltageScreenLine(4*FH, g_model.frsky.currentSource-1);
break;
#if defined(FRSKY_HUB)
case 3:
putsTelemetryChannel(3*FW+6*FW+4, 3*FH+1, TELEM_CURRENT-1, frskyData.hub.current, DBLSIZE);
break;
#endif
}
putsTelemetryChannel(4, 5*FH+1, TELEM_POWER-1, frskyData.power, LEFT|DBLSIZE);
putsTelemetryChannel(3*FW+4+4*FW+6*FW+FW, 5*FH+1, TELEM_CONSUMPTION-1, frskyData.currentConsumption, DBLSIZE);
}
else {
displayVoltageScreenLine(analog > 0 ? 5*FH : 4*FH, analog ? 2-analog : 0);
if (analog == 0) displayVoltageScreenLine(6*FH, 1);
}
#if defined(FRSKY_HUB)
// Cells voltage
if (frskyData.hub.cellsCount > 0) {
uint8_t y = 1*FH;
for (uint8_t k=0; k<frskyData.hub.cellsCount && k<6; k++) {
uint8_t attr = (barsThresholds[THLD_CELL] && frskyData.hub.cellVolts[k] < barsThresholds[THLD_CELL]) ? BLINK|PREC2 : PREC2;
lcd_outdezNAtt(LCD_W, y, frskyData.hub.cellVolts[k] * 2, attr, 4);
y += 1*FH;
}
lcd_vline(LCD_W-3*FW-2, 8, 47);
}
#endif
displayRssiLine();
}
#if defined(FRSKY_HUB)
else if (s_frsky_view == e_frsky_after_flight) {
uint8_t line=1*FH+1;
if (IS_USR_PROTO_FRSKY_HUB()) {
// Latitude
lcd_putsLeft(line, STR_LATITUDE);
displayGpsCoord(line, frskyData.hub.gpsLatitudeNS, frskyData.hub.gpsLatitude_bp, frskyData.hub.gpsLatitude_ap);
// Longitude
line+=1*FH+1;
lcd_putsLeft(line, STR_LONGITUDE);
displayGpsCoord(line, frskyData.hub.gpsLongitudeEW, frskyData.hub.gpsLongitude_bp, frskyData.hub.gpsLongitude_ap);
displayGpsTime();
line+=1*FH+1;
}
// Rssi
lcd_putsLeft(line, STR_MINRSSI);
lcd_puts(10*FW, line, STR_TX);
lcd_outdezNAtt(lcdLastPos, line, frskyData.rssi[1].min, LEFT|LEADING0, 2);
lcd_puts(16*FW, line, STR_RX);
lcd_outdezNAtt(lcdLastPos, line, frskyData.rssi[0].min, LEFT|LEADING0, 2);
}
#endif
}
else {
lcd_putsAtt(22, 40, STR_NODATA, DBLSIZE);
}
}