Unverified Commit 388a804f authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #8966 from DonLakeFlyer/VehicleInit

Fix C++ 20 compiler warning
parents 3c8fd695 4d4c0b63
...@@ -3446,6 +3446,7 @@ void Vehicle::requestMessage(RequestMessageResultHandler resultHandler, void* re ...@@ -3446,6 +3446,7 @@ void Vehicle::requestMessage(RequestMessageResultHandler resultHandler, void* re
{ {
RequestMessageInfo_t* pInfo = new RequestMessageInfo_t; RequestMessageInfo_t* pInfo = new RequestMessageInfo_t;
*pInfo = { };
pInfo->msgId = messageId; pInfo->msgId = messageId;
pInfo->compId = compId; pInfo->compId = compId;
pInfo->resultHandler = resultHandler; pInfo->resultHandler = resultHandler;
......
...@@ -1581,12 +1581,12 @@ private: ...@@ -1581,12 +1581,12 @@ private:
// requestMessage handling // requestMessage handling
typedef struct { typedef struct {
bool commandAckReceived = false; // We keep track of the ack/message being received since the order in which this will come in is random bool commandAckReceived; // We keep track of the ack/message being received since the order in which this will come in is random
bool messageReceived = false; // We only delete the allocated RequestMessageInfo_t when both happen (or the message wait times out) bool messageReceived; // We only delete the allocated RequestMessageInfo_t when both happen (or the message wait times out)
int msgId = 0; int msgId;
int compId = 0; int compId;
RequestMessageResultHandler resultHandler = nullptr; RequestMessageResultHandler resultHandler;
void* resultHandlerData = nullptr; void* resultHandlerData;
} RequestMessageInfo_t; } RequestMessageInfo_t;
static void _requestMessageCmdResultHandler (void* resultHandlerData, int compId, MAV_RESULT result, bool noResponsefromVehicle); static void _requestMessageCmdResultHandler (void* resultHandlerData, int compId, MAV_RESULT result, bool noResponsefromVehicle);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment