Skip to content

Commit

Permalink
getter for air quality
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarthak-Shaha committed Sep 9, 2024
1 parent bbce050 commit 3e4e368
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ class AirQualitySensorManager
}
};

/**
* @return The current AirQuality value.
*/
AirQuality::AirQualityEnum GetAirQuality();

/**
* @brief Get an Air Quality Manager object - this class acts as a singleton device manager for the air quality device
* @param[in] aEndpointId Endpoint that the air quality is on
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ void AirQualitySensorManager::Init()
mFormaldehydeConcentrationMeasurementInstance.SetLevelValue(LevelValueEnum::kLow);
}

AirQualityEnum AirQualitySensorManager::GetAirQuality()
{
return mAirQualityInstance.GetAirQuality();
}

void AirQualitySensorManager::OnAirQualityChangeHandler(AirQualityEnum newValue)
{
mAirQualityInstance.UpdateAirQuality(newValue);
Expand Down

0 comments on commit 3e4e368

Please sign in to comment.