1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-12 19:10:32 +03:00

Fix gimbalCmdIn.u.crc to gimbalCmdIn.u.gimbalCmd.crc (#14311)

This commit is contained in:
nerdCopter 2025-03-21 17:27:40 -05:00 committed by GitHub
parent 8dafdbce41
commit 9c8f84f62d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -288,7 +288,7 @@ void gimbalUpdate(timeUs_t currentTimeUs)
if (gimbalInCount == sizeof(gimbalCmdIn.u.gimbalCmd)) {
uint16_t crc = gimbalCrc((uint8_t *)&gimbalCmdIn, sizeof(gimbalCmdIn) - 2);
// Only use the data if the CRC is correct
if (gimbalCmdIn.u.crc == crc) {
if (gimbalCmdIn.u.gimbalCmd.crc == crc) {
gimbalCmdOut = gimbalCmdIn.u.gimbalCmd;
gimbalSet(gimbalCmdIn.u.gimbalCmd.roll, gimbalCmdIn.u.gimbalCmd.pitch, gimbalCmdIn.u.gimbalCmd.yaw);
serialWriteBuf(gimbalSerialPort, (uint8_t *)&gimbalCmdOut, sizeof(gimbalCmdOut));