comparison tempctrl.c @ 69:3dcf933f2640

Write the sub command into the right variable (oops). Now you can set the ROM IDs.
author darius@Inchoate
date Mon, 19 Jan 2009 22:53:40 +1030
parents ac45a96e8034
children ea5862987368
comparison
equal deleted inserted replaced
68:ac45a96e8034 69:3dcf933f2640
573 #endif 573 #endif
574 if (!strcasecmp_P(cmd, PSTR("ferm")) || 574 if (!strcasecmp_P(cmd, PSTR("ferm")) ||
575 !strcasecmp_P(cmd, PSTR("frg")) || 575 !strcasecmp_P(cmd, PSTR("frg")) ||
576 !strcasecmp_P(cmd, PSTR("amb"))) { 576 !strcasecmp_P(cmd, PSTR("amb"))) {
577 577
578 if (sscanf_P((char *)cmd, PSTR("tc %5s %hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx"), cmd, 578 if (sscanf_P(buf, PSTR("tc %5s %hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx:%hhx"), cmd,
579 &ROM[0], &ROM[1], &ROM[2], &ROM[3], 579 &ROM[0], &ROM[1], &ROM[2], &ROM[3],
580 &ROM[4], &ROM[5], &ROM[6], &ROM[7]) != 9) { 580 &ROM[4], &ROM[5], &ROM[6], &ROM[7]) != 9) {
581 printf_P(PSTR("Unable to parse ROM ID\r\n")); 581 printf_P(PSTR("Unable to parse ROM ID\r\n"));
582 } else { 582 } else {
583 if (!strcasecmp_P(cmd, PSTR("ferm"))) 583 if (!strcasecmp_P(cmd, PSTR("ferm")))