telemetry improvements / cli CSV export

This commit is contained in:
2026-05-20 10:13:16 -07:00
parent 5e8d6e2a34
commit ab09c98084
8 changed files with 396 additions and 46 deletions
+19 -6
View File
@@ -2,26 +2,39 @@
pub mod hid {
use deku::DekuRead;
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use usbd_hid::descriptor::generator_prelude::*;
#[derive(DekuRead)]
#[deku(endian = "little")]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
#[gen_hid_descriptor(
(collection = APPLICATION, usage_page = VENDOR_DEFINED_START, usage = 0x01, ) = {
state=input;
average_buffer_fill=input;
frame_count=input;
dac_underflow_count=input;
usb_underflow_count=input;
dac_overflow_count=input;
p=input;
i=input;
fb=input;
integrator=input;
}
)]
#[repr(C)]
// Note these are all actually u32
#[repr(C, packed)]
// TODO: Fix that most of these values are actually u32, but usbd_hid macro doesn't work properly on u32
pub struct AudioTelemetryReport {
pub average_buffer_fill: i32,
pub state: u8,
pub average_buffer_fill: u16,
pub frame_count: i32,
pub dac_underflow_count: i32,
pub usb_underflow_count: i32,
pub dac_overflow_count: i32,
pub dac_underflow_count: u16,
pub usb_underflow_count: u16,
pub dac_overflow_count: u16,
pub p: i32,
pub i: i32,
pub fb: i32,
pub integrator: i32,
}
}