mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
holybro: hard-select CAM1 for now
I don't think there is an easy way to hook this up to RC input at the moment, so I'm setting it fixed to CAM1 for now.
This commit is contained in:
parent
9595f12327
commit
c9145a24b4
@ -132,12 +132,17 @@
|
||||
|
||||
#define GPIO_VTX_9V_EN /* PE3 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_SET|GPIO_PORTE|GPIO_PIN3)
|
||||
|
||||
#define GPIO_CAM_SWITCH /* PC13 */ (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_2MHz|GPIO_OUTPUT_CLEAR|GPIO_PORTC|GPIO_PIN13)
|
||||
|
||||
/* Define True logic Power Control in arch agnostic form */
|
||||
|
||||
#define VDD_3V3_SENSORS_EN(on_true) px4_arch_gpiowrite(GPIO_VDD_3V3_SENSORS_EN, (on_true))
|
||||
|
||||
#define VTX_9V_EN(on_true) px4_arch_gpiowrite(GPIO_VTX_9V_EN, (on_true))
|
||||
|
||||
#define CAM_SWITCH_CAM1 px4_arch_gpiowrite(GPIO_CAM_SWITCH, false) // low is CAM1
|
||||
#define CAM_SWITCH_CAM2 px4_arch_gpiowrite(GPIO_CAM_SWITCH, true) // high is CAM2
|
||||
|
||||
/* Tone alarm output */
|
||||
|
||||
#define TONE_ALARM_TIMER 17 /* Timer 17 */
|
||||
@ -214,6 +219,7 @@
|
||||
GPIO_TONE_ALARM_IDLE, \
|
||||
GPIO_PPM_IN, \
|
||||
GPIO_VTX_9V_EN, \
|
||||
GPIO_CAM_SWITCH, \
|
||||
}
|
||||
|
||||
#define BOARD_ENABLE_CONSOLE_BUFFER
|
||||
|
||||
@ -121,6 +121,8 @@ __EXPORT void board_peripheral_reset(int ms)
|
||||
board_control_spi_sensors_power(true, 0xffff);
|
||||
VDD_3V3_SENSORS_EN(true);
|
||||
VTX_9V_EN(true);
|
||||
|
||||
CAM_SWITCH_CAM1;
|
||||
}
|
||||
|
||||
/************************************************************************************
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user