This commit is contained in:
Diego Freitas 2025-12-11 16:58:23 -03:00
parent f8b022ce11
commit a6d3b8e348
1 changed files with 2 additions and 2 deletions

View File

@ -157,9 +157,9 @@ namespace AgroBase.Services
private void EnviarComando() private void EnviarComando()
{ {
if ((ReleCoolerEntrada?.StatusLeitura ?? Estado.Desligado) != CoolerEntradaEstado) if (ReleCoolerEntrada != null && (ReleCoolerEntrada?.StatusLeitura ?? Estado.Desligado) != CoolerEntradaEstado)
GeneralJoystick.EnviarComandoSensoriamento(ReleCoolerEntrada.Componente, ReleCoolerEntrada.ID, CoolerEntradaEstado); GeneralJoystick.EnviarComandoSensoriamento(ReleCoolerEntrada.Componente, ReleCoolerEntrada.ID, CoolerEntradaEstado);
if ((ReleCoolerSaida?.StatusLeitura ?? Estado.Desligado) != CoolerSaidaEstado) if (ReleCoolerSaida != null && (ReleCoolerSaida?.StatusLeitura ?? Estado.Desligado) != CoolerSaidaEstado)
GeneralJoystick.EnviarComandoSensoriamento(ReleCoolerSaida.Componente, ReleCoolerSaida.ID, CoolerSaidaEstado); GeneralJoystick.EnviarComandoSensoriamento(ReleCoolerSaida.Componente, ReleCoolerSaida.ID, CoolerSaidaEstado);
} }