From f6de04542ee64f77415ff0975a4bddb12f9bc8a8 Mon Sep 17 00:00:00 2001 From: Sidi Liang <1467329765@qq.com> Date: Wed, 31 Jul 2019 14:29:13 +0800 Subject: [PATCH] System: bug fix --- gui/dialogs/battery-management.xml | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gui/dialogs/battery-management.xml b/gui/dialogs/battery-management.xml index e43fa60..7ba9d28 100755 --- a/gui/dialogs/battery-management.xml +++ b/gui/dialogs/battery-management.xml @@ -76,7 +76,17 @@ </binding> <binding> <command>nasal</command> - <script>setprop("/sim/sound/voices/pilot", "Hey there! How can I help you, comrade?")</script> + <script> + + if(!getprop(services/service-truck/enable)){ + setprop("/sim/sound/voices/pilot", "Hey there! How can I help you?"); + }else{ + setprop("/sim/sound/voices/pilot", "Goodbye, drive safe!"); + setprop("/sim/sound/voices/copilot", "Thanks comrade!"); + } + + + </script> </binding> <binding> <command>dialog-update</command>