changeDevice
This commit is contained in:
@ -245,13 +245,17 @@ static bool changeDeviceCmd(uint8_t argc, char **args) {
|
||||
|
||||
bool retCode = makeDevice(1, argc, args, &deviceBlock);
|
||||
if (retCode) {
|
||||
sendString("Changed device would be:\n\r");
|
||||
sendString("Changed device will be:\n\r");
|
||||
sendFormatString(" Index: %d\n\r", index);
|
||||
sendFormatString(" Name: %s, Address: %d, Period: %d\n\r",
|
||||
deviceBlock.deviceName, deviceBlock.address, deviceBlock.period);
|
||||
for (uint8_t i = 0; i < MBUSDEVICE_NUM_OF_CONSIDEREDFIELDS; i++) {
|
||||
sendFormatString(" Considered field: %d\n\r", deviceBlock.consideredField[i]);
|
||||
}
|
||||
if (deviceBlock.period == 0) {
|
||||
sendString(" Device is marked as inactive\n\r");
|
||||
}
|
||||
eepromWriteDeviceBlock(index, &deviceBlock);
|
||||
}
|
||||
|
||||
return retCode;
|
||||
|
Reference in New Issue
Block a user