From 7fa15005ab82884881b65011caac4bc32f3bda99 Mon Sep 17 00:00:00 2001 From: bsongis Date: Fri, 16 Mar 2012 23:04:54 +0000 Subject: [PATCH] Cell value and negative Acc were wrong on Custom Telemetry View --- src/frsky.cpp | 8 +++++++- src/lcd.h | 2 +- src/open9x.cpp | 2 +- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/frsky.cpp b/src/frsky.cpp index 6810430ef..5911c221f 100644 --- a/src/frsky.cpp +++ b/src/frsky.cpp @@ -779,6 +779,12 @@ void putsTelemetryChannel(uint8_t x, uint8_t y, uint8_t channel, int16_t val, ui putsTelemetryValue(x, y, val, UNIT_VOLTS, att|PREC2); break; + case TELEM_ACCx-1: + case TELEM_ACCy-1: + case TELEM_ACCz-1: + putsTelemetryValue(x, y, val, UNIT_RAW, att|PREC2); + break; + default: putsTelemetryValue(x, y, val, pgm_read_byte(bchunit_ar+channel-2), att); break; @@ -893,9 +899,9 @@ void menuProcFrsky(uint8_t event) } } if (field) { - lcd_putsiAtt(j*65, 1+FH+2*FH*i, STR_VTELEMCHNS, field, 0); int16_t value = getValue(CSW_CHOUT_BASE+NUM_CHNOUT+MAX_TIMERS+field-1); putsTelemetryChannel(j ? 128 : 63, i==3 ? 1+7*FH : 1+2*FH+2*FH*i, field-1, value, i==3 ? NO_UNIT : DBLSIZE|NO_UNIT); + lcd_putsiAtt(j*65, 1+FH+2*FH*i, STR_VTELEMCHNS, field, 0); } } } diff --git a/src/lcd.h b/src/lcd.h index 98eecd3db..69dabc890 100644 --- a/src/lcd.h +++ b/src/lcd.h @@ -73,7 +73,7 @@ #define SWCONDENSED 0x80 /* means that THRm will be displayed as THR */ /* telemetry flags */ -#define NO_UNIT UNSIGN +#define NO_UNIT 0x40 /* other flags */ #define TWO_DOTS LEFT diff --git a/src/open9x.cpp b/src/open9x.cpp index fe7244e2c..7a6740df6 100644 --- a/src/open9x.cpp +++ b/src/open9x.cpp @@ -320,7 +320,7 @@ int16_t getValue(uint8_t i) else if(i