|
@@ -3,9 +3,7 @@
|
|
|
|
|
|
!! His schedule:
|
|
!! His schedule:
|
|
!RadomirLocCity tells us where Radomir is located
|
|
!RadomirLocCity tells us where Radomir is located
|
|
-! TODO. Later on in this file the schedule is described as:
|
|
|
|
-! !!Radomir is home Mon-Tues and Thurs from 18:00 for rest of night, Sat from 08:00 till 20:00, Sun all day
|
|
|
|
-! Which one is correct?
|
|
|
|
|
|
+
|
|
!locat['A154']
|
|
!locat['A154']
|
|
!----------------------------------------------
|
|
!----------------------------------------------
|
|
!locat['A154'] = 0 (Radomir not home Fri and Sat 20:00 for rest of night)
|
|
!locat['A154'] = 0 (Radomir not home Fri and Sat 20:00 for rest of night)
|
|
@@ -23,14 +21,19 @@
|
|
!! locat['A154'] = 3 An init should set this, bur here we want to preserve the current location.
|
|
!! locat['A154'] = 3 An init should set this, bur here we want to preserve the current location.
|
|
|
|
|
|
!! For the moment based on the standard schedule. Should be adjusted to City schedule.
|
|
!! For the moment based on the standard schedule. Should be adjusted to City schedule.
|
|
-
|
|
|
|
|
|
+! TODO-DONE. Fix for:
|
|
|
|
+!!Radomir is home Mon-Tues and Thurs from 18:00 for rest of night, Sat from 08:00 till 20:00, Sun all day
|
|
if week = 1:
|
|
if week = 1:
|
|
if hour >= 8 and hour < 17:
|
|
if hour >= 8 and hour < 17:
|
|
locat['A154'] = 9
|
|
locat['A154'] = 9
|
|
|
|
+ elseif hour > 18:
|
|
|
|
+ locat['A154'] = 3
|
|
end
|
|
end
|
|
elseif week = 2:
|
|
elseif week = 2:
|
|
if hour >= 8 and hour < 17:
|
|
if hour >= 8 and hour < 17:
|
|
locat['A154'] = 9
|
|
locat['A154'] = 9
|
|
|
|
+ elseif hour > 18:
|
|
|
|
+ locat['A154'] = 3
|
|
end
|
|
end
|
|
elseif week = 3:
|
|
elseif week = 3:
|
|
if hour >= 8 and hour < 17:
|
|
if hour >= 8 and hour < 17:
|
|
@@ -41,6 +44,8 @@ elseif week = 3:
|
|
elseif week = 4:
|
|
elseif week = 4:
|
|
if hour >= 8 and hour < 17:
|
|
if hour >= 8 and hour < 17:
|
|
locat['A154'] = 9
|
|
locat['A154'] = 9
|
|
|
|
+ elseif hour > 18:
|
|
|
|
+ locat['A154'] = 3
|
|
end
|
|
end
|
|
elseif week = 5:
|
|
elseif week = 5:
|
|
if hour >= 8 and hour < 17:
|
|
if hour >= 8 and hour < 17:
|
|
@@ -49,10 +54,13 @@ elseif week = 5:
|
|
locat['A154'] = 0
|
|
locat['A154'] = 0
|
|
end
|
|
end
|
|
elseif week = 6:
|
|
elseif week = 6:
|
|
- if hour >= 20:
|
|
|
|
|
|
+ if hour >= 8 and hour <20:
|
|
|
|
+ locat['A154'] = 3
|
|
|
|
+ elseif hour >= 20:
|
|
locat['A154'] = 0
|
|
locat['A154'] = 0
|
|
end
|
|
end
|
|
elseif week = 7:
|
|
elseif week = 7:
|
|
|
|
+ locat['A154'] = 3
|
|
end
|
|
end
|
|
|
|
|
|
if locat['A154'] > 0 and locat['A154'] < 8:
|
|
if locat['A154'] > 0 and locat['A154'] < 8:
|