Tool/software: Code Composer Studio
Hi,
I am using a Tiva C launchpad to run a little test station with a stepper motor and load cell. I'm using the BOOSTXL- KV350QVG touch screen - a newer version with the SPI interface.
I have a button called "StartTest" which is intended to start moving the motor and measuring the load cell - at which point I would like to update the screen on the progress. For now, I am simply trying to update a text box and basically grey-out the "StartTest" button so the operator recognizes that a test is in process.
However, the Widget calls I am making mid-function are not re-writing to the screen. At the end of the function, the screen update is made, but the operator only sees the last change that would have otherwise shown up (I believe it is writing the intermediate changes after the function is done, but they refresh too fast to see). I have experimented by adding return; lines mid-function, and then the screen updates to the intermediate changes. GrFlush(&sContext); seems to make no difference. What am I doing wrong?
void OnStartTestButton (tWidget *pWidget) { // Disable Test and return to main buttons during test TurnOffStartTest(); //these functions are simply a collection of calls to make a couple of buttons disappear during the test TurnOffReturnToMain(); //Start Driving Down with measurements CanvasTextSet(&g_TestingResults, "...Moving Down..."); WidgetPaint((tWidget *)&g_TestingResults); GrFlush(&sContext); // This seems to do nothing //if I add return; here, then the "Moving Down" text shows up and the StartTest and ReturntoMain buttons shut off as intended SysCtlDelay(50000000); //using this to mimic the time of the test CanvasTextSet(&g_TestingResults, "...Success..."); //or not? WidgetPaint((tWidget *)&g_TestingResults); //if I add return; here, then I see the "Success" text and the buttons are still shut off as intended //Enable Test button with new text and return to main PushButtonTextSet(&g_StartTestButton, "Test Another"); TurnOnStartTest(); TurnOnReturnToMain(); GrFlush(&sContext); // this does nothing // All I end up seeing is "Test Another" and my buttons are on }
I'm using the Kentec320x240x16_ssd2119_spi drivers included with TivaWare.
All of my other graphics calls work fine, except for any where I want to change the screen mid-function. I cannot seem to flush the buffer to the screen at will.
Help!