I was hoping to use an off the shelf menu system for one of my projects, this one seemed to offer some of the best features:
https://github.com/neu-rah/ArduinoMenu
It claimed to work on Teensy so I was hopeful that it would work with STM32
Anyway whilst compiling I get this error:
menuBase.cpp:50:76: error: in C++98 'defaultOptions' must be initialized by constructor, not by '{...}'
config defaultOptions={'>','-',false,false,Menu::defaultNavCodes,false,true};
mapleMini.build.cpu_flags=-DMCU_STM32F103CB -DSERIAL_USB -std=gnu++11
The Mini Crashes as soon as any of the input buttons are pressed.
Suspect this is because the menu code overloads a lot of functions.
Other code works fine with the uplifted c++ standard so it’s just this menu system, ah well. The joys of being on the fringe.
Perhaps those with more experience may be able to assist?
When a button is pressed the menu fires this event
result action1(eventMask e,navNode& nav, prompt &item) {
Serial<<e<<" event on "<<item<<", proceed menu"<<endl;
Serial.flush();
return proceed;
}
I’ve reported it to the library maintainer, it’s a bit beyond me to debug.
and add a simple ‘Serial<<‘***************'<<endl;’ line to see if it dies there
srp
It’s not important really because I don’t think I’ll ever need to use that within my menu system.
And yes a debugger would be good – sure the hell beats moving a ‘Serial.println(“got here”);’ about in the code ![]()
![]()
http://www.stm32duino.com/viewtopic.php?t=1241
It sounds like they are now the standard for the ARM Arduino build settings, so we should consider using them.
However I can only do limited testing e.g. with my projects, so the proof of the pudding would be just to update the repo and wait for people to complain if it caused side effects
http://www.stm32duino.com/viewtopic.php?t=1241
It sounds like they are now the standard for the ARM Arduino build settings, so we should consider using them.
However I can only do limited testing e.g. with my projects, so the proof of the pudding would be just to update the repo and wait for people to complain if it caused side effects
http://www.stm32duino.com/viewtopic.php?t=1241
It sounds like they are now the standard for the ARM Arduino build settings, so we should consider using them.
However I can only do limited testing e.g. with my projects, so the proof of the pudding would be just to update the repo and wait for people to complain if it caused side effects
Ok.
I will do that.
I will post a replacement platform.txt
cc1.exe: warning: command line option '-std=gnu++11' is valid for C++/ObjC++ but not for C [enabled by default]
There is an issue I’ve found when using multiple SSD1306 displays however, because a single framebuffer in ram is used for all the displays, and it gets cleared for each screen being drawn, this results in the menu blanking out each time ‘cleardisplay’ is called.
The reason this happens is the author has utilised lazy updates to minimise cpu cycles – ie if the menu has not changed, then it does not output to the buffer. I’m going to ask him if it’s possible to have a ‘redraw all’ or non lazy update added.
The workaround for the time being is to disable drawing to the other displays whilst in the menu – the menu is non blocking, so it was nice to still have the gauges on the other displays visible and updating…
cc1.exe: warning: command line option '-std=gnu++11' is valid for C++/ObjC++ but not for C [enabled by default]
I added it to the build flags for maple mini in boards.txt:
mapleMini.build.cpu_flags=-DMCU_STM32F103CB -DSERIAL_USB -std=gnu++11
Q also in the STM32F4 platform.txt or just add to all platform.txt files?
srp
Q also in the STM32F4 platform.txt or just add to all platform.txt files?
srp


