mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
Fixes pessimistic std::move (#1069)
Also adds test to ensure all the sim headers get compiled Closes #1068
This commit is contained in:
committed by
Peter Johnson
parent
ef442d775d
commit
11d46713d1
@@ -27,7 +27,7 @@ class AccelerometerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAccelerometerActiveCallback);
|
||||
store->SetUid(HALSIM_RegisterAccelerometerActiveCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetActive() { return HALSIM_GetAccelerometerActive(m_index); }
|
||||
void SetActive(bool active) {
|
||||
@@ -40,7 +40,7 @@ class AccelerometerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAccelerometerRangeCallback);
|
||||
store->SetUid(HALSIM_RegisterAccelerometerRangeCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
HAL_AccelerometerRange GetRange() {
|
||||
return HALSIM_GetAccelerometerRange(m_index);
|
||||
@@ -55,7 +55,7 @@ class AccelerometerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAccelerometerXCallback);
|
||||
store->SetUid(HALSIM_RegisterAccelerometerXCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetX() { return HALSIM_GetAccelerometerX(m_index); }
|
||||
void SetX(double x) { HALSIM_SetAccelerometerX(m_index, x); }
|
||||
@@ -66,7 +66,7 @@ class AccelerometerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAccelerometerYCallback);
|
||||
store->SetUid(HALSIM_RegisterAccelerometerYCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetY() { return HALSIM_GetAccelerometerY(m_index); }
|
||||
void SetY(double y) { HALSIM_SetAccelerometerY(m_index, y); }
|
||||
@@ -77,7 +77,7 @@ class AccelerometerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAccelerometerZCallback);
|
||||
store->SetUid(HALSIM_RegisterAccelerometerZCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetZ() { return HALSIM_GetAccelerometerZ(m_index); }
|
||||
void SetZ(double z) { HALSIM_SetAccelerometerZ(m_index, z); }
|
||||
|
||||
@@ -27,7 +27,7 @@ class AnalogGyroSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogGyroAngleCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogGyroAngleCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetAngle() { return HALSIM_GetAnalogGyroAngle(m_index); }
|
||||
void SetAngle(double angle) { HALSIM_SetAnalogGyroAngle(m_index, angle); }
|
||||
@@ -38,7 +38,7 @@ class AnalogGyroSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogGyroRateCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogGyroRateCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetRate() { return HALSIM_GetAnalogGyroRate(m_index); }
|
||||
void SetRate(double rate) { HALSIM_SetAnalogGyroRate(m_index, rate); }
|
||||
@@ -49,7 +49,7 @@ class AnalogGyroSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogGyroInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogGyroInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitialized() { return HALSIM_GetAnalogGyroInitialized(m_index); }
|
||||
void SetInitialized(bool initialized) {
|
||||
|
||||
@@ -27,7 +27,7 @@ class AnalogInSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogInInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogInInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitialized() { return HALSIM_GetAnalogInInitialized(m_index); }
|
||||
void SetInitialized(bool initialized) {
|
||||
@@ -40,7 +40,7 @@ class AnalogInSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogInAverageBitsCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogInAverageBitsCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetAverageBits() { return HALSIM_GetAnalogInAverageBits(m_index); }
|
||||
void SetAverageBits(int averageBits) {
|
||||
@@ -53,7 +53,7 @@ class AnalogInSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogInOversampleBitsCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogInOversampleBitsCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetOversampleBits() { return HALSIM_GetAnalogInOversampleBits(m_index); }
|
||||
void SetOversampleBits(int oversampleBits) {
|
||||
@@ -66,7 +66,7 @@ class AnalogInSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogInVoltageCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogInVoltageCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetVoltage() { return HALSIM_GetAnalogInVoltage(m_index); }
|
||||
void SetVoltage(double voltage) {
|
||||
@@ -80,7 +80,7 @@ class AnalogInSim {
|
||||
&HALSIM_CancelAnalogInAccumulatorInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogInAccumulatorInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetAccumulatorInitialized() {
|
||||
return HALSIM_GetAnalogInAccumulatorInitialized(m_index);
|
||||
@@ -95,7 +95,7 @@ class AnalogInSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogInAccumulatorValueCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogInAccumulatorValueCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int64_t GetAccumulatorValue() {
|
||||
return HALSIM_GetAnalogInAccumulatorValue(m_index);
|
||||
@@ -110,7 +110,7 @@ class AnalogInSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogInAccumulatorCountCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogInAccumulatorCountCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int64_t GetAccumulatorCount() {
|
||||
return HALSIM_GetAnalogInAccumulatorCount(m_index);
|
||||
@@ -125,7 +125,7 @@ class AnalogInSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogInAccumulatorCenterCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogInAccumulatorCenterCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetAccumulatorCenter() {
|
||||
return HALSIM_GetAnalogInAccumulatorCenter(m_index);
|
||||
@@ -141,7 +141,7 @@ class AnalogInSim {
|
||||
&HALSIM_CancelAnalogInAccumulatorDeadbandCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogInAccumulatorDeadbandCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetAccumulatorDeadband() {
|
||||
return HALSIM_GetAnalogInAccumulatorDeadband(m_index);
|
||||
|
||||
@@ -27,7 +27,7 @@ class AnalogOutSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogOutVoltageCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogOutVoltageCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetVoltage() { return HALSIM_GetAnalogOutVoltage(m_index); }
|
||||
void SetVoltage(double voltage) {
|
||||
@@ -40,7 +40,7 @@ class AnalogOutSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogOutInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogOutInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitialized() { return HALSIM_GetAnalogOutInitialized(m_index); }
|
||||
void SetInitialized(bool initialized) {
|
||||
|
||||
@@ -27,7 +27,7 @@ class AnalogTriggerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelAnalogTriggerInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogTriggerInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitialized() { return HALSIM_GetAnalogTriggerInitialized(m_index); }
|
||||
void SetInitialized(bool initialized) {
|
||||
@@ -41,7 +41,7 @@ class AnalogTriggerSim {
|
||||
&HALSIM_CancelAnalogTriggerTriggerLowerBoundCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogTriggerTriggerLowerBoundCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetTriggerLowerBound() {
|
||||
return HALSIM_GetAnalogTriggerTriggerLowerBound(m_index);
|
||||
@@ -57,7 +57,7 @@ class AnalogTriggerSim {
|
||||
&HALSIM_CancelAnalogTriggerTriggerUpperBoundCallback);
|
||||
store->SetUid(HALSIM_RegisterAnalogTriggerTriggerUpperBoundCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetTriggerUpperBound() {
|
||||
return HALSIM_GetAnalogTriggerTriggerUpperBound(m_index);
|
||||
|
||||
@@ -27,7 +27,7 @@ class DIOSim {
|
||||
m_index, -1, callback, &HALSIM_CancelDIOInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterDIOInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitialized() { return HALSIM_GetDIOInitialized(m_index); }
|
||||
void SetInitialized(bool initialized) {
|
||||
@@ -40,7 +40,7 @@ class DIOSim {
|
||||
m_index, -1, callback, &HALSIM_CancelDIOValueCallback);
|
||||
store->SetUid(HALSIM_RegisterDIOValueCallback(m_index, &CallbackStoreThunk,
|
||||
store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetValue() { return HALSIM_GetDIOValue(m_index); }
|
||||
void SetValue(bool value) { HALSIM_SetDIOValue(m_index, value); }
|
||||
@@ -51,7 +51,7 @@ class DIOSim {
|
||||
m_index, -1, callback, &HALSIM_CancelDIOPulseLengthCallback);
|
||||
store->SetUid(HALSIM_RegisterDIOPulseLengthCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetPulseLength() { return HALSIM_GetDIOPulseLength(m_index); }
|
||||
void SetPulseLength(double pulseLength) {
|
||||
@@ -64,7 +64,7 @@ class DIOSim {
|
||||
m_index, -1, callback, &HALSIM_CancelDIOIsInputCallback);
|
||||
store->SetUid(HALSIM_RegisterDIOIsInputCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetIsInput() { return HALSIM_GetDIOIsInput(m_index); }
|
||||
void SetIsInput(bool isInput) { HALSIM_SetDIOIsInput(m_index, isInput); }
|
||||
@@ -75,7 +75,7 @@ class DIOSim {
|
||||
m_index, -1, callback, &HALSIM_CancelDIOFilterIndexCallback);
|
||||
store->SetUid(HALSIM_RegisterDIOFilterIndexCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetFilterIndex() { return HALSIM_GetDIOFilterIndex(m_index); }
|
||||
void SetFilterIndex(int filterIndex) {
|
||||
|
||||
@@ -27,7 +27,7 @@ class DigitalPWMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelDigitalPWMInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterDigitalPWMInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitialized() { return HALSIM_GetDigitalPWMInitialized(m_index); }
|
||||
void SetInitialized(bool initialized) {
|
||||
@@ -40,7 +40,7 @@ class DigitalPWMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelDigitalPWMDutyCycleCallback);
|
||||
store->SetUid(HALSIM_RegisterDigitalPWMDutyCycleCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetDutyCycle() { return HALSIM_GetDigitalPWMDutyCycle(m_index); }
|
||||
void SetDutyCycle(double dutyCycle) {
|
||||
@@ -53,7 +53,7 @@ class DigitalPWMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelDigitalPWMPinCallback);
|
||||
store->SetUid(HALSIM_RegisterDigitalPWMPinCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetPin() { return HALSIM_GetDigitalPWMPin(m_index); }
|
||||
void SetPin(int pin) { HALSIM_SetDigitalPWMPin(m_index, pin); }
|
||||
|
||||
@@ -25,7 +25,7 @@ class DriverStationSim {
|
||||
-1, callback, &HALSIM_CancelDriverStationEnabledCallback);
|
||||
store->SetUid(HALSIM_RegisterDriverStationEnabledCallback(
|
||||
&CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetEnabled() { return HALSIM_GetDriverStationEnabled(); }
|
||||
void SetEnabled(bool enabled) { HALSIM_SetDriverStationEnabled(enabled); }
|
||||
@@ -36,7 +36,7 @@ class DriverStationSim {
|
||||
-1, callback, &HALSIM_CancelDriverStationAutonomousCallback);
|
||||
store->SetUid(HALSIM_RegisterDriverStationAutonomousCallback(
|
||||
&CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetAutonomous() { return HALSIM_GetDriverStationAutonomous(); }
|
||||
void SetAutonomous(bool autonomous) {
|
||||
@@ -49,7 +49,7 @@ class DriverStationSim {
|
||||
-1, callback, &HALSIM_CancelDriverStationTestCallback);
|
||||
store->SetUid(HALSIM_RegisterDriverStationTestCallback(
|
||||
&CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetTest() { return HALSIM_GetDriverStationTest(); }
|
||||
void SetTest(bool test) { HALSIM_SetDriverStationTest(test); }
|
||||
@@ -60,7 +60,7 @@ class DriverStationSim {
|
||||
-1, callback, &HALSIM_CancelDriverStationEStopCallback);
|
||||
store->SetUid(HALSIM_RegisterDriverStationEStopCallback(
|
||||
&CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetEStop() { return HALSIM_GetDriverStationEStop(); }
|
||||
void SetEStop(bool eStop) { HALSIM_SetDriverStationEStop(eStop); }
|
||||
@@ -71,7 +71,7 @@ class DriverStationSim {
|
||||
-1, callback, &HALSIM_CancelDriverStationFmsAttachedCallback);
|
||||
store->SetUid(HALSIM_RegisterDriverStationFmsAttachedCallback(
|
||||
&CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetFmsAttached() { return HALSIM_GetDriverStationFmsAttached(); }
|
||||
void SetFmsAttached(bool fmsAttached) {
|
||||
@@ -84,7 +84,7 @@ class DriverStationSim {
|
||||
-1, callback, &HALSIM_CancelDriverStationDsAttachedCallback);
|
||||
store->SetUid(HALSIM_RegisterDriverStationDsAttachedCallback(
|
||||
&CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetDsAttached() { return HALSIM_GetDriverStationDsAttached(); }
|
||||
void SetDsAttached(bool dsAttached) {
|
||||
|
||||
@@ -27,7 +27,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitialized() { return HALSIM_GetEncoderInitialized(m_index); }
|
||||
void SetInitialized(bool initialized) {
|
||||
@@ -40,7 +40,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderCountCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderCountCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetCount() { return HALSIM_GetEncoderCount(m_index); }
|
||||
void SetCount(int count) { HALSIM_SetEncoderCount(m_index, count); }
|
||||
@@ -51,7 +51,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderPeriodCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderPeriodCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetPeriod() { return HALSIM_GetEncoderPeriod(m_index); }
|
||||
void SetPeriod(double period) { HALSIM_SetEncoderPeriod(m_index, period); }
|
||||
@@ -62,7 +62,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderResetCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderResetCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetReset() { return HALSIM_GetEncoderReset(m_index); }
|
||||
void SetReset(bool reset) { HALSIM_SetEncoderReset(m_index, reset); }
|
||||
@@ -73,7 +73,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderMaxPeriodCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderMaxPeriodCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetMaxPeriod() { return HALSIM_GetEncoderMaxPeriod(m_index); }
|
||||
void SetMaxPeriod(double maxPeriod) {
|
||||
@@ -86,7 +86,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderDirectionCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderDirectionCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetDirection() { return HALSIM_GetEncoderDirection(m_index); }
|
||||
void SetDirection(bool direction) {
|
||||
@@ -99,7 +99,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderReverseDirectionCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderReverseDirectionCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetReverseDirection() {
|
||||
return HALSIM_GetEncoderReverseDirection(m_index);
|
||||
@@ -114,7 +114,7 @@ class EncoderSim {
|
||||
m_index, -1, callback, &HALSIM_CancelEncoderSamplesToAverageCallback);
|
||||
store->SetUid(HALSIM_RegisterEncoderSamplesToAverageCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetSamplesToAverage() {
|
||||
return HALSIM_GetEncoderSamplesToAverage(m_index);
|
||||
|
||||
@@ -28,7 +28,7 @@ class PCMSim {
|
||||
&HALSIM_CancelPCMSolenoidInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterPCMSolenoidInitializedCallback(
|
||||
m_index, channel, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetSolenoidInitialized(int channel) {
|
||||
return HALSIM_GetPCMSolenoidInitialized(m_index, channel);
|
||||
@@ -44,7 +44,7 @@ class PCMSim {
|
||||
&HALSIM_CancelPCMSolenoidOutputCallback);
|
||||
store->SetUid(HALSIM_RegisterPCMSolenoidOutputCallback(
|
||||
m_index, channel, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetSolenoidOutput(int channel) {
|
||||
return HALSIM_GetPCMSolenoidOutput(m_index, channel);
|
||||
@@ -59,7 +59,7 @@ class PCMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPCMCompressorInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterPCMCompressorInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetCompressorInitialized() {
|
||||
return HALSIM_GetPCMCompressorInitialized(m_index);
|
||||
@@ -74,7 +74,7 @@ class PCMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPCMCompressorOnCallback);
|
||||
store->SetUid(HALSIM_RegisterPCMCompressorOnCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetCompressorOn() { return HALSIM_GetPCMCompressorOn(m_index); }
|
||||
void SetCompressorOn(bool compressorOn) {
|
||||
@@ -87,7 +87,7 @@ class PCMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPCMClosedLoopEnabledCallback);
|
||||
store->SetUid(HALSIM_RegisterPCMClosedLoopEnabledCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetClosedLoopEnabled() {
|
||||
return HALSIM_GetPCMClosedLoopEnabled(m_index);
|
||||
@@ -102,7 +102,7 @@ class PCMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPCMPressureSwitchCallback);
|
||||
store->SetUid(HALSIM_RegisterPCMPressureSwitchCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetPressureSwitch() { return HALSIM_GetPCMPressureSwitch(m_index); }
|
||||
void SetPressureSwitch(bool pressureSwitch) {
|
||||
@@ -115,7 +115,7 @@ class PCMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPCMCompressorCurrentCallback);
|
||||
store->SetUid(HALSIM_RegisterPCMCompressorCurrentCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetCompressorCurrent() {
|
||||
return HALSIM_GetPCMCompressorCurrent(m_index);
|
||||
|
||||
@@ -27,7 +27,7 @@ class PDPSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPDPInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterPDPInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitialized() { return HALSIM_GetPDPInitialized(m_index); }
|
||||
void SetInitialized(bool initialized) {
|
||||
@@ -40,7 +40,7 @@ class PDPSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPDPTemperatureCallback);
|
||||
store->SetUid(HALSIM_RegisterPDPTemperatureCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetTemperature() { return HALSIM_GetPDPTemperature(m_index); }
|
||||
void SetTemperature(double temperature) {
|
||||
@@ -53,7 +53,7 @@ class PDPSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPDPVoltageCallback);
|
||||
store->SetUid(HALSIM_RegisterPDPVoltageCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetVoltage() { return HALSIM_GetPDPVoltage(m_index); }
|
||||
void SetVoltage(double voltage) { HALSIM_SetPDPVoltage(m_index, voltage); }
|
||||
@@ -64,7 +64,7 @@ class PDPSim {
|
||||
m_index, channel, -1, callback, &HALSIM_CancelPDPCurrentCallback);
|
||||
store->SetUid(HALSIM_RegisterPDPCurrentCallback(
|
||||
m_index, channel, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetCurrent(int channel) {
|
||||
return HALSIM_GetPDPCurrent(m_index, channel);
|
||||
|
||||
@@ -27,7 +27,7 @@ class PWMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPWMInitializedCallback);
|
||||
store->SetUid(HALSIM_RegisterPWMInitializedCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitialized() { return HALSIM_GetPWMInitialized(m_index); }
|
||||
void SetInitialized(bool initialized) {
|
||||
@@ -40,7 +40,7 @@ class PWMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPWMRawValueCallback);
|
||||
store->SetUid(HALSIM_RegisterPWMRawValueCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetRawValue() { return HALSIM_GetPWMRawValue(m_index); }
|
||||
void SetRawValue(int rawValue) { HALSIM_SetPWMRawValue(m_index, rawValue); }
|
||||
@@ -51,7 +51,7 @@ class PWMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPWMSpeedCallback);
|
||||
store->SetUid(HALSIM_RegisterPWMSpeedCallback(m_index, &CallbackStoreThunk,
|
||||
store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetSpeed() { return HALSIM_GetPWMSpeed(m_index); }
|
||||
void SetSpeed(double speed) { HALSIM_SetPWMSpeed(m_index, speed); }
|
||||
@@ -62,7 +62,7 @@ class PWMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPWMPositionCallback);
|
||||
store->SetUid(HALSIM_RegisterPWMPositionCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetPosition() { return HALSIM_GetPWMPosition(m_index); }
|
||||
void SetPosition(double position) {
|
||||
@@ -75,7 +75,7 @@ class PWMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPWMPeriodScaleCallback);
|
||||
store->SetUid(HALSIM_RegisterPWMPeriodScaleCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetPeriodScale() { return HALSIM_GetPWMPeriodScale(m_index); }
|
||||
void SetPeriodScale(int periodScale) {
|
||||
@@ -88,7 +88,7 @@ class PWMSim {
|
||||
m_index, -1, callback, &HALSIM_CancelPWMZeroLatchCallback);
|
||||
store->SetUid(HALSIM_RegisterPWMZeroLatchCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetZeroLatch() { return HALSIM_GetPWMZeroLatch(m_index); }
|
||||
void SetZeroLatch(bool zeroLatch) {
|
||||
|
||||
@@ -27,7 +27,7 @@ class RelaySim {
|
||||
m_index, -1, callback, &HALSIM_CancelRelayInitializedForwardCallback);
|
||||
store->SetUid(HALSIM_RegisterRelayInitializedForwardCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitializedForward() {
|
||||
return HALSIM_GetRelayInitializedForward(m_index);
|
||||
@@ -42,7 +42,7 @@ class RelaySim {
|
||||
m_index, -1, callback, &HALSIM_CancelRelayInitializedReverseCallback);
|
||||
store->SetUid(HALSIM_RegisterRelayInitializedReverseCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetInitializedReverse() {
|
||||
return HALSIM_GetRelayInitializedReverse(m_index);
|
||||
@@ -57,7 +57,7 @@ class RelaySim {
|
||||
m_index, -1, callback, &HALSIM_CancelRelayForwardCallback);
|
||||
store->SetUid(HALSIM_RegisterRelayForwardCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetForward() { return HALSIM_GetRelayForward(m_index); }
|
||||
void SetForward(bool forward) { HALSIM_SetRelayForward(m_index, forward); }
|
||||
@@ -68,7 +68,7 @@ class RelaySim {
|
||||
m_index, -1, callback, &HALSIM_CancelRelayReverseCallback);
|
||||
store->SetUid(HALSIM_RegisterRelayReverseCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetReverse() { return HALSIM_GetRelayReverse(m_index); }
|
||||
void SetReverse(bool reverse) { HALSIM_SetRelayReverse(m_index, reverse); }
|
||||
|
||||
@@ -27,7 +27,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioFPGAButtonCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioFPGAButtonCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetFPGAButton() { return HALSIM_GetRoboRioFPGAButton(m_index); }
|
||||
void SetFPGAButton(bool fPGAButton) {
|
||||
@@ -40,7 +40,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioVInVoltageCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioVInVoltageCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetVInVoltage() { return HALSIM_GetRoboRioVInVoltage(m_index); }
|
||||
void SetVInVoltage(double vInVoltage) {
|
||||
@@ -53,7 +53,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioVInCurrentCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioVInCurrentCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetVInCurrent() { return HALSIM_GetRoboRioVInCurrent(m_index); }
|
||||
void SetVInCurrent(double vInCurrent) {
|
||||
@@ -66,7 +66,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserVoltage6VCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserVoltage6VCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetUserVoltage6V() { return HALSIM_GetRoboRioUserVoltage6V(m_index); }
|
||||
void SetUserVoltage6V(double userVoltage6V) {
|
||||
@@ -79,7 +79,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserCurrent6VCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserCurrent6VCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetUserCurrent6V() { return HALSIM_GetRoboRioUserCurrent6V(m_index); }
|
||||
void SetUserCurrent6V(double userCurrent6V) {
|
||||
@@ -92,7 +92,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserActive6VCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserActive6VCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetUserActive6V() { return HALSIM_GetRoboRioUserActive6V(m_index); }
|
||||
void SetUserActive6V(bool userActive6V) {
|
||||
@@ -105,7 +105,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserVoltage5VCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserVoltage5VCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetUserVoltage5V() { return HALSIM_GetRoboRioUserVoltage5V(m_index); }
|
||||
void SetUserVoltage5V(double userVoltage5V) {
|
||||
@@ -118,7 +118,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserCurrent5VCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserCurrent5VCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetUserCurrent5V() { return HALSIM_GetRoboRioUserCurrent5V(m_index); }
|
||||
void SetUserCurrent5V(double userCurrent5V) {
|
||||
@@ -131,7 +131,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserActive5VCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserActive5VCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetUserActive5V() { return HALSIM_GetRoboRioUserActive5V(m_index); }
|
||||
void SetUserActive5V(bool userActive5V) {
|
||||
@@ -144,7 +144,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserVoltage3V3Callback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserVoltage3V3Callback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetUserVoltage3V3() {
|
||||
return HALSIM_GetRoboRioUserVoltage3V3(m_index);
|
||||
@@ -159,7 +159,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserCurrent3V3Callback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserCurrent3V3Callback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetUserCurrent3V3() {
|
||||
return HALSIM_GetRoboRioUserCurrent3V3(m_index);
|
||||
@@ -174,7 +174,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserActive3V3Callback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserActive3V3Callback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetUserActive3V3() { return HALSIM_GetRoboRioUserActive3V3(m_index); }
|
||||
void SetUserActive3V3(bool userActive3V3) {
|
||||
@@ -187,7 +187,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserFaults6VCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserFaults6VCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetUserFaults6V() { return HALSIM_GetRoboRioUserFaults6V(m_index); }
|
||||
void SetUserFaults6V(int userFaults6V) {
|
||||
@@ -200,7 +200,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserFaults5VCallback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserFaults5VCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetUserFaults5V() { return HALSIM_GetRoboRioUserFaults5V(m_index); }
|
||||
void SetUserFaults5V(int userFaults5V) {
|
||||
@@ -213,7 +213,7 @@ class RoboRioSim {
|
||||
m_index, -1, callback, &HALSIM_CancelRoboRioUserFaults3V3Callback);
|
||||
store->SetUid(HALSIM_RegisterRoboRioUserFaults3V3Callback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetUserFaults3V3() { return HALSIM_GetRoboRioUserFaults3V3(m_index); }
|
||||
void SetUserFaults3V3(int userFaults3V3) {
|
||||
|
||||
@@ -27,7 +27,7 @@ class SPIAccelerometerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelSPIAccelerometerActiveCallback);
|
||||
store->SetUid(HALSIM_RegisterSPIAccelerometerActiveCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
bool GetActive() { return HALSIM_GetSPIAccelerometerActive(m_index); }
|
||||
void SetActive(bool active) {
|
||||
@@ -40,7 +40,7 @@ class SPIAccelerometerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelSPIAccelerometerRangeCallback);
|
||||
store->SetUid(HALSIM_RegisterSPIAccelerometerRangeCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
int GetRange() { return HALSIM_GetSPIAccelerometerRange(m_index); }
|
||||
void SetRange(int range) { HALSIM_SetSPIAccelerometerRange(m_index, range); }
|
||||
@@ -51,7 +51,7 @@ class SPIAccelerometerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelSPIAccelerometerXCallback);
|
||||
store->SetUid(HALSIM_RegisterSPIAccelerometerXCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetX() { return HALSIM_GetSPIAccelerometerX(m_index); }
|
||||
void SetX(double x) { HALSIM_SetSPIAccelerometerX(m_index, x); }
|
||||
@@ -62,7 +62,7 @@ class SPIAccelerometerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelSPIAccelerometerYCallback);
|
||||
store->SetUid(HALSIM_RegisterSPIAccelerometerYCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetY() { return HALSIM_GetSPIAccelerometerY(m_index); }
|
||||
void SetY(double y) { HALSIM_SetSPIAccelerometerY(m_index, y); }
|
||||
@@ -73,7 +73,7 @@ class SPIAccelerometerSim {
|
||||
m_index, -1, callback, &HALSIM_CancelSPIAccelerometerZCallback);
|
||||
store->SetUid(HALSIM_RegisterSPIAccelerometerZCallback(
|
||||
m_index, &CallbackStoreThunk, store.get(), initialNotify));
|
||||
return std::move(store);
|
||||
return store;
|
||||
}
|
||||
double GetZ() { return HALSIM_GetSPIAccelerometerZ(m_index); }
|
||||
void SetZ(double z) { HALSIM_SetSPIAccelerometerZ(m_index, z); }
|
||||
|
||||
Reference in New Issue
Block a user