ProsController
vectorlib::ProsController — fields, methods, parameters and return types.
pub struct ProsController<C: ControllerDevice = Controller>PROS's controller functions on top of a ControllerDevice: print, clear,
get_digital and get_digital_new_press with PROS's exact behaviour (31-character
truncation, 0-indexed lines and columns, per-button press latches).
Methods
Prop
Type
new
pub const fn new(device: C) -> SelfWrap a controller.
Parameters
Prop
Type
Returns
Selfdevice
pub fn device(&mut self) -> &mut CThe wrapped controller.
Returns
&mut Cpub fn print(&mut self, line: u8, col: u8, text: &str)controller_print(line, col, fmt, ...): text is the already-formatted string.
Parameters
Prop
Type
Returns
()clear
pub fn clear(&mut self)controller_clear (VEXos newer than 1.0: controller_print(id, -1, 0, "")).
Returns
()get_digital
pub fn get_digital(&self, button: ControllerButton) -> boolcontroller_get_digital.
Parameters
Prop
Type
Returns
boolget_digital_new_press
pub fn get_digital_new_press(&mut self, button: ControllerButton) -> boolcontroller_get_digital_new_press: true the first time this is called while the
button is held, false until it has been seen released by this function again.
Parameters
Prop
Type
Returns
bool