maybe work?
This commit is contained in:
parent
23db40c577
commit
65fca6a5b2
1 changed files with 3 additions and 2 deletions
|
@ -348,11 +348,12 @@ fn main() {
|
||||||
if number_of_bytes == 4 {
|
if number_of_bytes == 4 {
|
||||||
// Unpack the buffer into coordinates.
|
// Unpack the buffer into coordinates.
|
||||||
if let Some((x_rev, y_rev)) = unpack_coordinates(&buf) {
|
if let Some((x_rev, y_rev)) = unpack_coordinates(&buf) {
|
||||||
let x_32:u32 = x_rev.into();
|
|
||||||
|
println!("Received Coordinates: X = {}, Y = {}", x_rev, y_rev); let x_32:u32 = x_rev.into();
|
||||||
let y_32:u32 = y_rev.into();
|
let y_32:u32 = y_rev.into();
|
||||||
*x_thread.lock().unwrap() = x_32;
|
*x_thread.lock().unwrap() = x_32;
|
||||||
*y_thread.lock().unwrap() = y_32;
|
*y_thread.lock().unwrap() = y_32;
|
||||||
println!("Received Coordinates: X = {}, Y = {}", x_rev, y_rev);
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
// This case should ideally not be reached if number_of_bytes is 4.
|
// This case should ideally not be reached if number_of_bytes is 4.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue