colemarkham / cellbots

Automatically exported from code.google.com/p/cellbots
0 stars 0 forks source link

New Routine for handling commands returned from the robot to the phone #21

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
We have commandParse() to deal with incoming commands from the user. Now that 
we're starting to have two-way serial working, we need to have a new routing 
to deal with the responses from the robot. Something like responseParse().

Original issue reported on code.google.com by rhickman on 5 Apr 2010 at 1:47

GoogleCodeExporter commented 8 years ago

Original comment by glen.arrowsmith on 7 Apr 2010 at 2:48

GoogleCodeExporter commented 8 years ago
ReaderThead now parses input that contains a ':' and posts values onto the 
whiteboard
which keeps a log of these values. 

For example, if the arduino sends 'dist:10' then the reader thread will split 
it into
'dist' and '10' and store it. To access it, 
sensorHistory = whiteboard['dist']
latestValueAndTime = sensorHistory[0]
value = latestValueAndTime[0]
timeSaved = latestValueAndTime[1]

Whiteboard can be used to store any value. 

Original comment by glen.arrowsmith on 23 Apr 2010 at 3:00