From 5cc9ae734331686152e4f130c80dfb9ba5691604 Mon Sep 17 00:00:00 2001 From: a-f-G-U-C <65810997+a-f-G-U-C@users.noreply.github.com> Date: Tue, 26 Oct 2021 14:14:49 +0000 Subject: [PATCH 1/2] add a Team field in USER message --- mesh.proto | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/mesh.proto b/mesh.proto index 0b15318..e33b895 100644 --- a/mesh.proto +++ b/mesh.proto @@ -241,6 +241,28 @@ message Position { DIY_V1 = 39; } +/* + * 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 + */ +enum Team { + CLEAR = 0; /* the default (unset) is "achromatic" (unaffiliated) */ + CYAN = 1; + WHITE = 2; + YELLOW = 3; + ORANGE = 4; + MAGENTA = 5; + RED = 6; + MAROON = 7; + PURPLE = 8; + DARKBLUE = 9; + BLUE = 10; + TEAL = 11; + GREEN = 12; + DARKGREEN = 13; + BROWN = 14; +} + /* * Broadcast when a newly powered mesh node wants to find a node num it can use * Sent from the phone over bluetooth to set the user id for the owner of this node. @@ -308,6 +330,15 @@ message User { * Also, "long_name" should be their licence number. */ bool is_licensed = 7; + + /* + * 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 = 8; } /* From 872054013a6ca5522d0116a556733c25b8ba79a7 Mon Sep 17 00:00:00 2001 From: a-f-G-U-C <65810997+a-f-G-U-C@users.noreply.github.com> Date: Tue, 26 Oct 2021 23:56:18 +0000 Subject: [PATCH 2/2] readability fix --- mesh.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesh.proto b/mesh.proto index e33b895..366b15e 100644 --- a/mesh.proto +++ b/mesh.proto @@ -255,11 +255,11 @@ enum Team { RED = 6; MAROON = 7; PURPLE = 8; - DARKBLUE = 9; + DARK_BLUE = 9; BLUE = 10; TEAL = 11; GREEN = 12; - DARKGREEN = 13; + DARK_GREEN = 13; BROWN = 14; }