Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Distributed Autonomous Networked Control Lab
MicroCART
Commits
906bfed4
Commit
906bfed4
authored
7 years ago
by
Jake
Browse files
Options
Downloads
Patches
Plain Diff
Save/Load
parent
3b2544ca
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
groundStation/gui/MicroCART/mainwindow.cpp
+33
-0
33 additions, 0 deletions
groundStation/gui/MicroCART/mainwindow.cpp
groundStation/gui/MicroCART/mainwindow.h
+4
-0
4 additions, 0 deletions
groundStation/gui/MicroCART/mainwindow.h
with
37 additions
and
0 deletions
groundStation/gui/MicroCART/mainwindow.cpp
+
33
−
0
View file @
906bfed4
...
...
@@ -360,3 +360,36 @@ void MainWindow::on_pbInsertSetpoint_clicked()
findChild
<
QLineEdit
*>
(
"zSetpoint"
)
->
text
()
+
"]"
);
setpointList
->
insertRow
(
current
,
new
QStandardItem
(
str
));
}
void
MainWindow
::
on_pbSaveWaypoints_clicked
()
{
QString
savePath
=
QFileDialog
::
getSaveFileName
(
this
);
if
(
!
savePath
.
isEmpty
())
{
QFile
f
(
savePath
);
f
.
open
(
QIODevice
::
WriteOnly
|
QIODevice
::
Text
);
for
(
int
i
=
0
;
i
<
setpointList
->
rowCount
();
i
++
)
{
f
.
write
(
setpointList
->
item
(
i
)
->
text
().
toAscii
());
f
.
write
(
"
\n
"
);
}
f
.
close
();
}
}
void
MainWindow
::
on_pbLoadWaypoints_clicked
()
{
QString
openPath
=
QFileDialog
::
getOpenFileName
(
this
);
if
(
!
openPath
.
isEmpty
())
{
QFile
f
(
openPath
);
f
.
open
(
QIODevice
::
ReadOnly
|
QIODevice
::
Text
);
setpointList
->
clear
();
while
(
!
f
.
atEnd
())
{
QString
line
=
f
.
readLine
();
line
.
chop
(
1
);
setpointList
->
appendRow
(
new
QStandardItem
(
line
));
}
f
.
close
();
}
}
This diff is collapsed.
Click to expand it.
groundStation/gui/MicroCART/mainwindow.h
+
4
−
0
View file @
906bfed4
...
...
@@ -65,6 +65,10 @@ private slots:
void
on_pbInsertSetpoint_clicked
();
void
on_pbSaveWaypoints_clicked
();
void
on_pbLoadWaypoints_clicked
();
private:
Ui
::
MainWindow
*
ui
;
pid_t
backendPid
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment