static void SetSensorState(SensorType aSensor, bool activate) { int type = HalSensorToHardwareSensor(aSensor); const sensor_t* sensors = NULL; int size = sSensorModule->get_sensors_list(sSensorModule, &sensors); for (ssize_t i = 0; i < size; i++) { if (sensors[i].type == type) { SwitchSensor(activate, sensors[i], pthread_self()); break; } } }
SwitchSensor DataClass::switchSensor( String name, byte pin, Timer time) { return SwitchSensor(name, pin, time); }
/** SwitchSensor **/ SwitchSensor DataClass::switchSensor( String name, byte pin) { return SwitchSensor(name, pin, _timer); }