Skip to content

Develop a solution for dynamically modifying the sensor configuration #4

@curieos

Description

@curieos

Currently sensors are created by the plant service on initialization:

PlantService::PlantService(Scheduler *scheduler)
: Task(CHECK_SENSOR_PERIOD, TASK_FOREVER, scheduler, true) {
this->ambient_temperature_sensor = new AmbientTemperatureSensor();
this->ambient_humidity_sensor = new AmbientHumiditySensor();

This should be changed so sensors can be created and destroyed based on the configuration as it changes. A sensor factory is probably a good design pattern to follow. #5 should probably be completed before this so extra work doesn't occur.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrefactorCode that needs refactoring

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions