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:
Jan-Peter von Hunnius 2026-06-04 11:12:55 +02:00
parent 8f50302a78
commit 56d3169033
7 changed files with 98 additions and 45 deletions

View file

@ -51,12 +51,6 @@ pub fn read_u16(data: &[u8], offset: usize) -> u16 {
u16::from_le_bytes(buf)
}
/// Read a signed `i8` from the data at the given offset.
/// Returns 0 if the offset is out of bounds.
pub fn read_i8(data: &[u8], offset: usize) -> i8 {
data.get(offset).map(|&b| b as i8).unwrap_or(0)
}
/// Read a little-endian `f32` from the data at the given offset.
/// Returns 0.0 if the offset is out of bounds (safe fallback for malformed packets).
pub fn read_f32(data: &[u8], offset: usize) -> f32 {