mirror of
https://github.com/node-red/node-red-nodes.git
synced 2023-10-10 13:36:58 +02:00
Update suncalc to match module api changes
This commit is contained in:
parent
ec3c36dfdd
commit
4b3db1e780
@ -38,7 +38,7 @@ function SunNode(n) {
|
||||
var mins2 = times[node.end].getUTCMinutes();
|
||||
var e1 = (hour*60+mins) - (hour1*60+mins1);
|
||||
var e2 = (hour*60+mins) - (hour2*60+mins2);
|
||||
var moon = parseInt(SunCalc.getMoonFraction(now)*100)/100;
|
||||
var moon = SunCalc.getMoonIllumination(now).fraction;
|
||||
msg = { payload:0, topic:"sun", moon:moon };
|
||||
if ((e1 > 0) & (e2 < 0)) { msg.payload = 1; }
|
||||
if (oldval == null) { oldval = msg.payload; }
|
||||
|
Loading…
Reference in New Issue
Block a user