QuadroCopter
0.1.4
|
#include <LVMaxSonarEZ.h>
Public Types | |
enum | deviceMode { Inches = 0, Cm = 1 } |
enum | deviceStatus { On = 1, Off = 0, Error = 2 } |
Public Types inherited from quadro::analog::analogBase | |
enum | analogPort { PORT0 = 0, PORT1 = 1, PORT2 = 2, PORT3 = 3, PORT4 = 4, PORT5 = 5, PORT6 = 6 } |
Public Member Functions | |
LVMaxSonarEZ () | |
int | start () |
int | stop () |
double | getDistance () |
Storage of the timer for the sensors main thread, based on the data rate of the sensor. More... | |
void | setMode (deviceMode _mode) |
int | getStatus () |
void | setStatus (deviceStatus _status) |
Public Member Functions inherited from quadro::analog::analogBase | |
~analogBase () | |
analogBase () | |
int | getCurrentReading () |
void | setDevicePort (analogPort _AP) |
Public Member Functions inherited from quadro::IDevice | |
virtual | ~IDevice () |
Public Attributes | |
__useconds_t | dataTimer = SONIC_DATATIMER |
deviceMode | currentMode |
LVMaxSonarEZ::LVMaxSonarEZ | ( | ) |
Class constructor - by default this constructor sets the height mode to CM and the devices status to off.
double LVMaxSonarEZ::getDistance | ( | ) |
Storage of the timer for the sensors main thread, based on the data rate of the sensor.
This method provides access to the private calculate distance result.
int LVMaxSonarEZ::getStatus | ( | ) |
void LVMaxSonarEZ::setMode | ( | deviceMode | _mode | ) |
setMode allows the mode of the sensor to be changed to one of the values set in deviceModes
_mode |
void LVMaxSonarEZ::setStatus | ( | deviceStatus | _status | ) |
int LVMaxSonarEZ::start | ( | ) |
start() - Allows the independent control to start the thread that updates the Sonic Sensor readings.
none |
analogSetupException |
int LVMaxSonarEZ::stop | ( | ) |
stop() - Allows the independent control to stop the current thread.
none |
analogRuntimeException |
deviceMode quadro::analog::LVMaxSonarEZ::currentMode |
__useconds_t quadro::analog::LVMaxSonarEZ::dataTimer = SONIC_DATATIMER |