db_send() doesn't send a full deBruijn sequence
encrypsis opened this issue · 2 comments
I haven't traced down yet where the problem is originating from (the conditional recursive db() calls is disorienting and debugging an output that is just a long sequence of 0s and 1s makes it even harder)... but, it is not generating a deBruijn sequence properly. Even if we go based off of the estimates included in the Readme/webpage for opensesame... Transmitting the 10 bit length code in array one takes only 2 seconds with txfast = 1 (sorry nyancat!).
Have you actually tested the sequence generator in any mathematical way to confirm it is validly generating a deBruijn sequence (even if just by throwing a bunch of random test sequences at the output)? I'm quite sure that txdone is blocking from running convertBits() til rftx() is complete, so I don't think that the problem lays in the transmission part
Why not compare an alternative implementation with the output...or recursively generate all possibilities and grep each possibility from the output...or write your own implementation and compare...there are many ways to validate.
PS, the output will be slightly longer than an actual de bruijn sequence as the 8051 has limited memory and can't transmit in real time, so a chunk is generated, then transmitted, then the tail of the previous check is retransmitted along with the next chunk, in order to not miss a valid sequence between chunks.
Sorry. You're deBruijn generator is correct. I swapped out waitForTx(); for while (!txdone); in rf.c, and messed up sharing the variable between opensesame.c and rf.c.
PS: I've implemented opensesame inside of mossmann's IM-ME specan, and made the entries in the garages array selectable, (and made the #bits modifiable as well).
I dont think you want me to submit that in this repo, so I'll just fork it. I will make sure to re-neuter the code identically to how this repo is. Than