cleanup
This commit is contained in:
@@ -1,4 +1,6 @@
|
||||
// src/bus/mod.rs
|
||||
//! Shared access to the hardware I2C peripheral on a
|
||||
//! single core.
|
||||
|
||||
use core::cell::RefCell;
|
||||
use embedded_hal_bus::i2c::RefCellDevice;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
// src/contracts.rs
|
||||
//! Cross-feature message contracts.
|
||||
//!
|
||||
//! This is the ONLY coupling point between features.
|
||||
//! Features depend on these types, not on each other.
|
||||
|
||||
use heapless::String as HString;
|
||||
use heapless::String;
|
||||
use pages_tui::input::Key;
|
||||
|
||||
/// IMU sensor reading from MPU6050
|
||||
@@ -20,17 +19,13 @@ pub struct ImuReading {
|
||||
/// Commands that can be sent to the display actor
|
||||
#[derive(Clone, Debug)]
|
||||
pub enum DisplayCommand {
|
||||
/// Show IMU sensor data
|
||||
SetImu(ImuReading),
|
||||
/// Show a status line (max 32 chars)
|
||||
SetStatus(HString<32>),
|
||||
/// Show an error message (max 64 chars)
|
||||
ShowError(HString<64>),
|
||||
/// Show MQTT connection status
|
||||
SetStatus(String<32>),
|
||||
ShowError(String<64>),
|
||||
SetMqttStatus { connected: bool, msg_count: u32 },
|
||||
/// Clear the display to default state
|
||||
Clear,
|
||||
|
||||
PushKey(Key),
|
||||
AddChatMessage(HString<24>),
|
||||
AddChatMessage(String<24>),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user