mirror of
https://github.com/dexterbg/Twizy-Cfg.git
synced 2024-11-18 11:53:59 +00:00
- Checksum check fixed
- Login error stops preop mode attempt
This commit is contained in:
parent
8b51e02f6c
commit
53512ccf84
1 changed files with 3 additions and 3 deletions
|
@ -16,7 +16,7 @@
|
||||||
* https://www.gnu.org/licenses/lgpl.html
|
* 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 <EEPROM.h>
|
#include <EEPROM.h>
|
||||||
|
|
||||||
|
@ -201,7 +201,7 @@ bool exec(char *cmdline)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmd.mode >= modePreOp) {
|
if (!err && cmd.mode >= modePreOp) {
|
||||||
// enter config mode:
|
// enter config mode:
|
||||||
if (err = configmode(1)) {
|
if (err = configmode(1)) {
|
||||||
s = vehicle_twizy_fmt_err(s, err);
|
s = vehicle_twizy_fmt_err(s, err);
|
||||||
|
@ -352,7 +352,7 @@ bool exec(char *cmdline)
|
||||||
if (arguments = net_sms_nextarg(arguments))
|
if (arguments = net_sms_nextarg(arguments))
|
||||||
i = base64decode(arguments, (byte*)t);
|
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");
|
s = stp_rom(s, "ERROR: wrong checksum");
|
||||||
}
|
}
|
||||||
else if (arg[0] >= 1 && arg[0] <= 3) {
|
else if (arg[0] >= 1 && arg[0] <= 3) {
|
||||||
|
|
Loading…
Reference in a new issue