mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-26 09:26:25 +08:00
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:
+10
-9
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user