APM:Libraries
AP_LeakDetector_Digital.cpp
Go to the documentation of this file.
2 #include <AP_HAL/AP_HAL.h>
3 
4 extern const AP_HAL::HAL& hal;
5 
7  AP_LeakDetector_Backend(_leak_detector, _state)
8 {}
9 
11 {
12  if (leak_detector._pin[state.instance] >= 0) {
15  } else {
16  state.status = false;
17  }
18 }
AP_Int8 _pin[LEAKDETECTOR_MAX_INSTANCES]
virtual void pinMode(uint8_t pin, uint8_t output)=0
#define HAL_GPIO_INPUT
Definition: GPIO.h:7
AP_LeakDetector::LeakDetector_State & state
virtual uint8_t read(uint8_t pin)=0
AP_HAL::GPIO * gpio
Definition: HAL.h:111
AP_Int8 _default_reading[LEAKDETECTOR_MAX_INSTANCES]
AP_LeakDetector_Digital(AP_LeakDetector &_leak_detector, AP_LeakDetector::LeakDetector_State &_state)
const AP_HAL::HAL & hal
-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
Definition: AC_PID_test.cpp:14