mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Serial device settings improvement
This commit is contained in:
parent
377048b90a
commit
5558173181
3 changed files with 13 additions and 3 deletions
|
@ -378,7 +378,7 @@ function testHamlib() {
|
|||
v-for="option in serialDeviceOptions()"
|
||||
v-bind:value="option.port"
|
||||
>
|
||||
{{ option.port }}
|
||||
{{ option.description }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
|
@ -322,7 +322,7 @@ import { serialDeviceOptions } from "../js/deviceFormHelper";
|
|||
v-for="option in serialDeviceOptions()"
|
||||
v-bind:value="option.port"
|
||||
>
|
||||
{{ option.port }}
|
||||
{{ option.description }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
|
@ -404,7 +404,12 @@ import { serialDeviceOptions } from "../js/deviceFormHelper";
|
|||
@change="onChange"
|
||||
v-model="settings.remote.RADIO.ptt_port"
|
||||
>
|
||||
<option selected value="ignore">-- ignore --</option>
|
||||
<option
|
||||
v-for="option in serialDeviceOptions()"
|
||||
v-bind:value="option.port"
|
||||
>
|
||||
{{ option.description }}
|
||||
</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="input-group input-group-sm mb-1">
|
||||
|
|
|
@ -3,6 +3,9 @@ import { getAudioDevices, getSerialDevices } from "./api";
|
|||
let audioDevices = await getAudioDevices();
|
||||
let serialDevices = await getSerialDevices();
|
||||
|
||||
//Add an ignore option for rig and ptt for transceivers that don't require them
|
||||
serialDevices.push({description:"-- ignore --", port:"ignore"})
|
||||
|
||||
//Dummy device data sent if unable to get devices from modem to prevent GUI crash
|
||||
const skel = JSON.parse(`
|
||||
[{
|
||||
|
@ -11,6 +14,7 @@ const skel = JSON.parse(`
|
|||
"name": "No devices received from modem",
|
||||
"native_index": 0
|
||||
}]`);
|
||||
|
||||
export function loadAudioDevices() {
|
||||
getAudioDevices().then((devices) => {
|
||||
audioDevices = devices;
|
||||
|
@ -34,6 +38,7 @@ export function audioOutputOptions() {
|
|||
if (audioDevices === undefined) {
|
||||
return skel;
|
||||
}
|
||||
|
||||
return audioDevices.out;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue