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 BLACKBOX_FEATURE_SERVOS
= 1 << 13,
39 } blackboxFeatureMask_e
;
40 typedef struct blackboxConfig_s
{
44 uint8_t invertedCardDetection
;
45 uint32_t includeFlags
;
48 PG_DECLARE(blackboxConfig_t
, blackboxConfig
);
50 void blackboxLogEvent(FlightLogEvent event
, flightLogEventData_t
*data
);
52 void blackboxInit(void);
53 void blackboxUpdate(timeUs_t currentTimeUs
);
54 void blackboxStart(void);
55 void blackboxFinish(void);
56 bool blackboxMayEditConfig(void);
57 void blackboxIncludeFlagSet(uint32_t mask
);
58 void blackboxIncludeFlagClear(uint32_t mask
);
59 bool blackboxIncludeFlag(uint32_t mask
);