avr: return an [e]rror in case of an unrecognized command

This commit is contained in:
Bart Van Der Meerssche 2010-12-29 16:22:01 +01:00
parent 20a13be0d3
commit db42f36f91
1 changed files with 11 additions and 0 deletions

View File

@ -215,12 +215,17 @@ void ctrlDecode(void)
case 'g': case 'g':
ctrlCmdGet(cmd[1]); ctrlCmdGet(cmd[1]);
break; break;
case 's': case 's':
ctrlCmdSet(cmd[1]); ctrlCmdSet(cmd[1]);
break; break;
case 'c': case 'c':
if (cmd[1] == 't') ctrlCmdCommit(); if (cmd[1] == 't') ctrlCmdCommit();
break; break;
default:
ctrlAddToTxBuffer('e');
} }
ctrlAddToTxBuffer('.'); ctrlAddToTxBuffer('.');
@ -281,6 +286,9 @@ void ctrlCmdGet(uint8_t cmd)
} }
} }
break; break;
default:
ctrlAddToTxBuffer('e');
} }
} }
@ -334,6 +342,9 @@ void ctrlCmdSet(uint8_t cmd)
event.brown_out = tmp16; event.brown_out = tmp16;
sei(); sei();
break; break;
default:
ctrlAddToTxBuffer('e');
} }
} }