Dear all,
I just reflashed my SD card after becoming read-only (LM4). After the recovery, I updated to firmware 20200720.
After restoring my backup I noticed the common rscalc function I use to check if the sun is up is not working any more on my system.
I always get the following error:
Common functions:7: attempt to call global 'rscalc' (a nil value)
stack traceback:
Does anybody have an idea what this is causing?
Or does anybody know where the sourcecode of rscalc can be found to check what is going wrong?
thanks
I just reflashed my SD card after becoming read-only (LM4). After the recovery, I updated to firmware 20200720.
After restoring my backup I noticed the common rscalc function I use to check if the sun is up is not working any more on my system.
Code:
function sun_is_up()
-- returns number of minutes from 0:00 until sunrise and sunset
latitude = 57
longitude = 24.15
log('gerund')
sunrise, sunset = rscalc(latitude, longitude)
date = os.date('*t')
now = date.hour * 60 + date.min
-- from 0:00 to sunrise
if now < sunrise then
alert('before sunrise')
return false
-- from sunset to 23:59
elseif now > sunset then
alert('after sunset')
return false
else
alert('day')
return true
end
end
I always get the following error:
Common functions:7: attempt to call global 'rscalc' (a nil value)
stack traceback:
Does anybody have an idea what this is causing?
Or does anybody know where the sourcecode of rscalc can be found to check what is going wrong?
thanks