1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-26 09:45:33 +03:00

fix typos. Thanks to @fiam for having noticed this!

This commit is contained in:
giacomo892 2018-02-07 11:12:31 +01:00
parent fab16951d5
commit ad265ebe61

View file

@ -60,7 +60,7 @@
typedef struct FixedWingLaunchState_s { typedef struct FixedWingLaunchState_s {
/* Launch detection */ /* Launch detection */
timeUs_t launchDetectorPreviosUpdate; timeUs_t launchDetectorPreviousUpdate;
timeUs_t launchDetectionTimeAccum; timeUs_t launchDetectionTimeAccum;
bool launchDetected; bool launchDetected;
@ -84,21 +84,21 @@ static void updateFixedWingLaunchDetector(timeUs_t currentTimeUs)
const bool isSwingLaunched = (swingVelocity > navConfig()->fw.launch_velocity_thresh) && (imuMeasuredAccelBF.A[X] > 0); const bool isSwingLaunched = (swingVelocity > navConfig()->fw.launch_velocity_thresh) && (imuMeasuredAccelBF.A[X] > 0);
if (isBungeeLaunched || isSwingLaunched) { if (isBungeeLaunched || isSwingLaunched) {
launchState.launchDetectionTimeAccum += (currentTimeUs - launchState.launchDetectorPreviosUpdate); launchState.launchDetectionTimeAccum += (currentTimeUs - launchState.launchDetectorPreviousUpdate);
launchState.launchDetectorPreviosUpdate = currentTimeUs; launchState.launchDetectorPreviousUpdate = currentTimeUs;
if (launchState.launchDetectionTimeAccum >= MS2US((uint32_t)navConfig()->fw.launch_time_thresh)) { if (launchState.launchDetectionTimeAccum >= MS2US((uint32_t)navConfig()->fw.launch_time_thresh)) {
launchState.launchDetected = true; launchState.launchDetected = true;
} }
} }
else { else {
launchState.launchDetectorPreviosUpdate = currentTimeUs; launchState.launchDetectorPreviousUpdate = currentTimeUs;
launchState.launchDetectionTimeAccum = 0; launchState.launchDetectionTimeAccum = 0;
} }
} }
void resetFixedWingLaunchController(timeUs_t currentTimeUs) void resetFixedWingLaunchController(timeUs_t currentTimeUs)
{ {
launchState.launchDetectorPreviosUpdate = currentTimeUs; launchState.launchDetectorPreviousUpdate = currentTimeUs;
launchState.launchDetectionTimeAccum = 0; launchState.launchDetectionTimeAccum = 0;
launchState.launchStartedTime = 0; launchState.launchStartedTime = 0;
launchState.launchDetected = false; launchState.launchDetected = false;