Re: Knob "Momentum" #ubitx #v6

Reed N
 

Hi Ashhar,

I just tried pulling my code into Arduino IDE 1.6.6 and got the same warning:
uninitialized const member 'SettingScreen_t::AdditionalText'
At home I think I'm running Arduino IDE 1.8.8, or something around there. I can check tonight after work (currently on lunch break).

The line it failed on was where I tried to zero-initialize the struct using the shorthand. Apparently the compiler doesn't like that for some reason. I changed the first line of the runSettings(...) function in setup.cpp to read as follows:
SettingScreen_t screen = {0,0,0,0,0,0,0,0};
I then edited the IDE's compiler flags file (C:\Program Files (x86)\Arduino\hardware\arduino\avr\platform.txt) to read:
compiler.warning_flags.none=-w -fpermissive
And with those two changes, the code compiles on Arduino IDE 1.6.6!

That said, I'd recommend just updating to a newer version of the Arduino IDE.

I should also make a point of cleaning up compiler warnings in the future, since that's generally a good practice to have.


Reed

Join BITX20@groups.io to automatically receive all group messages.