Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
5c239cd9
Commit
5c239cd9
authored
May 28, 2010
by
pixhawk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Working on Qt watchdog control
parent
b13a2a4c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
WatchdogControl.cc
src/ui/watchdog/WatchdogControl.cc
+7
-0
WatchdogControl.h
src/ui/watchdog/WatchdogControl.h
+3
-0
No files found.
src/ui/watchdog/WatchdogControl.cc
View file @
5c239cd9
...
...
@@ -9,6 +9,7 @@
WatchdogControl
::
WatchdogControl
(
QWidget
*
parent
)
:
QWidget
(
parent
),
mav
(
NULL
),
updateInterval
(
2000000
),
ui
(
new
Ui
::
WatchdogControl
)
{
ui
->
setupUi
(
this
);
...
...
@@ -43,14 +44,20 @@ void WatchdogControl::setUAS(UASInterface* uas)
void
WatchdogControl
::
updateWatchdog
(
int
systemId
,
int
watchdogId
,
unsigned
int
processCount
)
{
// request the watchdog with the given ID
// Get the watchdog and request the info for it
WatchdogInfo
&
watchdog
=
this
->
getWatchdog
(
systemId
,
watchdogId
);
// if the proces count doesn't match, the watchdog is either new or has changed - create a new vector with new (and empty) ProcessInfo structs.
if
(
watchdog
.
processes_
.
size
()
!=
processCount
)
{
watchdog
.
processes_
=
std
::
vector
<
ProcessInfo
>
(
processCount
);
// Create new UI widget
//WatchdogView* view = new Watch
}
// start the timeout timer
//watchdog.timeoutTimer_.reset();
qDebug
()
<<
"WATCHDOG RECEIVED"
;
//qDebug() << "<-- received mavlink_watchdog_heartbeat_t " << msg->sysid << " / " << payload.watchdog_id << " / " << payload.process_count << std::endl;
}
...
...
src/ui/watchdog/WatchdogControl.h
View file @
5c239cd9
...
...
@@ -67,6 +67,7 @@ public:
uint16_t
crashes_
;
///< The number of crashes
int32_t
pid_
;
///< The PID of the process
//quint64_t requestTimeout;
// Timer requestTimer_; ///< Internal timer, used to repeat status and info requests after some time (in case of packet loss)
// Timer updateTimer_; ///< Internal timer, used to measure the time since the last update (used only for graphics)
};
...
...
@@ -92,6 +93,7 @@ public:
ProcessInfo
&
getProcess
(
uint16_t
index
);
std
::
vector
<
ProcessInfo
>
processes_
;
///< A vector containing all processes running on this watchdog
uint64_t
timeout
;
QTimer
*
timeoutTimer_
;
///< Internal timer, used to measure the time since the last heartbeat message
};
...
...
@@ -116,6 +118,7 @@ protected:
UASInterface
*
mav
;
QVBoxLayout
*
listLayout
;
uint64_t
updateInterval
;
private:
Ui
::
WatchdogControl
*
ui
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment