Compare commits
No commits in common. "5d15a2b56bf877d8c8c4a8c533aa801a89aaef9b" and "fabb5cde3886266349c0892d9f82ace14e174aa1" have entirely different histories.
5d15a2b56b
...
fabb5cde38
1 changed files with 1 additions and 2 deletions
|
@ -1,4 +1,5 @@
|
|||
use chrono::{DateTime, Duration, Local};
|
||||
use core::num;
|
||||
use log::debug;
|
||||
use std::{collections::HashMap, net::UdpSocket, thread};
|
||||
|
||||
|
@ -88,7 +89,6 @@ fn mopp(speed: u8, data: &[u8]) -> Vec<u8> {
|
|||
|
||||
m.replace_range(m.len() - 2.., "11"); // EOW
|
||||
|
||||
// Extend to full bytes
|
||||
m = format!(
|
||||
"{1:0<0$}",
|
||||
(8 as f32 * (m.len() as f32 / 8 as f32).ceil()) as usize,
|
||||
|
@ -97,7 +97,6 @@ fn mopp(speed: u8, data: &[u8]) -> Vec<u8> {
|
|||
|
||||
let mut res = Vec::<u8>::new();
|
||||
|
||||
// Convert string representation to "real" bits
|
||||
for i in (0..m.len()).step_by(8) {
|
||||
let value = u8::from_str_radix(&m[i..i + 8], 2).unwrap();
|
||||
res.push(value);
|
||||
|
|
Loading…
Reference in a new issue