Skip to main content

LineChartBuffered

Struct LineChartBuffered 

Source
pub struct LineChartBuffered<const N: usize> { /* private fields */ }
Expand description

Version framebuffer de LineChart.

Identique à LineChart mais toutes les opérations de dessin écrivent dans le framebuffer RAM via GraphicsBuffered et les primitives *_buf. Aucun pixel n’est envoyé à l’écran avant l’appel à flush().

§Patron d’utilisation

let mut chart: LineChartBuffered<100> = LineChartBuffered::new(config);
chart.push(12.4);
chart.render_buf(&mut ecran);  // tout en RAM, synchrone
ecran.flush().await.unwrap();  // envoi unique → zéro clignotement

Implementations§

Source§

impl<const N: usize> LineChartBuffered<N>

Source

pub fn new(config: PlotConfig) -> Self

Source

pub fn push(&mut self, value: f32)

Source

pub fn clear(&mut self)

Source

pub fn render_buf<SPI, DC, RST>( &mut self, ecran: &mut St7789vBuffered<SPI, DC, RST>, )
where SPI: SpiDevice, DC: OutputPin, RST: OutputPin,

Rendu complet dans le framebuffer — synchrone, sans .await.

Appeler ecran.flush().await après pour envoyer à l’écran.

Auto Trait Implementations§

§

impl<const N: usize> Freeze for LineChartBuffered<N>

§

impl<const N: usize> RefUnwindSafe for LineChartBuffered<N>

§

impl<const N: usize> Send for LineChartBuffered<N>

§

impl<const N: usize> Sync for LineChartBuffered<N>

§

impl<const N: usize> Unpin for LineChartBuffered<N>

§

impl<const N: usize> UnsafeUnpin for LineChartBuffered<N>

§

impl<const N: usize> UnwindSafe for LineChartBuffered<N>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.