Skip to content

Commit

Permalink
Add Text to Speech for Geochats
Browse files Browse the repository at this point in the history
  • Loading branch information
niccellular committed Jul 21, 2024
1 parent 71713c2 commit 769f137
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
buildscript {


ext.PLUGIN_VERSION = "1.0.25"
ext.PLUGIN_VERSION = "1.0.26"
ext.ATAK_VERSION = "4.10.0"

def takdevVersion = '2.+'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,15 @@ else if (team.equals("DarkGreen"))
String deviceCallsign = contact.getDeviceCallsign();
String msgId = String.valueOf(UUID.randomUUID());

if (prefs.getBoolean("plugin_meshtastic_voice", false)) {
StringBuilder message = new StringBuilder();
message.append("GeoChat from ");
message.append(callsign);
message.append(" ");
message.append(geoChat.getMessage());
MeshtasticDropDownReceiver.t1.speak(message.toString(), TextToSpeech.QUEUE_FLUSH, null);
}

CotDetail cotDetail = new CotDetail("detail");

CoordinatedTime time = new CoordinatedTime();
Expand Down Expand Up @@ -900,6 +909,15 @@ else if (team.equals("DarkGreen"))
String msgId = String.valueOf(UUID.randomUUID());
String to = geoChat.getTo();

if (prefs.getBoolean("plugin_meshtastic_voice", false)) {
StringBuilder message = new StringBuilder();
message.append("GeoChat from ");
message.append(callsign);
message.append(" ");
message.append(geoChat.getMessage());
MeshtasticDropDownReceiver.t1.speak(message.toString(), TextToSpeech.QUEUE_FLUSH, null);
}

CotDetail cotDetail = new CotDetail("detail");

CoordinatedTime time = new CoordinatedTime();
Expand Down

0 comments on commit 769f137

Please sign in to comment.