send telemetry over UART
This commit is contained in:
parent
e58faf354f
commit
0748cb2517
1 changed files with 50 additions and 10 deletions
|
|
@ -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>),
|
||||
|
|
|
|||
Loading…
Reference in a new issue