incomplete changeDevice
This commit is contained in:
@ -221,6 +221,13 @@ static bool changeDeviceCmd(uint8_t argc, char **args) {
|
||||
return makeDevice(0, argc, args, NULL);
|
||||
}
|
||||
|
||||
long int rawIndex = strtol(args[1], NULL, 10);
|
||||
if (rawIndex < 0 || rawIndex > getConfig()->numOfDeviceBlocks) {
|
||||
sendFormatString("illegal index, must be greater 0 and less %d\n\r", getConfig()->numOfDeviceBlocks);
|
||||
return false;
|
||||
}
|
||||
uint8_t index = (uint8_t) rawIndex;
|
||||
|
||||
t_deviceBlock deviceBlock;
|
||||
uint8_t index;
|
||||
bool retCode = makeDevice(1, argc, args, &deviceBlock);
|
||||
|
Reference in New Issue
Block a user