02.12.2020, 09:01
What value exactly do you get in 32/1/4? Try adding log(value, x, y, z) before grp.write to check the variable contents.
Also getvalue() there is not needed since hours variable already contains the same value.
Also getvalue() there is not needed since hours variable already contains the same value.
Code:
if hours ~= nil then
grp.checkupdate('32/1/2', hours, 0.01)
else
return
end
hour = math.floor(hours)
minutes = string.format('%02d', math.floor((hours % 1) * 60))
text = hour .. ':' .. minutes
grp.write('32/1/4', text)