mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-29 01:29:03 -04:00
Provide configuration of symbol unstuffing.
This commit is contained in:
parent
a00fcbaa8f
commit
e9f28f9ef3
5 changed files with 25 additions and 4 deletions
|
@ -21,11 +21,18 @@
|
|||
|
||||
#include "packet_builder.hpp"
|
||||
|
||||
void PacketBuilder::configure(size_t new_payload_length) {
|
||||
void PacketBuilder::configure(
|
||||
uint32_t unstuffing_pattern,
|
||||
size_t unstuffing_length,
|
||||
size_t new_payload_length
|
||||
) {
|
||||
unstuff.configure(unstuffing_pattern, unstuffing_length);
|
||||
|
||||
if( new_payload_length <= payload.size() ) {
|
||||
payload_length = new_payload_length;
|
||||
reset_state();
|
||||
}
|
||||
|
||||
reset_state();
|
||||
}
|
||||
|
||||
void PacketBuilder::reset_state() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue