mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
uncrustified
This commit is contained in:
parent
b4b93bee93
commit
9a312ef115
@ -237,22 +237,22 @@ static bool check_stabilization_settings(int index, bool multirotor, bool copter
|
||||
// Get the different axis modes for this switch position
|
||||
switch (index) {
|
||||
case 1:
|
||||
FlightModeSettingsStabilization1SettingsArrayGet((FlightModeSettingsStabilization1SettingsOptions*) modes);
|
||||
FlightModeSettingsStabilization1SettingsArrayGet((FlightModeSettingsStabilization1SettingsOptions *)modes);
|
||||
break;
|
||||
case 2:
|
||||
FlightModeSettingsStabilization2SettingsArrayGet((FlightModeSettingsStabilization2SettingsOptions*) modes);
|
||||
FlightModeSettingsStabilization2SettingsArrayGet((FlightModeSettingsStabilization2SettingsOptions *)modes);
|
||||
break;
|
||||
case 3:
|
||||
FlightModeSettingsStabilization3SettingsArrayGet((FlightModeSettingsStabilization3SettingsOptions*) modes);
|
||||
FlightModeSettingsStabilization3SettingsArrayGet((FlightModeSettingsStabilization3SettingsOptions *)modes);
|
||||
break;
|
||||
case 4:
|
||||
FlightModeSettingsStabilization4SettingsArrayGet((FlightModeSettingsStabilization4SettingsOptions*) modes);
|
||||
FlightModeSettingsStabilization4SettingsArrayGet((FlightModeSettingsStabilization4SettingsOptions *)modes);
|
||||
break;
|
||||
case 5:
|
||||
FlightModeSettingsStabilization5SettingsArrayGet((FlightModeSettingsStabilization5SettingsOptions*) modes);
|
||||
FlightModeSettingsStabilization5SettingsArrayGet((FlightModeSettingsStabilization5SettingsOptions *)modes);
|
||||
break;
|
||||
case 6:
|
||||
FlightModeSettingsStabilization6SettingsArrayGet((FlightModeSettingsStabilization6SettingsOptions*) modes);
|
||||
FlightModeSettingsStabilization6SettingsArrayGet((FlightModeSettingsStabilization6SettingsOptions *)modes);
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
|
@ -96,27 +96,27 @@ void stabilizedHandler(bool newinit)
|
||||
|
||||
switch (flightStatus.FlightMode) {
|
||||
case FLIGHTSTATUS_FLIGHTMODE_STABILIZED1:
|
||||
stab_settings = (uint8_t*) FlightModeSettingsStabilization1SettingsToArray(settings.Stabilization1Settings);
|
||||
stab_settings = (uint8_t *)FlightModeSettingsStabilization1SettingsToArray(settings.Stabilization1Settings);
|
||||
break;
|
||||
case FLIGHTSTATUS_FLIGHTMODE_STABILIZED2:
|
||||
stab_settings = (uint8_t*) FlightModeSettingsStabilization2SettingsToArray(settings.Stabilization2Settings);
|
||||
stab_settings = (uint8_t *)FlightModeSettingsStabilization2SettingsToArray(settings.Stabilization2Settings);
|
||||
break;
|
||||
case FLIGHTSTATUS_FLIGHTMODE_STABILIZED3:
|
||||
stab_settings = (uint8_t*) FlightModeSettingsStabilization3SettingsToArray(settings.Stabilization3Settings);
|
||||
stab_settings = (uint8_t *)FlightModeSettingsStabilization3SettingsToArray(settings.Stabilization3Settings);
|
||||
break;
|
||||
case FLIGHTSTATUS_FLIGHTMODE_STABILIZED4:
|
||||
stab_settings = (uint8_t*) FlightModeSettingsStabilization4SettingsToArray(settings.Stabilization4Settings);
|
||||
stab_settings = (uint8_t *)FlightModeSettingsStabilization4SettingsToArray(settings.Stabilization4Settings);
|
||||
break;
|
||||
case FLIGHTSTATUS_FLIGHTMODE_STABILIZED5:
|
||||
stab_settings = (uint8_t*) FlightModeSettingsStabilization5SettingsToArray(settings.Stabilization5Settings);
|
||||
stab_settings = (uint8_t *)FlightModeSettingsStabilization5SettingsToArray(settings.Stabilization5Settings);
|
||||
break;
|
||||
case FLIGHTSTATUS_FLIGHTMODE_STABILIZED6:
|
||||
stab_settings = (uint8_t*) FlightModeSettingsStabilization6SettingsToArray(settings.Stabilization6Settings);
|
||||
stab_settings = (uint8_t *)FlightModeSettingsStabilization6SettingsToArray(settings.Stabilization6Settings);
|
||||
break;
|
||||
default:
|
||||
// Major error, this should not occur because only enter this block when one of these is true
|
||||
AlarmsSet(SYSTEMALARMS_ALARM_MANUALCONTROL, SYSTEMALARMS_ALARM_CRITICAL);
|
||||
stab_settings = (uint8_t*) FlightModeSettingsStabilization1SettingsToArray(settings.Stabilization1Settings);
|
||||
stab_settings = (uint8_t *)FlightModeSettingsStabilization1SettingsToArray(settings.Stabilization1Settings);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -315,7 +315,7 @@ int8_t VtolBrakeController::UpdateStabilizationDesired(void)
|
||||
default:
|
||||
break;
|
||||
}
|
||||
stabDesired.StabilizationMode.Thrust = (StabilizationDesiredStabilizationModeOptions) thrustMode;
|
||||
stabDesired.StabilizationMode.Thrust = (StabilizationDesiredStabilizationModeOptions)thrustMode;
|
||||
}
|
||||
|
||||
// set the thrust value
|
||||
|
@ -119,14 +119,10 @@ bool UAVObjectGeneratorFlight::process_object(ObjectInfo *info)
|
||||
// that StringList here for use below.
|
||||
//
|
||||
QStringList typeList;
|
||||
for (int n = 0; n < info->fields.length(); ++n)
|
||||
{
|
||||
if (info->fields[n]->type == FIELDTYPE_ENUM)
|
||||
{
|
||||
for (int n = 0; n < info->fields.length(); ++n) {
|
||||
if (info->fields[n]->type == FIELDTYPE_ENUM) {
|
||||
typeList << QString("%1%2Options").arg(info->name).arg(info->fields[n]->name);
|
||||
}
|
||||
else
|
||||
{
|
||||
} else {
|
||||
typeList << fieldTypeStrC[info->fields[n]->type];
|
||||
}
|
||||
}
|
||||
@ -276,7 +272,6 @@ bool UAVObjectGeneratorFlight::process_object(ObjectInfo *info)
|
||||
{
|
||||
// For non-array fields
|
||||
if (info->fields[n]->numElements == 1) {
|
||||
|
||||
/* Set */
|
||||
setgetfields.append(QString("void %2%3Set(%1 *New%3)\n")
|
||||
.arg(typeList[n])
|
||||
|
Loading…
Reference in New Issue
Block a user