Skip to content

Commit

Permalink
blackbox gyro unfitered + debug x8
Browse files Browse the repository at this point in the history
  • Loading branch information
rtlopez committed Jul 27, 2023
1 parent 8dfe620 commit c0a837d
Show file tree
Hide file tree
Showing 5 changed files with 125 additions and 18 deletions.
8 changes: 7 additions & 1 deletion lib/Espfc/src/Blackbox.h
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,11 @@ class Blackbox
cp->anti_gravity_cutoff_hz = 100;
cp->d_min_gain = 0;
cp->d_min_advance = 0;
cp->angle_limit = _model.config.angleLimit;
cp->angle_earth_ref = 100;
cp->horizon_limit_degrees = 135;
cp->horizon_delay_ms = 500;
cp->thrustLinearization = 0;

rcControlsConfigMutable()->deadband = _model.config.input.deadband;
rcControlsConfigMutable()->yaw_deadband = _model.config.input.deadband;
Expand Down Expand Up @@ -274,7 +279,7 @@ class Blackbox
blackboxConfigMutable()->sample_rate = blackboxCalculateSampleRate(_model.config.blackboxPdenom);
}
blackboxConfigMutable()->device = _model.config.blackboxDev;
blackboxConfigMutable()->fields_disabled_mask = 0;
blackboxConfigMutable()->fields_disabled_mask = _model.config.blackboxFieldsDisabledMask;

featureConfigMutable()->enabledFeatures = _model.config.featureMask;

Expand Down Expand Up @@ -325,6 +330,7 @@ class Blackbox
for(size_t i = 0; i < 3; i++)
{
gyro.gyroADCf[i] = degrees(_model.state.gyro[i]);
gyro.gyroADC[i] = degrees(_model.state.gyroSampled[i]);
pidData[i].P = _model.state.innerPid[i].pTerm * 1000.f;
pidData[i].I = _model.state.innerPid[i].iTerm * 1000.f;
pidData[i].D = _model.state.innerPid[i].dTerm * 1000.f;
Expand Down
2 changes: 1 addition & 1 deletion lib/Espfc/src/ModelState.h
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,7 @@ struct ModelState

bool airmodeAllowed;

int16_t debug[4];
int16_t debug[8];

BuzzerState buzzer;

Expand Down
Loading

0 comments on commit c0a837d

Please sign in to comment.