From 35eb25d46eb07056d2371f68fad0f8c97c32695f Mon Sep 17 00:00:00 2001 From: Damjan Adamic Date: Sun, 16 Nov 2014 20:12:58 +0100 Subject: [PATCH] Conditon was always true --- radio/src/gui/menu_model.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/menu_model.cpp b/radio/src/gui/menu_model.cpp index 5288efcf7..f0907f670 100644 --- a/radio/src/gui/menu_model.cpp +++ b/radio/src/gui/menu_model.cpp @@ -6220,8 +6220,9 @@ void menuModelTelemetry(uint8_t event) lcd_putsAtt(0, y, STR_TELEMETRY_NEWSENSOR, attr); if (attr && event==EVT_KEY_BREAK(KEY_ENTER)) { s_editMode = 0; - s_currIdx = availableTelemetryIndex(); - if (s_currIdx >= 0) { + int res = availableTelemetryIndex(); + if (res >= 0) { + s_currIdx = res; pushMenu(menuModelSensor); } }