Files
PX4-Autopilot/Tools
MDLZCOOL 819c783b6c px_uploader.py: optimize crc32 calculation using zlib (#26205)
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
2026-01-06 17:36:44 +13:00
..
2025-03-11 14:14:40 +01:00
2025-11-04 17:22:10 +01:00
2025-10-10 11:29:01 -07:00
2025-08-22 08:22:59 +02:00