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
076e240a
Commit
076e240a
authored
Jan 26, 2011
by
lm
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Supported now CR, LF, and CR+LF line breaks
parent
47b2dbf0
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
5 deletions
+13
-5
DebugConsole.cc
src/ui/DebugConsole.cc
+11
-3
HDDisplay.cc
src/ui/HDDisplay.cc
+2
-2
No files found.
src/ui/DebugConsole.cc
View file @
076e240a
...
...
@@ -299,12 +299,21 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes)
{
// Accept line feed and tab
case
(
unsigned
char
)
'\n'
:
{
if
(
lastByte
!=
'\r'
)
{
// Do not break line again for CR+LF
// only break line for single LF bytes
str
.
append
(
byte
);
}
}
break
;
case
(
unsigned
char
)
'\t'
:
str
.
append
(
byte
);
break
;
// Catch and ignore carriage return
case
(
unsigned
char
)
'\r'
:
// Ignore
str
.
append
(
byte
);
break
;
default:
str
.
append
(
QChar
(
QChar
::
ReplacementCharacter
));
...
...
@@ -324,6 +333,7 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes)
str
.
append
(
str2
);
}
lineBuffer
.
append
(
str
);
lastByte
=
byte
;
}
else
{
...
...
@@ -340,8 +350,6 @@ void DebugConsole::receiveBytes(LinkInterface* link, QByteArray bytes)
m_ui
->
receiveText
->
ensureCursorVisible
();
lineBuffer
.
clear
();
}
}
else
if
(
link
==
currLink
&&
holdOn
)
{
...
...
src/ui/HDDisplay.cc
View file @
076e240a
...
...
@@ -293,12 +293,12 @@ void HDDisplay::addGauge()
}
else
{
items
.
append
(
QString
(
"%1,%2,%3,%4"
).
arg
(
"
-180"
).
arg
(
key
).
arg
(
unit
).
arg
(
"+18
0"
));
items
.
append
(
QString
(
"%1,%2,%3,%4"
).
arg
(
"
0"
).
arg
(
key
).
arg
(
unit
).
arg
(
"+10
0"
));
}
}
bool
ok
;
QString
item
=
QInputDialog
::
getItem
(
this
,
tr
(
"Add Gauge Instrument"
),
tr
(
"Format: min, curve name, max[,s]"
),
items
,
0
,
true
,
&
ok
);
tr
(
"Format: min, curve name,
unit,
max[,s]"
),
items
,
0
,
true
,
&
ok
);
if
(
ok
&&
!
item
.
isEmpty
())
{
addGauge
(
item
);
...
...
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