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
+33
@@ -0,0 +1,33 @@
|
||||
mod parser;
|
||||
mod parser_ast;
|
||||
mod parser_lexer;
|
||||
|
||||
use winnow::prelude::*;
|
||||
|
||||
#[allow(clippy::eq_op, clippy::erasing_op)]
|
||||
fn arithmetic(c: &mut criterion::Criterion) {
|
||||
let data = " 2*2 / ( 5 - 1) + 3 / 4 * (2 - 7 + 567 *12 /2) + 3*(1+2*( 45 /2))";
|
||||
let expected = 2 * 2 / (5 - 1) + 3 * (1 + 2 * (45 / 2));
|
||||
|
||||
assert_eq!(parser::expr.parse(data), Ok(expected));
|
||||
assert_eq!(
|
||||
parser_ast::expr.parse(data).map(|ast| ast.eval()),
|
||||
Ok(expected)
|
||||
);
|
||||
assert_eq!(
|
||||
parser_lexer::expr2.parse(data).map(|ast| ast.eval()),
|
||||
Ok(expected)
|
||||
);
|
||||
c.bench_function("direct", |b| {
|
||||
b.iter(|| parser::expr.parse(data).unwrap());
|
||||
});
|
||||
c.bench_function("ast", |b| {
|
||||
b.iter(|| parser_ast::expr.parse(data).unwrap().eval());
|
||||
});
|
||||
c.bench_function("lexer", |b| {
|
||||
b.iter(|| parser_lexer::expr2.parse_peek(data).unwrap());
|
||||
});
|
||||
}
|
||||
|
||||
criterion::criterion_group!(benches, arithmetic);
|
||||
criterion::criterion_main!(benches);
|
||||
Reference in new issue
Block a user