sberl / supersid

Cross-platform Sudden Ionospheric Disturbances (SID) monitor
MIT License
9 stars 9 forks source link

index error if station frequency is above (audio_sampling_rate / 2) #55

Open fenrog opened 2 years ago

fenrog commented 2 years ago

The index error should be avoided by a plausibility check of the stations frequency compared to audio_sampling_rate in config.py

fenrog commented 2 years ago

ready for merge with #54

fenrog commented 5 months ago

Test: the frequency of STATION_2 is set to 24001 for audio_sampling_rate = 48000

A warning is present, but the station number is off by one. is:

ubuntu@ubuntu:~/fenrog/supersid/supersid$ ./config.py
Error: [STATION_1] frequency=24001: audio_sampling_rate=48000 must be >= 48002.

should:

ubuntu@ubuntu:~/fenrog/supersid/supersid$ ./config.py
Error: [STATION_2] frequency=24001: audio_sampling_rate=48000 must be >= 48002.

The same error occurs for the report if the channel number is too high.

fenrog commented 5 months ago

ready for merge with https://github.com/sberl/supersid/pull/79