fix: resolve 7 code review issues from v0.4.x
- Fix KSUDP clutch field reading fuel at offset 59 (KSUDP has no clutch input) - Replace Notify with watch::channel for reliable shutdown (no missed wakeups) - Deduplicate read_u16 from parser_pcars into shared binary_utils - Remove dead Display impl for FeedSource - Remove unused read_i8 helper from binary_utils - Change Vec<Instant> to [Instant; 50] in FeedState (eliminate heap alloc) - Cache rarely-changing strings by driver_id in Telemetry Tool parser
This commit is contained in:
parent
8f50302a78
commit
56d3169033
7 changed files with 98 additions and 45 deletions
|
|
@ -3,8 +3,6 @@
|
|||
//! Both the KSUDP (port 9996) and Telemetry Tool (port 10101) parsers produce
|
||||
//! `TelemetryFrame` instances from their raw binary data.
|
||||
|
||||
use std::fmt;
|
||||
|
||||
/// Identifies which feed source produced this frame.
|
||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||
pub enum FeedSource {
|
||||
|
|
@ -242,13 +240,3 @@ impl TelemetryFrame {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for FeedSource {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
FeedSource::Ksudp => write!(f, "KSUDP"),
|
||||
FeedSource::TelemetryTool => write!(f, "Telemetry Tool"),
|
||||
FeedSource::Pcars => write!(f, "PCARS"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue