chwilo zezwoliłem na ignorowanie błędów w radio_preamble
Open
Nobody has claimed this yet.
bug
- Dominant language
- Python
- Stars
- 0
- Forks
- 0
- PR merge metrics
- No merged PRs in 30d
Description
Pierwotnie było tak - patrz na ostatnią linijkę:
def leap_radio_preamble ( self , samples : NDArray [ np.complex64 ] , idx : np.uint32 ) -> np.uint32 :
# Wycinanie sekwencji korelacyjnej, sampli dopełniających i sekwencji synchronizacyjnej z sampli, aby sample zaczynały się od początku pakietu.
# Sekwencja korelacyjnej jest potrzebne tylko do detekcji ramki, a nie do dalszego przetwarzania pakietu.
# Dzięki temu funkcja detect_frames() może zacząć od razu demodulowanie ramki oraz z funkcji detect_frames() korzystać inne funkcje,
# które np. przekazują próbki tx_active_samples bez preambuły ani sekwencji synchronizacyjnej.
samples_components = [ samples.real , samples.imag , -samples.real , -samples.imag ]
for samples_component in samples_components :
radio_preamble_symbols = samples_component [ idx + filters.MIDDLE_SYMBOL_OFFSET : idx + filters.MIDDLE_SYMBOL_OFFSET + RADIO_PREAMBLE_SAMPLES_LEN : self.SPS ]
radio_preamble_bits = modulation.bpsk_symbols_2_bits_v0_1_7 ( radio_preamble_symbols )
if np.array_equal ( radio_preamble_bits , RADIO_PREAMBLE_BITS ) :
return idx + filters.FIRST_SYMBOL_OFFSET + RADIO_PREAMBLE_SAMPLES_LEN
return None
A teraz zmieniłem tak w ostatniej linijce:
return idx + filters.FIRST_SYMBOL_OFFSET + RADIO_PREAMBLE_SAMPLES_LEN # None
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating leap_radio_preamble and its callers, especially detect_frames, then reproduce the case where no preamble bits match. Compare the previous None return with the current unconditional return and determine the expected behavior for an unmatched preamble. Done means the intended error-handling behavior is explicit and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- embedded-iot
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100