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

Commit

Permalink
feat: add graphics feature to pros
Browse files Browse the repository at this point in the history
  • Loading branch information
Gavin-Niederman committed Mar 13, 2024
1 parent d987f4e commit 172d070
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/pros/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ rust-version = "1.75.0"
pros-sync = { version = "0.1.0", path = "../pros-sync", optional = true }
pros-async = { version = "0.1.0", path = "../pros-async", optional = true }
pros-devices = { version = "0.1.0", path = "../pros-devices", optional = true }
pros-graphics = { version = "0.1.0", path = "../pros-graphics", optional = true }
pros-panic = { version = "0.1.0", path = "../pros-panic", optional = true }
pros-core = { version = "0.1.0", path = "../pros-core", optional = true }
pros-math = { version = "0.1.0", path = "../pros-math", optional = true }
Expand All @@ -35,6 +36,7 @@ async = ["dep:pros-async"]
sync = ["dep:pros-sync"]

devices = ["dep:pros-devices"]
graphics = ["dep:pros-graphics"]

math = ["dep:pros-math"]

Expand Down
10 changes: 9 additions & 1 deletion packages/pros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ pub use pros_async as async_runtime;
pub use pros_core as core;
#[cfg(feature = "devices")]
pub use pros_devices as devices;
#[cfg(feature = "graphics")]
pub use pros_graphics as graphics;
#[cfg(feature = "math")]
pub use pros_math as math;
#[cfg(feature = "panic")]
Expand All @@ -82,6 +84,10 @@ pub mod prelude {
print, println,
task::delay,
};
#[cfg(all(not(feature = "graphics"), feature = "devices"))]
pub use pros_devices::screen::{
Circle, Line, Rect, Text, TextFormat, TextPosition, TouchState,
};
#[cfg(feature = "devices")]
pub use pros_devices::{
adi::{
Expand All @@ -99,7 +105,7 @@ pub mod prelude {
color::Rgb,
peripherals::{DynamicPeripherals, Peripherals},
position::Position,
screen::{Circle, Line, Rect, Screen, Text, TextFormat, TextPosition, TouchState},
screen::Screen,
smart::{
distance::DistanceSensor,
expander::AdiExpander,
Expand All @@ -113,6 +119,8 @@ pub mod prelude {
SmartDevice, SmartPort,
},
};
#[cfg(feature = "graphics")]
pub use pros_graphics::VexDisplay;
#[cfg(feature = "math")]
pub use pros_math::{feedforward::MotorFeedforwardController, pid::PidController};
#[cfg(feature = "sync")]
Expand Down

0 comments on commit 172d070

Please sign in to comment.