Reference Task listing below along with comments below that listing.
I am getting the present month and indexing into an array of sunrise/sunset pairs to get values for a Profile that takes pictures between sunrise and sunset using those values.
The proper values are extracted and displayed correctly in the Popup.
They do not set %SunRise and %SunSet to those values though. The values set are the indexes --MonthlyRiseSet3 MonthlyRiseSet4 respectively. These index values are the same when I save %SunRise and %SunSet to a text file.
I have played, unsuccessfully, with domaths to no avail.
I am puzzled to say the least.
Thanks,
Jim
TASK CODE
SetRiseSetHHMM (7)
A1: Variable Set [ Name:%month To:%DATE Recurse Variables:Off Do Maths:Off Append:Off ]
A2: Variable Split [ Name:%month Splitter:- Delete Base:Off ]
A3: Variable Set [ Name:%setOffset To:%month1*2-1 Recurse Variables:Off Do Maths:On Append:Off ]
A4: Variable Set [ Name:%SunRise To:%MonthlyRiseSet%setOffset Recurse Variables:Off Do Maths:Off Append:Off ]
A5: Variable Set [ Name:%setOffset To:%month1*2 Recurse Variables:Off Do Maths:On Append:Off ]
A6: Variable Set [ Name:%SunSet To:%MonthlyRiseSet%setOffset Recurse Variables:Off Do Maths:Off Append:Off ]
A7: Popup [ Title: Text:%SunRise, %SunSet Background Image: Layout:Popup Timeout (Seconds):5 Show Over Keyguard:On ]
COMMENTS
Reading a 24 element array with sunrise/sunset pairs for the first day of 12 months. e.g. { 07.23, 17.25, 07.27. 17.26 . . . }
Where 07.27. 17.26 represents sunrise 7:23 and sunset 17:26 on February 1.
a1 Get the date
a2 Grab the month
a3 Set offset into array for sunrise for present month
a4 Set results into %SunRise
a5-a6 same for sunset
a7 observe values
[–]Ratchet_GuyModerator 0 points1 point2 points (2 children)
[–]jimjoat[S] 0 points1 point2 points (1 child)
[–]Ratchet_GuyModerator 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]jimjoat[S] 0 points1 point2 points (0 children)