APM:Libraries
AnalogIn.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "AP_HAL_Empty.h"
4 
6 public:
7  AnalogSource(float v);
8  float read_average();
9  float read_latest();
10  void set_pin(uint8_t p);
11  void set_stop_pin(uint8_t p);
12  void set_settle_time(uint16_t settle_time_ms);
13  float voltage_average();
14  float voltage_latest();
16 private:
17  float _v;
18 };
19 
21 public:
22  AnalogIn();
23  void init();
24  AP_HAL::AnalogSource* channel(int16_t n);
25  float board_voltage(void);
26 };
void set_stop_pin(uint8_t p)
Definition: AnalogIn.cpp:28
AnalogSource(float v)
Definition: AnalogIn.cpp:5
float voltage_average_ratiometric()
Definition: AnalogIn.h:15
float read_average()
Definition: AnalogIn.cpp:9
void set_pin(uint8_t p)
Definition: AnalogIn.cpp:25
float voltage_latest()
Definition: AnalogIn.cpp:17
float v
Definition: Printf.cpp:15
void init()
Generic board initialization function.
Definition: system.cpp:136
float voltage_average()
Definition: AnalogIn.cpp:13
void set_settle_time(uint16_t settle_time_ms)
Definition: AnalogIn.cpp:31