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
+65
@@ -0,0 +1,65 @@
|
||||
//! Sanity check that alternate hashers work correctly.
|
||||
|
||||
#![cfg(not(miri))] // FIXME: takes too long
|
||||
|
||||
use hashbrown::HashSet;
|
||||
use std::hash::{BuildHasher, BuildHasherDefault, Hasher};
|
||||
|
||||
fn check<S: BuildHasher + Default>() {
|
||||
let range = 0..1_000;
|
||||
|
||||
let mut set = HashSet::<i32, S>::default();
|
||||
set.extend(range.clone());
|
||||
|
||||
assert!(!set.contains(&i32::MIN));
|
||||
assert!(!set.contains(&(range.start - 1)));
|
||||
for i in range.clone() {
|
||||
assert!(set.contains(&i));
|
||||
}
|
||||
assert!(!set.contains(&range.end));
|
||||
assert!(!set.contains(&i32::MAX));
|
||||
}
|
||||
|
||||
/// Use hashbrown's default hasher.
|
||||
#[test]
|
||||
fn default() {
|
||||
check::<hashbrown::DefaultHashBuilder>();
|
||||
}
|
||||
|
||||
/// Use std's default hasher.
|
||||
#[test]
|
||||
fn random_state() {
|
||||
check::<std::collections::hash_map::RandomState>();
|
||||
}
|
||||
|
||||
/// Use a constant 0 hash.
|
||||
#[test]
|
||||
fn zero() {
|
||||
#[derive(Default)]
|
||||
struct ZeroHasher;
|
||||
|
||||
impl Hasher for ZeroHasher {
|
||||
fn finish(&self) -> u64 {
|
||||
0
|
||||
}
|
||||
fn write(&mut self, _: &[u8]) {}
|
||||
}
|
||||
|
||||
check::<BuildHasherDefault<ZeroHasher>>();
|
||||
}
|
||||
|
||||
/// Use a constant maximum hash.
|
||||
#[test]
|
||||
fn max() {
|
||||
#[derive(Default)]
|
||||
struct MaxHasher;
|
||||
|
||||
impl Hasher for MaxHasher {
|
||||
fn finish(&self) -> u64 {
|
||||
u64::MAX
|
||||
}
|
||||
fn write(&mut self, _: &[u8]) {}
|
||||
}
|
||||
|
||||
check::<BuildHasherDefault<MaxHasher>>();
|
||||
}
|
||||
Reference in new issue
Block a user