Sim GUI: Add option to disable outputs on DS disable

This commit is contained in:
Peter Johnson
2019-10-21 00:33:51 -07:00
parent 2d3dac99f0
commit acf960f729
6 changed files with 40 additions and 7 deletions

View File

@@ -31,7 +31,10 @@ static void DisplaySolenoids() {
for (int j = 0; j < numChannels; ++j) {
if (HALSIM_GetPCMSolenoidInitialized(i, j)) {
anyInit = true;
channels[j] = HALSIM_GetPCMSolenoidOutput(i, j) ? 1 : -1;
channels[j] = (!HALSimGui::AreOutputsDisabled() &&
HALSIM_GetPCMSolenoidOutput(i, j))
? 1
: -1;
} else {
channels[j] = -2;
}