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