x7 rssi indicator (#5205)
Draw horizontal bars next to Batt (only for FRSKY Telem)
This commit is contained in:
@@ -30,10 +30,10 @@
|
||||
#endif
|
||||
#define MODELNAME_X (2*FW-2)
|
||||
#define MODELNAME_Y (0)
|
||||
#define PHASE_X (6*FW-1)
|
||||
#define PHASE_X (6*FW-2)
|
||||
#define PHASE_Y (2*FH)
|
||||
#define PHASE_FLAGS 0
|
||||
#define VBATT_X (6*FW)
|
||||
#define VBATT_X (6*FW-1)
|
||||
#define VBATT_Y (2*FH)
|
||||
#define VBATTUNIT_X (VBATT_X-1)
|
||||
#define VBATTUNIT_Y (3*FH)
|
||||
@@ -47,9 +47,27 @@
|
||||
#define TRIM_LH_POS (TRIM_LH_X-4*FW)
|
||||
#define TRIM_RH_NEG (TRIM_RH_X+1*FW)
|
||||
#define TRIM_RH_POS (TRIM_RH_X-4*FW)
|
||||
#if defined(TELEMETRY_FRSKY) && defined(CPUARM)
|
||||
#define RSSSI_X (30)
|
||||
#define RSSSI_Y (31)
|
||||
#define RSSI_MAX 105
|
||||
#endif
|
||||
|
||||
#define TRIM_LEN 23
|
||||
|
||||
#if defined(TELEMETRY_FRSKY) && defined(CPUARM)
|
||||
void drawRSSIGauge()
|
||||
{
|
||||
uint8_t bar = (RSSI_MAX - g_model.rssiAlarms.getWarningRssi()) / 4;
|
||||
|
||||
for(uint8_t i=1; i<5; i++) {
|
||||
if((TELEMETRY_RSSI() - g_model.rssiAlarms.getWarningRssi()) > bar*(i-1)) {
|
||||
lcdDrawFilledRect(RSSSI_X + i*4, RSSSI_Y - 2*i, 3, 2*i, SOLID, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void drawPotsBars()
|
||||
{
|
||||
// Optimization by Mike Blandford
|
||||
@@ -453,10 +471,17 @@ void menuMainView(event_t event)
|
||||
displayVoltageOrAlarm();
|
||||
|
||||
// Timer 1
|
||||
drawTimerWithMode(120, 2*FH, 0);
|
||||
drawTimerWithMode(125, 2*FH, 0);
|
||||
|
||||
// Trims sliders
|
||||
displayTrims(mode);
|
||||
|
||||
#if defined(TELEMETRY_FRSKY) && defined(CPUARM)
|
||||
// RSSI gauge
|
||||
if (TELEMETRY_RSSI() > 0) {
|
||||
drawRSSIGauge();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if (view_base < VIEW_INPUTS) {
|
||||
|
||||
Reference in New Issue
Block a user