Browse Source

Avoid conflict with C99 float conversion.

jeroen
Jeroen Vreeken 5 years ago
parent
commit
a1879bf52e
1 changed files with 5 additions and 5 deletions
  1. +5
    -5
      console/console/console_httpd.c

+ 5
- 5
console/console/console_httpd.c View File

@ -704,19 +704,19 @@ static int callback_http(struct lws *wsi,
if (!strncmp(rcv, "status ", 7)) {
char *ident;
sscanf(rcv, "%*s %as", &ident);
sscanf(rcv, "%*s %ms", &ident);
start_status(wsi, ident);
} else if (!strncmp(rcv, "trace ", 6)) {
int freq;
char *variable;
sscanf(rcv, "%*s %d %as", &freq, &variable);
sscanf(rcv, "%*s %d %ms", &freq, &variable);
start_trace(wsi, freq, variable);
} else if (!strncmp(rcv, "command ", 8)) {
char *ident;
char *command;
sscanf(rcv, "%*s %as", &ident);
sscanf(rcv, "%*s %ms", &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 %as %as", &name, &type);
sscanf(rcv, "%*s %ms %ms", &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 %as", &vstr);
sscanf(rcv, "%*s %*s %*s %ms", &vstr);
if (!strcmp(vstr, "TRACK")) {
entry.value.f = 0.0;
entry.type = COMMAND_PTYPE_SETPOINT_TRACK;


Loading…
Cancel
Save