Code is getting reset.
-
I have initialize CAN and read speed input from CAN and speed is showing correctly on display.
below is main.cpp code . Is there i am doing wrong ?
is this because of _qul_app.update(); ?**everything is working fine but Why my code is Getting reset.** some one has faced this issue please help me on this. int main () { Qul::initHardware(); Qul::initPlatform(); CanIfInit(); Qul::Application _qul_app; static struct ::HMI_Design_Multiscreen _qul_item; _qul_app.setRootItem(&_qul_item); R_TICK_Init(0); #ifdef APP_DEFAULT_UILANGUAGE _qul_app.settings().uiLanguage.setValue(APP_DEFAULT_UILANGUAGE); #endif static uint32_t oneMsTimer_counter =0; while(1){ CyclicCanTask(); speed_increment(); if ((R_TICK_GetTimeMS(0) - oneMsTimer_counter ) >= 50 ) { oneMsTimer_counter = R_TICK_GetTimeMS(0); _qul_app.update(); } } }
edit by @J.Hilk : added code tags for readability
-
I have initialize CAN and read speed input from CAN and speed is showing correctly on display.
below is main.cpp code . Is there i am doing wrong ?
is this because of _qul_app.update(); ?**everything is working fine but Why my code is Getting reset.** some one has faced this issue please help me on this. int main () { Qul::initHardware(); Qul::initPlatform(); CanIfInit(); Qul::Application _qul_app; static struct ::HMI_Design_Multiscreen _qul_item; _qul_app.setRootItem(&_qul_item); R_TICK_Init(0); #ifdef APP_DEFAULT_UILANGUAGE _qul_app.settings().uiLanguage.setValue(APP_DEFAULT_UILANGUAGE); #endif static uint32_t oneMsTimer_counter =0; while(1){ CyclicCanTask(); speed_increment(); if ((R_TICK_GetTimeMS(0) - oneMsTimer_counter ) >= 50 ) { oneMsTimer_counter = R_TICK_GetTimeMS(0); _qul_app.update(); } } }
edit by @J.Hilk : added code tags for readability
@Vishal-Biradar said in Code is getting reset.:
Why my code is Getting reset
What do you mean? What is "reset"? You also wrote that speed is shown correctly, so what is the issue?
Please format your code properly. -
Thanks @jsulm for your reply
I will give brief idea
This code for Instrument cluster for two wheeler bike.
I designed UI and i am trying to update speed module on designed UI .
Value read from CAN and updating it on QML code for speed and speed is getting correcly.
But after certain period code is resting means display is getting off again restart. it's happen continuously after certain time.
May this information will give an idea about issue.
Thanks! -
Thanks @jsulm for your reply
I will give brief idea
This code for Instrument cluster for two wheeler bike.
I designed UI and i am trying to update speed module on designed UI .
Value read from CAN and updating it on QML code for speed and speed is getting correcly.
But after certain period code is resting means display is getting off again restart. it's happen continuously after certain time.
May this information will give an idea about issue.
Thanks!@Vishal-Biradar said in Code is getting reset.:
But after certain period code is resting means display is getting off again restart
Do you mean your app is crashing?
The OS is restarting?
Please say exactly what happens.Regarding your code: using an endless loop in an event driven application is a no-go...