Skip to content

Commit

Permalink
Copter: add MASK_LOG_RCOUT_FAST for 400hz RC outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
jschall committed Oct 27, 2015
1 parent 94a7782 commit e0f8201
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
6 changes: 5 additions & 1 deletion ArduCopter/ArduCopter.pde
Original file line number Diff line number Diff line change
Expand Up @@ -935,6 +935,10 @@ static void fast_loop()
gps_glitch_update();

camera_mount.update_fast();

if (should_log(MASK_LOG_RCOUT_FAST)) {
DataFlash.Log_Write_RCOUT();
}
}

// rc_loops - reads user input from transmitter/receiver
Expand Down Expand Up @@ -1038,7 +1042,7 @@ static void fifty_hz_logging_loop()
Log_Write_Rate();
}

if (should_log(MASK_LOG_RCOUT)) {
if (should_log(MASK_LOG_RCOUT) && !should_log(MASK_LOG_RCOUT_FAST)) {
DataFlash.Log_Write_RCOUT();
}

Expand Down
3 changes: 2 additions & 1 deletion ArduCopter/defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,8 @@ enum FlipState {
#define MASK_LOG_MOTBATT (1UL<<17)
#define MASK_LOG_IMU_FAST (1UL<<18)
#define MASK_LOG_IMU_RAW (1UL<<19)
#define MASK_LOG_ANY 0xFFFF
#define MASK_LOG_RCOUT_FAST (1UL<<20)
#define MASK_LOG_ANY (((MASK_LOG_RCOUT_FAST<<1)-1) & ~MASK_LOG_WHEN_DISARMED)

// DATA - event logging
#define DATA_MAVLINK_FLOAT 1
Expand Down

0 comments on commit e0f8201

Please sign in to comment.