forked from mavlink/qgroundcontrol
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix HIL link reconnect issues due to missing threading flag usage, wa…
…rn user about missing config and take him to config view if necessary
- Loading branch information
1 parent
52be49a
commit a6fae6b
Showing
10 changed files
with
168 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
#include "QGXPX4UAS.h" | ||
|
||
QGXPX4UAS::QGXPX4UAS(MAVLinkProtocol* mavlink, QThread* thread, int id) : | ||
UAS(mavlink, thread, id) | ||
{ | ||
} | ||
|
||
/** | ||
* This function is called by MAVLink once a complete, uncorrupted (CRC check valid) | ||
* mavlink packet is received. | ||
* | ||
* @param link Hardware link the message came from (e.g. /dev/ttyUSB0 or UDP port). | ||
* messages can be sent back to the system via this link | ||
* @param message MAVLink message, as received from the MAVLink protocol stack | ||
*/ | ||
void QGXPX4UAS::receiveMessage(LinkInterface* link, mavlink_message_t message) | ||
{ | ||
UAS::receiveMessage(link, message); | ||
} | ||
|
||
void QGXPX4UAS::processParamValueMsgHook(mavlink_message_t& msg, const QString& paramName,const mavlink_param_value_t& rawValue, mavlink_param_union_t& paramValue) | ||
{ | ||
int compId = msg.compid; | ||
if (paramName == "SYS_AUTOSTART") { | ||
|
||
bool ok; | ||
|
||
int val = parameters.value(compId)->value(paramName).toInt(&ok); | ||
|
||
if (ok && val == 0) { | ||
emit misconfigurationDetected(this); | ||
qDebug() << "HINTING MISCONFIGURATION"; | ||
} | ||
|
||
qDebug() << "SYS_AUTOSTART FOUND WITH VAL: " << val; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#ifndef QGXPX4UAS_H | ||
#define QGXPX4UAS_H | ||
|
||
#include "UAS.h" | ||
|
||
class QGXPX4UAS : public UAS | ||
{ | ||
Q_OBJECT | ||
Q_INTERFACES(UASInterface) | ||
public: | ||
QGXPX4UAS(MAVLinkProtocol* mavlink, QThread* thread, int id); | ||
|
||
public slots: | ||
/** @brief Receive a MAVLink message from this MAV */ | ||
void receiveMessage(LinkInterface* link, mavlink_message_t message); | ||
|
||
virtual void processParamValueMsgHook(mavlink_message_t& msg, const QString& paramName,const mavlink_param_value_t& rawValue, mavlink_param_union_t& paramValue); | ||
|
||
}; | ||
|
||
#endif // QGXPX4UAS_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters