Skip to content

Commit 1ed0a78

Browse files
committed
fix transportation audio switch
1 parent 0dfb75f commit 1ed0a78

File tree

4 files changed

+7
-4
lines changed

4 files changed

+7
-4
lines changed

xbot2_gui/Audio/audiosource.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ AudioSource::AudioSource():
2222
connect(this, &AudioSource::activeChanged,
2323
[this](bool active)
2424
{
25+
qInfo("AudioSource::onActiveChanged");
2526
if(active) start();
2627
else stop();
2728
});

xbot2_gui/Concert/Transportation.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
.import Common 1.0 as Common
2-
.import AudioBroadcaster 1.0 as AudioBroadcaster
2+
.import Audio 1.0 as Audio
33
let error = Common.CommonProperties.notifications.error
44

55
function setAsrState(active) {
@@ -13,7 +13,8 @@ function setAsrState(active) {
1313

1414
if(active)
1515
{
16-
AudioBroadcaster.active = true
16+
console.log('enabling audio broadcaster')
17+
Audio.AudioBroadcaster.active = true
1718
}
1819
}
1920

xbot2_gui/Concert/Transportation.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ Item {
182182

183183
}
184184

185-
onPageSelected: {
185+
Component.onCompleted: {
186186

187187
client.doRequestAsync('GET', '/speech/info', '')
188188
.then((msg) => {

xbot2_gui/main.qml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,6 @@ ApplicationWindow {
277277

278278
onCurrentIndexChanged: {
279279

280-
nav.setBadgeNumber(currentIndex, 0)
281280

282281
try {
283282
itemAt(currentIndex).item.numErrors = 0
@@ -286,6 +285,8 @@ ApplicationWindow {
286285
try {
287286
itemAt(currentIndex).item.pageSelected()
288287
}catch(err){}
288+
289+
nav.setBadgeNumber(currentIndex, 0)
289290
}
290291

291292
// load all pages in the model

0 commit comments

Comments
 (0)