Skip to content

Commit

Permalink
Add ArduPilot logging
Browse files Browse the repository at this point in the history
  • Loading branch information
qqqlab committed Oct 22, 2024
1 parent a76157c commit 474b536
Show file tree
Hide file tree
Showing 23 changed files with 626 additions and 3,846 deletions.
6 changes: 3 additions & 3 deletions examples/02.QuadcopterAdvanced/02.QuadcopterAdvanced.ino
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ void loop() {

//update all I2C sensors, called from loop() with SPI IMU, or called from imu_loop() with I2C IMU
void i2c_sensors_update() {
if(bat.update()) bb.log_bat(); //update battery, and log if battery was updated.
if(baro.update()) bb.log_baro(); //log if pressure updated
if(bat.update()) bb_log_bat(); //update battery, and log if battery was updated.
if(baro.update()) bb_log_baro(); //log if pressure updated
mag.update();
}

Expand Down Expand Up @@ -383,7 +383,7 @@ void imu_loop() {
//if IMU uses I2C bus, then get I2C sensor readings in imu_interrupt_handler() to prevent I2C bus collisions. Alternatively, put the IMU on a separate I2C bus.
if (imu.usesI2C()) i2c_sensors_update();

//bb.log_imu(); //full speed black box logging of IMU data, memory fills up quickly...
//bb_log_imu(); //full speed black box logging of IMU data, memory fills up quickly...
}

//========================================================================================================================//
Expand Down
6 changes: 3 additions & 3 deletions examples/03.PID-Tune/03.PID-Tune.ino
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,8 @@ void loop() {

//update all I2C sensors, called from loop() with SPI IMU, or called from imu_loop() with I2C IMU
void i2c_sensors_update() {
if(bat.update()) bb.log_bat(); //update battery, and log if battery was updated.
if(baro.update()) bb.log_baro(); //log if pressure updated
if(bat.update()) bb_log_bat(); //update battery, and log if battery was updated.
if(baro.update()) bb_log_baro(); //log if pressure updated
mag.update();
}

Expand Down Expand Up @@ -378,7 +378,7 @@ void imu_loop() {
//if IMU uses I2C bus, then get I2C sensor readings in imu_interrupt_handler() to prevent I2C bus collisions. Alternatively, put the IMU on a separate I2C bus.
if (imu.usesI2C()) i2c_sensors_update();

//bb.log_imu(); //full speed black box logging of IMU data, memory fills up quickly...
//bb_log_imu(); //full speed black box logging of IMU data, memory fills up quickly...
}

//========================================================================================================================//
Expand Down
6 changes: 3 additions & 3 deletions examples/04.Plane/04.Plane.ino
Original file line number Diff line number Diff line change
Expand Up @@ -388,8 +388,8 @@ void loop() {

//update all I2C sensors, called from loop() with SPI IMU, or called from imu_loop() with I2C IMU
void i2c_sensors_update() {
if(bat.update()) bb.log_bat(); //update battery, and log if battery was updated.
if(baro.update()) bb.log_baro(); //log if pressure updated
if(bat.update()) bb_log_bat(); //update battery, and log if battery was updated.
if(baro.update()) bb_log_baro(); //log if pressure updated
mag.update();
}

Expand Down Expand Up @@ -434,7 +434,7 @@ void imu_loop() {
//if IMU uses I2C bus, then get I2C sensor readings in imu_interrupt_handler() to prevent I2C bus collisions. Alternatively, put the IMU on a separate I2C bus.
if (imu.usesI2C()) i2c_sensors_update();

//bb.log_imu(); //full speed black box logging of IMU data, memory fills up quickly...
//bb_log_imu(); //full speed black box logging of IMU data, memory fills up quickly...
}

//========================================================================================================================//
Expand Down
112 changes: 0 additions & 112 deletions extras/TestMadflight/bb.ino

This file was deleted.

2 changes: 1 addition & 1 deletion src/madflight.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#define MADFLIGHT_VERSION "madflight v1.2.1-DEV"
#define MADFLIGHT_VERSION "madflight v1.3.0-DEV"

/*==========================================================================================
madflight - Flight Controller for ESP32 / RP2040 / STM32
Expand Down
Loading

0 comments on commit 474b536

Please sign in to comment.