Skip to content

How to clear an element before ElemSetTxtStr (remove old text) #404

Answered by Pconti31
PrattTechnologies asked this question in Q&A
Discussion options

You must be logged in to vote

@PrattTechnologies @ImpulseAdventure Well, I couldn't reproduce your problem but I found enough bugs in your program to point to possible issues.

1- You must call gslc_Update every cycle through loop() or your UI will become unresponsive. Also, you need a delay in loop() to show all messages received or you will only see the last full message.

void loop() {
  // put your main code here, to run repeatedly:
  gslc_Update(&m_gui);
  delay(1000); 
  serialRead();
}

2- Inside serailRead you fail to terminate your message buffer during initalization so it will have garbage inside it and if it gets displayed you will see the results you posted.

3- Your read loop as written can over-write your m…

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@PrattTechnologies
Comment options

Comment options

You must be logged in to vote
1 reply
@PrattTechnologies
Comment options

Answer selected by PrattTechnologies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants