Skip to content

Commit

Permalink
chore: Replace use of BE bytes and swap combination with LE bytes
Browse files Browse the repository at this point in the history
  • Loading branch information
SuhEugene authored and qdot committed Mar 23, 2024
1 parent 0fc3a60 commit 8de0497
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion buttplug/src/server/device/protocol/mizzzee_v3.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ fn scalar_to_vector(scalar: u32) -> Vec<u8> {
let scale: f32 = handle_scale(scalar as f32 / 1000.0) * 1023.0;
let modded_scale: u16 = ((scale as u16) << 6) | 60;

let bytes = modded_scale.swap_bytes().to_be_bytes();
let bytes = modded_scale.to_le_bytes();

let mut data: Vec<u8> = Vec::new();
data.extend_from_slice(&HEADER);
Expand Down

0 comments on commit 8de0497

Please sign in to comment.