mirror of
https://github.com/aicodix/modem.git
synced 2026-04-27 22:35:41 +00:00
abort if either head or tail data is damaged
This commit is contained in:
parent
ae22102c0f
commit
3aa823facd
2 changed files with 4 additions and 3 deletions
1
TODO.md
vendored
1
TODO.md
vendored
|
|
@ -1,5 +1,4 @@
|
|||
### TODO
|
||||
* erase symbol or abort if either head or tail data is damaged, as we can't recover anything when that happens
|
||||
* implement analog mode (most significant mode bit is 1), where only complex values are the payload
|
||||
* re-encode preamble to use entire symbol to update the channel estimation
|
||||
* re-encode entire message and output number of bitflips and real SNR
|
||||
|
|
|
|||
|
|
@ -306,7 +306,8 @@ struct Decoder : Common
|
|||
int head_data = hadamard_decoder(head);
|
||||
if (head_data < 0) {
|
||||
std::cerr << "head data damaged" << std::endl;
|
||||
head_data = 0;
|
||||
oper_mode = -1;
|
||||
break;
|
||||
}
|
||||
hadamard_encoder(head, head_data);
|
||||
for (int i = 0; i < head_tones; ++i) {
|
||||
|
|
@ -322,7 +323,8 @@ struct Decoder : Common
|
|||
int tail_data = hadamard_decoder(tail);
|
||||
if (tail_data < 0) {
|
||||
std::cerr << "tail data damaged" << std::endl;
|
||||
tail_data = 0;
|
||||
oper_mode = -1;
|
||||
break;
|
||||
}
|
||||
hadamard_encoder(tail, tail_data);
|
||||
for (int i = 0; i < tail_tones; ++i) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue