Skip to content
This repository has been archived by the owner on Jun 19, 2024. It is now read-only.

Commit

Permalink
refactor: rename VexDisplay to V5BrainDisplay
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin-Niederman committed Mar 13, 2024
1 parent 172d070 commit 567f0c1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions packages/pros-graphics/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,13 @@ use embedded_graphics_core::{
};
use pros_devices::{color::Rgb, Screen};

/// An embedded_graphics driver for the Brain display
pub struct VexDisplay {
/// An embedded_graphics driver for the V5 Brain display
pub struct V5BrainDisplay {
pixel_buffer:
Box<[u32; Screen::HORIZONTAL_RESOLUTION as usize * Screen::VERTICAL_RESOLUTION as usize]>,
}

impl VexDisplay {
impl V5BrainDisplay {
/// Creates a new VexDisplay from a Screen
pub fn new(_screen: Screen) -> Self {
let pixel_buffer = Box::new_zeroed();
Expand Down Expand Up @@ -52,13 +52,13 @@ impl VexDisplay {
}
}

impl From<Screen> for VexDisplay {
impl From<Screen> for V5BrainDisplay {
fn from(value: Screen) -> Self {
Self::new(value)
}
}

impl Dimensions for VexDisplay {
impl Dimensions for V5BrainDisplay {
fn bounding_box(&self) -> Rectangle {
Rectangle::new(
Point::new(0, 0),
Expand All @@ -70,7 +70,7 @@ impl Dimensions for VexDisplay {
}
}

impl DrawTarget for VexDisplay {
impl DrawTarget for V5BrainDisplay {
type Color = Rgb888;
type Error = pros_devices::screen::ScreenError;

Expand Down
2 changes: 1 addition & 1 deletion packages/pros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ pub mod prelude {
},
};
#[cfg(feature = "graphics")]
pub use pros_graphics::VexDisplay;
pub use pros_graphics::V5BrainDisplay;
#[cfg(feature = "math")]
pub use pros_math::{feedforward::MotorFeedforwardController, pid::PidController};
#[cfg(feature = "sync")]
Expand Down

0 comments on commit 567f0c1

Please sign in to comment.