AP_HAL_VRBRAIN: code clean up. Deleted unused boards.
This commit is contained in:
parent
5e8c1b61b5
commit
d78ff43971
@ -41,23 +41,7 @@ static const struct {
|
||||
uint8_t pin;
|
||||
float scaling;
|
||||
} pin_scaling[] = {
|
||||
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V40)
|
||||
{ 0, 3.3f/4096 },
|
||||
{ 10, 3.3f/4096 },
|
||||
{ 11, 3.3f/4096 },
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V45)
|
||||
{ 0, 3.3f/4096 },
|
||||
{ 10, 3.3f/4096 },
|
||||
{ 11, 3.3f/4096 },
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V50)
|
||||
{ 0, 3.3f/4096 },
|
||||
{ 10, 3.3f/4096 },
|
||||
{ 11, 3.3f/4096 },
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V51)
|
||||
{ 0, 3.3f/4096 },
|
||||
{ 10, 3.3f/4096 },
|
||||
{ 11, 3.3f/4096 },
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V52)
|
||||
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V45) || defined(CONFIG_ARCH_BOARD_VRBRAIN_V51) || defined(CONFIG_ARCH_BOARD_VRBRAIN_V52)
|
||||
{ 0, 3.3f/4096 },
|
||||
{ 10, 3.3f/4096 },
|
||||
{ 11, 3.3f/4096 },
|
||||
|
@ -10,19 +10,7 @@
|
||||
#define VRBRAIN_ANALOG_MAX_CHANNELS 16
|
||||
|
||||
|
||||
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V40)
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_VOLTAGE_PIN 10
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_CURRENT_PIN 11
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V45)
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_VOLTAGE_PIN 10
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_CURRENT_PIN 11
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V50)
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_VOLTAGE_PIN 10
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_CURRENT_PIN 11
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V51)
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_VOLTAGE_PIN 10
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_CURRENT_PIN 11
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V52)
|
||||
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V45) || defined(CONFIG_ARCH_BOARD_VRBRAIN_V51) || defined(CONFIG_ARCH_BOARD_VRBRAIN_V52) || defined(CONFIG_ARCH_BOARD_VRHERO_V10)
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_VOLTAGE_PIN 10
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_CURRENT_PIN 11
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRUBRAIN_V51)
|
||||
@ -31,9 +19,6 @@
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRUBRAIN_V52)
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_VOLTAGE_PIN 10
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_CURRENT_PIN 1
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRHERO_V10)
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_VOLTAGE_PIN 10
|
||||
#define VRBRAIN_ANALOG_ORB_BATTERY_CURRENT_PIN 11
|
||||
#endif
|
||||
|
||||
class VRBRAIN::VRBRAINAnalogSource : public AP_HAL::AnalogSource {
|
||||
|
@ -44,19 +44,7 @@ static VRBRAINUtil utilInstance;
|
||||
static VRBRAINGPIO gpioDriver;
|
||||
|
||||
//We only support 3 serials for VRBRAIN at the moment
|
||||
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V40)
|
||||
#define UARTA_DEFAULT_DEVICE "/dev/ttyACM0"
|
||||
#define UARTB_DEFAULT_DEVICE "/dev/ttyS1"
|
||||
#define UARTC_DEFAULT_DEVICE "/dev/ttyS2"
|
||||
#define UARTD_DEFAULT_DEVICE "/dev/null"
|
||||
#define UARTE_DEFAULT_DEVICE "/dev/null"
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V45)
|
||||
#define UARTA_DEFAULT_DEVICE "/dev/ttyACM0"
|
||||
#define UARTB_DEFAULT_DEVICE "/dev/ttyS1"
|
||||
#define UARTC_DEFAULT_DEVICE "/dev/ttyS2"
|
||||
#define UARTD_DEFAULT_DEVICE "/dev/null"
|
||||
#define UARTE_DEFAULT_DEVICE "/dev/null"
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V50)
|
||||
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V45)
|
||||
#define UARTA_DEFAULT_DEVICE "/dev/ttyACM0"
|
||||
#define UARTB_DEFAULT_DEVICE "/dev/ttyS1"
|
||||
#define UARTC_DEFAULT_DEVICE "/dev/ttyS2"
|
||||
|
@ -106,12 +106,8 @@ bool VRBRAINUtil::get_system_id(char buf[40])
|
||||
uint8_t serialid[12];
|
||||
memset(serialid, 0, sizeof(serialid));
|
||||
get_board_serial(serialid);
|
||||
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V40)
|
||||
const char *board_type = "VRBRAINv40";
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V45)
|
||||
#if defined(CONFIG_ARCH_BOARD_VRBRAIN_V45)
|
||||
const char *board_type = "VRBRAINv45";
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V50)
|
||||
const char *board_type = "VRBRAINv50";
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V51)
|
||||
const char *board_type = "VRBRAINv51";
|
||||
#elif defined(CONFIG_ARCH_BOARD_VRBRAIN_V52)
|
||||
|
Loading…
Reference in New Issue
Block a user