CTRE Phoenix C++ 5.33.1
VictorSPXSimCollection.h
Go to the documentation of this file.
1/* Copyright (C) Cross The Road Electronics 2024 */
2#pragma once
3
5
6/* forward proto's */
7namespace ctre {
8 namespace phoenix {
9 namespace motorcontrol {
10 namespace can {
11 class BaseMotorController;
12 }
13 }
14 }
15}
16
17namespace ctre {
18 namespace phoenix {
19 namespace motorcontrol {
20
21 /**
22 * Collection of simulation commands available to a VictorSPX motor controller.
23 *
24 * Use the getSimCollection() routine inside your motor controller to create the respective sim collection.
25 */
27 public:
28 /**
29 * Constructor for VictorSPXSimCollection
30 * @param motorController VictorSPX Motor Controller to connect Collection to
31 */
33
34 /**
35 * Gets the last error generated by this object. Not all functions return an
36 * error code but can potentially report errors. This function can be used
37 * to retrieve those error codes.
38 *
39 * @return Last Error Code generated by a function.
40 */
42
43 /**
44 * Gets the simulated output voltage across M+ and M- for the motor.
45 *
46 * @return applied voltage to the motor in volts
47 */
49
50 /**
51 * Sets the simulated bus voltage of the VictorSPX.
52 *
53 * The minimum allowed bus voltage is 4 V - values
54 * below this will be promoted to 4 V.
55 *
56 * @param vbat the bus voltage in volts
57 *
58 * @return error code
59 */
61
62 private:
63 int _id;
64
65 };
66
67 } // namespace motorcontrol
68 } // namespace phoenix
69} // namespace ctre
Collection of simulation commands available to a VictorSPX motor controller.
Definition: VictorSPXSimCollection.h:26
ErrorCode SetBusVoltage(double vbat)
Sets the simulated bus voltage of the VictorSPX.
ErrorCode GetLastError()
Gets the last error generated by this object.
VictorSPXSimCollection(ctre::phoenix::motorcontrol::can::BaseMotorController &motorController)
Constructor for VictorSPXSimCollection.
double GetMotorOutputLeadVoltage()
Gets the simulated output voltage across M+ and M- for the motor.
Base motor controller features for all CTRE CAN motor controllers.
Definition: BaseMotorController.h:578
ErrorCode
Definition: ErrorCode.h:13
namespace ctre
Definition: paramEnum.h:5