Fix firmware dsss decoding bug

This is my #1 top dumbest bug like ever
This commit is contained in:
jaseg 2020-03-18 20:35:15 +01:00
parent 639a4d1386
commit 37338e2ad8
2 changed files with 5 additions and 4 deletions

View file

@ -213,6 +213,8 @@ int main(void)
GPIOA->MODER |= (1<<GPIO_MODER_MODER11_Pos) | (1<<GPIO_MODER_MODER12_Pos) | (1<<GPIO_MODER_MODER15_Pos);
#endif
dsss_demod_init(&demod_state);
con_printf("Booted.\r\n");
while (23) {
if (adc_fft_buf_ready_idx != -1) {
@ -243,7 +245,6 @@ int main(void)
GPIOA->BSRR = 1<<7;
GPIOA->BSRR = 1<<12;
dsss_demod_init(&demod_state);
dsss_demod_step(&demod_state, out, freq_sample_ts);
GPIOA->BSRR = 1<<12<<16;
}

View file

@ -129,12 +129,12 @@
},
{
"cell_type": "code",
"execution_count": 30,
"execution_count": 44,
"metadata": {},
"outputs": [],
"source": [
"with open('data/dsss_test_demod_fixed_03.bin', 'wb') as f:\n",
" for freq in read_freq_log('data/dsss_test_demod_fixed_03.log'):\n",
"with open('data/dsss_test_demod_fixed_05.bin', 'wb') as f:\n",
" for freq in read_freq_log('data/dsss_test_demod_fixed_05.log'):\n",
" f.write(struct.pack('f', freq))"
]
},