1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Fix line endings to CRLF

This commit is contained in:
kh4 2014-02-07 13:40:27 +02:00
parent 0c46bdbfc8
commit ceb1f78526
3 changed files with 100 additions and 100 deletions

View file

@ -216,12 +216,12 @@ const clivalue_t valueTable[] = {
#define VALUE_COUNT (sizeof(valueTable) / sizeof(clivalue_t))
typedef union {
int32_t int_value;
float float_value;
} int_float_value_t;
typedef union {
int32_t int_value;
float float_value;
} int_float_value_t;
static void cliSetVar(const clivalue_t *var, const int_float_value_t value);
static void cliPrintVar(const clivalue_t *var, uint32_t full);
static void cliPrint(const char *str);
@ -932,12 +932,12 @@ static void cliSet(char *cmdline)
val = &valueTable[i];
if (strncasecmp(cmdline, valueTable[i].name, strlen(valueTable[i].name)) == 0) {
if (valuef >= valueTable[i].min && valuef <= valueTable[i].max) { // here we compare the float value since... it should work, RIGHT?
int_float_value_t tmp;
if (valueTable[i].type == VAR_FLOAT)
tmp.float_value = valuef;
else
tmp.int_value = value;
cliSetVar(val, tmp);
int_float_value_t tmp;
if (valueTable[i].type == VAR_FLOAT)
tmp.float_value = valuef;
else
tmp.int_value = value;
cliSetVar(val, tmp);
printf("%s set to ", valueTable[i].name);
cliPrintVar(val, 0);
} else {