JXCT Soil Sensor 7-in-1 v3.4.9 (June 2025)
Professional IoT soil monitoring system with ESP32, Modbus RTU, MQTT, and advanced compensation algorithms
Загрузка...
Поиск...
Не найдено
sensor_factory.h
См. документацию.
1#pragma once
2#include <memory>
3#include "ISensor.h"
6#include "jxct_config_vars.h"
7
8static std::unique_ptr<ISensor> createSensorInstance()
9{
10 if (config.flags.useRealSensor)
11 return std::make_unique<ModbusSensorAdapter>();
12 return std::make_unique<FakeSensorAdapter>();
13}
Config config
Определения config.cpp:34
static std::unique_ptr< ISensor > createSensorInstance()
Определения sensor_factory.h:8