GuruSR/Watchy_GSR

looks like some serious typos in Watchy_GSR.cpp

Closed this issue · 3 comments

Near line 1223:

D = WatchTime.Local.Wday + 1; // 2.1
H - WatchTime.Local.Hour;   // 2.1
BatOk = (Battery.Last == 0 || Battery.Last > Battery.LowLevel);

Guessing that should be:

H = WatchTime.Local.Hour;

I also saw on line 1162

if (O > "")

which involves some weird C++ idiom. Should it be O.length == 0 or something more explicit?

GuruSR commented

I fixed the H = typo, actually found that a while ago and I guess didn't re-edit the file here to fix it too, 1.4.7 has that fixed, it was caused by going back and forth between SmallRTC 2.1 and 3.0.

The (O > "") works because it's an expression, if O > empty string, ... O.length > 0 is the same thing, not sure which is faster.

Either way, those are alright now. Thanks for noticing those.

GuruSR commented

Fixed in 1.4.7.