Skip to content

Commit

Permalink
[kermi] updated README.md & fixed typos from review
Browse files Browse the repository at this point in the history
Signed-off-by: Kai Neuhaus <[email protected]>
  • Loading branch information
KaaNee committed Nov 8, 2024
1 parent 4954570 commit 179f250
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,8 @@ public void initialize() {
}
ModbusCommunicationInterface localComms = connectEndpoint();
if (localComms == null) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Connection failure on initialize...");
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
"Connection failure on initialize...");
return;
}

Expand Down Expand Up @@ -272,24 +273,23 @@ public void initialize() {
pollTasks.add(chargingCircuitPoller);

ModbusReadRequestBlueprint energySourceRequest = new ModbusReadRequestBlueprint(slaveId,
ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, ENERGY_SOURCE_REG_START, ENERGY_SOURCE_REG_SIZE,
3);
ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, ENERGY_SOURCE_REG_START, ENERGY_SOURCE_REG_SIZE, 3);
energySourcePoller = localComms.registerRegularPoll(energySourceRequest, localConfig.refresh, 0,
this::handleEnergySourceResult, this::handleEnergySourceFailure);

pollTasks.add(energySourcePoller);

ModbusReadRequestBlueprint powerRequest = new ModbusReadRequestBlueprint(slaveId,
ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, POWER_REG_START, POWER_REG_SIZE, 3);
powerPoller = localComms.registerRegularPoll(powerRequest, localConfig.refresh, 0,
this::handlePowerResult, this::handlePowerFailure);
powerPoller = localComms.registerRegularPoll(powerRequest, localConfig.refresh, 0, this::handlePowerResult,
this::handlePowerFailure);

pollTasks.add(powerPoller);

if (localConfig.pvEnabled) {
ModbusReadRequestBlueprint pvRequest = new ModbusReadRequestBlueprint(slaveId,
ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, PV_MODULATION_REG_START,
PV_MODULATION_REG_SIZE, 3);
ModbusReadFunctionCode.READ_MULTIPLE_REGISTERS, PV_MODULATION_REG_START, PV_MODULATION_REG_SIZE,
3);
pvPoller = localComms.registerRegularPoll(pvRequest, localConfig.refresh, 0, this::handlePvResult,
this::handlePvFailure);

Expand Down Expand Up @@ -317,8 +317,7 @@ public void initialize() {
slaveId = slaveEndpointThingHandler.getSlaveId();
comms = slaveEndpointThingHandler.getCommunicationInterface();
} catch (EndpointNotInitializedException e) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR,
"Slave Endpoint not initialized");
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, "Slave Endpoint not initialized");
logger.debug("Slave Endpoint not initialized, Thing is offline");
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<label>Refresh Interval</label>
<description>Refresh Rate of Xcenter values in Milliseconds</description>
<default>5000</default>
<advanced>true</advanced>
<advanced>true</advanced>
</parameter>
<parameter name="pvEnabled" type="boolean">
<label>Read PV-Modulation States</label>
Expand Down

0 comments on commit 179f250

Please sign in to comment.