boards: initial CUAV X7Pro support (not complete)

- this is booting and functional, but still missing a few things
 - still needs full PWM output, verification of all sensor rotations and IO, etc
This commit is contained in:
Daniel Agar
2020-05-01 20:59:28 -04:00
committed by GitHub
parent 0c8dcf94bc
commit d89b7804f7
28 changed files with 2460 additions and 24 deletions
+10 -9
View File
@@ -143,7 +143,6 @@ void ADC::update_system_power(hrt_abstime now)
{
#if defined (BOARD_ADC_USB_CONNECTED)
system_power_s system_power {};
system_power.timestamp = now;
/* Assume HW provides only ADC_SCALED_V5_SENSE */
int cnt = 1;
@@ -191,7 +190,7 @@ void ADC::update_system_power(hrt_abstime now)
system_power.usb_valid = BOARD_ADC_USB_VALID;
#else
/* If not provided then use connected */
system_power.usb_valid = system_power.usb_connected;
system_power.usb_valid = system_power.usb_connected;
#endif
#if defined(BOARD_BRICK_VALID_LIST)
@@ -205,18 +204,20 @@ void ADC::update_system_power(hrt_abstime now)
#endif
system_power.servo_valid = BOARD_ADC_SERVO_VALID;
#ifdef BOARD_ADC_PERIPH_5V_OC
// OC pins are active low
system_power.periph_5v_oc = BOARD_ADC_PERIPH_5V_OC;
#if defined(BOARD_ADC_SERVO_VALID)
system_power.servo_valid = BOARD_ADC_SERVO_VALID;
#endif
#ifdef BOARD_ADC_HIPOWER_5V_OC
#if defined(BOARD_ADC_PERIPH_5V_OC)
// OC pins are active low
system_power.periph_5v_oc = BOARD_ADC_PERIPH_5V_OC;
#endif
#if defined(BOARD_ADC_HIPOWER_5V_OC)
system_power.hipower_5v_oc = BOARD_ADC_HIPOWER_5V_OC;
#endif
/* lazily publish */
system_power.timestamp = hrt_absolute_time();
_to_system_power.publish(system_power);
#endif // BOARD_ADC_USB_CONNECTED