Remove team and provision set_config

This commit is contained in:
Sacha Weatherstone
2022-05-02 08:35:31 +10:00
parent 057131b459
commit 3a1f20821e
5 changed files with 24 additions and 72 deletions

View File

@@ -69,41 +69,6 @@ typedef enum _HardwareModel {
HardwareModel_PRIVATE_HW = 255
} HardwareModel;
/* The team colors are based on the names of "friendly teams" in ATAK:
https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/atak/ATAK/app/src/main/assets/filters/team_filters.xml */
typedef enum _Team {
/* the default (unset) is "achromatic" (unaffiliated) */
Team_CLEAR = 0,
/* TODO: REPLACE */
Team_CYAN = 1,
/* TODO: REPLACE */
Team_WHITE = 2,
/* TODO: REPLACE */
Team_YELLOW = 3,
/* TODO: REPLACE */
Team_ORANGE = 4,
/* TODO: REPLACE */
Team_MAGENTA = 5,
/* TODO: REPLACE */
Team_RED = 6,
/* TODO: REPLACE */
Team_MAROON = 7,
/* TODO: REPLACE */
Team_PURPLE = 8,
/* TODO: REPLACE */
Team_DARK_BLUE = 9,
/* TODO: REPLACE */
Team_BLUE = 10,
/* TODO: REPLACE */
Team_TEAL = 11,
/* TODO: REPLACE */
Team_GREEN = 12,
/* TODO: REPLACE */
Team_DARK_GREEN = 13,
/* TODO: REPLACE */
Team_BROWN = 14
} Team;
/* Shared constants between device and phone */
typedef enum _Constants {
/* First enum must be zero, and we are just using this enum to
@@ -164,18 +129,17 @@ typedef enum _Position_LocSource {
Position_LocSource_LOCSRC_GPS_EXTERNAL = 3
} Position_LocSource;
/* The team colors are based on the names of "friendly teams" in ATAK:
https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/atak/ATAK/app/src/main/assets/filters/team_filters.xml */
/* Shared constants between device and phone */
typedef enum _Position_AltSource {
/* the default (unset) is "achromatic" (unaffiliated) */
/* First enum must be zero, and we are just using this enum to
pass int constants between two very different environments */
Position_AltSource_ALTSRC_UNSPECIFIED = 0,
/* TODO: REPLACE */
/* From mesh.options
note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is
outside of this envelope */
Position_AltSource_ALTSRC_MANUAL_ENTRY = 1,
/* TODO: REPLACE */
Position_AltSource_ALTSRC_GPS_INTERNAL = 2,
/* TODO: REPLACE */
Position_AltSource_ALTSRC_GPS_EXTERNAL = 3,
/* TODO: REPLACE */
Position_AltSource_ALTSRC_BAROMETRIC = 4
} Position_AltSource;
@@ -232,14 +196,15 @@ typedef enum _MeshPacket_Priority {
MeshPacket_Priority_MAX = 127
} MeshPacket_Priority;
/* The team colors are based on the names of "friendly teams" in ATAK:
https://github.com/deptofdefense/AndroidTacticalAssaultKit-CIV/blob/master/atak/ATAK/app/src/main/assets/filters/team_filters.xml */
/* Shared constants between device and phone */
typedef enum _MeshPacket_Delayed {
/* the default (unset) is "achromatic" (unaffiliated) */
/* First enum must be zero, and we are just using this enum to
pass int constants between two very different environments */
MeshPacket_Delayed_NO_DELAY = 0,
/* TODO: REPLACE */
/* From mesh.options
note: this payload length is ONLY the bytes that are sent inside of the Data protobuf (excluding protobuf overhead). The 16 byte header is
outside of this envelope */
MeshPacket_Delayed_DELAYED_BROADCAST = 1,
/* TODO: REPLACE */
MeshPacket_Delayed_DELAYED_DIRECT = 2
} MeshPacket_Delayed;
@@ -480,12 +445,6 @@ typedef struct _User {
If this user is a licensed operator, set this flag.
Also, "long_name" should be their licence number. */
bool is_licensed;
/* Participants in the same network can self-group into different teams.
Short-term this can be used to visually differentiate them on the map;
in the longer term it could also help users to semi-automatically
select or ignore messages according to team affiliation.
In total, 14 teams are defined (encoded in 4 bits) */
Team team;
/* Transmit power at antenna connector, in decibel-milliwatt
An optional self-reported value useful in network planning, discovery
and positioning - along with ant_gain_dbi and ant_azimuth below */
@@ -697,10 +656,6 @@ typedef struct _ToRadio {
#define _HardwareModel_MAX HardwareModel_PRIVATE_HW
#define _HardwareModel_ARRAYSIZE ((HardwareModel)(HardwareModel_PRIVATE_HW+1))
#define _Team_MIN Team_CLEAR
#define _Team_MAX Team_BROWN
#define _Team_ARRAYSIZE ((Team)(Team_BROWN+1))
#define _Constants_MIN Constants_Unused
#define _Constants_MAX Constants_DATA_PAYLOAD_LEN
#define _Constants_ARRAYSIZE ((Constants)(Constants_DATA_PAYLOAD_LEN+1))
@@ -740,7 +695,7 @@ extern "C" {
/* Initializer values for message structs */
#define Position_init_default {0, 0, 0, 0, _Position_LocSource_MIN, _Position_AltSource_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#define User_init_default {"", "", "", {0}, _HardwareModel_MIN, 0, _Team_MIN, 0, 0, 0}
#define User_init_default {"", "", "", {0}, _HardwareModel_MIN, 0, 0, 0, 0}
#define RouteDiscovery_init_default {0, {0, 0, 0, 0, 0, 0, 0, 0}}
#define Routing_init_default {0, {RouteDiscovery_init_default}}
#define Data_init_default {_PortNum_MIN, 0, {{0, {0}}}, 0, 0, 0, 0, 0, 0, false, Location_init_default}
@@ -753,7 +708,7 @@ extern "C" {
#define ToRadio_init_default {0, {MeshPacket_init_default}}
#define ToRadio_PeerInfo_init_default {0, 0}
#define Position_init_zero {0, 0, 0, 0, _Position_LocSource_MIN, _Position_AltSource_MIN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}
#define User_init_zero {"", "", "", {0}, _HardwareModel_MIN, 0, _Team_MIN, 0, 0, 0}
#define User_init_zero {"", "", "", {0}, _HardwareModel_MIN, 0, 0, 0, 0}
#define RouteDiscovery_init_zero {0, {0, 0, 0, 0, 0, 0, 0, 0}}
#define Routing_init_zero {0, {RouteDiscovery_init_zero}}
#define Data_init_zero {_PortNum_MIN, 0, {{0, {0}}}, 0, 0, 0, 0, 0, 0, false, Location_init_zero}
@@ -824,7 +779,6 @@ extern "C" {
#define User_macaddr_tag 4
#define User_hw_model_tag 6
#define User_is_licensed_tag 7
#define User_team_tag 8
#define User_tx_power_dbm_tag 10
#define User_ant_gain_dbi_tag 11
#define User_ant_azimuth_tag 12
@@ -906,7 +860,6 @@ X(a, STATIC, SINGULAR, STRING, short_name, 3) \
X(a, STATIC, SINGULAR, FIXED_LENGTH_BYTES, macaddr, 4) \
X(a, STATIC, SINGULAR, UENUM, hw_model, 6) \
X(a, STATIC, SINGULAR, BOOL, is_licensed, 7) \
X(a, STATIC, SINGULAR, UENUM, team, 8) \
X(a, STATIC, SINGULAR, UINT32, tx_power_dbm, 10) \
X(a, STATIC, SINGULAR, UINT32, ant_gain_dbi, 11) \
X(a, STATIC, SINGULAR, UINT32, ant_azimuth, 12)
@@ -1078,13 +1031,13 @@ extern const pb_msgdesc_t ToRadio_PeerInfo_msg;
#define LogRecord_size 81
#define MeshPacket_size 347
#define MyNodeInfo_size 210
#define NodeInfo_size 283
#define NodeInfo_size 281
#define Position_size 142
#define RouteDiscovery_size 40
#define Routing_size 42
#define ToRadio_PeerInfo_size 8
#define ToRadio_size 350
#define User_size 97
#define User_size 95
#ifdef __cplusplus
} /* extern "C" */