theFPVgeek / aeroquad

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

Configurator should accept ',' infront before the line end #124

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Many loops in SerialCom.pde have a special handling for the last value 
transmitted, so that a line end and no comma is transferred. If the 
Configurator would ignore the comma, the code was easier and shorter.

Original issue reported on code.google.com by al...@arcor.de on 25 Jul 2011 at 1:24

GoogleCodeExporter commented 8 years ago
Nice idea... output will look ugly, but I suppose it doesn't matter.  I'll look 
at this for next rev.

Original comment by CaranchoEngineering@gmail.com on 25 Jul 2011 at 2:45

GoogleCodeExporter commented 8 years ago
A comma at the end is not that ugly. In some commands you already ignore a 
trailing comma. You do not ignore it in the 'P' command when checking the 
transmitter calibration values set to AQ.

Original comment by al...@arcor.de on 25 Jul 2011 at 3:14

GoogleCodeExporter commented 8 years ago
As a compromise, I'd still like to end each line with a CR (even though the 
character before is still a ',').  I use it to know when the last character has 
been received.  Let me know if you see problems with this.

Original comment by CaranchoEngineering@gmail.com on 25 Jul 2011 at 6:16

GoogleCodeExporter commented 8 years ago

Original comment by CaranchoEngineering@gmail.com on 25 Jul 2011 at 6:32

GoogleCodeExporter commented 8 years ago
> As a compromise, I'd still like to end each line with a CR (even though the 
character before is still a ',').  I use it to know when the last character has 
been received.  Let me know if you see problems with this.
That is exactly how I want to have it. The only change is that the last value 
can have (but does not need)  a comma behind it. The complete message is still 
terminated with a \n as it is now, so you can determine the message end.
This might already work for most commands, for 'P' it does not. This change 
allows to simplify the code that sends the data, so no special handling of the 
last value is needed.

Original comment by al...@arcor.de on 25 Jul 2011 at 10:20