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
@@ -0,0 +1,24 @@
|
||||
use pulldown_cmark::{html, Options, Parser};
|
||||
|
||||
fn main() {
|
||||
let markdown_input: &str = "Hello world, this is a ~~complicated~~ *very simple* example.";
|
||||
println!("Parsing the following markdown string:\n{}", markdown_input);
|
||||
|
||||
// Set up options and parser. Strikethroughs are not part of the CommonMark standard
|
||||
// and we therefore must enable it explicitly.
|
||||
let mut options = Options::empty();
|
||||
options.insert(Options::ENABLE_STRIKETHROUGH);
|
||||
let parser = Parser::new_ext(markdown_input, options);
|
||||
|
||||
// Write to String buffer.
|
||||
let mut html_output: String = String::with_capacity(markdown_input.len() * 3 / 2);
|
||||
html::push_html(&mut html_output, parser);
|
||||
|
||||
// Check that the output is what we expected.
|
||||
let expected_html: &str =
|
||||
"<p>Hello world, this is a <del>complicated</del> <em>very simple</em> example.</p>\n";
|
||||
assert_eq!(expected_html, &html_output);
|
||||
|
||||
// Write result to stdout.
|
||||
println!("\nHTML output:\n{}", &html_output);
|
||||
}
|
||||
Reference in new issue
Block a user