Rover-4.3.0-beta1 released!

Great amount of work! Thanks a lot to all developers.

I flashed this version on a Balance Bot, maintaining parameters from v4.2.3. As had happened with other 4.3dev previous version, initially it started oscillating heavily back and forth, even disarming by itself (CRASH_ANGLE=45). So I changed ATC_BAL_D 0.1->0.5, and oscillations stopped; it kept vibrating back and forth a bit, and was manageable but noisy exactly as in here.

I started the same indoor mission (no GPS, with wheel encoders) I had installed on it (back and forth on a straight line), and the straight line was followed much better:
20220914_Barbie12_v43beta_BackForth

I observe that the irq handler for encoder signals includes the division µs->ms:
WheelEncoder_Quadrature.cpp:
irq_state.last_reading_ms = timestamp * 1e-3f;
so this seems to me executed at both edges for both signals edges for both encoders. Reading in µs and moving the conversion to the backend would save divisions, with a faster irq handler.

In adition in that irq handle the call to AP_WheelEncoder_Quadrature::pin_ab_to_phase() can be supressed with:
phase_after = (pin_a?(pin_b?2:3):(pin_b?1:0));
saving one call/return, with more clear coding. Better make the irq handler monolithic (no call/returns at all).

I have been using WRC_ENABLE=0. If changing that can stop vibrations, please illuminate me.

1 Like