Hi I have a bit of a conundrum, I have a piece of code and would like to wait until certain criteria is met, without blocking, before moving on to the next line of code.
Here is the flow :
-Send packet over serial comms
-Start Timeout Timer Event
-Wait until receive flag is set <=not sure what to do here .Receive Serial Event
-If receive flag set move on
-Send New packet over Serial comms .... starts process over again.
In the timeout timer event, will basically resend the data. My question is, how do I wait until the specific flag is set, BEFORE moving to the next line of code.
Application.Doevents from what I have read is a very bad way of performing this.