feat: add display UI with splash screen, dashboard, and RSSI sparkline
Implement full SSD1306 OLED display support: - Splash screen on boot (1.5s) with project name, version, board - Dashboard showing radio state, config, counters, RSSI/SNR - RSSI history sparkline (64-sample ring buffer, 2px-wide bars) - DisplayOn/DisplayOff host commands routed via dedicated channel - Pure render functions against generic DrawTarget (no hardware coupling) - Display on/off control bypasses radio task entirely Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
17624 files changed
+4564928
-38
No files matched your search
Vendored
+57
@@ -0,0 +1,57 @@
|
||||
use darling::FromVariant;
|
||||
use syn::{spanned::Spanned, Expr, ExprLit, LitInt};
|
||||
|
||||
#[derive(FromVariant)]
|
||||
#[darling(from_ident, attributes(hello))]
|
||||
#[allow(dead_code)]
|
||||
pub struct Lorem {
|
||||
ident: syn::Ident,
|
||||
into: Option<bool>,
|
||||
skip: Option<bool>,
|
||||
discriminant: Option<syn::Expr>,
|
||||
fields: darling::ast::Fields<syn::Type>,
|
||||
}
|
||||
|
||||
impl From<syn::Ident> for Lorem {
|
||||
fn from(ident: syn::Ident) -> Self {
|
||||
Lorem {
|
||||
ident,
|
||||
into: Default::default(),
|
||||
skip: Default::default(),
|
||||
discriminant: None,
|
||||
fields: darling::ast::Style::Unit.into(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn discriminant() {
|
||||
let input: syn::DeriveInput = syn::parse_str(
|
||||
r#"
|
||||
pub enum Test {
|
||||
Works = 1,
|
||||
AlsoWorks = 2,
|
||||
}
|
||||
"#,
|
||||
)
|
||||
.unwrap();
|
||||
|
||||
let span = input.span();
|
||||
if let syn::Data::Enum(enm) = input.data {
|
||||
let lorem = Lorem::from_variant(
|
||||
enm.variants
|
||||
.first()
|
||||
.expect("Hardcoded input has one variant"),
|
||||
)
|
||||
.expect("FromVariant can process the discriminant");
|
||||
assert_eq!(
|
||||
lorem.discriminant,
|
||||
Some(Expr::Lit(ExprLit {
|
||||
attrs: vec![],
|
||||
lit: LitInt::new("1", span).into(),
|
||||
}))
|
||||
)
|
||||
} else {
|
||||
panic!("Data should be enum");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user