RFExplorer / RFExplorer-for-Python

RF Explorer libraries and examples for Python 3
GNU Lesser General Public License v3.0
51 stars 25 forks source link

C3f message parsing fix #4

Closed aa1i closed 7 years ago

aa1i commented 7 years ago

The #c3-f message parsing was using start:len to index strings for the fields fStartMHZ and fStepMHZ

The correct way in Python is to index as start:stop, and this is corrected in this branch with commit 41b4389 . I have tested this on my signal generator and it works.

In addition, commit 0d237ca adds sample strings received from my signal generator for #C3-F and #C3-G messages and labels relevant columns. These are in comment lines and shouldn't affect the code. I feel this helps to document the string parsing, but if you feel this clutters the code, I'm OK with you omitting this commit, but you should still pick up the fix from 41b4389.

jcalderon09 commented 7 years ago

We agree with the new comments added but they seem a little bit confuse. We adopt this format:

r'#C3-F:0221000,0020,0000100,0,0,1,00150'

Positions: 6,14,19,27,29,31,33

The numbers indicate the start position of the substring inside the total string

aa1i commented 7 years ago

Thank you. I'm new to git/github, and it's an honor to be able to "give back to the community"

arocholl commented 7 years ago

thank you