Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tammo Jan Dijkema
dt_ctrl
Commits
a1879bf5
Commit
a1879bf5
authored
Sep 01, 2016
by
Jeroen Vreeken
Browse files
Avoid conflict with C99 float conversion.
parent
9fa780a9
Changes
1
Hide whitespace changes
Inline
Side-by-side
console/console/console_httpd.c
View file @
a1879bf5
...
...
@@ -704,19 +704,19 @@ static int callback_http(struct lws *wsi,
if
(
!
strncmp
(
rcv
,
"status "
,
7
))
{
char
*
ident
;
sscanf
(
rcv
,
"%*s %
a
s"
,
&
ident
);
sscanf
(
rcv
,
"%*s %
m
s"
,
&
ident
);
start_status
(
wsi
,
ident
);
}
else
if
(
!
strncmp
(
rcv
,
"trace "
,
6
))
{
int
freq
;
char
*
variable
;
sscanf
(
rcv
,
"%*s %d %
a
s"
,
&
freq
,
&
variable
);
sscanf
(
rcv
,
"%*s %d %
m
s"
,
&
freq
,
&
variable
);
start_trace
(
wsi
,
freq
,
variable
);
}
else
if
(
!
strncmp
(
rcv
,
"command "
,
8
))
{
char
*
ident
;
char
*
command
;
sscanf
(
rcv
,
"%*s %
a
s"
,
&
ident
);
sscanf
(
rcv
,
"%*s %
m
s"
,
&
ident
);
command
=
rcv
+
8
+
strlen
(
ident
)
+
1
;
do_command
(
ident
,
command
);
...
...
@@ -728,7 +728,7 @@ static int callback_http(struct lws *wsi,
struct
command
*
command
;
enum
command_value_type
vtype
;
sscanf
(
rcv
,
"%*s %
a
s %
a
s"
,
&
name
,
&
type
);
sscanf
(
rcv
,
"%*s %
m
s %
m
s"
,
&
name
,
&
type
);
if
(
!
strcmp
(
type
,
"bool"
))
{
int
v
;
sscanf
(
rcv
,
"%*s %*s %*s %d"
,
&
v
);
...
...
@@ -748,7 +748,7 @@ static int callback_http(struct lws *wsi,
if
(
!
strcmp
(
type
,
"float"
))
{
float
v
;
char
*
vstr
;
sscanf
(
rcv
,
"%*s %*s %*s %
a
s"
,
&
vstr
);
sscanf
(
rcv
,
"%*s %*s %*s %
m
s"
,
&
vstr
);
if
(
!
strcmp
(
vstr
,
"TRACK"
))
{
entry
.
value
.
f
=
0
.
0
;
entry
.
type
=
COMMAND_PTYPE_SETPOINT_TRACK
;
...
...
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