diff --git a/src/AutoPilotPlugins/PX4/FlightModesComponent.cc b/src/AutoPilotPlugins/PX4/FlightModesComponent.cc index a2f3b9a6f89975bca97530ba50a20693be9b13f7..bba49c0c92f595887f533aab351b5fcbb881c07a 100644 --- a/src/AutoPilotPlugins/PX4/FlightModesComponent.cc +++ b/src/AutoPilotPlugins/PX4/FlightModesComponent.cc @@ -143,7 +143,7 @@ QList FlightModesComponent::summaryItems(void) const // Switch is not mapped if (i == 0) { // Mode switch is required - Q_ASSERT(switchList[0].param == "RC_MAP_MODE_SW"); + Q_ASSERT(strcmp(switchList[0].param, "RC_MAP_MODE_SW") == 0); row << "Setup required"; } else { row << "None"; diff --git a/src/VehicleSetup/SetupView.cc b/src/VehicleSetup/SetupView.cc index f3fdfda632956dc633f0cf31dd1d40f14c86df71..8c013a42dbdf62b50eb83c2ebbd4f2cdb560d5ec 100644 --- a/src/VehicleSetup/SetupView.cc +++ b/src/VehicleSetup/SetupView.cc @@ -118,7 +118,9 @@ void SetupView::_clearComponentButtons(void) QLayoutItem* item; while ((item = _ui->componentButtonLayout->itemAt(0))) { VehicleComponentButton* componentButton = dynamic_cast(item->widget()); + // Make sure this is really a VehicleComponentButton. If it isn't the UI has changed but the code hasn't. Q_ASSERT(componentButton); + Q_UNUSED(componentButton); _ui->componentButtonLayout->removeWidget(item->widget()); } }