From a2dbee7d983cc6432634203c6db4c3ef341ad769 Mon Sep 17 00:00:00 2001 From: bsongis Date: Wed, 30 Apr 2014 15:54:57 +0200 Subject: [PATCH] Fixes #1012 --- radio/src/eeprom_conversions.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/eeprom_conversions.cpp b/radio/src/eeprom_conversions.cpp index 1454b12ce..cff0b1dae 100644 --- a/radio/src/eeprom_conversions.cpp +++ b/radio/src/eeprom_conversions.cpp @@ -387,8 +387,8 @@ int ConvertSwitch_215_to_216(int swtch) return -ConvertSwitch_215_to_216(-swtch); else if (swtch <= SWSRC_LAST_SWITCH) return swtch; - else if (swtch > SWSRC_LAST_SWITCH + 32) { - swtch -= (22+32); + else if (swtch > SWSRC_LAST_SWITCH + 32 + 1) { + swtch -= (SWSRC_LAST_SWITCH + 32 + 1); if (swtch > SWSRC_ON) swtch = 0; return swtch;