|
|
@ -52,8 +52,12 @@ public class ResHeatingTubeRackSlotManager extends DiResourceManagerBase { |
|
|
|
public void refreshSlotTemperature() { |
|
|
|
var registers = this.getDevice().getRegisters(); |
|
|
|
for (ResHeatingTubeRackSlot slot : this.slots) { |
|
|
|
slot.temperature = registers.getValue("HeatingPlateSlotTemperature" + slot.index); |
|
|
|
LOG.info("[Heating Slot {}] temperature: {}", slot.index, slot.temperature); |
|
|
|
try { |
|
|
|
slot.temperature = registers.getValue("HeatingPlateSlotTemperature" + slot.index); |
|
|
|
LOG.info("[Heating Slot {}] temperature: {}", slot.index, slot.temperature); |
|
|
|
} catch (Exception e) { |
|
|
|
LOG.error("Failed to get temperature for slot {}", slot.index, e); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
@ -77,7 +81,7 @@ public class ResHeatingTubeRackSlotManager extends DiResourceManagerBase { |
|
|
|
} |
|
|
|
throw new RuntimeException("暂无空闲试管架位置"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// get slot by index |
|
|
|
public ResHeatingTubeRackSlot getSlotByIndex( Integer index ) { |
|
|
|
return this.slots.get(index); |
|
|
@ -91,7 +95,7 @@ public class ResHeatingTubeRackSlotManager extends DiResourceManagerBase { |
|
|
|
// get slot at liquid plate |
|
|
|
public ResHeatingTubeRackSlot getSlotAtLiquidPlate() { |
|
|
|
for (ResHeatingTubeRackSlot slot : this.slots) { |
|
|
|
if (slot.rackPosition.equals(ResHeatingTubeRackSlot.LOCATION_LIQUID_PLATE)) { |
|
|
|
if (ResHeatingTubeRackSlot.LOCATION_LIQUID_PLATE.equals(slot.rackPosition)) { |
|
|
|
return slot; |
|
|
|
} |
|
|
|
} |
|
|
|