From e8d4605b3680bcbff54f427f45d3742162c3e270 Mon Sep 17 00:00:00 2001 From: Tdogb Date: Mon, 3 Apr 2023 22:19:37 -0400 Subject: [PATCH] add id --- src/main/cli/settings.c | 1 + src/main/config/config.c | 1 + src/main/config/config.h | 1 + 3 files changed, 3 insertions(+) diff --git a/src/main/cli/settings.c b/src/main/cli/settings.c index 5ca109b4bf..09f12e6662 100644 --- a/src/main/cli/settings.c +++ b/src/main/cli/settings.c @@ -1720,6 +1720,7 @@ const clivalue_t valueTable[] = { #endif #endif { "craft_name", VAR_UINT8 | MASTER_VALUE | MODE_STRING, .config.string = { 1, MAX_NAME_LENGTH, STRING_FLAGS_NONE }, PG_PILOT_CONFIG, offsetof(pilotConfig_t, craftName) }, + { "drone_id", VAR_UINT8 | MASTER_VALUE | MODE_STRING, .config.string = { 1, MAX_NAME_LENGTH, STRING_FLAGS_NONE }, PG_PILOT_CONFIG, offsetof(pilotConfig_t, droneId) }, #ifdef USE_OSD { "pilot_name", VAR_UINT8 | MASTER_VALUE | MODE_STRING, .config.string = { 1, MAX_NAME_LENGTH, STRING_FLAGS_NONE }, PG_PILOT_CONFIG, offsetof(pilotConfig_t, pilotName) }, #endif diff --git a/src/main/config/config.c b/src/main/config/config.c index eb5931eb71..ab5b0aa2a0 100644 --- a/src/main/config/config.c +++ b/src/main/config/config.c @@ -111,6 +111,7 @@ PG_REGISTER_WITH_RESET_TEMPLATE(pilotConfig_t, pilotConfig, PG_PILOT_CONFIG, 2); PG_RESET_TEMPLATE(pilotConfig_t, pilotConfig, .craftName = { 0 }, .pilotName = { 0 }, + .droneId = { 0 }, ); PG_REGISTER_WITH_RESET_TEMPLATE(systemConfig_t, systemConfig, PG_SYSTEM_CONFIG, 3); diff --git a/src/main/config/config.h b/src/main/config/config.h index af947a50eb..be12eb8f6d 100644 --- a/src/main/config/config.h +++ b/src/main/config/config.h @@ -36,6 +36,7 @@ typedef enum { typedef struct pilotConfig_s { char craftName[MAX_NAME_LENGTH + 1]; char pilotName[MAX_NAME_LENGTH + 1]; + char droneId[MAX_NAME_LENGTH + 1]; } pilotConfig_t; PG_DECLARE(pilotConfig_t, pilotConfig);