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

Compare commits

...
Author SHA1 Message Date
Jannik Beyerstedt
6580809609 PATCH: Ignore RW DENM 2026-10-12 16:28:59 +02:00
Jannik Beyerstedt
91027e8f97 PATCH: c-inno demo variation 2026-10-12 16:26:08 +02:00
4 changed files with 35 additions and 3 deletions

6
run-standalone-denm.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
## Builds common config for standalone device
## -> enable DENM with GNSS and a screen (no GLOSA)
cargo run --release --no-default-features -F esp,screen,gnss_ubx,denm,ble

6
run-standalone-glosa+denm.sh Executable file
View file

@ -0,0 +1,6 @@
#!/bin/sh
## Builds common config for standalone device
## -> enable SPAT/ GLOSA and DENM icons with GNSS and a screen and BLE
cargo run --release -F denm,cam_tx

View file

@ -603,10 +603,15 @@ async fn main(spawner: Spawner) -> ! {
match applogic::denm::handle_denm(etsi) { match applogic::denm::handle_denm(etsi) {
#[cfg(feature = "screen")] #[cfg(feature = "screen")]
Some(cc) => { Some(cc) => {
match cc.to_u8_tuple() {
(3, _) => {} // ignore CC 3
_ => {
let _ = screen let _ = screen
.update(screen::ScreenState::DenmWarning(cc)) .update(screen::ScreenState::DenmWarning(cc))
.inspect_err(log_screen_error); .inspect_err(log_screen_error);
} }
}
}
_ => {} _ => {}
} }

View file

@ -561,6 +561,14 @@ where
// clear whole display and draw text // clear whole display and draw text
self.clear()?; self.clear()?;
text::Text::with_alignment(
"consider\ninnovation",
geometry::Point::new(i32::from(self.size.width) / 2, 40 + self.size.offset_top),
Self::MID_TEXT_STYLE,
text::Alignment::Center,
)
.draw(&mut self.target)?;
text::Text::with_alignment( text::Text::with_alignment(
"Waiting\nfor DENM...", "Waiting\nfor DENM...",
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),
@ -684,6 +692,13 @@ where
) )
.draw(&mut self.target)?; .draw(&mut self.target)?;
} else { } else {
text::Text::with_alignment(
"consider\ninnovation",
geometry::Point::new(centerline, 40 + self.size.offset_top),
Self::MID_TEXT_STYLE,
text::Alignment::Center,
)
.draw(&mut self.target)?;
text::Text::with_alignment( text::Text::with_alignment(
"C-ITS Companion", "C-ITS Companion",
geometry::Point::new(centerline, 130 + self.size.offset_top), geometry::Point::new(centerline, 130 + self.size.offset_top),