Update modbus_controller.cpp (#3768)

This commit is contained in:
Avirsaam 2022-09-05 03:50:27 +03:00 committed by Jesse Hills
parent d2ce62aa13
commit 39d493c278
No known key found for this signature in database
GPG Key ID: BEAAE804EFD8E83A

View File

@ -236,7 +236,7 @@ size_t ModbusController::create_register_ranges_() {
}
}
if (curr->start_address == r.start_address) {
if (curr->start_address == r.start_address && curr->register_type == r.register_type) {
// use the lowest non zero value for the whole range
// Because zero is the default value for skip_updates it is excluded from getting the min value.
if (curr->skip_updates != 0) {