mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-01-19 04:52:12 +01:00
OP-1740: uavobj use enums: clean up errors
This commit is contained in:
parent
e6de41855b
commit
782944bfb1
@ -101,7 +101,7 @@ int32_t VtolBrakeFSM::Initialize(VtolPathFollowerSettingsData *ptr_vtolPathFollo
|
|||||||
mBrakeData = (VtolBrakeFSMData_T *)pios_malloc(sizeof(VtolBrakeFSMData_T));
|
mBrakeData = (VtolBrakeFSMData_T *)pios_malloc(sizeof(VtolBrakeFSMData_T));
|
||||||
PIOS_Assert(mBrakeData);
|
PIOS_Assert(mBrakeData);
|
||||||
}
|
}
|
||||||
memset(mBrakeData, sizeof(VtolBrakeFSMData_T), 0);
|
memset(mBrakeData, 0, sizeof(VtolBrakeFSMData_T));
|
||||||
vtolPathFollowerSettings = ptr_vtolPathFollowerSettings;
|
vtolPathFollowerSettings = ptr_vtolPathFollowerSettings;
|
||||||
pathDesired = ptr_pathDesired;
|
pathDesired = ptr_pathDesired;
|
||||||
flightStatus = ptr_flightStatus;
|
flightStatus = ptr_flightStatus;
|
||||||
@ -113,7 +113,7 @@ int32_t VtolBrakeFSM::Initialize(VtolPathFollowerSettingsData *ptr_vtolPathFollo
|
|||||||
|
|
||||||
void VtolBrakeFSM::Inactive(void)
|
void VtolBrakeFSM::Inactive(void)
|
||||||
{
|
{
|
||||||
memset(mBrakeData, sizeof(VtolBrakeFSMData_T), 0);
|
memset(mBrakeData, 0, sizeof(VtolBrakeFSMData_T));
|
||||||
initFSM();
|
initFSM();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ void VtolBrakeFSM::initFSM(void)
|
|||||||
|
|
||||||
void VtolBrakeFSM::Activate()
|
void VtolBrakeFSM::Activate()
|
||||||
{
|
{
|
||||||
memset(mBrakeData, sizeof(VtolBrakeFSMData_T), 0);
|
memset(mBrakeData, 0, sizeof(VtolBrakeFSMData_T));
|
||||||
mBrakeData->currentState = BRAKE_STATE_INACTIVE;
|
mBrakeData->currentState = BRAKE_STATE_INACTIVE;
|
||||||
setState(BRAKE_STATE_BRAKE, FSMBRAKESTATUS_STATEEXITREASON_NONE);
|
setState(BRAKE_STATE_BRAKE, FSMBRAKESTATUS_STATEEXITREASON_NONE);
|
||||||
}
|
}
|
||||||
|
@ -130,7 +130,7 @@ int32_t VtolLandFSM::Initialize(VtolPathFollowerSettingsData *ptr_vtolPathFollow
|
|||||||
mLandData = (VtolLandFSMData_T *)pios_malloc(sizeof(VtolLandFSMData_T));
|
mLandData = (VtolLandFSMData_T *)pios_malloc(sizeof(VtolLandFSMData_T));
|
||||||
PIOS_Assert(mLandData);
|
PIOS_Assert(mLandData);
|
||||||
}
|
}
|
||||||
memset(mLandData, sizeof(VtolLandFSMData_T), 0);
|
memset(mLandData, 0, sizeof(VtolLandFSMData_T));
|
||||||
vtolPathFollowerSettings = ptr_vtolPathFollowerSettings;
|
vtolPathFollowerSettings = ptr_vtolPathFollowerSettings;
|
||||||
pathDesired = ptr_pathDesired;
|
pathDesired = ptr_pathDesired;
|
||||||
flightStatus = ptr_flightStatus;
|
flightStatus = ptr_flightStatus;
|
||||||
@ -141,7 +141,7 @@ int32_t VtolLandFSM::Initialize(VtolPathFollowerSettingsData *ptr_vtolPathFollow
|
|||||||
|
|
||||||
void VtolLandFSM::Inactive(void)
|
void VtolLandFSM::Inactive(void)
|
||||||
{
|
{
|
||||||
memset(mLandData, sizeof(VtolLandFSMData_T), 0);
|
memset(mLandData, 0, sizeof(VtolLandFSMData_T));
|
||||||
initFSM();
|
initFSM();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +157,7 @@ void VtolLandFSM::initFSM(void)
|
|||||||
|
|
||||||
void VtolLandFSM::Activate()
|
void VtolLandFSM::Activate()
|
||||||
{
|
{
|
||||||
memset(mLandData, sizeof(VtolLandFSMData_T), 0);
|
memset(mLandData, 0, sizeof(VtolLandFSMData_T));
|
||||||
mLandData->currentState = STATUSVTOLLAND_STATE_INACTIVE;
|
mLandData->currentState = STATUSVTOLLAND_STATE_INACTIVE;
|
||||||
mLandData->flLowAltitude = false;
|
mLandData->flLowAltitude = false;
|
||||||
mLandData->flAltitudeHold = false;
|
mLandData->flAltitudeHold = false;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user