LightLib
PROS library for VEX V5: EKF/MCL localization, RAMSETE path following, high-level chassis API
Loading...
Searching...
No Matches
controllerUtil.hpp
Go to the documentation of this file.
1/*
2 * This Source Code Form is subject to the terms of the Mozilla Public
3 * License, v. 2.0. If a copy of the MPL was not distributed with this
4 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 */
6#pragma once
7
8#include "api.h"
9
10namespace okapi {
14enum class ControllerId {
15 master = 0,
16 partner = 1
17};
18
22enum class ControllerAnalog {
23 leftX = 0,
24 leftY = 1,
25 rightX = 2,
26 rightY = 3
27};
28
33 L1 = 6,
34 L2 = 7,
35 R1 = 8,
36 R2 = 9,
37 up = 10,
38 down = 11,
39 left = 12,
40 right = 13,
41 X = 14,
42 B = 15,
43 Y = 16,
44 A = 17
45};
46
48 public:
52 static pros::controller_id_e_t idToProsEnum(ControllerId in);
53
57 static pros::controller_analog_e_t analogToProsEnum(ControllerAnalog in);
58
62 static pros::controller_digital_e_t digitalToProsEnum(ControllerDigital in);
63};
64} // namespace okapi
PROS API header provides high-level user functionality.
static pros::controller_id_e_t idToProsEnum(ControllerId in)
Maps an id to the PROS enum equivalent.
static pros::controller_analog_e_t analogToProsEnum(ControllerAnalog in)
Maps an analog to the PROS enum equivalent.
static pros::controller_digital_e_t digitalToProsEnum(ControllerDigital in)
Maps a digital to the PROS enum equivalent.
ControllerId
Which controller role this has.
ControllerDigital
Various buttons.
ControllerAnalog
The analog sticks.