The second telemetry screen reworked

This commit is contained in:
bsongis
2012-02-05 22:19:17 +00:00
parent f42596a2a7
commit d2cc0a3f02
5 changed files with 39 additions and 49 deletions
+32 -35
View File
@@ -426,6 +426,11 @@ void menuMainView(uint8_t event)
#ifdef WS_HOW_HIGH
else if (g_model.frsky.usrProto == PROTO_WS_HOW_HIGH && view == e_telemetry+2*ALTERNATE_VIEW) {
displayAltitudeLine(0, 4*FH, DBLSIZE);
lcd_puts_P(1*FW, 7*FH, STR_RX);
lcd_outdezAtt(4*FW, 7*FH, staticRSSI[0], LEFT);
lcd_puts_P(11*FW, 7*FH, STR_TX);
lcd_outdezAtt(14*FW, 7*FH, staticRSSI[1], LEFT);
lcd_filled_rect(0, 7*FH, DISPLAY_W, 8);
}
#endif
#ifdef FRSKY_HUB
@@ -495,53 +500,45 @@ void menuMainView(uint8_t event)
// lcd_outdezAtt(lcd_lastPos+2, 7*FH, frskyHubData.gpsAltitude_ap, LEFT|UNSIGN); // after '.'
}
else if (g_model.frsky.usrProto == PROTO_FRSKY_HUB && view == e_telemetry+2*ALTERNATE_VIEW) {
uint8_t y = 2*FH;
// Temperature 1
lcd_puts_P(0, y, STR_TEMP1);
putsTelemetryValue(lcd_lastPos, y, frskyHubData.temperature1, UNIT_DEGREES, LEFT);
y += FH;
lcd_puts_P(0, 4*FH, STR_TEMP1);
putsTelemetryValue(lcd_lastPos, 4*FH, frskyHubData.temperature1, UNIT_DEGREES, DBLSIZE|LEFT);
// Temperature 2
lcd_puts_P(0, y, STR_TEMP2);
putsTelemetryValue(lcd_lastPos, y, frskyHubData.temperature2, UNIT_DEGREES, LEFT);
y += 2*FH;
lcd_puts_P(11*FW, 4*FH, STR_TEMP2);
putsTelemetryValue(lcd_lastPos, 4*FH, frskyHubData.temperature2, UNIT_DEGREES, DBLSIZE|LEFT);
// RPM
lcd_puts_P(0, y, STR_RPM);
lcd_outdezNAtt(lcd_lastPos, y, frskyHubData.rpm, LEFT);
y += FH;
lcd_puts_P(0, 2*FH, STR_RPM);
lcd_outdezNAtt(lcd_lastPos, 1*FH, frskyHubData.rpm, DBLSIZE|LEFT);
// Fuel
lcd_puts_P(0, y, STR_FUEL);
lcd_outdezNAtt(lcd_lastPos, y, frskyHubData.fuelLevel, LEFT);
lcd_putc(lcd_lastPos, y, '%');
y += FH;
lcd_puts_P(10*FW, 2*FH, STR_FUEL);
lcd_outdezNAtt(lcd_lastPos, 1*FH, frskyHubData.fuelLevel, DBLSIZE|LEFT); // TODO putsTelemetry + UNIT_PERCENT
lcd_putc(lcd_lastPos, 2*FH, '%');
#if 0
// Volts
lcd_puts_P(0, y, STR_VOLTS);
lcd_outdezNAtt(lcd_lastPos, y, frskyHubData.volts, LEFT);
lcd_putc(lcd_lastPos, y, 'V');
y = 2*FH;
lcd_puts_P(10*FW, 7*FH, STR_VOLTS);
lcd_outdezNAtt(lcd_lastPos, 6*FH, frskyHubData.volts, DBLSIZE|LEFT); // TODO putsTelemetry?
lcd_putc(lcd_lastPos, 7*FH, 'V');
#endif
// Altitude (barometric)
displayAltitudeLine(12*FW, y, 0);
y += 2*FH;
displayAltitudeLine(0, 6*FH, DBLSIZE);
// Acceleromter
lcd_puts_P(11*FW, y, STR_ACCEL);
y += FH;
lcd_puts_P(11*FW, y, PSTR("x:"));
lcd_outdezNAtt(FW*17, y, (int32_t)frskyHubData.accelX * 100 / 256, PREC2);
lcd_putc(lcd_lastPos, y, 'g');
y += FH;
lcd_puts_P(11*FW, y, PSTR("y:"));
lcd_outdezNAtt(FW*17, y, (int32_t)frskyHubData.accelY * 100 / 256, PREC2);
lcd_putc(lcd_lastPos, y, 'g');
y += FH;
lcd_puts_P(11*FW, y, PSTR("z:"));
lcd_outdezNAtt(FW*17, y, (int32_t)frskyHubData.accelZ * 100 / 256, PREC2);
lcd_putc(lcd_lastPos, y, 'g');
// Accelerometer
lcd_puts_P(0, 7*FH, STR_ACCEL);
// lcd_puts_P(4*FW, 7*FH, PSTR("x:"));
lcd_outdezNAtt(4*FW, 7*FH, (int32_t)frskyHubData.accelX * 100 / 256, LEFT|PREC2);
// lcd_putc(lcd_lastPos, 7*FH, 'g');
// lcd_puts_P(11*FW, 7*FH, PSTR("y:"));
lcd_outdezNAtt(10*FW, 7*FH, (int32_t)frskyHubData.accelY * 100 / 256, LEFT|PREC2);
// lcd_putc(lcd_lastPos, 7*FH, 'g');
// lcd_puts_P(18*FW, 7*FH, PSTR("z:"));
lcd_outdezNAtt(16*FW, 7*FH, (int32_t)frskyHubData.accelZ * 100 / 256, LEFT|PREC2);
// lcd_putc(lcd_lastPos, 7*FH, 'g');
lcd_filled_rect(0, DATE_LINE, DISPLAY_W, 8);
}
#endif
else {
-2
View File
@@ -144,13 +144,11 @@ const pm_char STR_ALT[] PROGMEM = TR_ALT;
const pm_char STR_RXBATT[] PROGMEM = TR_RXBATT;
const pm_char STR_RX[] PROGMEM = TR_RX;
const pm_char STR_TX[] PROGMEM = TR_TX;
const pm_char STR_HDG[] PROGMEM = TR_HDG;
const pm_char STR_SPD[] PROGMEM = TR_SPD;
const pm_char STR_TEMP1[] PROGMEM = TR_TEMP1;
const pm_char STR_TEMP2[] PROGMEM = TR_TEMP2;
const pm_char STR_RPM[] PROGMEM = TR_RPM;
const pm_char STR_FUEL[] PROGMEM = TR_FUEL;
const pm_char STR_VOLTS[] PROGMEM = TR_VOLTS;
const pm_char STR_ACCEL[] PROGMEM = TR_ACCEL;
const pm_char STR_TELE[] PROGMEM = TR_TELE;
const pm_char STR_RSSI[] PROGMEM = TR_RSSI;
-2
View File
@@ -223,13 +223,11 @@ extern const pm_char STR_ALT[];
extern const pm_char STR_RXBATT[];
extern const pm_char STR_RX[];
extern const pm_char STR_TX[];
extern const pm_char STR_HDG[];
extern const pm_char STR_SPD[];
extern const pm_char STR_TEMP1[];
extern const pm_char STR_TEMP2[];
extern const pm_char STR_RPM[];
extern const pm_char STR_FUEL[];
extern const pm_char STR_VOLTS[];
extern const pm_char STR_ACCEL[];
extern const pm_char STR_TELE[];
extern const pm_char STR_RSSI[];
+3 -5
View File
@@ -212,14 +212,12 @@
#define TR_RXBATT "Rx Batt:"
#define TR_RX "Rx:"
#define TR_TX "Tx:"
#define TR_HDG "Hdg:"
#define TR_SPD "Spd:"
#define TR_TEMP1 "Temp1:"
#define TR_TEMP2 "Temp2:"
#define TR_TEMP1 "T@1:"
#define TR_TEMP2 "T@2:"
#define TR_RPM "RPM:"
#define TR_FUEL "Fuel:"
#define TR_VOLTS "Volts:"
#define TR_ACCEL "Accel"
#define TR_ACCEL "Acc:"
#define TR_TELE "Tele:"
#define TR_RSSI "RSSI:"
#define TR_NODATA "NO DATA"
+4 -5
View File
@@ -212,14 +212,13 @@
#define TR_RXBATT "Rx Batt:"
#define TR_RX "Rx:"
#define TR_TX "Tx:"
#define TR_HDG "Hdg:"
#define TR_SPD "Spd:"
#define TR_TEMP1 "Temp1:"
#define TR_TEMP2 "Temp2:"
#define TR_TEMP1 "T@1:"
#define TR_TEMP2 "T@2:"
#define TR_RPM "RPM:"
#define TR_FUEL "Fuel:"
#define TR_VOLTS "Volts:"
#define TR_ACCEL "Accel"
#define TR_VOLTS "Vlts:"
#define TR_ACCEL "Acc:"
#define TR_TELE "Tele:"
#define TR_RSSI "RSSI:"
#define TR_NODATA "NO DATA"