Fix spacing and const correctness in sim (#1269)

This commit is contained in:
PJ Reiniger
2018-08-16 01:17:59 -04:00
committed by Peter Johnson
parent 44099d9a21
commit 1462a5bd46
17 changed files with 294 additions and 86 deletions

View File

@@ -29,7 +29,9 @@ class AnalogGyroSim {
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return store;
}
double GetAngle() { return HALSIM_GetAnalogGyroAngle(m_index); }
double GetAngle() const { return HALSIM_GetAnalogGyroAngle(m_index); }
void SetAngle(double angle) { HALSIM_SetAnalogGyroAngle(m_index, angle); }
std::unique_ptr<CallbackStore> RegisterRateCallback(NotifyCallback callback,
@@ -40,7 +42,9 @@ class AnalogGyroSim {
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return store;
}
double GetRate() { return HALSIM_GetAnalogGyroRate(m_index); }
double GetRate() const { return HALSIM_GetAnalogGyroRate(m_index); }
void SetRate(double rate) { HALSIM_SetAnalogGyroRate(m_index, rate); }
std::unique_ptr<CallbackStore> RegisterInitializedCallback(
@@ -51,7 +55,11 @@ class AnalogGyroSim {
m_index, &CallbackStoreThunk, store.get(), initialNotify));
return store;
}
bool GetInitialized() { return HALSIM_GetAnalogGyroInitialized(m_index); }
bool GetInitialized() const {
return HALSIM_GetAnalogGyroInitialized(m_index);
}
void SetInitialized(bool initialized) {
HALSIM_SetAnalogGyroInitialized(m_index, initialized);
}