Closed andimik closed 2 years ago
Good point, but would not it be better to have the channel handler return an error code? Now the attached device gets the request to tune to frequency 0
Op ma 13 jun. 2022 om 22:04 schreef andimik @.***>:
Before
If the optarg for -C is any other string than declared (like "text" in the sample below), the program assigns the value for 5A (which is the first entry in the list to be found in band-handler.cpp) instead of producing an error or set it to 0.
$ eti-cmdline-rtlsdr -Q -C text tunedFrequency = 174928000
After
Now it's clear for the user, that his syntax was wrong (as the frequency got 0)
$ ./eti-cmdline-rtlsdr -Q -C text tunedFrequency = 0
or illegal channel number
$ ./eti-cmdline-rtlsdr -Q -C 5E tunedFrequency = 0
You can view, comment on, or merge this pull request online at:
https://github.com/JvanKatwijk/eti-stuff/pull/54 Commit Summary
- 20dd86b https://github.com/JvanKatwijk/eti-stuff/pull/54/commits/20dd86be71b879b87d2d49d252a1b19f74c6c83e valid channel name check
File Changes
(1 file https://github.com/JvanKatwijk/eti-stuff/pull/54/files)
- M eti-cmdline/src/support/band-handler.cpp https://github.com/JvanKatwijk/eti-stuff/pull/54/files#diff-632e06a9882c0946fd65e2139d290d9b69756aa26ce5e27ce4c4b6506f8915df (1)
Patch Links:
- https://github.com/JvanKatwijk/eti-stuff/pull/54.patch
- https://github.com/JvanKatwijk/eti-stuff/pull/54.diff
— Reply to this email directly, view it on GitHub https://github.com/JvanKatwijk/eti-stuff/pull/54, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACCPHQBDYCANM3MSEN2NTJDVO6H3LANCNFSM5YVLG4HA . You are receiving this because you are subscribed to this thread.Message ID: @.***>
-- Jan van Katwijk
Before
If the optarg for
-C
is any other string than declared (like "text" in the sample below), the program assigns the value for 5A (which is the first entry in the list to be found inband-handler.cpp
) instead of producing an error or set it to 0.After
Now it's clear for the user, that his syntax was wrong (as the frequency got 0)
or illegal channel number