From b65af910da70d18ac6b001835647bd86b0b5d630 Mon Sep 17 00:00:00 2001 From: rtlopez Date: Mon, 29 Jul 2024 12:53:35 +0200 Subject: [PATCH] Add PID bandwidth to blackbox headers (#131) --- src/main/blackbox/blackbox.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/main/blackbox/blackbox.c b/src/main/blackbox/blackbox.c index ba56d301bc..acb3d67954 100644 --- a/src/main/blackbox/blackbox.c +++ b/src/main/blackbox/blackbox.c @@ -1480,9 +1480,20 @@ static bool blackboxWriteSysinfo(void) currentPidProfile->angle.level_limit, currentPidProfile->horizon.level_strength, currentPidProfile->horizon.transition); - BLACKBOX_PRINT_HEADER_LINE("govPID", "%d,%d,%d", currentPidProfile->governor.p_gain, + BLACKBOX_PRINT_HEADER_LINE("govPID", "%d,%d,%d,%d,%d", currentPidProfile->governor.p_gain, currentPidProfile->governor.i_gain, - currentPidProfile->governor.d_gain); + currentPidProfile->governor.d_gain, + currentPidProfile->governor.f_gain, + currentPidProfile->governor.gain); + BLACKBOX_PRINT_HEADER_LINE("rollBW", "%d,%d,%d", currentPidProfile->gyro_cutoff[PID_ROLL], + currentPidProfile->dterm_cutoff[PID_ROLL], + currentPidProfile->bterm_cutoff[PID_ROLL]); + BLACKBOX_PRINT_HEADER_LINE("pitchBW", "%d,%d,%d", currentPidProfile->gyro_cutoff[PID_PITCH], + currentPidProfile->dterm_cutoff[PID_PITCH], + currentPidProfile->bterm_cutoff[PID_PITCH]); + BLACKBOX_PRINT_HEADER_LINE("yawBW", "%d,%d,%d", currentPidProfile->gyro_cutoff[PID_YAW], + currentPidProfile->dterm_cutoff[PID_YAW], + currentPidProfile->bterm_cutoff[PID_YAW]); BLACKBOX_PRINT_HEADER_LINE("deadband", "%d", rcControlsConfig()->rc_deadband); BLACKBOX_PRINT_HEADER_LINE("yaw_deadband", "%d", rcControlsConfig()->rc_yaw_deadband);