Skip to content

Move the logic of this check to the sensor class #422

Open
@unlogisch04

Description

@unlogisch04

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;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Difficulty: Newbie FriendlyAre you a new contributor looking for something to do? Try this :)Priority: LowLess important right nowType: DiscussionFurther information is requestedType: EnhancementAdds or improves a feature

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions