22 MADFLIGHT CONFIG
33==========================================================================================================================
44
5- The configuration is loaded from two strings: first from madflight_board in <madflight_board.h> , and then from
5+ The configuration is loaded from two strings: first from madflight_board in from the board header in /brd/ , and then from
66madflight_config in this file. If the same setting occurs more than once, the last one is applied.
77
88The strings are multi-line raw strings in with a key-value list. Anything after '#' or '/' is ignored as comment.
99
1010You have 3 options to setup the flight controller:
1111
12- 1) Default - Keep "#include <madflight_board.h> ", this defines the default pinout as shown on https://madflight.com
12+ 1) Default - Keep #define MF_BOARD "brd/default.h ", this defines the default pinout as shown on https://madflight.com
1313 for the supported processor families. Now edit madflight_config below, and uncomment and configure imu_gizmo,
1414 imu_bus_type, rcl_gizmo, and other lines as needed. (Do not change the pin_xxx_yyy and xxx_yyy_bus settings.)
1515
16- 2) BetaFlight - Change "#include <madflight_board.h> " to the BetaFlight flight controller you want to use, for example:
17- "#include <madflight_zzz_MTKS -MATEKH743.h> ". See library/madflight/src for all available boards. Edit madflight_config
18- to fine-tune the configuration.
16+ 2) BetaFlight - Change "brd/default.h " to the BetaFlight flight controller you want to use, for example:
17+ #define MF_BOARD "brd/betaflight/MTKS -MATEKH743.h". See library/madflight/src for all available boards. Edit
18+ madflight_config to fine-tune the configuration.
1919
20- 3) Bare Metal - Remove "#include <madflight_board.h> ", and set the full configuration in madflight_config below.
20+ 3) Bare Metal - Comment out "#define MF_BOARD ", and set the full configuration in madflight_config below.
2121
2222Pins and spi/i2c/serial busses use zero-based numbering, i.e. "gps_ser_bus 0" connects the GPS to the first serial bus
2323with pins pin_ser0_tx and pin_ser0_rx. Pins use GPIO numbers, not physical pin numbers. Use -1 to disable a pin or bus.
@@ -29,7 +29,8 @@ If things do not work as expected, have a good look at the startup messages!
2929
3030========================================================================================================================*/
3131
32- #include <madflight_board.h>
32+ //define the board header to use, or comment out for none
33+ #define MF_BOARD "brd/default.h"
3334
3435const char madflight_config [] = R "" (
3536
0 commit comments