VEXcode IQ C++ Unofficial documentation for version 3.0.4.1
Loading...
Searching...
No Matches
vex_pneumatic.h
Go to the documentation of this file.
1/*----------------------------------------------------------------------------*/
2/* */
3/* Copyright (c) Innovation First 2023, All rights reserved. */
4/* */
5/* Module: vex_pneumatic.h */
6/* Author: James Pearman */
7/* Created: 1 June 2023 */
8/* */
9/* Revisions: */
10/* V1.00 TBD - Initial release */
11/* */
12/*----------------------------------------------------------------------------*/
13
14#ifndef VEX_PNEUMATIC_CLASS_H
15#define VEX_PNEUMATIC_CLASS_H
16
17/*-----------------------------------------------------------------------------*/
20/*---------------------------------------------------------------------------*/
21
22/*-----------------------------------------------------------------------------*/
24/*-----------------------------------------------------------------------------*/
25namespace vex {
26 class pneumatic : public device {
27
28 public:
34 pneumatic( int32_t index, bool bPumpEnable = true );
35 ~pneumatic();
36
37 bool installed();
38
43 void extend( cylinderType id );
52 void pumpOn();
56 void pumpOff();
61 void pump( bool state );
62
63 protected:
64 uint32_t status();
65
66 private:
67 uint32_t _lastCtrlTime;
68 void _ctrldelay();
69 };
70}
71
72#endif // VEX_PNEUMATIC_CLASS_H
void pumpOn()
Turn on the pneumatic air pump.
void pumpOff()
Turn off the pneumatic air pump.
void extend(cylinderType id)
extend a pneumatic cylinder
pneumatic(int32_t index, bool bPumpEnable=true)
Creates a new pneumatic object on the port specified by the parameter.
void pump(bool state)
Set the pneumatic air pump to on or off.
void retract(cylinderType id)
retract a pneumatic cylinder
Bumper switch device class
Definition vex_brain.h:24
cylinderType
The defined types for pneumatic cylinders.
Definition vex_units.h:178