Update packet building

This commit is contained in:
Wastl Kraus 2025-09-13 11:05:33 +02:00
parent 8d07812548
commit 7e8c7466cd
2 changed files with 2 additions and 2 deletions

View File

@ -312,7 +312,7 @@ dshot_result_t DShotRMT::getTelemetry(uint16_t magnet_count)
} }
// Build a complete DShot packet // Build a complete DShot packet
dshot_packet_t DShotRMT::_buildDShotPacket(const uint16_t value) dshot_packet_t DShotRMT::_buildDShotPacket(const uint16_t &value)
{ {
// Init packet structure // Init packet structure
dshot_packet_t packet = {}; dshot_packet_t packet = {};

View File

@ -162,7 +162,7 @@ private:
dshot_result_t _initDShotEncoder(); dshot_result_t _initDShotEncoder();
// --- PACKET MANAGEMENT --- // --- PACKET MANAGEMENT ---
dshot_packet_t _buildDShotPacket(const uint16_t value); dshot_packet_t _buildDShotPacket(const uint16_t &value);
uint16_t _parseDShotPacket(const dshot_packet_t &packet); uint16_t _parseDShotPacket(const dshot_packet_t &packet);
uint16_t _calculateCRC(const uint16_t data); uint16_t _calculateCRC(const uint16_t data);
void _preCalculateBitPositions(); void _preCalculateBitPositions();