Skip to content

Commit

Permalink
mcu-util: serial can only be obtained if orb-ui not running (#86)
Browse files Browse the repository at this point in the history
make it optional
still unused anyway
  • Loading branch information
fouge authored May 4, 2024
1 parent fc65538 commit 056f8f9
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mcu-util/src/orb/main_board.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,9 @@ const REBOOT_DELAY: u32 = 3;
pub struct MainBoard {
canfd_iface: CanRawMessaging,
isotp_iface: CanIsoTpMessaging,
/// Optional serial interface for the main board, if available (ie orb-ui might own it)
#[allow(dead_code)]
serial_iface: SerialMessaging,
serial_iface: Option<SerialMessaging>,
message_queue_rx: mpsc::Receiver<McuPayload>,
}

Expand Down Expand Up @@ -55,7 +56,7 @@ impl MainBoardBuilder {
self.message_queue_tx.clone(),
)?;

let serial_iface = SerialMessaging::new(Device::Main)?;
let serial_iface = SerialMessaging::new(Device::Main).ok();

// Send a heartbeat to the main mcu to ensure it is alive
// & "subscribe" to the main mcu messages: messages to the Jetson
Expand Down

0 comments on commit 056f8f9

Please sign in to comment.