Small corrections
This commit is contained in:
+1
-20
@@ -826,6 +826,7 @@ int16_t convertTelemValue(uint8_t channel, uint8_t value)
|
|||||||
result = value * 3;
|
result = value * 3;
|
||||||
break;
|
break;
|
||||||
case TELEM_ALT:
|
case TELEM_ALT:
|
||||||
|
case TELEM_GPSALT:
|
||||||
result = value * 4;
|
result = value * 4;
|
||||||
break;
|
break;
|
||||||
case TELEM_RPM:
|
case TELEM_RPM:
|
||||||
@@ -849,26 +850,6 @@ int16_t convertTelemValue(uint8_t channel, uint8_t value)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t att)
|
|
||||||
{
|
|
||||||
#ifdef IMPERIAL_UNITS
|
|
||||||
if (unit == UNIT_DEGREES) {
|
|
||||||
val += 18 ;
|
|
||||||
val *= 115 ;
|
|
||||||
val >>= 6 ;
|
|
||||||
}
|
|
||||||
if (unit == UNIT_METERS) {
|
|
||||||
// m to ft *105/32
|
|
||||||
val = val * 3 + ( val >> 2 ) + (val >> 5) ;
|
|
||||||
unit = UNIT_MAX;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att & (~NO_UNIT)); // TODO we could add this test inside lcd_outdezAtt!
|
|
||||||
if (~att & NO_UNIT && unit != UNIT_RAW)
|
|
||||||
lcd_putsiAtt(lcd_lastPos/*+1*/, y, STR_VTELEMUNIT, unit, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
static const pm_uint8_t bchunit_ar[] PROGMEM = {
|
static const pm_uint8_t bchunit_ar[] PROGMEM = {
|
||||||
UNIT_METERS, // Alt
|
UNIT_METERS, // Alt
|
||||||
UNIT_RAW, // Rpm
|
UNIT_RAW, // Rpm
|
||||||
|
|||||||
@@ -177,7 +177,6 @@ int16_t convertTelemValue(uint8_t channel, uint8_t value);
|
|||||||
NOINLINE uint8_t getRssiAlarmValue(uint8_t alarm);
|
NOINLINE uint8_t getRssiAlarmValue(uint8_t alarm);
|
||||||
|
|
||||||
void putsTelemetryChannel(uint8_t x, uint8_t y, uint8_t channel, int16_t val, uint8_t att);
|
void putsTelemetryChannel(uint8_t x, uint8_t y, uint8_t channel, int16_t val, uint8_t att);
|
||||||
void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t att);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -61,7 +61,7 @@ const pm_char STR_OPEN9X[] PROGMEM =
|
|||||||
ISTR(VFSWRESET)
|
ISTR(VFSWRESET)
|
||||||
ISTR(FUNCSOUNDS)
|
ISTR(FUNCSOUNDS)
|
||||||
ISTR(VTELEMCHNS)
|
ISTR(VTELEMCHNS)
|
||||||
#ifdef FRSKY
|
#if defined(FRSKY) || defined(PCBARM)
|
||||||
ISTR(VTELEMUNIT)
|
ISTR(VTELEMUNIT)
|
||||||
ISTR(VALARM)
|
ISTR(VALARM)
|
||||||
ISTR(VALARMFN)
|
ISTR(VALARMFN)
|
||||||
|
|||||||
+2
-2
@@ -78,7 +78,7 @@ extern const pm_char STR_OPEN9X[];
|
|||||||
#define OFS_VFSWRESET (OFS_VFSWFUNC + sizeof(TR_VFSWFUNC))
|
#define OFS_VFSWRESET (OFS_VFSWFUNC + sizeof(TR_VFSWFUNC))
|
||||||
#define OFS_FUNCSOUNDS (OFS_VFSWRESET + sizeof(TR_VFSWRESET))
|
#define OFS_FUNCSOUNDS (OFS_VFSWRESET + sizeof(TR_VFSWRESET))
|
||||||
#define OFS_VTELEMCHNS (OFS_FUNCSOUNDS + sizeof(TR_FUNCSOUNDS))
|
#define OFS_VTELEMCHNS (OFS_FUNCSOUNDS + sizeof(TR_FUNCSOUNDS))
|
||||||
#ifdef FRSKY
|
#if defined(FRSKY) || defined(PCBARM)
|
||||||
#define OFS_VTELEMUNIT (OFS_VTELEMCHNS + sizeof(TR_VTELEMCHNS))
|
#define OFS_VTELEMUNIT (OFS_VTELEMCHNS + sizeof(TR_VTELEMCHNS))
|
||||||
#define OFS_VALARM (OFS_VTELEMUNIT + sizeof(TR_VTELEMUNIT))
|
#define OFS_VALARM (OFS_VTELEMUNIT + sizeof(TR_VTELEMUNIT))
|
||||||
#define OFS_VALARMFN (OFS_VALARM + sizeof(TR_VALARM))
|
#define OFS_VALARMFN (OFS_VALARM + sizeof(TR_VALARM))
|
||||||
@@ -142,7 +142,7 @@ extern const pm_char STR_OPEN9X[];
|
|||||||
#define STR_FUNCSOUNDS (STR_OPEN9X + OFS_FUNCSOUNDS)
|
#define STR_FUNCSOUNDS (STR_OPEN9X + OFS_FUNCSOUNDS)
|
||||||
#define STR_VTELEMCHNS (STR_OPEN9X + OFS_VTELEMCHNS)
|
#define STR_VTELEMCHNS (STR_OPEN9X + OFS_VTELEMCHNS)
|
||||||
|
|
||||||
#ifdef FRSKY
|
#if defined(FRSKY) || defined(PCBARM)
|
||||||
#define STR_VTELEMUNIT (STR_OPEN9X + OFS_VTELEMUNIT)
|
#define STR_VTELEMUNIT (STR_OPEN9X + OFS_VTELEMUNIT)
|
||||||
#define STR_VALARM (STR_OPEN9X + OFS_VALARM)
|
#define STR_VALARM (STR_OPEN9X + OFS_VALARM)
|
||||||
#define STR_VALARMFN (STR_OPEN9X + OFS_VALARMFN)
|
#define STR_VALARMFN (STR_OPEN9X + OFS_VALARMFN)
|
||||||
|
|||||||
@@ -655,6 +655,27 @@ void incRotaryEncoder(uint8_t idx, int8_t inc)
|
|||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(FRSKY) || defined(PCBARM)
|
||||||
|
void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t att)
|
||||||
|
{
|
||||||
|
#ifdef IMPERIAL_UNITS
|
||||||
|
if (unit == UNIT_DEGREES) {
|
||||||
|
val += 18 ;
|
||||||
|
val *= 115 ;
|
||||||
|
val >>= 6 ;
|
||||||
|
}
|
||||||
|
if (unit == UNIT_METERS) {
|
||||||
|
// m to ft *105/32
|
||||||
|
val = val * 3 + ( val >> 2 ) + (val >> 5) ;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
lcd_outdezAtt(x, (att & DBLSIZE ? y - FH : y), val, att & (~NO_UNIT)); // TODO we could add this test inside lcd_outdezAtt!
|
||||||
|
if (~att & NO_UNIT && unit != UNIT_RAW)
|
||||||
|
lcd_putsiAtt(lcd_lastPos/*+1*/, y, STR_VTELEMUNIT, unit, 0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void clearKeyEvents()
|
void clearKeyEvents()
|
||||||
{
|
{
|
||||||
#ifdef SIMU
|
#ifdef SIMU
|
||||||
|
|||||||
@@ -847,5 +847,9 @@ extern union ReusableBuffer reusableBuffer;
|
|||||||
|
|
||||||
void checkFlashOnBeep();
|
void checkFlashOnBeep();
|
||||||
|
|
||||||
|
#if defined(FRSKY) || defined(PCBARM)
|
||||||
|
void putsTelemetryValue(uint8_t x, uint8_t y, int16_t val, uint8_t unit, uint8_t att);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif // gruvin9x_h
|
#endif // gruvin9x_h
|
||||||
/*eof*/
|
/*eof*/
|
||||||
|
|||||||
@@ -134,6 +134,8 @@
|
|||||||
#define TR_VTELPROTO "NoneHub WSHH"
|
#define TR_VTELPROTO "NoneHub WSHH"
|
||||||
#elif defined(FRSKY_HUB)
|
#elif defined(FRSKY_HUB)
|
||||||
#define TR_VTELPROTO "NoneHub "
|
#define TR_VTELPROTO "NoneHub "
|
||||||
|
#else
|
||||||
|
#define TR_VTELPROTO ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LEN_GPSFORMAT "\004"
|
#define LEN_GPSFORMAT "\004"
|
||||||
|
|||||||
@@ -129,6 +129,8 @@
|
|||||||
#define TR_VTELPROTO "NoneHub WSHH"
|
#define TR_VTELPROTO "NoneHub WSHH"
|
||||||
#elif defined(FRSKY_HUB)
|
#elif defined(FRSKY_HUB)
|
||||||
#define TR_VTELPROTO "NoneHub "
|
#define TR_VTELPROTO "NoneHub "
|
||||||
|
#else
|
||||||
|
#define TR_VTELPROTO ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LEN_GPSFORMAT "\004"
|
#define LEN_GPSFORMAT "\004"
|
||||||
|
|||||||
@@ -128,6 +128,8 @@
|
|||||||
#define TR_VTELPROTO "--- Hub WSHH"
|
#define TR_VTELPROTO "--- Hub WSHH"
|
||||||
#elif defined(FRSKY_HUB)
|
#elif defined(FRSKY_HUB)
|
||||||
#define TR_VTELPROTO "--- Hub "
|
#define TR_VTELPROTO "--- Hub "
|
||||||
|
#else
|
||||||
|
#define TR_VTELPROTO ""
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define LEN_GPSFORMAT "\004"
|
#define LEN_GPSFORMAT "\004"
|
||||||
|
|||||||
Reference in New Issue
Block a user