Fast
This commit is contained in:
parent
91cd1de85e
commit
6d1bd77f19
2 changed files with 7 additions and 5 deletions
|
|
@ -44,6 +44,8 @@ void Dtu::populateMicroinverters() {
|
|||
int portStartAddress = 0x4000;
|
||||
uint16_t registers[19];
|
||||
|
||||
modbus_set_debug(this->modbus, 1);
|
||||
|
||||
int registerCount;
|
||||
registerCount = modbus_read_registers(this->modbus, portStartAddress, 19, registers);
|
||||
|
||||
|
|
@ -51,10 +53,10 @@ void Dtu::populateMicroinverters() {
|
|||
return;
|
||||
}
|
||||
|
||||
while (registerCount != -1) {
|
||||
if(registers[0] != 12) {
|
||||
break;
|
||||
}
|
||||
while (portStartAddress <= (0x4000 + 0x0019*99)) {
|
||||
// if(registers[0] != 12) {
|
||||
// break;
|
||||
// }
|
||||
|
||||
Port port{portStartAddress};
|
||||
port.setParametersFromMicroinverterArray(registers, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue