Skip to content

Commit 536081b

Browse files
MicheleCarboneraMicheleCarbonera
authored andcommitted
Merge branch 'volumeLevelCtrl' into music_ext_sprint_1
2 parents 5d87a78 + 2bd1898 commit 536081b

File tree

1 file changed

+28
-1
lines changed

1 file changed

+28
-1
lines changed

src/components/Settings.vue

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,6 +425,25 @@
425425
</v-layout>
426426
</v-container>
427427
</v-tab-item>
428+
429+
430+
<!-- AUDIO TAB -->
431+
<v-tab-item>
432+
<v-container grid-list-md text-xs-center>
433+
<v-layout row wrap align-center>
434+
<v-flex xs12 md6 offset-md3>
435+
<h3 class="text-xs-left">Audio settings</h3>
436+
<v-card>
437+
<div class="cardContent">
438+
Volume:
439+
440+
<v-text-field v-model="settings.audioLevel" label="Volume" />
441+
</div>
442+
</v-card>
443+
</v-flex>
444+
</v-layout>
445+
</v-container>
446+
</v-tab-item>
428447
</v-tabs-items>
429448
<!--</template>
430449
<template v-else>
@@ -448,6 +467,7 @@
448467
import sidebar from "../components/Sidebar"
449468
450469
export default {
470+
451471
components: { sidebar },
452472
name: 'Settings',
453473
mounted() {
@@ -471,6 +491,7 @@ export default {
471491
this.fileObj = files[0]
472492
this.formdata = new FormData();
473493
this.formdata.append('file_to_upload', files[0], files[0].name);
494+
474495
},
475496
upload() {
476497
const config = {
@@ -665,6 +686,7 @@ export default {
665686
data.ctrlTurnElapse = remoteConfig.ctrl_tr_elapse
666687
data.ctrlTurnSpeed = remoteConfig.ctrl_tr_speed
667688
689+
data.audioLevel = remoteConfig.audio_volume_level
668690
}.bind(this))
669691
},
670692
save: function() {
@@ -714,6 +736,8 @@ export default {
714736
'ctrl_fw_speed': data.ctrlFwdSpeed,
715737
'ctrl_tr_elapse': data.ctrlTurnElapse,
716738
'ctrl_tr_speed': data.ctrlTurnSpeed,
739+
740+
'audio_volume_level': data.audioLevel,
717741
})
718742
axios.post(CBv1 + '/config', legacySettings)
719743
.then(function() {
@@ -750,13 +774,16 @@ export default {
750774
updateStatus: 0,
751775
// TODO: Prepopulate this
752776
settings: {
777+
753778
cbName: 'CoderBot di Antonio',
754779
power: [null, null, null],
755780
startupProgram: null,
756781
btnFun: null,
757782
wifiMode: 'ap',
758783
wifiSSID: null,
759784
wifiPsw: null,
785+
786+
audioLevel: null,
760787
761788
moveFwdElapse: null,
762789
moveFwdSpeed: null,
@@ -807,7 +834,7 @@ export default {
807834
drawer: null,
808835
tab: null,
809836
//tabs: ['Generali', 'Rete', 'Movimento', 'Suoni', 'Avanzate'],
810-
tabs: ['Generali', 'Movimento', 'Suoni', 'Avanzate', 'Test']
837+
tabs: ['Generali', 'Movimento', 'Suoni', 'Avanzate', 'Test','Audio']
811838
}
812839
}
813840
}

0 commit comments

Comments
 (0)