You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
/// -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-
|
|
|
|
|
|
|
|
#ifndef __AP_ANALOG_SOURCE_ARDUINO_H__
|
|
|
|
#define __AP_ANALOG_SOURCE_ARDUINO_H__
|
|
|
|
|
|
|
|
#include "AnalogSource.h"
|
|
|
|
|
|
|
|
class AP_AnalogSource_Arduino : public AP_AnalogSource
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AP_AnalogSource_Arduino( int pin, float prescale = 1.0 ) :
|
|
|
|
_pin(pin), _prescale(prescale) {}
|
|
|
|
float read(void);
|
|
|
|
|
|
|
|
private:
|
|
|
|
int _pin;
|
|
|
|
float _prescale;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __AP_ANALOG_SOURCE_ARDUINO_H__
|