mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-12-02 21:11:47 +00:00
Remove payload_length from PacketBuilder, etc.
This commit is contained in:
@@ -23,16 +23,11 @@
|
||||
|
||||
void PacketBuilder::configure(
|
||||
const BitPattern preamble,
|
||||
const BitPattern unstuff,
|
||||
size_t new_payload_length
|
||||
const BitPattern unstuff
|
||||
) {
|
||||
preamble_pattern = preamble;
|
||||
unstuff_pattern = unstuff;
|
||||
|
||||
if( new_payload_length <= payload.size() ) {
|
||||
payload_length = new_payload_length;
|
||||
}
|
||||
|
||||
reset_state();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,8 +42,7 @@ public:
|
||||
|
||||
void configure(
|
||||
const BitPattern preamble,
|
||||
const BitPattern unstuffing,
|
||||
size_t new_payload_length
|
||||
const BitPattern unstuffing
|
||||
);
|
||||
|
||||
void execute(
|
||||
@@ -104,7 +103,6 @@ private:
|
||||
BitPattern unstuff_pattern { 0b111110, 6 };
|
||||
BitPattern end_flag_pattern { 0b01111110, 8 };
|
||||
|
||||
size_t payload_length { 0 };
|
||||
size_t bits_received { 0 };
|
||||
State state { State::Preamble };
|
||||
PayloadType payload;
|
||||
|
||||
@@ -47,8 +47,7 @@ void FSKProcessor::configure(const FSKConfiguration new_configuration) {
|
||||
clock_recovery.configure(sampling_rate / 4, new_configuration.symbol_rate);
|
||||
packet_builder.configure(
|
||||
{ new_configuration.access_code, new_configuration.access_code_length, new_configuration.access_code_tolerance },
|
||||
{ new_configuration.unstuffing_pattern, new_configuration.unstuffing_length },
|
||||
new_configuration.packet_length
|
||||
{ new_configuration.unstuffing_pattern, new_configuration.unstuffing_length }
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user