WPILibC++ 2025.2.1
Loading...
Searching...
No Matches
CommandStadiaController.h
Go to the documentation of this file.
1// Copyright (c) FIRST and other WPILib contributors.
2// Open Source Software; you can modify and/or share it under the terms of
3// the WPILib BSD license file in the root directory of this project.
4
5// THIS FILE WAS AUTO-GENERATED BY ./wpilibNewCommands/generate_hids.py. DO NOT MODIFY
6
7#pragma once
9
13
14namespace frc2 {
15/**
16 * A version of {@link frc::StadiaController} with {@link Trigger} factories for
17 * command-based.
18 *
19 * @see frc::StadiaController
20 */
22 public:
23 /**
24 * Construct an instance of a controller.
25 *
26 * @param port The port index on the Driver Station that the controller is
27 * plugged into.
28 */
29 explicit CommandStadiaController(int port);
30
31 /**
32 * Get the underlying GenericHID object.
33 *
34 * @return the wrapped GenericHID object
35 */
37
38 /**
39 * Constructs a Trigger instance around the A button's
40 * digital signal.
41 *
42 * @param loop the event loop instance to attach the event to. Defaults to the
43 * CommandScheduler's default loop.
44 * @return a Trigger instance representing the A button's
45 * digital signal attached to the given loop.
46 */
48 .GetDefaultButtonLoop()) const;
49
50 /**
51 * Constructs a Trigger instance around the B button's
52 * digital signal.
53 *
54 * @param loop the event loop instance to attach the event to. Defaults to the
55 * CommandScheduler's default loop.
56 * @return a Trigger instance representing the B button's
57 * digital signal attached to the given loop.
58 */
60 .GetDefaultButtonLoop()) const;
61
62 /**
63 * Constructs a Trigger instance around the X button's
64 * digital signal.
65 *
66 * @param loop the event loop instance to attach the event to. Defaults to the
67 * CommandScheduler's default loop.
68 * @return a Trigger instance representing the X button's
69 * digital signal attached to the given loop.
70 */
72 .GetDefaultButtonLoop()) const;
73
74 /**
75 * Constructs a Trigger instance around the Y button's
76 * digital signal.
77 *
78 * @param loop the event loop instance to attach the event to. Defaults to the
79 * CommandScheduler's default loop.
80 * @return a Trigger instance representing the Y button's
81 * digital signal attached to the given loop.
82 */
84 .GetDefaultButtonLoop()) const;
85
86 /**
87 * Constructs a Trigger instance around the left bumper button's
88 * digital signal.
89 *
90 * @param loop the event loop instance to attach the event to. Defaults to the
91 * CommandScheduler's default loop.
92 * @return a Trigger instance representing the left bumper button's
93 * digital signal attached to the given loop.
94 */
96 .GetDefaultButtonLoop()) const;
97
98 /**
99 * Constructs a Trigger instance around the right bumper button's
100 * digital signal.
101 *
102 * @param loop the event loop instance to attach the event to. Defaults to the
103 * CommandScheduler's default loop.
104 * @return a Trigger instance representing the right bumper button's
105 * digital signal attached to the given loop.
106 */
108 .GetDefaultButtonLoop()) const;
109
110 /**
111 * Constructs a Trigger instance around the left stick button's
112 * digital signal.
113 *
114 * @param loop the event loop instance to attach the event to. Defaults to the
115 * CommandScheduler's default loop.
116 * @return a Trigger instance representing the left stick button's
117 * digital signal attached to the given loop.
118 */
120 .GetDefaultButtonLoop()) const;
121
122 /**
123 * Constructs a Trigger instance around the right stick button's
124 * digital signal.
125 *
126 * @param loop the event loop instance to attach the event to. Defaults to the
127 * CommandScheduler's default loop.
128 * @return a Trigger instance representing the right stick button's
129 * digital signal attached to the given loop.
130 */
132 .GetDefaultButtonLoop()) const;
133
134 /**
135 * Constructs a Trigger instance around the ellipses button's
136 * digital signal.
137 *
138 * @param loop the event loop instance to attach the event to. Defaults to the
139 * CommandScheduler's default loop.
140 * @return a Trigger instance representing the ellipses button's
141 * digital signal attached to the given loop.
142 */
144 .GetDefaultButtonLoop()) const;
145
146 /**
147 * Constructs a Trigger instance around the hamburger button's
148 * digital signal.
149 *
150 * @param loop the event loop instance to attach the event to. Defaults to the
151 * CommandScheduler's default loop.
152 * @return a Trigger instance representing the hamburger button's
153 * digital signal attached to the given loop.
154 */
156 .GetDefaultButtonLoop()) const;
157
158 /**
159 * Constructs a Trigger instance around the stadia button's
160 * digital signal.
161 *
162 * @param loop the event loop instance to attach the event to. Defaults to the
163 * CommandScheduler's default loop.
164 * @return a Trigger instance representing the stadia button's
165 * digital signal attached to the given loop.
166 */
168 .GetDefaultButtonLoop()) const;
169
170 /**
171 * Constructs a Trigger instance around the right trigger button's
172 * digital signal.
173 *
174 * @param loop the event loop instance to attach the event to. Defaults to the
175 * CommandScheduler's default loop.
176 * @return a Trigger instance representing the right trigger button's
177 * digital signal attached to the given loop.
178 */
180 .GetDefaultButtonLoop()) const;
181
182 /**
183 * Constructs a Trigger instance around the left trigger button's
184 * digital signal.
185 *
186 * @param loop the event loop instance to attach the event to. Defaults to the
187 * CommandScheduler's default loop.
188 * @return a Trigger instance representing the left trigger button's
189 * digital signal attached to the given loop.
190 */
192 .GetDefaultButtonLoop()) const;
193
194 /**
195 * Constructs a Trigger instance around the google button's
196 * digital signal.
197 *
198 * @param loop the event loop instance to attach the event to. Defaults to the
199 * CommandScheduler's default loop.
200 * @return a Trigger instance representing the google button's
201 * digital signal attached to the given loop.
202 */
204 .GetDefaultButtonLoop()) const;
205
206 /**
207 * Constructs a Trigger instance around the frame button's
208 * digital signal.
209 *
210 * @param loop the event loop instance to attach the event to. Defaults to the
211 * CommandScheduler's default loop.
212 * @return a Trigger instance representing the frame button's
213 * digital signal attached to the given loop.
214 */
216 .GetDefaultButtonLoop()) const;
217
218 /**
219 * Get the X axis value of left side of the controller.
220 *
221 * @return The axis value.
222 */
223 double GetLeftX() const;
224
225 /**
226 * Get the X axis value of right side of the controller.
227 *
228 * @return The axis value.
229 */
230 double GetRightX() const;
231
232 /**
233 * Get the Y axis value of left side of the controller.
234 *
235 * @return The axis value.
236 */
237 double GetLeftY() const;
238
239 /**
240 * Get the Y axis value of right side of the controller.
241 *
242 * @return The axis value.
243 */
244 double GetRightY() const;
245
246 private:
248};
249} // namespace frc2
A version of frc::GenericHID with Trigger factories for command-based.
Definition CommandGenericHID.h:19
static CommandScheduler & GetInstance()
Returns the Scheduler instance.
A version of frc::StadiaController with Trigger factories for command-based.
Definition CommandStadiaController.h:21
frc::StadiaController & GetHID()
Get the underlying GenericHID object.
Trigger LeftBumper(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the left bumper button's digital signal.
double GetLeftX() const
Get the X axis value of left side of the controller.
double GetLeftY() const
Get the Y axis value of left side of the controller.
Trigger Google(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the google button's digital signal.
Trigger Ellipses(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the ellipses button's digital signal.
Trigger X(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the X button's digital signal.
Trigger LeftStick(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the left stick button's digital signal.
Trigger B(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the B button's digital signal.
Trigger LeftTrigger(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the left trigger button's digital signal.
Trigger Y(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the Y button's digital signal.
Trigger Frame(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the frame button's digital signal.
double GetRightX() const
Get the X axis value of right side of the controller.
CommandStadiaController(int port)
Construct an instance of a controller.
Trigger Hamburger(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the hamburger button's digital signal.
Trigger Stadia(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the stadia button's digital signal.
Trigger A(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the A button's digital signal.
Trigger RightBumper(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the right bumper button's digital signal.
Trigger RightStick(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the right stick button's digital signal.
double GetRightY() const
Get the Y axis value of right side of the controller.
Trigger RightTrigger(frc::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the right trigger button's digital signal.
This class provides an easy way to link commands to conditions.
Definition Trigger.h:32
A declarative way to bind a set of actions to a loop and execute them when the loop is polled.
Definition EventLoop.h:15
Handle input from Stadia controllers connected to the Driver Station.
Definition StadiaController.h:30
Definition FunctionalCommand.h:13