refactor: move Solar struct to mqtt module

This commit is contained in:
2026-05-10 02:38:50 +02:00
parent 271c1a1383
commit 2cfb2607a9
2 changed files with 7 additions and 7 deletions

View File

@@ -84,12 +84,6 @@ enum WaitType {
MqttConfig,
}
#[derive(Serialize, Deserialize, Debug, PartialEq)]
struct Solar {
current_ma: u32,
voltage_ma: u32,
}
impl WaitType {
fn blink_pattern(&self) -> u64 {
match self {
@@ -1047,7 +1041,7 @@ async fn publish_mppt_state(
) -> FatResult<()> {
let current = board.board_hal.get_mptt_current().await?;
let voltage = board.board_hal.get_mptt_voltage().await?;
let solar_state = Solar {
let solar_state = mqtt::Solar {
current_ma: current.as_milliamperes() as u32,
voltage_ma: voltage.as_millivolts() as u32,
};