From 53512ccf84e10c20a0bb09e056873ad1176759b8 Mon Sep 17 00:00:00 2001 From: Michael Balzer Date: Sat, 1 Jul 2017 11:10:58 +0200 Subject: [PATCH] - Checksum check fixed - Login error stops preop mode attempt --- TwizyCfg/TwizyCfg.ino | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/TwizyCfg/TwizyCfg.ino b/TwizyCfg/TwizyCfg.ino index 077a513..65e2bf1 100644 --- a/TwizyCfg/TwizyCfg.ino +++ b/TwizyCfg/TwizyCfg.ino @@ -16,7 +16,7 @@ * https://www.gnu.org/licenses/lgpl.html * */ -#define TWIZY_CFG_VERSION "V2.0 (2017-06-25)" +#define TWIZY_CFG_VERSION "V2.0.1 (2017-07-01)" #include @@ -201,7 +201,7 @@ bool exec(char *cmdline) } } - if (cmd.mode >= modePreOp) { + if (!err && cmd.mode >= modePreOp) { // enter config mode: if (err = configmode(1)) { s = vehicle_twizy_fmt_err(s, err); @@ -352,7 +352,7 @@ bool exec(char *cmdline) if (arguments = net_sms_nextarg(arguments)) i = base64decode(arguments, (byte*)t); - if (t[0] != vehicle_twizy_cfg_calc_checksum((BYTE *)t)) { + if ((BYTE) t[0] != vehicle_twizy_cfg_calc_checksum((BYTE *)t)) { s = stp_rom(s, "ERROR: wrong checksum"); } else if (arg[0] >= 1 && arg[0] <= 3) {