Skip to content

Commit e3c62df

Browse files
authored
Merge pull request #27 from Navatusein/dev
Added nil check for t3 and t5
2 parents 78bc180 + 0fd6dd0 commit e3c62df

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/t3-controller.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ function t3controller:new(transposerAddress)
4848
self.stateMachine.states.work.init = function()
4949
local currentCount = self.gtSensorParser:getNumber(4, "Polyaluminium Chloride consumed this cycle: §c")
5050

51-
if currentCount >= 900000 then
51+
if currentCount ~= nil and currentCount >= 900000 then
5252
self.stateMachine:setState(self.stateMachine.states.waitEnd)
5353
return
5454
end

src/t5-controller.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ function t5controller:new(plasmaTransposerAddress, coolantTransposerAddress)
4747
self.stateMachine.states.idle.init = function ()
4848
local temperature = self.gtSensorParser:getNumber(4, "Current temperature:")
4949

50-
if self.controllerProxy.hasWork() and temperature ~= 0 then
50+
if self.controllerProxy.hasWork() and temperature ~= nil and temperature ~= 0 then
5151
self.stateMachine:setState(self.stateMachine.states.waitEnd)
5252
end
5353
end

version.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
local versions = {
2-
programVersion = "1.0.3",
2+
programVersion = "1.0.4",
33
configVersion = 1
44
}
55

0 commit comments

Comments
 (0)