Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Käppler
ampel-firmware
Commits
90d94b88
Commit
90d94b88
authored
4 years ago
by
Eric Duminil
Browse files
Options
Download
Email Patches
Plain Diff
Allow backspace in console
parent
b912c9e4
dev/sensorstates
dev/calibnightmode
dev/debugcalib
dev/fixstartup
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ampel-firmware/sensor_commands.cpp
+7
-1
ampel-firmware/sensor_commands.cpp
with
7 additions
and
1 deletion
+7
-1
ampel-firmware/sensor_commands.cpp
+
7
-
1
View file @
90d94b88
...
...
@@ -92,10 +92,16 @@ namespace sensor_commands {
break
;
case
'\r'
:
// discard carriage return
break
;
case
'\b'
:
// backspace
if
(
input_pos
>
0
)
{
input_pos
--
;
}
break
;
default:
// keep adding if not full ... allow for terminating null byte
if
(
input_pos
<
(
MAX_COMMAND_SIZE
-
1
))
if
(
input_pos
<
(
MAX_COMMAND_SIZE
-
1
))
{
input_line
[
input_pos
++
]
=
input_byte
;
}
break
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets