APM:Libraries
Macros | Functions | Variables
HAL_VRBRAIN_Class.cpp File Reference
#include <AP_HAL/AP_HAL.h>
#include <AP_HAL/utility/RCOutput_Tap.h>
#include <AP_HAL_Empty/AP_HAL_Empty.h>
#include <AP_HAL_Empty/AP_HAL_Empty_Private.h>
#include "AP_HAL_VRBRAIN.h"
#include "AP_HAL_VRBRAIN_Namespace.h"
#include "HAL_VRBRAIN_Class.h"
#include "Scheduler.h"
#include "UARTDriver.h"
#include "Storage.h"
#include "RCInput.h"
#include "RCOutput.h"
#include "AnalogIn.h"
#include "Util.h"
#include "GPIO.h"
#include "I2CDevice.h"
#include "SPIDevice.h"
#include <stdlib.h>
#include <systemlib/systemlib.h>
#include <nuttx/config.h>
#include <unistd.h>
#include <stdio.h>
#include <pthread.h>
#include <poll.h>
#include <drivers/drv_hrt.h>
Include dependency graph for HAL_VRBRAIN_Class.cpp:

Go to the source code of this file.

Macros

#define UARTA_DEFAULT_DEVICE   "/dev/ttyACM0"
 
#define UARTB_DEFAULT_DEVICE   "/dev/ttyS0"
 
#define UARTC_DEFAULT_DEVICE   "/dev/ttyS2"
 
#define UARTD_DEFAULT_DEVICE   "/dev/ttyS1"
 
#define UARTE_DEFAULT_DEVICE   "/dev/null"
 
#define UARTF_DEFAULT_DEVICE   "/dev/null"
 

Functions

void hal_vrbrain_set_priority (uint8_t priority)
 
static void loop_overtime (void *)
 
static int main_loop (int argc, char **argv)
 
static void usage (void)
 

Variables

static VRBRAINScheduler schedulerInstance
 
static VRBRAINStorage storageDriver
 
static VRBRAINRCInput rcinDriver
 
static VRBRAINRCOutput rcoutDriver
 
static VRBRAINAnalogIn analogIn
 
static VRBRAINUtil utilInstance
 
static VRBRAINGPIO gpioDriver
 
static VRBRAIN::I2CDeviceManager i2c_mgr_instance
 
static VRBRAIN::SPIDeviceManager spi_mgr_instance
 
static VRBRAINUARTDriver uartADriver (UARTA_DEFAULT_DEVICE, "APM_uartA")
 
static VRBRAINUARTDriver uartBDriver (UARTB_DEFAULT_DEVICE, "APM_uartB")
 
static VRBRAINUARTDriver uartCDriver (UARTC_DEFAULT_DEVICE, "APM_uartC")
 
static VRBRAINUARTDriver uartDDriver (UARTD_DEFAULT_DEVICE, "APM_uartD")
 
static VRBRAINUARTDriver uartEDriver (UARTE_DEFAULT_DEVICE, "APM_uartE")
 
static VRBRAINUARTDriver uartFDriver (UARTF_DEFAULT_DEVICE, "APM_uartF")
 
bool _vrbrain_thread_should_exit = false
 
static bool thread_running = false
 
static int daemon_task
 
bool vrbrain_ran_overtime
 
const AP_HAL::HALhal
 -*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*- More...
 
static AP_HAL::HAL::Callbacksg_callbacks
 

Macro Definition Documentation

◆ UARTA_DEFAULT_DEVICE

#define UARTA_DEFAULT_DEVICE   "/dev/ttyACM0"

Definition at line 109 of file HAL_VRBRAIN_Class.cpp.

Referenced by HAL_VRBRAIN::run(), and usage().

◆ UARTB_DEFAULT_DEVICE

#define UARTB_DEFAULT_DEVICE   "/dev/ttyS0"

Definition at line 110 of file HAL_VRBRAIN_Class.cpp.

◆ UARTC_DEFAULT_DEVICE

#define UARTC_DEFAULT_DEVICE   "/dev/ttyS2"

Definition at line 111 of file HAL_VRBRAIN_Class.cpp.

Referenced by HAL_VRBRAIN::run(), and usage().

◆ UARTD_DEFAULT_DEVICE

#define UARTD_DEFAULT_DEVICE   "/dev/ttyS1"

Definition at line 112 of file HAL_VRBRAIN_Class.cpp.

Referenced by HAL_VRBRAIN::run(), and usage().

◆ UARTE_DEFAULT_DEVICE

#define UARTE_DEFAULT_DEVICE   "/dev/null"

Definition at line 113 of file HAL_VRBRAIN_Class.cpp.

Referenced by HAL_VRBRAIN::run(), and usage().

◆ UARTF_DEFAULT_DEVICE

#define UARTF_DEFAULT_DEVICE   "/dev/null"

Definition at line 114 of file HAL_VRBRAIN_Class.cpp.

Referenced by HAL_VRBRAIN::run(), and usage().

Function Documentation

◆ hal_vrbrain_set_priority()

void hal_vrbrain_set_priority ( uint8_t  priority)

Definition at line 157 of file HAL_VRBRAIN_Class.cpp.

Referenced by loop_overtime(), main_loop(), sem_post_boost(), and set_normal_priority().

Here is the caller graph for this function:

◆ loop_overtime()

static void loop_overtime ( void *  )
static

Definition at line 170 of file HAL_VRBRAIN_Class.cpp.

Referenced by main_loop().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main_loop()

static int main_loop ( int  argc,
char **  argv 
)
static

Definition at line 178 of file HAL_VRBRAIN_Class.cpp.

Referenced by HAL_VRBRAIN::run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usage()

static void usage ( void  )
static

Definition at line 248 of file HAL_VRBRAIN_Class.cpp.

Referenced by HAL_VRBRAIN::run().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ _vrbrain_thread_should_exit

bool _vrbrain_thread_should_exit = false

◆ analogIn

VRBRAINAnalogIn analogIn
static

Definition at line 45 of file HAL_VRBRAIN_Class.cpp.

◆ daemon_task

int daemon_task
static

Handle of daemon task / thread

Definition at line 149 of file HAL_VRBRAIN_Class.cpp.

Referenced by hal_vrbrain_set_priority(), and HAL_VRBRAIN::run().

◆ g_callbacks

AP_HAL::HAL::Callbacks* g_callbacks
static

Definition at line 176 of file HAL_VRBRAIN_Class.cpp.

◆ gpioDriver

VRBRAINGPIO gpioDriver
static

Definition at line 47 of file HAL_VRBRAIN_Class.cpp.

◆ hal

const AP_HAL::HAL& hal

-*- tab-width: 4; Mode: C++; c-basic-offset: 4; indent-tabs-mode: nil -*-

Definition at line 14 of file AC_PID_test.cpp.

◆ i2c_mgr_instance

VRBRAIN::I2CDeviceManager i2c_mgr_instance
static

Definition at line 49 of file HAL_VRBRAIN_Class.cpp.

◆ rcinDriver

VRBRAINRCInput rcinDriver
static

Definition at line 43 of file HAL_VRBRAIN_Class.cpp.

◆ rcoutDriver

VRBRAINRCOutput rcoutDriver
static

Definition at line 44 of file HAL_VRBRAIN_Class.cpp.

◆ schedulerInstance

VRBRAINScheduler schedulerInstance
static

Definition at line 41 of file HAL_VRBRAIN_Class.cpp.

◆ spi_mgr_instance

VRBRAIN::SPIDeviceManager spi_mgr_instance
static

Definition at line 50 of file HAL_VRBRAIN_Class.cpp.

◆ storageDriver

VRBRAINStorage storageDriver
static

Definition at line 42 of file HAL_VRBRAIN_Class.cpp.

◆ thread_running

bool thread_running = false
static

Daemon status flag

Definition at line 148 of file HAL_VRBRAIN_Class.cpp.

Referenced by main_loop(), and HAL_VRBRAIN::run().

◆ uartADriver

VRBRAINUARTDriver uartADriver(UARTA_DEFAULT_DEVICE, "APM_uartA")
static

Referenced by HAL_VRBRAIN::run().

◆ uartBDriver

VRBRAINUARTDriver uartBDriver(UARTB_DEFAULT_DEVICE, "APM_uartB")
static

◆ uartCDriver

VRBRAINUARTDriver uartCDriver(UARTC_DEFAULT_DEVICE, "APM_uartC")
static

Referenced by HAL_VRBRAIN::run().

◆ uartDDriver

VRBRAINUARTDriver uartDDriver(UARTD_DEFAULT_DEVICE, "APM_uartD")
static

Referenced by HAL_VRBRAIN::run().

◆ uartEDriver

VRBRAINUARTDriver uartEDriver(UARTE_DEFAULT_DEVICE, "APM_uartE")
static

Referenced by HAL_VRBRAIN::run().

◆ uartFDriver

VRBRAINUARTDriver uartFDriver(UARTF_DEFAULT_DEVICE, "APM_uartF")
static

Referenced by HAL_VRBRAIN::run().

◆ utilInstance

VRBRAINUtil utilInstance
static

Definition at line 46 of file HAL_VRBRAIN_Class.cpp.

◆ vrbrain_ran_overtime

bool vrbrain_ran_overtime