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:
parent
2227580965
commit
f36fe2386d
8 changed files with 83 additions and 32 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue