cancel
Showing results for 
Search instead for 
Did you mean: 

Function animateToItem makes a two animationSteps and HardFault

VKost.3
Associate II

I am using stm32f746 nucleo board and display with fmc!

his is how it works

void Screen1View::handleTickEvent()

{

tickCounter++;

if(tickCounter > 60){

tickCounter = 0;

scrollWheel.animateToItem(scrollWheel.getSelectedItem() + 1, 0);

// application().gotoScreen2ScreenSlideTransitionEast();

}

}

doesn't work like that! Makes a two animationSteps and HardFault!

void Screen1View::handleTickEvent()

{

tickCounter++;

if(tickCounter > 60){

tickCounter = 0;

scrollWheel.animateToItem(scrollWheel.getSelectedItem() + 1, 10);

// application().gotoScreen2ScreenSlideTransitionEast();

}

}

10 REPLIES 10
VKost.3
Associate II

doesn't work like that! Makes a two animationSteps and HardFault!

void Screen1View::handleTickEvent()

{

tickCounter++;

if(tickCounter > 60){

tickCounter = 0;

scrollWheel.animateToItem(scrollWheel.getSelectedItem() + 1, 10);

// application().gotoScreen2ScreenSlideTransitionEast();

}

}

??? why you duplicate

??? why you dont check index over limit, you cant animate to not existed +1 on last.

I gave this two options. The first one without steps, the second with steps! The first option works fine without overflow checking. I gave this two options. The first one without steps, the second with steps! The first option works fine without overflow checking. The second option with steps, redraws the first two frames and gets into HardFault!

0 is no animation, then 10 maybe is so slow , that your tickCounter 60 try start new animation when previous isnt ended. Add if animation in progress or use more as 60 repeat

I tried changing the step value, it didn't help. In debug mode, the scrollWheel.animateToItem (scrollWheel.getSelectedItem () + 1, 60) function is not called a second time.

then seem be memory (stack heap) issue or i dont know.

heap and steak increased, but the result was not good!

osThreadDef(defaultTask, StartDefaultTask, osPriorityNormal, 0, 4096);

you change this when your touch is default?

Yes! Size stack 4096!