The sensor class should tell if the config has been changed.
It would avoid the need for check
&& sensor->getSensorType() != SensorTypeID::Unknown
&& sensor->getSensorType() != SensorTypeID::Empty;
The challenge is probably to get the acknowledged back to the sensor.
|
bool Connection::isSensorStateUpdated(int i, std::unique_ptr<Sensor>& sensor) { |
|
return (m_AckedSensorState[i] != sensor->getSensorState() |
|
|| m_AckedSensorCalibration[i] != sensor->hasCompletedRestCalibration() |
|
|| m_AckedSensorConfigData[i] != sensor->getSensorConfigData()) |
|
&& sensor->getSensorType() != SensorTypeID::Unknown |
|
&& sensor->getSensorType() != SensorTypeID::Empty; |
|
} |
The sensor class should tell if the config has been changed.
It would avoid the need for check
&& sensor->getSensorType() != SensorTypeID::Unknown && sensor->getSensorType() != SensorTypeID::Empty;The challenge is probably to get the acknowledged back to the sensor.
SlimeVR-Tracker-ESP/src/network/connection.cpp
Lines 516 to 522 in ee48341