Beispiel #1
0
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;
    }
  }
}
Beispiel #2
0
SwitchSensor DataClass::switchSensor(
    String name, byte pin, Timer time) {
  return SwitchSensor(name, pin, time);
}
Beispiel #3
0
/** SwitchSensor **/
SwitchSensor DataClass::switchSensor(
    String name, byte pin) {
  return SwitchSensor(name, pin, _timer);
}