Skip to content

Commit e854411

Browse files
authored
Merge pull request #948 from EGParadox/master
fix Blackbox logging rate over 8kHz #415
2 parents dcebea0 + 188a19d commit e854411

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/js/tabs/onboard_logging.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,14 @@ TABS.onboard_logging.initialize = function (callback) {
180180

181181
// Offer a reasonable choice of logging rates (if people want weird steps they can use CLI)
182182
var loggingRates = [];
183-
var pidRate = 8000 / PID_ADVANCED_CONFIG.gyro_sync_denom / PID_ADVANCED_CONFIG.pid_process_denom;
183+
var pidRateBase = 8000;
184+
185+
if (PID_ADVANCED_CONFIG.gyroUse32kHz !== 0) {
186+
pidRateBase = 32000;
187+
}
188+
189+
var pidRate = pidRateBase / PID_ADVANCED_CONFIG.gyro_sync_denom /
190+
PID_ADVANCED_CONFIG.pid_process_denom;
184191

185192
if (semver.gte(CONFIG.apiVersion, "1.36.0")) {
186193
loggingRates = [

0 commit comments

Comments
 (0)