Skip to content

Commit 7d3f5b4

Browse files
committed
v2.0.0
1 parent 3747a75 commit 7d3f5b4

File tree

6 files changed

+30
-24
lines changed

6 files changed

+30
-24
lines changed

examples/00.HelloWorld/madflight_config.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// You have 3 options to setup the pins (gpio numbers) and busses for the flight controller:
66
//
77
// 1) Default - #include <madflight_board.h> and see https://madflight.com for default pinout diagrams for the supported
8-
// processor families. Default pinouts are defined in the board header files library/src/madflight_board_XXX.h
8+
// processor families. Default pinouts are defined in the board header files library/madflight/src/madflight_board_XXX.h
99
//
1010
// 2) Header - #include the BetaFlight flight controller you want to use. See library/madflight/src for all available
1111
// boards. For example: #include <madflight_zzz_MTKS-MATEKH743.h>
@@ -23,6 +23,8 @@
2323
//
2424
// Hardware configuration is a raw string with a key-value list. On a line, anything after '#' or '/' is ignored as comment
2525
//
26+
// You can also set these values from the CLI, for example "set imu_gizmo MPU6500"
27+
//
2628
//========================================================================================================================//
2729

2830
#define MADFLIGHT_CONFIG R""(
@@ -35,9 +37,9 @@ imu_spi_bus 0 // connect IMU to SPI bus 0
3537

3638
// IMPORTANT: the IMU sensor should be the ONLY sensor on the selected bus
3739

38-
imu_gizmo MPU6500 // options: NONE, BMI270, MPU6000, MPU6050, MPU6500, MPU9150, MPU9250
40+
imu_gizmo NONE // options: NONE, BMI270, MPU6000, MPU6050, MPU6500, MPU9150, MPU9250
3941
imu_align CW90 // options: CW0, CW90, CW180, CW270, CW0FLIP, CW90FLIP, CW180FLIP, CW270FLIP
40-
imu_i2c_adr 0 // use 0 for default i2c address
42+
imu_i2c_adr 0 // enter decimal i2c address, not hex (use 0 for default i2c address)
4143

4244
// RCL - Remote Controller Link
4345
rcl_gizmo NONE // options: NONE, MAVLINK, CRSF, SBUS, DSM, PPM, PWM
@@ -67,6 +69,9 @@ bbx_gizmo NONE // options: NONE, SDSPI, SDMMC
6769
rdr_gizmo NONE // options: NONE, LD2411S, LD2413, USD1
6870
rdr_baud 0
6971

72+
// AHR - AHRS
73+
ahr_gizmo MAHONY // options: MAHONY, MAHONY_BF, MADGWICK, VQF
74+
7075
)"" // End of MADFLIGHT_CONFIG
7176

7277

@@ -184,10 +189,7 @@ imu_i2c_bus -1
184189
// COMPILER OPTIONS //
185190
//========================================================================================================================//
186191

187-
//-- AHRS sensor fusion
188-
#define AHR_USE AHR_USE_MAHONY // Select one: AHRS_USE_MAHONY, AHRS_USE_MAHONY_BF, AHRS_USE_MADGWICK, AHRS_USE_VQF
189-
190-
// Reset config eeprom to defaults (uncomment this, upload, then comment out, and upload again)
192+
// Reset config eeprom to defaults (uncomment this, upload, execute, then comment out, and upload again)
191193
//#define MF_CONFIG_CLEAR
192194

193195
// Uncomment to print additional debug information and reduce startup delay

examples/01.Quadcopter/madflight_config.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// You have 3 options to setup the pins (gpio numbers) and busses for the flight controller:
66
//
77
// 1) Default - #include <madflight_board.h> and see https://madflight.com for default pinout diagrams for the supported
8-
// processor families. Default pinouts are defined in the board header files library/src/madflight_board_XXX.h
8+
// processor families. Default pinouts are defined in the board header files library/madflight/src/madflight_board_XXX.h
99
//
1010
// 2) Header - #include the BetaFlight flight controller you want to use. See library/madflight/src for all available
1111
// boards. For example: #include <madflight_zzz_MTKS-MATEKH743.h>
@@ -23,6 +23,8 @@
2323
//
2424
// Hardware configuration is a raw string with a key-value list. On a line, anything after '#' or '/' is ignored as comment
2525
//
26+
// You can also set these values from the CLI, for example "set imu_gizmo MPU6500"
27+
//
2628
//========================================================================================================================//
2729

2830
#define MADFLIGHT_CONFIG R""(
@@ -35,9 +37,9 @@ imu_spi_bus 0 // connect IMU to SPI bus 0
3537

3638
// IMPORTANT: the IMU sensor should be the ONLY sensor on the selected bus
3739

38-
imu_gizmo MPU6500 // options: NONE, BMI270, MPU6000, MPU6050, MPU6500, MPU9150, MPU9250
40+
imu_gizmo NONE // options: NONE, BMI270, MPU6000, MPU6050, MPU6500, MPU9150, MPU9250
3941
imu_align CW90 // options: CW0, CW90, CW180, CW270, CW0FLIP, CW90FLIP, CW180FLIP, CW270FLIP
40-
imu_i2c_adr 0 // use 0 for default i2c address
42+
imu_i2c_adr 0 // enter decimal i2c address, not hex (use 0 for default i2c address)
4143

4244
// RCL - Remote Controller Link
4345
rcl_gizmo NONE // options: NONE, MAVLINK, CRSF, SBUS, DSM, PPM, PWM
@@ -67,6 +69,9 @@ bbx_gizmo NONE // options: NONE, SDSPI, SDMMC
6769
rdr_gizmo NONE // options: NONE, LD2411S, LD2413, USD1
6870
rdr_baud 0
6971

72+
// AHR - AHRS
73+
ahr_gizmo MAHONY // options: MAHONY, MAHONY_BF, MADGWICK, VQF
74+
7075
)"" // End of MADFLIGHT_CONFIG
7176

7277

@@ -184,10 +189,7 @@ imu_i2c_bus -1
184189
// COMPILER OPTIONS //
185190
//========================================================================================================================//
186191

187-
//-- AHRS sensor fusion
188-
#define AHR_USE AHR_USE_MAHONY // Select one: AHRS_USE_MAHONY, AHRS_USE_MAHONY_BF, AHRS_USE_MADGWICK, AHRS_USE_VQF
189-
190-
// Reset config eeprom to defaults (uncomment this, upload, then comment out, and upload again)
192+
// Reset config eeprom to defaults (uncomment this, upload, execute, then comment out, and upload again)
191193
//#define MF_CONFIG_CLEAR
192194

193195
// Uncomment to print additional debug information and reduce startup delay

examples/03.Plane/03.Plane.ino

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Copyright (c) 2024-2025 https://madflight.com
7878
#define VEH_FLIGHTMODE_AP_IDS {AP_PLANE_FLIGHTMODE_MANUAL, AP_PLANE_FLIGHTMODE_STABILIZE, AP_PLANE_FLIGHTMODE_FLY_BY_WIRE_A} //(approximate) mapping of fightmode index to ArduPilot code for logging and mavlink
7979
#define VEH_FLIGHTMODE_NAMES {"MANUAL", "ROLL", "FBWA"} //fightmode names for telemetry
8080
enum flightmode_enum {MANUAL, ROLL, FBWA}; //available flight modes: MANUAL send rc commands directly to motor and aileron/pitch/yaw servos, ROLL stabilize roll angle, FBWA stabilize roll/pitch angles
81-
flightmode_enum rcin_to_flightmode_map[6] {MANUAL, MANUAL, ROLL, ROLL, FBWA, FBWA}; //flightmode mapping from 6 pos switch to flight mode (simulates a 3-pos switch: MANUAL/ROLL/FBWA)
81+
flightmode_enum rcin_to_flightmode_map[6] {MANUAL, MANUAL, ROLL, ROLL, FBWA, FBWA}; //flightmode mapping from 3/6 pos switch to flight mode (simulates a 3-pos switch: MANUAL/ROLL/FBWA)
8282

8383
#include "madflight_config.h" //Edit this header file to setup the pins, hardware, radio, etc. for madflight
8484
#include <madflight.h>

examples/03.Plane/madflight_config.h

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
// You have 3 options to setup the pins (gpio numbers) and busses for the flight controller:
66
//
77
// 1) Default - #include <madflight_board.h> and see https://madflight.com for default pinout diagrams for the supported
8-
// processor families. Default pinouts are defined in the board header files library/src/madflight_board_XXX.h
8+
// processor families. Default pinouts are defined in the board header files library/madflight/src/madflight_board_XXX.h
99
//
1010
// 2) Header - #include the BetaFlight flight controller you want to use. See library/madflight/src for all available
1111
// boards. For example: #include <madflight_zzz_MTKS-MATEKH743.h>
@@ -23,6 +23,8 @@
2323
//
2424
// Hardware configuration is a raw string with a key-value list. On a line, anything after '#' or '/' is ignored as comment
2525
//
26+
// You can also set these values from the CLI, for example "set imu_gizmo MPU6500"
27+
//
2628
//========================================================================================================================//
2729

2830
#define MADFLIGHT_CONFIG R""(
@@ -35,9 +37,9 @@ imu_spi_bus 0 // connect IMU to SPI bus 0
3537

3638
// IMPORTANT: the IMU sensor should be the ONLY sensor on the selected bus
3739

38-
imu_gizmo MPU6500 // options: NONE, BMI270, MPU6000, MPU6050, MPU6500, MPU9150, MPU9250
40+
imu_gizmo NONE // options: NONE, BMI270, MPU6000, MPU6050, MPU6500, MPU9150, MPU9250
3941
imu_align CW90 // options: CW0, CW90, CW180, CW270, CW0FLIP, CW90FLIP, CW180FLIP, CW270FLIP
40-
imu_i2c_adr 0 // use 0 for default i2c address
42+
imu_i2c_adr 0 // enter decimal i2c address, not hex (use 0 for default i2c address)
4143

4244
// RCL - Remote Controller Link
4345
rcl_gizmo NONE // options: NONE, MAVLINK, CRSF, SBUS, DSM, PPM, PWM
@@ -67,6 +69,9 @@ bbx_gizmo NONE // options: NONE, SDSPI, SDMMC
6769
rdr_gizmo NONE // options: NONE, LD2411S, LD2413, USD1
6870
rdr_baud 0
6971

72+
// AHR - AHRS
73+
ahr_gizmo MAHONY // options: MAHONY, MAHONY_BF, MADGWICK, VQF
74+
7075
)"" // End of MADFLIGHT_CONFIG
7176

7277

@@ -184,10 +189,7 @@ imu_i2c_bus -1
184189
// COMPILER OPTIONS //
185190
//========================================================================================================================//
186191

187-
//-- AHRS sensor fusion
188-
#define AHR_USE AHR_USE_MAHONY // Select one: AHRS_USE_MAHONY, AHRS_USE_MAHONY_BF, AHRS_USE_MADGWICK, AHRS_USE_VQF
189-
190-
// Reset config eeprom to defaults (uncomment this, upload, then comment out, and upload again)
192+
// Reset config eeprom to defaults (uncomment this, upload, execute, then comment out, and upload again)
191193
//#define MF_CONFIG_CLEAR
192194

193195
// Uncomment to print additional debug information and reduce startup delay

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=madflight
2-
version=1.3.3
2+
version=2.0.0
33
author=qqqlab
44
maintainer=qqqlab <madflight@qqqlab.com>
55
license=MIT

src/madflight.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#define MADFLIGHT_VERSION "madflight v2.0.0-DEV"
1+
#define MADFLIGHT_VERSION "madflight v2.0.0"
22

33
//madflight.h - Flight Controller for ESP32 / ESP32-S3 / RP2350 / RP2040 / STM32
44

0 commit comments

Comments
 (0)