diff --git a/flight/pios/stm32f4xx/pios_usart.c b/flight/pios/stm32f4xx/pios_usart.c index 78137a6e6..71c2b2697 100644 --- a/flight/pios/stm32f4xx/pios_usart.c +++ b/flight/pios/stm32f4xx/pios_usart.c @@ -47,12 +47,12 @@ static void PIOS_USART_TxStart(uint32_t usart_id, uint16_t tx_bytes_avail); static void PIOS_USART_RxStart(uint32_t usart_id, uint16_t rx_bytes_avail); const struct pios_com_driver pios_usart_com_driver = { - .set_baud = PIOS_USART_ChangeBaud, + .set_baud = PIOS_USART_ChangeBaud, .set_ctrl_line = PIOS_USART_SetCtrlLine, - .tx_start = PIOS_USART_TxStart, - .rx_start = PIOS_USART_RxStart, - .bind_tx_cb = PIOS_USART_RegisterTxCallback, - .bind_rx_cb = PIOS_USART_RegisterRxCallback, + .tx_start = PIOS_USART_TxStart, + .rx_start = PIOS_USART_RxStart, + .bind_tx_cb = PIOS_USART_RegisterTxCallback, + .bind_rx_cb = PIOS_USART_RegisterRxCallback, }; enum pios_usart_dev_magic { diff --git a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp index b0ec7d9be..2bf06f959 100644 --- a/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp +++ b/ground/openpilotgcs/src/plugins/setupwizard/vehicleconfigurationhelper.cpp @@ -100,8 +100,8 @@ bool VehicleConfigurationHelper::setupHardwareSettings(bool save) bool VehicleConfigurationHelper::isApplicable(UAVObject *dataObj) { - return true; - } + return true; +} void VehicleConfigurationHelper::addModifiedObject(UAVDataObject *object, QString description) { @@ -410,6 +410,13 @@ void VehicleConfigurationHelper::applyActuatorConfiguration() if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_REVO) { data.BankUpdateFreq[2] = escFrequence; data.BankMode[2] = bankMode; + } else if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_NANO) { + data.BankUpdateFreq[1] = escFrequence; + data.BankMode[1] = bankMode; + data.BankUpdateFreq[2] = escFrequence; + data.BankMode[2] = bankMode; + data.BankUpdateFreq[3] = escFrequence; + data.BankMode[3] = bankMode; } break; case VehicleConfigurationSource::MULTI_ROTOR_HEXA: @@ -429,6 +436,10 @@ void VehicleConfigurationHelper::applyActuatorConfiguration() data.BankMode[2] = bankMode; data.BankUpdateFreq[3] = escFrequence; data.BankMode[3] = bankMode; + if (m_configSource->getControllerType() == VehicleConfigurationSource::CONTROLLER_NANO) { + data.BankUpdateFreq[4] = escFrequence; + data.BankMode[4] = bankMode; + } break; default: break;