GPSDemoV1.1.BS2 bug fix
zeit451
Posts: 1
Bug in Location_Lags when Greenwich 2-1 and USA 1-31 results in day being 0
[noparse][[/noparse]original code]
Location_Lags:············································· ' west of Greenwich
· day = day - 1············································ ' adjust day
· IF (day > 0) THEN Adjust_Time···························· ' same month?
· month = month - 1
· IF (month > 0) THEN Adjust_Time·························· ' same year?
· month = 1················································ ' no, set to January
· eeAddr = DaysInMon * (month - 1)
· READ eeAddr, day········································· ' get new day
· year = year + 99 // 100·································· ' set to previous year
[noparse][[/noparse]fixed code]
Location_Lags:············································· ' west of Greenwich
· day = day - 1············································ ' adjust day
· IF (day > 0) THEN Adjust_Time···························· ' same month?
· month = month - 1
· IF (month = 0) THEN······································ ' same year?
··· month = 1·············································· ' no, set to January
··· year = year + 99 // 100································ ' set to previous year
· ENDIF
· eeAddr = DaysInMon + (month - 1)
· READ eeAddr, day········································· ' get new day
[noparse][[/noparse]original code]
Location_Lags:············································· ' west of Greenwich
· day = day - 1············································ ' adjust day
· IF (day > 0) THEN Adjust_Time···························· ' same month?
· month = month - 1
· IF (month > 0) THEN Adjust_Time·························· ' same year?
· month = 1················································ ' no, set to January
· eeAddr = DaysInMon * (month - 1)
· READ eeAddr, day········································· ' get new day
· year = year + 99 // 100·································· ' set to previous year
[noparse][[/noparse]fixed code]
Location_Lags:············································· ' west of Greenwich
· day = day - 1············································ ' adjust day
· IF (day > 0) THEN Adjust_Time···························· ' same month?
· month = month - 1
· IF (month = 0) THEN······································ ' same year?
··· month = 1·············································· ' no, set to January
··· year = year + 99 // 100································ ' set to previous year
· ENDIF
· eeAddr = DaysInMon + (month - 1)
· READ eeAddr, day········································· ' get new day
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering