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:
parent
8dafdbce41
commit
9c8f84f62d
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue