correct the filling order of the struct, otherwise it may cause compilation errors

This commit is contained in:
xianglunkai 2023-10-25 12:04:50 +08:00 committed by Peter Barker
parent 8b0bc101f2
commit 4f00dfa69a

View File

@ -574,14 +574,13 @@ bool AP_Logger_Backend::Write_VER()
patch: fwver.patch,
fw_type: fwver.fw_type,
git_hash: fwver.fw_hash,
build_type: fwver.vehicle_type,
};
strncpy(pkt.fw_string, fwver.fw_string, ARRAY_SIZE(pkt.fw_string)-1);
#ifdef APJ_BOARD_ID
pkt._APJ_BOARD_ID = APJ_BOARD_ID;
#endif
pkt.build_type = fwver.vehicle_type;
return WriteCriticalBlock(&pkt, sizeof(pkt));
}