This commit is contained in:
Priec
2026-01-19 13:56:39 +01:00
parent 6b26ed9318
commit 424c795170
2 changed files with 6 additions and 9 deletions

View File

@@ -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;

View File

@@ -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>),
}