[glass] Don't check IsConnected for NT widgets (#4674)

Checking this isn't required, and prevented these widgets from working
in the simulation GUI without another NT client connected.
This commit is contained in:
Peter Johnson
2022-11-20 17:27:28 -08:00
committed by GitHub
parent 9a36373b8f
commit 98e922313b
15 changed files with 15 additions and 15 deletions

View File

@@ -43,5 +43,5 @@ void NTCommandSchedulerModel::Update() {
}
bool NTCommandSchedulerModel::Exists() {
return m_inst.IsConnected() && m_commands.Exists();
return m_commands.Exists();
}

View File

@@ -37,5 +37,5 @@ void NTCommandSelectorModel::Update() {
}
bool NTCommandSelectorModel::Exists() {
return m_inst.IsConnected() && m_running.Exists();
return m_running.Exists();
}

View File

@@ -56,5 +56,5 @@ void NTDifferentialDriveModel::Update() {
}
bool NTDifferentialDriveModel::Exists() {
return m_inst.IsConnected() && m_lPercent.Exists();
return m_lPercent.Exists();
}

View File

@@ -33,5 +33,5 @@ void NTDigitalInputModel::Update() {
}
bool NTDigitalInputModel::Exists() {
return m_inst.IsConnected() && m_value.Exists();
return m_value.Exists();
}

View File

@@ -40,5 +40,5 @@ void NTDigitalOutputModel::Update() {
}
bool NTDigitalOutputModel::Exists() {
return m_inst.IsConnected() && m_value.Exists();
return m_value.Exists();
}

View File

@@ -73,5 +73,5 @@ void NTFMSModel::Update() {
}
bool NTFMSModel::Exists() {
return m_inst.IsConnected() && m_controlWord.Exists();
return m_controlWord.Exists();
}

View File

@@ -171,7 +171,7 @@ void NTField2DModel::Update() {
}
bool NTField2DModel::Exists() {
return m_inst.IsConnected() && m_nameTopic.Exists();
return m_nameTopic.Exists();
}
bool NTField2DModel::IsReadOnly() {

View File

@@ -30,5 +30,5 @@ void NTGyroModel::Update() {
}
bool NTGyroModel::Exists() {
return m_inst.IsConnected() && m_angle.Exists();
return m_angle.Exists();
}

View File

@@ -81,5 +81,5 @@ void NTMecanumDriveModel::Update() {
}
bool NTMecanumDriveModel::Exists() {
return m_inst.IsConnected() && m_flPercent.Exists();
return m_flPercent.Exists();
}

View File

@@ -335,7 +335,7 @@ void NTMechanism2DModel::Update() {
}
bool NTMechanism2DModel::Exists() {
return m_inst.IsConnected() && m_nameTopic.Exists();
return m_nameTopic.Exists();
}
bool NTMechanism2DModel::IsReadOnly() {

View File

@@ -70,5 +70,5 @@ void NTPIDControllerModel::Update() {
}
bool NTPIDControllerModel::Exists() {
return m_inst.IsConnected() && m_setpoint.Exists();
return m_setpoint.Exists();
}

View File

@@ -40,5 +40,5 @@ void NTSpeedControllerModel::Update() {
}
bool NTSpeedControllerModel::Exists() {
return m_inst.IsConnected() && m_value.Exists();
return m_value.Exists();
}

View File

@@ -60,5 +60,5 @@ void NTStringChooserModel::Update() {
}
bool NTStringChooserModel::Exists() {
return m_inst.IsConnected() && m_options.Exists();
return m_options.Exists();
}

View File

@@ -34,5 +34,5 @@ void NTSubsystemModel::Update() {
}
bool NTSubsystemModel::Exists() {
return m_inst.IsConnected() && m_defaultCommand.Exists();
return m_defaultCommand.Exists();
}

View File

@@ -552,7 +552,7 @@ void NetworkTablesModel::RebuildTreeImpl(std::vector<TreeNode>* tree,
}
bool NetworkTablesModel::Exists() {
return m_inst.IsConnected();
return true;
}
NetworkTablesModel::Entry* NetworkTablesModel::GetEntry(std::string_view name) {