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':
ctrlCmdGet(cmd[1]);
break;
case 's':
ctrlCmdSet(cmd[1]);
break;
case 'c':
if (cmd[1] == 't') ctrlCmdCommit();
break;
default:
ctrlAddToTxBuffer('e');
}
ctrlAddToTxBuffer('.');
@ -281,6 +286,9 @@ void ctrlCmdGet(uint8_t cmd)
}
}
break;
default:
ctrlAddToTxBuffer('e');
}
}
@ -334,6 +342,9 @@ void ctrlCmdSet(uint8_t cmd)
event.brown_out = tmp16;
sei();
break;
default:
ctrlAddToTxBuffer('e');
}
}