scozzaro / sma-bluetooth

Automatically exported from code.google.com/p/sma-bluetooth
0 stars 0 forks source link

Patch for /almanac.c #95

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
lngHour: You do integer division so you need to cast to double first, or change 
15 to 15.0
tm_yday: is the previous day, not a big issue.

Original issue reported on code.google.com by terrebro...@gmail.com on 17 Aug 2012 at 8:44

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

Just a mistake in your code, i hope :)
Because your patch doesn't work for me !
you write : 
     t = loctime->(tm_yday + 1) + ((6 - lngHour) / 24);
And I think it could be :
     t = (loctime->tm_yday + 1) + ((6 - lngHour) / 24);

Like your next line : t = (loctime->tm_yday + 1) + ((18 - lngHour) / 24);

do you agree ?
regards

SoniX

Original comment by v3c...@gmail.com on 26 Sep 2012 at 8:56