pub struct AttentionConfig {
pub timeout: Duration,
pub dim_margin: Duration,
pub dim_ramp: Duration,
}Expand description
Timing policy. Held by value so a board can adjust it at runtime —
the plumbing a future PROP_DISPLAY_TIMEOUT needs.
Fields§
§timeout: DurationInactivity before attention lapses.
dim_margin: DurationHow long before timeout an emissive panel dims as a warning.
Zero (or anything at least as large as timeout) disables the
dim state. Ignored for persistent panels.
dim_ramp: DurationHow long the fall from full brightness to the dim floor is drawn out over. Zero drops in a single step, which is what a persistent panel — and any board whose panel cannot be dimmed gradually — wants.
Implementations§
Source§impl AttentionConfig
impl AttentionConfig
Sourcepub const EMISSIVE: Self
pub const EMISSIVE: Self
OLED default: off after 30 s, dimmed for the last 10 s of that, falling into the dim over the first second of those ten.
The numbers are what a panel a person is actually reading from needs: twenty seconds is long enough to walk to a menu entry, read it, and think about it, and ten dimmed seconds afterwards is long enough that the warning is a warning rather than the last moment before the screen is gone.
Sourcepub const PERSISTENT: Self
pub const PERSISTENT: Self
E-paper default: menu returns home after 30 s. Longer than the emissive timeout because nothing is being spent to keep the screen readable — only stale menu context is at stake — and because each partial refresh is visible enough that a twitchy fallback would be an annoyance of its own.
Trait Implementations§
Source§impl Clone for AttentionConfig
impl Clone for AttentionConfig
Source§fn clone(&self) -> AttentionConfig
fn clone(&self) -> AttentionConfig
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AttentionConfig
impl Debug for AttentionConfig
Source§impl PartialEq for AttentionConfig
impl PartialEq for AttentionConfig
impl Copy for AttentionConfig
impl Eq for AttentionConfig
impl StructuralPartialEq for AttentionConfig
Auto Trait Implementations§
impl Freeze for AttentionConfig
impl RefUnwindSafe for AttentionConfig
impl Send for AttentionConfig
impl Sync for AttentionConfig
impl Unpin for AttentionConfig
impl UnwindSafe for AttentionConfig
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CheckedAs for T
impl<T> CheckedAs for T
Source§fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
fn checked_as<Dst>(self) -> Option<Dst>where
T: CheckedCast<Dst>,
Source§impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
impl<Src, Dst> CheckedCastFrom<Src> for Dstwhere
Src: CheckedCast<Dst>,
Source§fn checked_cast_from(src: Src) -> Option<Dst>
fn checked_cast_from(src: Src) -> Option<Dst>
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)