send telemetry over UART

This commit is contained in:
Andy Killorin 2025-01-30 18:40:37 -05:00
commit 0748cb2517
Signed by: ank
GPG key ID: 23F9463ECB67FE8C

View file

@ -4,7 +4,7 @@
use nalgebra::Vector3;
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
pub enum Command {
/// Forward, clockwise
Twist(f32,f32),
@ -18,14 +18,14 @@ pub enum Command {
Disable,
}
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
pub struct Response {
enabled: bool,
sensor_data: Option<SensorData>,
uptime_micros: u64,
pub enabled: bool,
pub sensor_data: Option<SensorData>,
pub uptime_micros: u64,
}
#[derive(Serialize, Deserialize)]
#[derive(Serialize, Deserialize, Debug)]
pub enum SensorData {
/// degrees per second
Gyro(Vector3<f32>),