gunshot detection - direction optional as defined by profile

This commit is contained in:
stopflock
2025-08-29 13:47:32 -05:00
parent 57acff8ae7
commit 395ef77fe3
7 changed files with 124 additions and 9 deletions
+4 -2
View File
@@ -36,8 +36,10 @@ class Uploader {
print('Uploader: Created changeset ID: $csId');
// 2. create or update node
final mergedTags = Map<String, String>.from(p.profile.tags)
..['direction'] = p.direction.round().toString();
final mergedTags = Map<String, String>.from(p.profile.tags);
if (p.profile.requiresDirection) {
mergedTags['direction'] = p.direction.round().toString();
}
final tagsXml = mergedTags.entries.map((e) =>
'<tag k="${e.key}" v="${e.value}"/>').join('\n ');