Unverified Commit dd27f8ea authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8582 from alexeylysenko/fixed_enable_sensor_hil

Emit sensorHilChanged signal only if it was really changed
parents 84e704e4 ac9ad934
...@@ -94,10 +94,11 @@ public slots: ...@@ -94,10 +94,11 @@ public slots:
} }
void enableSensorHIL(bool enable) { void enableSensorHIL(bool enable) {
if (enable != _sensorHilEnabled) if (enable != _sensorHilEnabled) {
_sensorHilEnabled = enable; _sensorHilEnabled = enable;
emit sensorHilChanged(enable); emit sensorHilChanged(enable);
} }
}
void readBytes(); void readBytes();
......
...@@ -131,10 +131,11 @@ public slots: ...@@ -131,10 +131,11 @@ public slots:
void setVersion(unsigned int version); void setVersion(unsigned int version);
void enableSensorHIL(bool enable) { void enableSensorHIL(bool enable) {
if (enable != _sensorHilEnabled) if (enable != _sensorHilEnabled) {
_sensorHilEnabled = enable; _sensorHilEnabled = enable;
emit sensorHilChanged(enable); emit sensorHilChanged(enable);
} }
}
void enableHilActuatorControls(bool enable); void enableHilActuatorControls(bool enable);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment