diff --git a/hal/src/main/native/include/Simulation/AccelerometerSim.h b/hal/src/main/native/include/Simulation/AccelerometerSim.h index 9a8b273197..4cc71efca8 100644 --- a/hal/src/main/native/include/Simulation/AccelerometerSim.h +++ b/hal/src/main/native/include/Simulation/AccelerometerSim.h @@ -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); } diff --git a/hal/src/main/native/include/Simulation/AnalogGyroSim.h b/hal/src/main/native/include/Simulation/AnalogGyroSim.h index 7d4cff02f5..623cf62507 100644 --- a/hal/src/main/native/include/Simulation/AnalogGyroSim.h +++ b/hal/src/main/native/include/Simulation/AnalogGyroSim.h @@ -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) { diff --git a/hal/src/main/native/include/Simulation/AnalogInSim.h b/hal/src/main/native/include/Simulation/AnalogInSim.h index 815fc48e36..d09cede68c 100644 --- a/hal/src/main/native/include/Simulation/AnalogInSim.h +++ b/hal/src/main/native/include/Simulation/AnalogInSim.h @@ -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); diff --git a/hal/src/main/native/include/Simulation/AnalogOutSim.h b/hal/src/main/native/include/Simulation/AnalogOutSim.h index ce19f8469c..1ccb91967d 100644 --- a/hal/src/main/native/include/Simulation/AnalogOutSim.h +++ b/hal/src/main/native/include/Simulation/AnalogOutSim.h @@ -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) { diff --git a/hal/src/main/native/include/Simulation/AnalogTriggerSim.h b/hal/src/main/native/include/Simulation/AnalogTriggerSim.h index 03d21e2352..ab43b7a5db 100644 --- a/hal/src/main/native/include/Simulation/AnalogTriggerSim.h +++ b/hal/src/main/native/include/Simulation/AnalogTriggerSim.h @@ -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); diff --git a/hal/src/main/native/include/Simulation/DIOSim.h b/hal/src/main/native/include/Simulation/DIOSim.h index f9e347fcd4..07734270b2 100644 --- a/hal/src/main/native/include/Simulation/DIOSim.h +++ b/hal/src/main/native/include/Simulation/DIOSim.h @@ -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) { diff --git a/hal/src/main/native/include/Simulation/DigitalPWMSim.h b/hal/src/main/native/include/Simulation/DigitalPWMSim.h index 85c0a0a6aa..d38621258d 100644 --- a/hal/src/main/native/include/Simulation/DigitalPWMSim.h +++ b/hal/src/main/native/include/Simulation/DigitalPWMSim.h @@ -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); } diff --git a/hal/src/main/native/include/Simulation/DriverStationSim.h b/hal/src/main/native/include/Simulation/DriverStationSim.h index aea5099049..88ca123994 100644 --- a/hal/src/main/native/include/Simulation/DriverStationSim.h +++ b/hal/src/main/native/include/Simulation/DriverStationSim.h @@ -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) { diff --git a/hal/src/main/native/include/Simulation/EncoderSim.h b/hal/src/main/native/include/Simulation/EncoderSim.h index bbfee3146c..2cf891653e 100644 --- a/hal/src/main/native/include/Simulation/EncoderSim.h +++ b/hal/src/main/native/include/Simulation/EncoderSim.h @@ -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); diff --git a/hal/src/main/native/include/Simulation/PCMSim.h b/hal/src/main/native/include/Simulation/PCMSim.h index 30516ad48f..2e92bf6776 100644 --- a/hal/src/main/native/include/Simulation/PCMSim.h +++ b/hal/src/main/native/include/Simulation/PCMSim.h @@ -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); diff --git a/hal/src/main/native/include/Simulation/PDPSim.h b/hal/src/main/native/include/Simulation/PDPSim.h index 2ccfe4cb13..a6818407d9 100644 --- a/hal/src/main/native/include/Simulation/PDPSim.h +++ b/hal/src/main/native/include/Simulation/PDPSim.h @@ -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); diff --git a/hal/src/main/native/include/Simulation/PWMSim.h b/hal/src/main/native/include/Simulation/PWMSim.h index c491e88920..89579b320b 100644 --- a/hal/src/main/native/include/Simulation/PWMSim.h +++ b/hal/src/main/native/include/Simulation/PWMSim.h @@ -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) { diff --git a/hal/src/main/native/include/Simulation/RelaySim.h b/hal/src/main/native/include/Simulation/RelaySim.h index cc30f9141d..48f1caa1a7 100644 --- a/hal/src/main/native/include/Simulation/RelaySim.h +++ b/hal/src/main/native/include/Simulation/RelaySim.h @@ -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); } diff --git a/hal/src/main/native/include/Simulation/RoboRioSim.h b/hal/src/main/native/include/Simulation/RoboRioSim.h index d88f339635..8f4cbf3ba8 100644 --- a/hal/src/main/native/include/Simulation/RoboRioSim.h +++ b/hal/src/main/native/include/Simulation/RoboRioSim.h @@ -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) { diff --git a/hal/src/main/native/include/Simulation/SPIAccelerometerSim.h b/hal/src/main/native/include/Simulation/SPIAccelerometerSim.h index 47fd77643b..2a0ad9b946 100644 --- a/hal/src/main/native/include/Simulation/SPIAccelerometerSim.h +++ b/hal/src/main/native/include/Simulation/SPIAccelerometerSim.h @@ -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); } diff --git a/hal/src/test/native/cpp/Sim/SimInitializationTest.cpp b/hal/src/test/native/cpp/Sim/SimInitializationTest.cpp new file mode 100644 index 0000000000..664b1032b0 --- /dev/null +++ b/hal/src/test/native/cpp/Sim/SimInitializationTest.cpp @@ -0,0 +1,49 @@ +/*----------------------------------------------------------------------------*/ +/* Copyright (c) 2018 FIRST. All Rights Reserved. */ +/* Open Source Software - may be modified and shared by FRC teams. The code */ +/* must be accompanied by the FIRST BSD license file in the root directory of */ +/* the project. */ +/*----------------------------------------------------------------------------*/ + +#include "HAL/HAL.h" +#include "Simulation/AccelerometerSim.h" +#include "Simulation/AnalogGyroSim.h" +#include "Simulation/AnalogInSim.h" +#include "Simulation/AnalogOutSim.h" +#include "Simulation/AnalogTriggerSim.h" +#include "Simulation/DIOSim.h" +#include "Simulation/DigitalPWMSim.h" +#include "Simulation/DriverStationSim.h" +#include "Simulation/EncoderSim.h" +#include "Simulation/PCMSim.h" +#include "Simulation/PDPSim.h" +#include "Simulation/PWMSim.h" +#include "Simulation/RelaySim.h" +#include "Simulation/RoboRioSim.h" +#include "Simulation/SPIAccelerometerSim.h" +#include "gtest/gtest.h" + +using namespace frc::sim; + +namespace hal { + +TEST(SimInitializationTests, TestAllInitialize) { + HAL_Initialize(500, 0); + AccelerometerSim acsim{0}; + AnalogGyroSim agsim{0}; + AnalogInSim aisim{0}; + AnalogOutSim aosim{0}; + AnalogTriggerSim atsim{0}; + DigitalPWMSim dpsim{0}; + DIOSim diosim{0}; + DriverStationSim dssim; + (void)dssim; + EncoderSim esim{0}; + PCMSim pcmsim{0}; + PDPSim pdpsim{0}; + PWMSim pwmsim{0}; + RelaySim rsim{0}; + RoboRioSim rrsim{0}; + SPIAccelerometerSim sasim{0}; +} +} // namespace hal