mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[glass] Split DataSource into type-specific variants (#7588)
This commit is contained in:
@@ -41,12 +41,12 @@ class CompressorSimModel : public glass::CompressorModel {
|
||||
|
||||
bool Exists() override { return HALSIM_GetCTREPCMInitialized(m_index); }
|
||||
|
||||
glass::DataSource* GetRunningData() override { return &m_running; }
|
||||
glass::DataSource* GetEnabledData() override { return &m_enabled; }
|
||||
glass::DataSource* GetPressureSwitchData() override {
|
||||
glass::BooleanSource* GetRunningData() override { return &m_running; }
|
||||
glass::BooleanSource* GetEnabledData() override { return &m_enabled; }
|
||||
glass::BooleanSource* GetPressureSwitchData() override {
|
||||
return &m_pressureSwitch;
|
||||
}
|
||||
glass::DataSource* GetCurrentData() override { return &m_current; }
|
||||
glass::DoubleSource* GetCurrentData() override { return &m_current; }
|
||||
|
||||
void SetRunning(bool val) override {
|
||||
HALSIM_SetCTREPCMCompressorOn(m_index, val);
|
||||
@@ -78,7 +78,7 @@ class SolenoidSimModel : public glass::SolenoidModel {
|
||||
|
||||
bool Exists() override { return HALSIM_GetCTREPCMInitialized(m_index); }
|
||||
|
||||
glass::DataSource* GetOutputData() override { return &m_output; }
|
||||
glass::BooleanSource* GetOutputData() override { return &m_output; }
|
||||
|
||||
void SetOutput(bool val) override {
|
||||
HALSIM_SetCTREPCMSolenoidOutput(m_index, m_channel, val);
|
||||
|
||||
Reference in New Issue
Block a user