1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-23 00:05:33 +03:00

Fixed 'get' / 'set' CLI commands.

This commit is contained in:
mikeller 2017-03-12 19:08:23 +13:00
parent 454081978b
commit 441b0c4e98

View file

@ -1413,7 +1413,7 @@ static void printValuePointer(const clivalue_t *var, const void *valuePointer, u
} }
break; break;
case MODE_LOOKUP: case MODE_LOOKUP:
cliPrintf(lookupTables[var->config.lookup.tableIndex].values[value]); cliPrint(lookupTables[var->config.lookup.tableIndex].values[value]);
break; break;
} }
} }
@ -1704,7 +1704,7 @@ static uint16_t getValueOffset(const clivalue_t *value)
static void *getValuePointer(const clivalue_t *value) static void *getValuePointer(const clivalue_t *value)
{ {
const pgRegistry_t* rec = pgFind(value->pgn); const pgRegistry_t* rec = pgFind(value->pgn);
return CONST_CAST(void *, rec + getValueOffset(value)); return CONST_CAST(void *, rec->address + getValueOffset(value));
} }
static void dumpPgValue(const clivalue_t *value, uint8_t dumpMask) static void dumpPgValue(const clivalue_t *value, uint8_t dumpMask)