[hal, wpilib] Remove analog accumulator and analog gyro (#7697)

The 2 high level classes were temporarily kept to keep the examples compiling. We will remove those when we have the interface into the built in IMU.
This commit is contained in:
Thad House
2025-01-17 12:58:31 -08:00
committed by GitHub
parent 92f0a3c961
commit f80874dd4b
76 changed files with 33 additions and 3886 deletions

View File

@@ -86,95 +86,6 @@ void AnalogInputSim::SetVoltage(double voltage) {
HALSIM_SetAnalogInVoltage(m_index, voltage);
}
std::unique_ptr<CallbackStore>
AnalogInputSim::RegisterAccumulatorInitializedCallback(NotifyCallback callback,
bool initialNotify) {
auto store = std::make_unique<CallbackStore>(
m_index, -1, callback,
&HALSIM_CancelAnalogInAccumulatorInitializedCallback);
store->SetUid(HALSIM_RegisterAnalogInAccumulatorInitializedCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return store;
}
bool AnalogInputSim::GetAccumulatorInitialized() const {
return HALSIM_GetAnalogInAccumulatorInitialized(m_index);
}
void AnalogInputSim::SetAccumulatorInitialized(bool accumulatorInitialized) {
HALSIM_SetAnalogInAccumulatorInitialized(m_index, accumulatorInitialized);
}
std::unique_ptr<CallbackStore> AnalogInputSim::RegisterAccumulatorValueCallback(
NotifyCallback callback, bool initialNotify) {
auto store = std::make_unique<CallbackStore>(
m_index, -1, callback, &HALSIM_CancelAnalogInAccumulatorValueCallback);
store->SetUid(HALSIM_RegisterAnalogInAccumulatorValueCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return store;
}
int64_t AnalogInputSim::GetAccumulatorValue() const {
return HALSIM_GetAnalogInAccumulatorValue(m_index);
}
void AnalogInputSim::SetAccumulatorValue(int64_t accumulatorValue) {
HALSIM_SetAnalogInAccumulatorValue(m_index, accumulatorValue);
}
std::unique_ptr<CallbackStore> AnalogInputSim::RegisterAccumulatorCountCallback(
NotifyCallback callback, bool initialNotify) {
auto store = std::make_unique<CallbackStore>(
m_index, -1, callback, &HALSIM_CancelAnalogInAccumulatorCountCallback);
store->SetUid(HALSIM_RegisterAnalogInAccumulatorCountCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return store;
}
int64_t AnalogInputSim::GetAccumulatorCount() const {
return HALSIM_GetAnalogInAccumulatorCount(m_index);
}
void AnalogInputSim::SetAccumulatorCount(int64_t accumulatorCount) {
HALSIM_SetAnalogInAccumulatorCount(m_index, accumulatorCount);
}
std::unique_ptr<CallbackStore>
AnalogInputSim::RegisterAccumulatorCenterCallback(NotifyCallback callback,
bool initialNotify) {
auto store = std::make_unique<CallbackStore>(
m_index, -1, callback, &HALSIM_CancelAnalogInAccumulatorCenterCallback);
store->SetUid(HALSIM_RegisterAnalogInAccumulatorCenterCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return store;
}
int AnalogInputSim::GetAccumulatorCenter() const {
return HALSIM_GetAnalogInAccumulatorCenter(m_index);
}
void AnalogInputSim::SetAccumulatorCenter(int accumulatorCenter) {
HALSIM_SetAnalogInAccumulatorCenter(m_index, accumulatorCenter);
}
std::unique_ptr<CallbackStore>
AnalogInputSim::RegisterAccumulatorDeadbandCallback(NotifyCallback callback,
bool initialNotify) {
auto store = std::make_unique<CallbackStore>(
m_index, -1, callback, &HALSIM_CancelAnalogInAccumulatorDeadbandCallback);
store->SetUid(HALSIM_RegisterAnalogInAccumulatorDeadbandCallback(
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return store;
}
int AnalogInputSim::GetAccumulatorDeadband() const {
return HALSIM_GetAnalogInAccumulatorDeadband(m_index);
}
void AnalogInputSim::SetAccumulatorDeadband(int accumulatorDeadband) {
HALSIM_SetAnalogInAccumulatorDeadband(m_index, accumulatorDeadband);
}
void AnalogInputSim::ResetData() {
HALSIM_ResetAnalogInData(m_index);
}