Commit 0bc5a89a authored by luz's avatar luz

SensorBehaviour: added default changes-only interval parameter for setHardwareSensorConfig

parent 9bc086f1
......@@ -39,7 +39,7 @@ SensorBehaviour::SensorBehaviour(Device &aDevice) :
}
void SensorBehaviour::setHardwareSensorConfig(DsSensorType aType, DsUsageHint aUsage, double aMin, double aMax, double aResolution, MLMicroSeconds aUpdateInterval, MLMicroSeconds aAliveSignInterval)
void SensorBehaviour::setHardwareSensorConfig(DsSensorType aType, DsUsageHint aUsage, double aMin, double aMax, double aResolution, MLMicroSeconds aUpdateInterval, MLMicroSeconds aAliveSignInterval, MLMicroSeconds aDefaultChangesOnlyInterval)
{
sensorType = aType;
sensorUsage = aUsage;
......@@ -48,6 +48,8 @@ void SensorBehaviour::setHardwareSensorConfig(DsSensorType aType, DsUsageHint aU
resolution = aResolution;
updateInterval = aUpdateInterval;
aliveSignInterval = aAliveSignInterval;
// default only, devices once created will have this as a persistent setting
changesOnlyInterval = aDefaultChangesOnlyInterval;
}
......
......@@ -77,7 +77,7 @@ namespace p44 {
/// initialisation of hardware-specific constants for this sensor
/// @note this must be called once before the device gets added to the device container. Implementation might
/// also derive default values for settings from this information.
void setHardwareSensorConfig(DsSensorType aType, DsUsageHint aUsage, double aMin, double aMax, double aResolution, MLMicroSeconds aUpdateInterval, MLMicroSeconds aAliveSignInterval);
void setHardwareSensorConfig(DsSensorType aType, DsUsageHint aUsage, double aMin, double aMax, double aResolution, MLMicroSeconds aUpdateInterval, MLMicroSeconds aAliveSignInterval, MLMicroSeconds aDefaultChangesOnlyInterval=0);
/// set group
virtual void setGroup(DsGroup aGroup) { sensorGroup = aGroup; };
......
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