Removed tattle tale test driver

This commit is contained in:
2024-08-24 10:59:43 -04:00
parent ee334db157
commit 1c7a10c330
2 changed files with 0 additions and 39 deletions

View File

@ -11,7 +11,6 @@ use std::ops::Deref;
// Debug modules
mod test_console;
//mod test_driver_tattle;
// Release modules
mod commands;

View File

@ -1,38 +0,0 @@
/// Listen to every command handled by dispatch, and report it to uart.
use log::*; //{trace, debug, info, warn, error}
use strum::EnumCount;
use crate::commands::Commands;
use crate::dispatch::Dispatch;
use async_channel::Receiver;
pub fn prepare_tattle(dispatch: &mut Dispatch) -> anyhow::Result<Receiver<Commands>> {
let cmds = vec![
Commands::PicRecvUp,
Commands::PicRecvDown,
Commands::PicRecvStop,
Commands::BluetoothUp{data: 0},
Commands::BluetoothDown{data: 0},
Commands::BluetoothStop{_data: 0},
Commands::StopTimerExpired,
Commands::StopTimerRestart,
Commands::StopTimerClear,
Commands::ButtonTimerExpired,
Commands::ButtonTimerRestart,
Commands::ButtonTimerClear,
];
if Commands::COUNT != cmds.len() {
warn!("Incorrect number of commands are being tattled on. Total commands: {}, listening to {}", Commands::COUNT, cmds.len());
}
let r_channel = dispatch.get_callback_channel(&cmds);
Ok(r_channel)
}
pub async fn start_tattle(r_channel: Receiver<Commands>) -> anyhow::Result<()> {
debug!("Tattle started listening to messages");
loop {
let msg = r_channel.recv().await?;
debug!("Message: {:?}", msg);
}
}