spectrum analyzer new mode

This commit is contained in:
Eng1n33r
2022-06-22 04:11:52 +03:00
parent c6a3b71db6
commit 881b6d2634
7 changed files with 46 additions and 13 deletions

View File

@@ -86,7 +86,13 @@ static int32_t spectrum_analyzer_worker_thread(void* context) {
instance->max_rssi_dec = 0;
for(uint8_t ch = 0; ch < NUM_CHANNELS - 1; ch++) {
// Visit each channel non-consecutively
for(
uint8_t ch_offset = 0, chunk = 0;
ch_offset < CHUNK_SIZE;
++chunk >= NUM_CHUNKS && ++ch_offset && (chunk = 0)
) {
uint8_t ch = chunk * CHUNK_SIZE + ch_offset;
furi_hal_subghz_set_frequency(instance->channel0_frequency + (ch * instance->spacing));
furi_hal_subghz_rx();