Shop OBEX P1 Docs P2 Docs Learn Events
GPSDemoV1.1.BS2 bug fix — Parallax Forums

GPSDemoV1.1.BS2 bug fix

zeit451zeit451 Posts: 1
edited 2009-02-11 16:01 in BASIC Stamp
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

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2009-02-11 16:01
    Thanks for the report. We will look into this. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
Sign In or Register to comment.