2023-01-25 01:11 AM
I'm faced with problem when I add elements to list. For better understanding I explain what I want to do. So here when I click add new elements I go to other screen where config pinout. And when I click save it stores names like "VM1", "Main module" in array there is placed in model.hpp. In list layout I can create 5 elements.When I add more than 3 elements to the list my names somehow which I store in array disappear and random values which is in my project enrolls
What can cause this problem?
2023-01-25 03:01 AM
Hello @heyo,
That looks like an out-of-bound issue.
How did you create and initialize your array ?
/Yoann
2023-01-25 03:42 AM
I create structure in model.hpp
This is how put information in to arrays
2023-01-25 04:16 AM
Can you also show me how you display your Array values into the screen ?
Also, why are you using 2-dimensionnal arrays for Headlines and Correction ?
/Yoann
2023-01-25 04:22 AM
@Yoann 2-dimensionnal arrays because in one row writes more than one symbol. I mean if I want to write "176" number I need three positions if I correctly understand.
AirTemperature_Save is how many times was pressed save I mean how many elements are in list. From the model.hpp I take data
Here adding elements to list :
And this is how create list members:
2023-01-25 04:38 AM
That's gonna be hard to debug without having access to your project, can you share it ?
/Yoann
2023-01-25 04:40 AM
PM
2023-01-26 08:51 AM
Hi,
May I ask what is this line supposed to do ?
memset ( & Cfg_C7_temperature.Headline[idx][30] , 0, 30 );
If intention is to clear the string at index 'idx' then this is correct statement
memset ( Cfg_C7_temperature.Headline[idx] , 0, sizeof (Unicode::UnicodeChar)*30 );
2023-01-26 10:39 PM
Nope, this is not working for me as you said.