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:
swaitsandClaude Opus 4.6 committed 2026-03-29 20:42:54 -06:00
1 parent 7064110293
commit 3102fc747a
17624 files changed
+4564928 -38

No files matched your search

+79
View File
@@ -0,0 +1,79 @@
use std::{self, error, fmt, io, str};
use semver::{self, Identifier};
/// The error type for this crate.
#[derive(Debug)]
pub enum Error {
/// An error ocurrend when executing the `rustc` command.
CouldNotExecuteCommand(io::Error),
/// The output of `rustc -vV` was not valid utf-8.
Utf8Error(str::Utf8Error),
/// The output of `rustc -vV` was not in the expected format.
UnexpectedVersionFormat,
/// An error ocurred in parsing a `VersionReq`.
ReqParseError(semver::ReqParseError),
/// An error ocurred in parsing the semver.
SemVerError(semver::SemVerError),
/// The pre-release tag is unknown.
UnknownPreReleaseTag(Identifier),
}
use Error::*;
impl fmt::Display for Error {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
use std::error::Error;
match *self {
CouldNotExecuteCommand(ref e) => write!(f, "{}: {}", self.description(), e),
Utf8Error(_) => write!(f, "{}", self.description()),
UnexpectedVersionFormat => write!(f, "{}", self.description()),
ReqParseError(ref e) => write!(f, "{}: {}", self.description(), e),
SemVerError(ref e) => write!(f, "{}: {}", self.description(), e),
UnknownPreReleaseTag(ref i) => write!(f, "{}: {}", self.description(), i),
}
}
}
impl error::Error for Error {
fn cause(&self) -> Option<&error::Error> {
match *self {
CouldNotExecuteCommand(ref e) => Some(e),
Utf8Error(ref e) => Some(e),
UnexpectedVersionFormat => None,
ReqParseError(ref e) => Some(e),
SemVerError(ref e) => Some(e),
UnknownPreReleaseTag(_) => None,
}
}
fn description(&self) -> &str {
match *self {
CouldNotExecuteCommand(_) => "could not execute command",
Utf8Error(_) => "invalid UTF-8 output from `rustc -vV`",
UnexpectedVersionFormat => "unexpected `rustc -vV` format",
ReqParseError(_) => "error parsing version requirement",
SemVerError(_) => "error parsing version",
UnknownPreReleaseTag(_) => "unknown pre-release tag",
}
}
}
macro_rules! impl_from {
($($err_ty:ty => $variant:ident),* $(,)*) => {
$(
impl From<$err_ty> for Error {
fn from(e: $err_ty) -> Error {
Error::$variant(e)
}
}
)*
}
}
impl_from! {
str::Utf8Error => Utf8Error,
semver::SemVerError => SemVerError,
semver::ReqParseError => ReqParseError,
}
/// The result type for this crate.
pub type Result<T> = std::result::Result<T, Error>;