| Anonymous | Login | Signup for a new account | 2010-09-10 10:42 UTC |
| Main | My View | View Issues | Change Log | Roadmap | Docs |
| Viewing Issue Simple Details [ Jump to Notes ] | [ View Advanced ] [ Issue History ] [ Print ] | ||||||
| ID | Category | Severity | Reproducibility | Date Submitted | Last Update | ||
| 0000077 | [FreeEMS-Tuner] Comm Interface | feature | N/A | 2008-11-29 21:01 | 2009-02-15 08:25 | ||
| Reporter | Fred | View Status | public | ||||
| Assigned To | sry_not4sale | ||||||
| Priority | normal | Resolution | fixed | ||||
| Status | closed | Product Version | |||||
| Summary | 0000077: Move serial comms low level stuff into SOA style thread setup | ||||||
| Description |
I think this will enable you to debug it a little better and keep the gui responsive. Currently I click on the buttons repeatedly quickly and it can't keep up because it is working on the last click at a low level. To do this effectively you'll need some sort of queueing system where by a packet to send gets placed in a queue FIFO style, and the same for returned packets from the device. I haven't tried to look at what you are doing, but the following pseudo code should be more or less how the serial stuff works : * look for start byte : ignore all other bytes until a start is found. perhaps cache the other bytes so you can dump them as an array in the log after finding the start byte with a specific message such as "junk before start byte : <junk>" * move all bytes into a raw buffer to examine for debugging. * move non escape/stop bytes into buffer to be processed : when an escape byte is found do not buffer it, rather set a flag to unescape the next byte before moving it to the buffer and drop this byte. * when a stop byte is found check the last byte received against the checksum of all bytes before that as per the spec. move from the buffer to a raw object and add to queue *repeat no data should be lost, and it should all be processed sequentially. if you can achieve the same logic with searches etc, by all means, but it might be better to KISS to start with? Lastly, except moving it to a thread, feel free to ignore all this provided that it works :-) |
||||||
| Additional Information | |||||||
| Tags | No tags attached. | ||||||
| Issue Type | Improvement | ||||||
| Attached Files | |||||||
|
|
|||||||
Notes |
|
|
(0000148) sry_not4sale (administrator) 2009-01-13 21:40 |
Send, receive and comms logic now moved to individual threads |
| Mantis 1.1.7[^] Copyright © 2000 - 2008 Mantis Group |