pub fn convert_i8_to_order(order: i8) -> Option<Order>
Expand description
Convert an int to an Order
ยงExample
use robust_arduino_serial::Order;
let order: i8 = 2; // Order::MOTOR has the index 2 in the enum
let converted_order = robust_arduino_serial::convert_i8_to_order(order).unwrap();
assert_eq!(converted_order, Order::MOTOR);