WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
CommandNiDsStadiaController.hpp
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 ./commandsv2/generate_hids.py. DO NOT MODIFY
6
7#pragma once
8
10
14
15namespace wpi::cmd {
16/**
17 * A version of {@link wpi::NiDsStadiaController} with {@link Trigger} factories for
18 * command-based.
19 *
20 * @see wpi::NiDsStadiaController
21 */
23 public:
24 /**
25 * Construct an instance of a controller.
26 *
27 * @param port The port index on the Driver Station that the controller is
28 * plugged into.
29 */
30 explicit CommandNiDsStadiaController(int port);
31
32 /**
33 * Get the underlying GenericHID object.
34 *
35 * @return the wrapped GenericHID object
36 */
38
39 /**
40 * Constructs a Trigger instance around the A button's
41 * digital signal.
42 *
43 * @param loop the event loop instance to attach the event to. Defaults to the
44 * CommandScheduler's default loop.
45 * @return a Trigger instance representing the A button's
46 * digital signal attached to the given loop.
47 */
49 .GetDefaultButtonLoop()) const;
50
51 /**
52 * Constructs a Trigger instance around the B button's
53 * digital signal.
54 *
55 * @param loop the event loop instance to attach the event to. Defaults to the
56 * CommandScheduler's default loop.
57 * @return a Trigger instance representing the B button's
58 * digital signal attached to the given loop.
59 */
61 .GetDefaultButtonLoop()) const;
62
63 /**
64 * Constructs a Trigger instance around the X button's
65 * digital signal.
66 *
67 * @param loop the event loop instance to attach the event to. Defaults to the
68 * CommandScheduler's default loop.
69 * @return a Trigger instance representing the X button's
70 * digital signal attached to the given loop.
71 */
73 .GetDefaultButtonLoop()) const;
74
75 /**
76 * Constructs a Trigger instance around the Y button's
77 * digital signal.
78 *
79 * @param loop the event loop instance to attach the event to. Defaults to the
80 * CommandScheduler's default loop.
81 * @return a Trigger instance representing the Y button's
82 * digital signal attached to the given loop.
83 */
85 .GetDefaultButtonLoop()) const;
86
87 /**
88 * Constructs a Trigger instance around the left bumper button's
89 * digital signal.
90 *
91 * @param loop the event loop instance to attach the event to. Defaults to the
92 * CommandScheduler's default loop.
93 * @return a Trigger instance representing the left bumper button's
94 * digital signal attached to the given loop.
95 */
97 .GetDefaultButtonLoop()) const;
98
99 /**
100 * Constructs a Trigger instance around the right bumper button's
101 * digital signal.
102 *
103 * @param loop the event loop instance to attach the event to. Defaults to the
104 * CommandScheduler's default loop.
105 * @return a Trigger instance representing the right bumper button's
106 * digital signal attached to the given loop.
107 */
109 .GetDefaultButtonLoop()) const;
110
111 /**
112 * Constructs a Trigger instance around the left stick button's
113 * digital signal.
114 *
115 * @param loop the event loop instance to attach the event to. Defaults to the
116 * CommandScheduler's default loop.
117 * @return a Trigger instance representing the left stick button's
118 * digital signal attached to the given loop.
119 */
121 .GetDefaultButtonLoop()) const;
122
123 /**
124 * Constructs a Trigger instance around the right stick button's
125 * digital signal.
126 *
127 * @param loop the event loop instance to attach the event to. Defaults to the
128 * CommandScheduler's default loop.
129 * @return a Trigger instance representing the right stick button's
130 * digital signal attached to the given loop.
131 */
133 .GetDefaultButtonLoop()) const;
134
135 /**
136 * Constructs a Trigger instance around the ellipses button's
137 * digital signal.
138 *
139 * @param loop the event loop instance to attach the event to. Defaults to the
140 * CommandScheduler's default loop.
141 * @return a Trigger instance representing the ellipses button's
142 * digital signal attached to the given loop.
143 */
145 .GetDefaultButtonLoop()) const;
146
147 /**
148 * Constructs a Trigger instance around the hamburger button's
149 * digital signal.
150 *
151 * @param loop the event loop instance to attach the event to. Defaults to the
152 * CommandScheduler's default loop.
153 * @return a Trigger instance representing the hamburger button's
154 * digital signal attached to the given loop.
155 */
157 .GetDefaultButtonLoop()) const;
158
159 /**
160 * Constructs a Trigger instance around the stadia button's
161 * digital signal.
162 *
163 * @param loop the event loop instance to attach the event to. Defaults to the
164 * CommandScheduler's default loop.
165 * @return a Trigger instance representing the stadia button's
166 * digital signal attached to the given loop.
167 */
169 .GetDefaultButtonLoop()) const;
170
171 /**
172 * Constructs a Trigger instance around the right trigger button's
173 * digital signal.
174 *
175 * @param loop the event loop instance to attach the event to. Defaults to the
176 * CommandScheduler's default loop.
177 * @return a Trigger instance representing the right trigger button's
178 * digital signal attached to the given loop.
179 */
181 .GetDefaultButtonLoop()) const;
182
183 /**
184 * Constructs a Trigger instance around the left trigger button's
185 * digital signal.
186 *
187 * @param loop the event loop instance to attach the event to. Defaults to the
188 * CommandScheduler's default loop.
189 * @return a Trigger instance representing the left trigger button's
190 * digital signal attached to the given loop.
191 */
193 .GetDefaultButtonLoop()) const;
194
195 /**
196 * Constructs a Trigger instance around the google button's
197 * digital signal.
198 *
199 * @param loop the event loop instance to attach the event to. Defaults to the
200 * CommandScheduler's default loop.
201 * @return a Trigger instance representing the google button's
202 * digital signal attached to the given loop.
203 */
205 .GetDefaultButtonLoop()) const;
206
207 /**
208 * Constructs a Trigger instance around the frame button's
209 * digital signal.
210 *
211 * @param loop the event loop instance to attach the event to. Defaults to the
212 * CommandScheduler's default loop.
213 * @return a Trigger instance representing the frame button's
214 * digital signal attached to the given loop.
215 */
217 .GetDefaultButtonLoop()) const;
218
219 /**
220 * Get the X axis value of left side of the controller. Right is positive.
221 *
222 * @return The axis value.
223 */
224 double GetLeftX() const;
225
226 /**
227 * Get the X axis value of right side of the controller. Right is positive.
228 *
229 * @return The axis value.
230 */
231 double GetRightX() const;
232
233 /**
234 * Get the Y axis value of left side of the controller. Back is positive.
235 *
236 * @return The axis value.
237 */
238 double GetLeftY() const;
239
240 /**
241 * Get the Y axis value of right side of the controller. Back is positive.
242 *
243 * @return The axis value.
244 */
245 double GetRightY() const;
246
247 private:
249};
250} // namespace wpi::cmd
A declarative way to bind a set of actions to a loop and execute them when the loop is polled.
Definition EventLoop.hpp:15
Handle input from NiDsStadia controllers connected to the Driver Station.
Definition NiDsStadiaController.hpp:30
CommandGenericHID(int port)
Construct an instance of a device.
Trigger Frame(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the frame button's digital signal.
Trigger RightStick(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the right stick button's digital signal.
double GetRightX() const
Get the X axis value of right side of the controller.
Trigger LeftStick(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the left stick button's digital signal.
Trigger Ellipses(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the ellipses button's digital signal.
double GetRightY() const
Get the Y axis value of right side of the controller.
Trigger A(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the A button's digital signal.
Trigger LeftTrigger(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the left trigger button's digital signal.
Trigger Stadia(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the stadia button's digital signal.
Trigger LeftBumper(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the left bumper button's digital signal.
Trigger Hamburger(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the hamburger button's digital signal.
wpi::NiDsStadiaController & GetHID()
Get the underlying GenericHID object.
double GetLeftX() const
Get the X axis value of left side of the controller.
CommandNiDsStadiaController(int port)
Construct an instance of a controller.
Trigger Google(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the google button's digital signal.
Trigger Y(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the Y button's digital signal.
Trigger RightTrigger(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the right trigger button's digital signal.
double GetLeftY() const
Get the Y axis value of left side of the controller.
Trigger B(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the B button's digital signal.
Trigger RightBumper(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the right bumper button's digital signal.
Trigger X(wpi::EventLoop *loop=CommandScheduler::GetInstance() .GetDefaultButtonLoop()) const
Constructs a Trigger instance around the X button's digital signal.
static CommandScheduler & GetInstance()
Returns the Scheduler instance.
This class provides an easy way to link commands to conditions.
Definition Trigger.hpp:31
Definition CommandNiDsStadiaController.hpp:15