Mercurial > templog
diff main.c @ 389:5e3880342390
- fix set_params (strange)
- allow overriding settings in another config file
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Wed, 11 Jul 2012 23:37:13 +0800 |
parents | 1ee4485b59a2 |
children | 81b8c84344c4 |
line wrap: on
line diff
--- a/main.c Wed Jul 11 22:50:23 2012 +0800 +++ b/main.c Wed Jul 11 23:37:13 2012 +0800 @@ -486,10 +486,9 @@ { cmd_get_params(); } - else if (strncmp_P(readbuf, PSTR("set_params "), - strlen("set_params ") == 0)) + else if (strncmp_P(readbuf, PSTR("set_params "), 11) == 0) { - cmd_set_params(&readbuf[strlen("set_params ")]); + cmd_set_params(&readbuf[11]); } else if (strcmp_P(readbuf, PSTR("awake")) == 0) { @@ -501,7 +500,7 @@ } else { - printf_P(PSTR("Bad command\n")); + printf_P(PSTR("Bad command '%s'\n"), readbuf); } }