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

Add setting name to the MSP2_COMMON_SETTING_INFO message (#5133)

Allows to enumerate all the settings and get the setting names. It is
the only way to do so.
This commit is contained in:
Michel Pastor 2019-10-17 23:44:29 +02:00 committed by GitHub
parent 4f646ca06a
commit 6e70eee04b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -3012,6 +3012,10 @@ static bool mspSettingInfoCommand(sbuf_t *dst, sbuf_t *src)
return false;
}
char name_buf[SETTING_MAX_WORD_LENGTH+1];
settingGetName(setting, name_buf);
sbufWriteDataSafe(dst, name_buf, strlen(name_buf) + 1);
// Parameter Group ID
sbufWriteU16(dst, settingGetPgn(setting));

View file

@ -60,7 +60,7 @@
#define MSP_PROTOCOL_VERSION 0 // Same version over MSPv1 & MSPv2 - message format didn't change and it backward compatible
#define API_VERSION_MAJOR 2 // increment when major changes are made
#define API_VERSION_MINOR 3 // increment when any change is made, reset to zero when major changes are released after changing API_VERSION_MAJOR
#define API_VERSION_MINOR 4 // increment when any change is made, reset to zero when major changes are released after changing API_VERSION_MAJOR
#define API_VERSION_LENGTH 2