joeycastillo / Sensor-Watch

A board replacement for the classic Casio F-91W wristwatch
Other
1.16k stars 233 forks source link

Yellow LED constantly on for red board #407

Open rieck opened 3 months ago

rieck commented 3 months ago

The yellow LED on my red board stays on continuously, which typically signals an incorrect firmware version (color). However, I have compiled the firmware correctly using make COLOR=red, and the watch is actuially functioning normally. The only issue is that the yellow LED remains lit. It’s not due to a short circuit from the case, as the LED remains on even when connected to USB. Does anyone have any ideas about what might be causing this?

joeycastillo commented 3 months ago

Alas the issue is with uppercase vs lowercase: you have to make COLOR=RED for it to work.

Is there some make-fu we can use to make these lines case insensitive? Or uppercase whatever the input is?

rieck commented 3 months ago

Oh, thanks for the swift response!!

COLOR := $(shell echo $(COLOR) | awk '{print toupper($$0)}')

or

COLOR := $(shell echo $(COLOR) | tr '[:lower:]' '[:upper:]')

would be two options. They require the shell subcommand, which is not present in BSD make to my knowledge, and likely they both do not work on Windows.

wryun commented 3 months ago

I think the best thing to do is to have it abort if the COLOR line has an unrecognised colour.

chris-v8 commented 3 months ago

or modify the makefile to skip the COLOR argument, and always run it with your watch colour

orhun commented 3 months ago

I'm having the same issue. Is there way to turn this off for the pre-built firmware? Do I need to build the firmware with the flag?