Skip to content

Commit

Permalink
fix(lib): A3930 state update parsing mistake
Browse files Browse the repository at this point in the history
The A3930 does not have wear detection or touch tone in its state update
packet. I probably copy and pasted from the A3951 parser a long time ago
and never noticed the leftover fields that should have been removed.
  • Loading branch information
Oppzippy committed Nov 2, 2024
1 parent 4f66dbc commit 47c64da
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions lib/src/devices/a3930/packets/state_update_packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ pub struct A3930StateUpdatePacket {
custom_button_model: CustomButtonModel,
sound_modes: SoundModes,
side_tone: bool,
wear_detection: bool,
touch_tone: bool,
// length >= 96
// length >= 94
hear_id_eq_index: Option<u16>,
}

Expand Down Expand Up @@ -78,8 +76,6 @@ impl InboundPacket for A3930StateUpdatePacket {
CustomButtonModel::take,
SoundModes::take,
take_bool,
take_bool,
take_bool,
opt(le_u16),
)),
|(
Expand All @@ -93,8 +89,6 @@ impl InboundPacket for A3930StateUpdatePacket {
custom_button_model,
sound_modes,
side_tone,
wear_detection,
touch_tone,
hear_id_eq_index,
)| {
A3930StateUpdatePacket {
Expand All @@ -108,8 +102,6 @@ impl InboundPacket for A3930StateUpdatePacket {
custom_button_model,
sound_modes,
side_tone,
wear_detection,
touch_tone,
hear_id_eq_index,
}
},
Expand Down

0 comments on commit 47c64da

Please sign in to comment.