¿ªÔÆÌåÓý

N8ME Firmware Day/Night Colors Switch Mod


 

On N8ME's v0.2, I am able to switch between two color "themes" for day and night (Red) by adding a hardware switch to the Arduino's analog pin A7 and an "If..Else" statement in display.cpp to select between two groups of colors. (I also made those variables not constants.)
?
All colors change depending on the switch position correctly EXCEPT the VFO colors*.
?
Since the VFO display goes through some code to determine which VFO is active, changing the colors is more complicated.
?
*If the VFO related color variables are defined outside of my If..Else function, you get those defined VFO colors. However, if those same variables are defined inside the function, they do not work and the VFO colors are black. Maybe its a scope or extern problem. I don't know. :)
?
The hardware switch wiring is just adding a 20k pull-up resistor between A7 and +5v on the CONTROLS header and the switch goes between A7 and GND. (I will include pics). Apparently A6 and A7 do not have internal pull-ups if I understand right.
?
If N8ME is OK with it, should I post my version and see if anyone wants to take a crack at getting the VFO colors to change with the switch?
?
?


 

It's been a while since I worked on this, I'm glad you're working with it. It's okay for you to post your updates.

I took a quick look at the code. The problem may be around line 383 in display.cpp where the VFO colors are stored in the VFO_COLORS array. That array, which is initialized with the VFO color constants are used to set the VFO colors, not the color constants directly.




On Thu, Jul 18, 2024 at 1:59?AM Ed K. via <edmk5000=[email protected]> wrote:
On N8ME's v0.2, I am able to switch between two color "themes" for day and night (Red) by adding a hardware switch to the Arduino's analog pin A7 and an "If..Else" statement in display.cpp to select between two groups of colors. (I also made those variables not constants.)
?
All colors change depending on the switch position correctly EXCEPT the VFO colors*.
?
Since the VFO display goes through some code to determine which VFO is active, changing the colors is more complicated.
?
*If the VFO related color variables are defined outside of my If..Else function, you get those defined VFO colors. However, if those same variables are defined inside the function, they do not work and the VFO colors are black. Maybe its a scope or extern problem. I don't know. :)
?
The hardware switch wiring is just adding a 20k pull-up resistor between A7 and +5v on the CONTROLS header and the switch goes between A7 and GND. (I will include pics). Apparently A6 and A7 do not have internal pull-ups if I understand right.
?
If N8ME is OK with it, should I post my version and see if anyone wants to take a crack at getting the VFO colors to change with the switch?
?
?


--
73,
Mark, N8ME


 

Thanks.
?
Maybe the color theme switch would also help the visually impaired by setting a "high contrast" mode too.
?
I'll be posting here soon.
?
?


 

--I deleted a previous reply because I significantly changed the intent that inolved a hardware modification to the v6 that is not required--
?
I was able to get all colors (including VFOs) to change to a second color pallet by holding the tuner button in while turning on the radio.
?
It is now posted in the Files section under the filename: uBITX_6_N8ME_2_Nite_HW.zip
?
I am not sure what the convention is for naming and documenting this modification of your code and will change the name and any other text to properly indicate that it is not your original release.
?
Ed
KY4IA
?
?
?


 

I just downloaded and installed your version on my uBitx V6, and it's much better than the stock firmware, great job!

I do have a question, looking through the code, and that's how do I add to the 5 memory slots? I am guessing they are for quick CW messages or possibly favorite frequencies, but I can't find any reference to them in the code, or on the menus / config.

-- -- J R Parrick (K0TBS)
Si vis pacem, para bellum!