8 _logger = spdlog::get(
"console");
43 s->_change->type(SensorType::SPEED);
44 s->_change->speed(s->_second, s->_first, timeout);
68 json += s->_first->json(
"value");
70 json += s->json(s->name());
74 json += s->_change->json(
"change");
76 json += s->json(s->name());
79 if (json.back() ==
',')
85 if (json.back() ==
',')
ObSensor(std::string name={"sensor"})
std::string name() const
Returns name of sensor.
std::vector< ObSensor * > _sensors
List of subsensors.
ObSensor * _first
Pointer to first sensor.
virtual std::string json(const std::string name={}) const
ObSensor * _second
Pointer to second sensor.
virtual void update(int timeout) final
std::string _name
Sensor name.
void type(SensorType t)
Sets sensor type.