
Originally Posted by
richard
ndays VAR BYTE [13] 'create an array with 12 byte location for months values
nday[0] = 0
nday[1] = 31
ndays[2] = 28
ndays[3] = 31
......
ndays[11] = 30
ndays[12] = 31
ps its easier to arraywrite ndays,[0,31,28....]
reason , when you get the month from the nmea sentence you will store the month as a number from 1 to 12
for the sake of one byte why add the complication of needing to calculate an offset into the lookup table ?
num_days_this_mth = ndays[month] where month = 1 to 12
all of these aliases are just a pointless typing exercise ,unless you have something else in mind for them
Bookmarks