2022-12-14 03:22 PM
I can make an application and load it into the IDE. I'm very familiar with programming the STM32s. I created a simple app that creates a dynamic chart. I can see where the dummy data is loaded into the chart in the base code. I have a few questions and I am using the STM32CUBEIDE.
1) Why aren't all the includes added to the project in a way they can be easily edited? I can see them and it seems like some are locked out as read-only and I haven't taken the time to explore how to unlock them.
2) I can see where dummy data is added, I a read thru the charting example where it says :
To add data points to the Dynamic Graph, the method addDataPoint() is used. The following code example shows how to add data points to a Dynamic Graph, by overwriting the handleTickEvent() method.
What do they mean by that? I tried to modify the system1view class as in the example code and add my own handleTickEvent but it wouldn't let me modify the hpp include. So I fought with that but in order to use hpp and class calls you have to change main.c to main.cpp or migrate the entire app to c++(don't know why the touchGFX generator didn't make the entire project c++) but then other included code threw errors like crazy. Also, the system1view calls that contain the dynamic graph aren't called in the main.c file, so maybe there is code that runs as part of the OS that is loaded?? having typed that I am going to go look.
3) so what is the best way to add code to a dynamic graph in the code mainline main.c (or main.cpp)? I seem to be missing some basic understanding. I tried using externs for the graph and constructs but since they are c++ again, the code threw so many errors I gave up.
the code I want to integrate was written as a mix of c and c++ so that's no big deal but there are a number of interrupts to external devices that must be processed in the interrupt and then sent to the code mainline, unless there is another thread I need to look at?
Bottom line is once TouchGFX builds the code, what is the best way to access the elements. Maybe I am missing the architecture understanding...
thanks
jerry
2)
2022-12-14 03:49 PM
OK, Typing the question above got me thinking. So I went down and took another look at the code and I was able to modify it and I add my own data points. I wasn't thinking in terms of a multi threaded application with time slices going to the touchGFX program. So now I have to figure out as if this OS is going to impact the interrupts that our sensors are sending but otherwise this is a pretty cool app. I guess you can ignore everything above.