Commit 03133560 authored by DonLakeFlyer's avatar DonLakeFlyer

parent 8c7e8cf6
Subproject commit 99a977433a13705cd0624f8ff3b5f5210d526ba9
Subproject commit d1eea85b685eec2204ad31c7f7f51486f218f86b
......@@ -1174,12 +1174,13 @@ QGCCameraControl::_requestAllParameters()
MAVLinkProtocol* mavlink = qgcApp()->toolbox()->mavlinkProtocol();
mavlink_message_t msg;
mavlink_msg_param_ext_request_list_pack_chan(
static_cast<uint8_t>(mavlink->getSystemId()),
static_cast<uint8_t>(mavlink->getComponentId()),
_vehicle->priorityLink()->mavlinkChannel(),
&msg,
static_cast<uint8_t>(_vehicle->id()),
static_cast<uint8_t>(compID()));
static_cast<uint8_t>(mavlink->getSystemId()),
static_cast<uint8_t>(mavlink->getComponentId()),
_vehicle->priorityLink()->mavlinkChannel(),
&msg,
static_cast<uint8_t>(_vehicle->id()),
static_cast<uint8_t>(compID()),
0); // trimmed messages = false
_vehicle->sendMessageOnLinkThreadSafe(_vehicle->priorityLink(), msg);
qCDebug(CameraControlVerboseLog) << "Request all parameters";
}
......
......@@ -356,14 +356,15 @@ QGCCameraParamIO::paramRequest(bool reset)
strncpy(param_id, _fact->name().toStdString().c_str(), MAVLINK_MSG_PARAM_EXT_REQUEST_READ_FIELD_PARAM_ID_LEN);
mavlink_message_t msg;
mavlink_msg_param_ext_request_read_pack_chan(
static_cast<uint8_t>(_pMavlink->getSystemId()),
static_cast<uint8_t>(_pMavlink->getComponentId()),
_vehicle->priorityLink()->mavlinkChannel(),
&msg,
static_cast<uint8_t>(_vehicle->id()),
static_cast<uint8_t>(_control->compID()),
param_id,
-1);
static_cast<uint8_t>(_pMavlink->getSystemId()),
static_cast<uint8_t>(_pMavlink->getComponentId()),
_vehicle->priorityLink()->mavlinkChannel(),
&msg,
static_cast<uint8_t>(_vehicle->id()),
static_cast<uint8_t>(_control->compID()),
param_id,
-1,
0); // trimmed messages = false
_vehicle->sendMessageOnLinkThreadSafe(_vehicle->priorityLink(), msg);
_paramRequestTimer.start();
}
......@@ -7,7 +7,6 @@
*
****************************************************************************/
#include "MockLink.h"
#include "QGCLoggingCategory.h"
#include "QGCApplication.h"
......@@ -28,11 +27,6 @@
QGC_LOGGING_CATEGORY(MockLinkLog, "MockLinkLog")
QGC_LOGGING_CATEGORY(MockLinkVerboseLog, "MockLinkVerboseLog")
/// @file
/// @brief Mock implementation of a Link.
///
/// @author Don Gagne <don@thegagnes.com>
// Vehicle position is set close to default Gazebo vehicle location. This allows for multi-vehicle
// testing of a gazebo vehicle and a mocklink vehicle
#if 1
......@@ -410,12 +404,14 @@ void MockLink::_sendBatteryStatus(void)
mavlink_message_t msg;
uint16_t rgVoltages[10];
uint16_t rgVoltagesNone[10];
uint16_t rgVoltagesExtNone[4];
for (int i=0; i<10; i++) {
rgVoltages[i] = UINT16_MAX;
rgVoltagesNone[i] = UINT16_MAX;
}
rgVoltages[0] = rgVoltages[1] = rgVoltages[2] = 4200;
memset(rgVoltagesExtNone, 0, sizeof(rgVoltagesExtNone));
mavlink_msg_battery_status_pack_chan(
_vehicleSystemId,
......@@ -432,7 +428,8 @@ void MockLink::_sendBatteryStatus(void)
-1, // energy consumed not supported
_battery1PctRemaining,
_battery1TimeRemaining,
_battery1ChargeState);
_battery1ChargeState,
rgVoltagesExtNone);
respondWithMavlinkMessage(msg);
mavlink_msg_battery_status_pack_chan(
......@@ -450,7 +447,8 @@ void MockLink::_sendBatteryStatus(void)
-1, // energy consumed not supported
_battery2PctRemaining,
_battery2TimeRemaining,
_battery2ChargeState);
_battery2ChargeState,
rgVoltagesExtNone);
respondWithMavlinkMessage(msg);
}
......
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