Minor bug in v355 firmware

More
1 year 6 months ago #9310 by BS_Jim
Hi Ian,

In the 12hr. display mode I noticed that the PM decimal indicator doesn't come on until 1PM. It should turn on 1 hour earlier at 12PM. I haven't checked on the status at 12AM (00:00 in 24hr. mode) but I suspect it is alright.

I tried playing around with the code to fix it but was unsuccessful. Maybe if you have the time you could update it in your next code release.

Jim

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #9311 by Ty_Eeberfest
Should just be a matter of searching for this:
// AM/PM indicator
  if (hourMode) {
    dpArray[1] = (hour() > 12);
  }

and changing to:
// AM/PM indicator
  if (hourMode) {
    dpArray[1] = (hour() >= 12);
  }

Look into it later when the dust is clearing off the crater.

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago - 1 year 6 months ago #9312 by Ty_Eeberfest
Okay, now I'm gonna get (unreasonably??) picky. With the code as written, if the user were to switch from 12- to 24-hour mode while the PM indicator was lit, it looks like it would get "orphaned" in a permanently lit state (until next reboot at least). So I humbly recommend for the next release:
  // AM/PM indicator
  if (hourMode) {
    dpArray[1] = (hour() >= 12);
  }
  else {
    dpArray[1] = false;  
  }

Or for those who like it cryptic:
  // AM/PM indicator
  dpArray[1] = (hourMode && (hour() >= 12));

Look into it later when the dust is clearing off the crater.
Last edit: 1 year 6 months ago by Ty_Eeberfest.
The following user(s) said Thank You: BS_Jim

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #9313 by BS_Jim
Replied by BS_Jim on topic Minor bug in v355 firmware
Thanks Ty,

I had played with that earlier by changing it to
// AM/PM indicator
  if (hourMode) {
    dpArray[1] = (hour() > 11);
  }
but I didn't notice that my clock reset to 24hr mode and I thought it didn't work. I used your recommendation and uploaded it into my clock just a few minutes ago and tested it out with various time zone settings. All seems good.

I know just enough about code to get into trouble so I appreciate your time.

Jim

Please Log in or Create an account to join the conversation.

More
1 year 6 months ago #9322 by Ian
Replied by Ian on topic Minor bug in v355 firmware
That's not at all unreasonable. I'll put it in there!

Thanks for that!

Please Log in or Create an account to join the conversation.

Moderators: AccutronTy_EeberfestIan
Time to create page: 0.160 seconds

Search

Tube Suppliers

Go to top
JSN Boot template designed by JoomlaShine.com