feat:themes, tactilea codec
This commit is contained in:
@@ -12,7 +12,7 @@ use tokio_util::sync::CancellationToken;
|
||||
use std::future::pending;
|
||||
use std::sync::{Arc, Mutex};
|
||||
use std::time::Instant;
|
||||
use log::info;
|
||||
use log::{info, debug};
|
||||
use crate::serial_core::record::{FrameTiming, RecordedFrame};
|
||||
|
||||
pub enum PollMode<F> {
|
||||
@@ -211,6 +211,7 @@ where
|
||||
let mut prune_interval = time::interval(Duration::from_millis(450));
|
||||
prune_interval.set_missed_tick_behavior(MissedTickBehavior::Delay);
|
||||
|
||||
|
||||
loop {
|
||||
tokio::select! {
|
||||
_ = cancel.cancelled() => break,
|
||||
@@ -239,6 +240,9 @@ where
|
||||
read_result = port.read(&mut buffer) => {
|
||||
let n = read_result?;
|
||||
if n == 0 {
|
||||
// Some serial drivers can resolve reads with 0 bytes repeatedly.
|
||||
// Yield here so timer-driven poll requests are not starved by a busy loop.
|
||||
tokio::task::yield_now().await;
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -261,7 +265,6 @@ where
|
||||
|
||||
let display_values = if let Some(vals) = decode_res.as_ref() {
|
||||
let summary = vals.iter().copied().sum::<i32>();
|
||||
info!("dot value summary: {}", summary);
|
||||
chart_state.record_summary(summary as f32);
|
||||
chart_state.record_pressure_matrix(vals.as_slice());
|
||||
Some(vec![summary])
|
||||
|
||||
Reference in New Issue
Block a user