Hello,
I wrote a program to display LEDDigits and update them once every few seconds. I use the function ledDigitsDisplay() for that and let the IDE create the code for that (using the paste code button). I use this inside a loop which also reads data over serial.
The problem is that the ledDigitsDisplay() method seems to crash the program. When I write a simple program which only shows increasing numbers it works fine but in my program after updating the numbers 3 times it crashes (display goes blank and unresponsive).
If I change the number I send over serial the number of times it works changes (for example to 5). So I think there is some overflow or something like that going on. But I can find it and I don't know how to debug it in a way to find it.
Below you find my code
I wrote a program to display LEDDigits and update them once every few seconds. I use the function ledDigitsDisplay() for that and let the IDE create the code for that (using the paste code button). I use this inside a loop which also reads data over serial.
The problem is that the ledDigitsDisplay() method seems to crash the program. When I write a simple program which only shows increasing numbers it works fine but in my program after updating the numbers 3 times it crashes (display goes blank and unresponsive).
If I change the number I send over serial the number of times it works changes (for example to 5). So I think there is some overflow or something like that going on. But I can find it and I don't know how to debug it in a way to find it.
Below you find my code
Code:
counter := 0; value := 0; repeat chReceived := serin1(); if (chReceived > 0) // Store character in the buffer str_PutByte(pchTextBuffer + counter, chReceived); counter += 1; if (counter >= messageSize) //str_Printf(&pchTextBuffer, "%2s"); //putstr(pchTextBuffer); //putstr("hallo"); str_GetC(&pchTextBuffer, &typeS); if (str_FindI(&typeS, "S")) print("jöasdf"); endif //putch(typeS); str_GetD(&pchTextBuffer, &value); print(value, "\n"); // Speed 1.0 generated 5/14/2019 2:08:39 AM ledDigitsDisplay(value, iRPM+1, 176, 4, 1, 33, 1); //ledDigitsDisplay(value, iSpeed+1, 0, 3, 1, 59, 1); counter := 0; endif endif until (com_Error());
Comment