rdmenezes / qmast

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

Problems to address with parse() #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
This is anticipated problems that need to be addressed with the parse() 
function. parse() should now be receiving only strings that pass their checksum 
test (if reliable_serial_data.pde checks out ok). But we might find problems 
the following ways:
1. Testing with real data
2. Perhaps displaying output to the screen
3. Experimenting with parsing the whole string

This might show:
- parse cant handle strtok(cp, ',') where cp has empty data fields (99,S,,N,99)
- parse might not know where the end of the string is, as far as I know there 
is no end of string character appended presently before parse is called - this 
might make a problem with tokenizing the end of the string
- parse should be examining the data status fields (all those 999,N,999,S; the 
N and S are actually status indicators, not directions)
- parse presently doesn't check if strtok is returning NULLs instead of valid 
data

To address this:
- See limited strtok info here: 
https://www.securecoding.cert.org/confluence/display/seccode/STR06-C.+Do+not+ass
ume+that+strtok%28%29+leaves+the+parse+string+unchanged
- Also see the compass and wind sensor user manuals for status code information

Original issue reported on code.google.com by cdmblair@gmail.com on 29 Dec 2010 at 11:22

GoogleCodeExporter commented 9 years ago

Original comment by cdmblair@gmail.com on 4 Jan 2011 at 11:16

GoogleCodeExporter commented 9 years ago
We can deal with double commas by discarding the whole data string or doing 
something fancy to read the remaining data from the string

Original comment by allgood38@gmail.com on 15 Jan 2011 at 12:14

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago

Original comment by cdmblair@gmail.com on 15 Jan 2011 at 2:41

GoogleCodeExporter commented 9 years ago

Original comment by cdmblair@gmail.com on 15 Jan 2011 at 2:43

GoogleCodeExporter commented 9 years ago

Original comment by cdmblair@gmail.com on 20 Jan 2011 at 6:24

GoogleCodeExporter commented 9 years ago

Original comment by cdmblair@gmail.com on 20 Jan 2011 at 6:26

GoogleCodeExporter commented 9 years ago
Michelle and Nate are working on the NMEA strings:
"
- parse should be examining the data status fields (all those 999,N,999,S; the 
N and S are actually status indicators, not directions)
- parse presently doesn't check if strtok is returning NULLs instead of valid 
data
"
See sailcode_alpha_3.pde for the code.
See dropbox->software manuals->for PB100 manual, and compass manual with status 
codes etc.

Original comment by cdmblair@gmail.com on 21 Jan 2011 at 11:30

GoogleCodeExporter commented 9 years ago
See alpha5 now for most up to date code. Compass() function contains 
reliable_serial_data. Compass() has a problem when it tries to roll over 
partial data between it's runs; all data is saving as 0's. There's a new issue 
for this.

Original comment by cdmblair@gmail.com on 29 Jan 2011 at 3:09

GoogleCodeExporter commented 9 years ago

Original comment by cdmblair@gmail.com on 29 Jan 2011 at 3:38

GoogleCodeExporter commented 9 years ago

Original comment by cdmblair@gmail.com on 29 Jan 2011 at 3:39

GoogleCodeExporter commented 9 years ago

Original comment by cdmblair@gmail.com on 29 Jan 2011 at 3:40

GoogleCodeExporter commented 9 years ago

Original comment by cdmblair@gmail.com on 29 Jan 2011 at 3:43

GoogleCodeExporter commented 9 years ago

Original comment by cdmblair@gmail.com on 3 Feb 2011 at 4:12

GoogleCodeExporter commented 9 years ago
Changeset 51 seems to be handling serial data well; changed the serial buffer 
size to 255. It seems to be occasionally wrapping data around (ie loop is 
running a BIT too fast).

Original comment by cdmblair@gmail.com on 12 Feb 2011 at 12:31

GoogleCodeExporter commented 9 years ago
Parse should also be split into multiple functions.

Original comment by cdmblair@gmail.com on 10 Apr 2011 at 9:21

GoogleCodeExporter commented 9 years ago
Is working now.

Original comment by laszloka...@gmail.com on 24 Jun 2011 at 1:22

GoogleCodeExporter commented 9 years ago

Original comment by laszloka...@gmail.com on 24 Jun 2011 at 1:22