* FwLateralLongitudinalControl: publish flight phase
* FwLateralLongitudinalControl: consolidate hrt_absolute_time calls
* FwLateralLongitudinalControl: Name time variables correctly
* FwLateralLongitudinalControl: pass current time as argument rather than class member
* FwLateralLongitudinalControl: use local position timestamp
Replaces the legacy pure-Python lookup table CRC32 implementation with the built-in `zlib.crc32`.
The previous implementation relied on a manual loop over bytes, which was inefficient for large firmware files (taking ~0.5s for 2MB on modern CPUs). The new implementation reduces this to ~1ms.
Implementation details:
- Removed the hardcoded `crctab` array to clean up the code.
- Adjusted `zlib` initial state (0xFFFFFFFF) and final XOR operations to ensure bit-perfect compatibility with the specific CRC32 variant expected by the PX4 bootloader.
Benchmark (2MB firmware):
- Legacy: ~0.48s
- zlib: ~0.001s
This prevents PX4 from sending out the GPS_GLOBAL_ORIGIN message
immediately when a SET_GPS_GLOBAL_ORIGIN message arrives.
Instead, we apply the new origin in the EKF, and only then send out
the new origin, which is much more intuitive and doesn't confuse a user
of the API.
* init: working towards dual-action ATMOS
* fix: update gz sim to latest
* fix: add motor number max fitting Actuator
* fix: revert non-necessary changes
* fix: ensure esc count does not exceed maximum number of ESCs
* feat: update gz to latest, includes ATMOS dual action
* fix: restore dds_topics
* fix: update gazebo model commit
* reset by fusion:
* state correction with tiny observation variance
* covariance matrix upate with correct observation variance
* reset wind to 0 on hard-reset during global-position-reset
increase gate
* adjust unittest: velocity gets now reset on resetGlobalPosToExternalObservation
- avoids using invalid velocity estimate to reset wind
- do not set fusion flags if starting was impossible
- reset wind to 0 before resetting velocity using airspeed if wind data
is outdated
* driver: ist8310: add IST8310J device ID support and cross-axis compensation
IST8310J shares the same register map and initialization sequence as IST8310.
This change extends the existing IST8310 driver to:
- Accept the IST8310J device ID during probe and reset
- Load factory cross-axis calibration data from OTP
- Apply cross-axis compensation to raw magnetometer samples
The cross-axis compensation corrects factory axis misalignment only and
does not replace PX4 runtime magnetometer calibration.
Tested on Raspberry Pi using I2C with both IST8310 and IST8310J devices.
Signed-off-by: webbyeh <webbyeh@isentek.com>
* driver: ist8310: add IST8310J device ID support
IST8310J shares the same register map and initialization sequence as IST8310.
Factory cross-axis compensation support was evaluated but has been removed
in this revision due to flash size constraints on embedded targets. The
driver now focuses on device identification and stability, while relying on
the existing PX4 magnetometer calibration framework.
This commit also addresses review feedback by caching the WAI register value
to avoid redundant I2C reads during the reset wait state.
Tested on Raspberry Pi using I2C with both IST8310 and IST8310J devices.
Signed-off-by: webbyeh <webbyeh@isentek.com>
* Fix formatting issues in IST8310.cpp
---------
Signed-off-by: webbyeh <webbyeh@isentek.com>
Co-authored-by: Jacob Dahl <37091262+dakejahl@users.noreply.github.com>