1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-25 17:25:18 +03:00

Teach settings how to handle strings, make craft name a setting

Add a new type for settings to be able to handle strings. This makes
it easier to add more settings of this type and removes the need to
handle them with dedicated CLI commands.

Replace the `name` CLI command with a setting called `name`.

Saves 8 bytes of FLASH on OMNIBUS
This commit is contained in:
Alberto García Hierro 2018-06-24 18:38:10 +01:00
parent 2227580965
commit f36fe2386d
8 changed files with 83 additions and 32 deletions

View file

@ -2680,6 +2680,11 @@ static bool mspSetSettingCommand(sbuf_t *dst, sbuf_t *src)
*((float*)ptr) = val;
}
break;
case VAR_STRING:
{
settingSetString(setting, (const char*)sbufPtr(src), sbufBytesRemaining(src));
}
break;
}
return true;