2 * This file is part of Cleanflight.
4 * Cleanflight is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
9 * Cleanflight is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with Cleanflight. If not, see <http://www.gnu.org/licenses/>.
20 #include "blackbox/blackbox_fielddefs.h"
22 #include "config/parameter_group.h"
25 BLACKBOX_FEATURE_NAV_ACC
= 1 << 0,
26 BLACKBOX_FEATURE_NAV_POS
= 1 << 1,
27 BLACKBOX_FEATURE_NAV_PID
= 1 << 2,
28 BLACKBOX_FEATURE_MAG
= 1 << 3,
29 BLACKBOX_FEATURE_ACC
= 1 << 4,
30 BLACKBOX_FEATURE_ATTITUDE
= 1 << 5,
31 BLACKBOX_FEATURE_RC_DATA
= 1 << 6,
32 BLACKBOX_FEATURE_RC_COMMAND
= 1 << 7,
33 BLACKBOX_FEATURE_MOTORS
= 1 << 8,
34 BLACKBOX_FEATURE_GYRO_RAW
= 1 << 9,
35 BLACKBOX_FEATURE_GYRO_PEAKS_ROLL
= 1 << 10,
36 BLACKBOX_FEATURE_GYRO_PEAKS_PITCH
= 1 << 11,
37 BLACKBOX_FEATURE_GYRO_PEAKS_YAW
= 1 << 12,
38 } blackboxFeatureMask_e
;
39 typedef struct blackboxConfig_s
{
43 uint8_t invertedCardDetection
;
44 uint32_t includeFlags
;
47 PG_DECLARE(blackboxConfig_t
, blackboxConfig
);
49 void blackboxLogEvent(FlightLogEvent event
, flightLogEventData_t
*data
);
51 void blackboxInit(void);
52 void blackboxUpdate(timeUs_t currentTimeUs
);
53 void blackboxStart(void);
54 void blackboxFinish(void);
55 bool blackboxMayEditConfig(void);
56 void blackboxIncludeFlagSet(uint32_t mask
);
57 void blackboxIncludeFlagClear(uint32_t mask
);
58 bool blackboxIncludeFlag(uint32_t mask
);