fix terminal read command

This commit is contained in:
MichaelDvP
2024-07-24 17:22:39 +02:00
parent bc7d848b9b
commit b2873fb901

View File

@@ -428,10 +428,9 @@ static void setup_commands(std::shared_ptr<Commands> & commands) {
to_app(shell).send_read_request(type_id, device_id, offset, length, true);
} else if (arguments.size() == 3) {
uint16_t offset = Helpers::hextoint(arguments.back().c_str());
to_app(shell).send_read_request(type_id, device_id, offset, EMS_MAX_TELEGRAM_LENGTH, true);
to_app(shell).send_read_request(type_id, device_id, offset, 0, true);
} else {
// send with length to send immediately and trigger publish read_id
to_app(shell).send_read_request(type_id, device_id, 0, EMS_MAX_TELEGRAM_LENGTH, true);
to_app(shell).send_read_request(type_id, device_id, 0, 0, true);
}
to_app(shell).set_read_id(type_id);
});