root: add rest of sensors as static project. Modbus: debug additions
This commit is contained in:
@@ -22,6 +22,10 @@ int ModbusRegister::read() {
|
||||
void ModbusRegister::write(int value)
|
||||
{
|
||||
// write only if not
|
||||
if(hr) m->writeSingleRegister(addr, value); // not checking if write succeeds
|
||||
volatile uint8_t error = 15;
|
||||
if(hr)
|
||||
error = m->writeSingleRegister(addr, value);
|
||||
error++;
|
||||
error--;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user