supports MindPXv2 borad which is a product from AirMind.

This commit is contained in:
Felix Hu
2016-03-30 19:45:39 +02:00
committed by Lorenz Meier
parent adab451013
commit bd580e09bf
49 changed files with 9941 additions and 49 deletions
+11 -1
View File
@@ -314,7 +314,7 @@ ADC::_tick()
void
ADC::update_system_power(void)
{
#ifdef CONFIG_ARCH_BOARD_PX4FMU_V2
#if defined (CONFIG_ARCH_BOARD_PX4FMU_V2) || defined (CONFIG_ARCH_BOARD_MINDPX_V2)
system_power_s system_power = {};
system_power.timestamp = hrt_absolute_time();
@@ -331,6 +331,15 @@ ADC::update_system_power(void)
// publish these to the same topic
system_power.usb_connected = stm32_gpioread(GPIO_OTGFS_VBUS);
#if defined (CONFIG_ARCH_BOARD_MINDPX_V2)
// note that the valid pins are active low
system_power.brick_valid = 1;
system_power.servo_valid = 1;
// OC pins are active low
system_power.periph_5V_OC = 1;
system_power.hipower_5V_OC = 1;
#else
// note that the valid pins are active low
system_power.brick_valid = !stm32_gpioread(GPIO_VDD_BRICK_VALID);
system_power.servo_valid = !stm32_gpioread(GPIO_VDD_SERVO_VALID);
@@ -338,6 +347,7 @@ ADC::update_system_power(void)
// OC pins are active low
system_power.periph_5V_OC = !stm32_gpioread(GPIO_VDD_5V_PERIPH_OC);
system_power.hipower_5V_OC = !stm32_gpioread(GPIO_VDD_5V_HIPOWER_OC);
#endif
/* lazily publish */
if (_to_system_power != nullptr) {