Mercurial > templog
comparison main.c @ 83:b9179968a272
- 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 | 4a2a82d6302c |
children | 81b8c84344c4 |
comparison
equal
deleted
inserted
replaced
82:0f7c005b3f87 | 83:b9179968a272 |
---|---|
484 } | 484 } |
485 else if (strcmp_P(readbuf, PSTR("get_params")) == 0) | 485 else if (strcmp_P(readbuf, PSTR("get_params")) == 0) |
486 { | 486 { |
487 cmd_get_params(); | 487 cmd_get_params(); |
488 } | 488 } |
489 else if (strncmp_P(readbuf, PSTR("set_params "), | 489 else if (strncmp_P(readbuf, PSTR("set_params "), 11) == 0) |
490 strlen("set_params ") == 0)) | 490 { |
491 { | 491 cmd_set_params(&readbuf[11]); |
492 cmd_set_params(&readbuf[strlen("set_params ")]); | |
493 } | 492 } |
494 else if (strcmp_P(readbuf, PSTR("awake")) == 0) | 493 else if (strcmp_P(readbuf, PSTR("awake")) == 0) |
495 { | 494 { |
496 cmd_awake(); | 495 cmd_awake(); |
497 } | 496 } |
499 { | 498 { |
500 cmd_reset(); | 499 cmd_reset(); |
501 } | 500 } |
502 else | 501 else |
503 { | 502 { |
504 printf_P(PSTR("Bad command\n")); | 503 printf_P(PSTR("Bad command '%s'\n"), readbuf); |
505 } | 504 } |
506 } | 505 } |
507 | 506 |
508 ISR(INT0_vect) | 507 ISR(INT0_vect) |
509 { | 508 { |