From 424c795170df91aaa7d486e14d2a738cccb3567b Mon Sep 17 00:00:00 2001 From: Priec Date: Mon, 19 Jan 2026 13:56:39 +0100 Subject: [PATCH] cleanup --- mqtt_display/src/bus/mod.rs | 2 ++ mqtt_display/src/contracts.rs | 13 ++++--------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/mqtt_display/src/bus/mod.rs b/mqtt_display/src/bus/mod.rs index 52638a5..7b4ba28 100644 --- a/mqtt_display/src/bus/mod.rs +++ b/mqtt_display/src/bus/mod.rs @@ -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; diff --git a/mqtt_display/src/contracts.rs b/mqtt_display/src/contracts.rs index 56b48ff..cf6f908 100644 --- a/mqtt_display/src/contracts.rs +++ b/mqtt_display/src/contracts.rs @@ -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>), }