Watch
0
0
Fork
You've already forked esp32-c_its-companion
0

Compare commits

..
4 changed files with 41 additions and 71 deletions

View file

@ -120,7 +120,17 @@ pub async fn run(
.. ..
} = stack.build(); } = stack.build();
let mut features = crate::util::get_rx_feature_list(); let mut features = alloc::vec![];
if cfg!(feature = "cam") {
features.push("cam");
}
if cfg!(feature = "denm") {
features.push("denm");
}
if cfg!(feature = "spat") {
features.push("mapem");
features.push("spatem");
}
info!( info!(
"Starting advertising and GATT service for {}", "Starting advertising and GATT service for {}",
features.join(",") features.join(",")

View file

@ -58,7 +58,6 @@ mod io;
mod screen; mod screen;
#[cfg(feature = "gnss_ubx")] #[cfg(feature = "gnss_ubx")]
mod ubx; mod ubx;
mod util;
const WIFI_CHANNEL: radio::Channel = 180; const WIFI_CHANNEL: radio::Channel = 180;
const WIFI_TXPOWER: i8 = 10; // dBm, 2..20 const WIFI_TXPOWER: i8 = 10; // dBm, 2..20

View file

@ -356,7 +356,7 @@ where
self.clear()?; self.clear()?;
text::Text::with_alignment( text::Text::with_alignment(
"Searching\nupcoming\nintersection...", "Searching...",
geometry::Point::new(i32::from(self.size.width) / 2, 130 + self.size.offset_top), geometry::Point::new(i32::from(self.size.width) / 2, 130 + self.size.offset_top),
Self::DEFAULT_TEXT_STYLE, Self::DEFAULT_TEXT_STYLE,
text::Alignment::Center, text::Alignment::Center,
@ -614,8 +614,6 @@ where
self.clear_all()?; self.clear_all()?;
#[cfg(feature = "spat")]
{
let sig_width = i32::from(self.size.width) / 3; let sig_width = i32::from(self.size.width) / 3;
let circle_dia = 50; let circle_dia = 50;
let circle_margin = (sig_width - circle_dia) / 2; let circle_margin = (sig_width - circle_dia) / 2;
@ -651,11 +649,6 @@ where
text::Alignment::Center, text::Alignment::Center,
) )
.draw(&mut self.target)?; .draw(&mut self.target)?;
}
// show features
let enabled_features = crate::util::get_rx_feature_list();
let enabled_tx_features = crate::util::get_tx_feature_list();
Ok(()) Ok(())
} }

View file

@ -1,32 +0,0 @@
//! Some stuff used at several places
use alloc::vec::Vec;
#[allow(unused)]
pub(crate) fn get_rx_feature_list() -> Vec<&'static str> {
let mut features = alloc::vec![];
if cfg!(feature = "cam") {
features.push("cam");
}
if cfg!(feature = "denm") {
features.push("denm");
}
if cfg!(feature = "spat") {
features.push("mapem");
features.push("spatem");
}
features
}
pub(crate) fn get_tx_feature_list() -> Vec<&'static str> {
let mut features = alloc::vec![];
if cfg!(feature = "cam_tx") {
features.push("cam-tx");
}
if cfg!(feature = "uart") {
features.push("uart-tx");
}
features
}