mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
more typescript cheating...
This commit is contained in:
parent
fc35d5265a
commit
c07e0e05db
|
@ -20,19 +20,19 @@ function startStopModem() {
|
|||
switch (state.modem_running_state) {
|
||||
case "stopped":
|
||||
|
||||
let startupInputDeviceValue = (<HTMLInputElement>document.getElementById("audio_input_selectbox")).value;
|
||||
let startupOutputDeviceValue = (<HTMLInputElement>document.getElementById("audio_output_selectbox")).value;
|
||||
let startupInputDeviceValue = parseInt((<HTMLSelectElement>document.getElementById("audio_input_selectbox")).value);
|
||||
let startupOutputDeviceValue = parseInt((<HTMLSelectElement>document.getElementById("audio_output_selectbox")).value);
|
||||
|
||||
let startupInputDeviceIndex = (<HTMLInputElement>document.getElementById("audio_input_selectbox")).selectedIndex;
|
||||
let startupOutputDeviceIndex = (<HTMLInputElement>document.getElementById("audio_output_selectbox")).selectedIndex;
|
||||
let startupInputDeviceIndex = (<HTMLSelectElement>document.getElementById("audio_input_selectbox")).selectedIndex;
|
||||
let startupOutputDeviceIndex = (<HTMLSelectElement>document.getElementById("audio_output_selectbox")).selectedIndex;
|
||||
|
||||
|
||||
audioStore.startupInputDevice = startupInputDeviceValue
|
||||
audioStore.startupOutputDevice = startupOutputDeviceValue
|
||||
|
||||
// get full name of audio device
|
||||
settings.rx_audio = (<HTMLInputElement>document.getElementById("audio_input_selectbox")).options[startupInputDeviceIndex].text;
|
||||
settings.tx_audio = (<HTMLInputElement>document.getElementById("audio_output_selectbox")).options[startupOutputDeviceIndex].text;
|
||||
settings.rx_audio = (<HTMLSelectElement>document.getElementById("audio_input_selectbox")).options[startupInputDeviceIndex].text;
|
||||
settings.tx_audio = (<HTMLSelectElement>document.getElementById("audio_output_selectbox")).options[startupOutputDeviceIndex].text;
|
||||
|
||||
|
||||
saveSettingsToFile();
|
||||
|
|
|
@ -543,7 +543,7 @@ export async function updateAllChat(cleanup) {
|
|||
}
|
||||
getFromDBByFilter(filter)
|
||||
.then(async function (result) {
|
||||
for (var item of result.docs) {
|
||||
for (var item of (result as any).docs) {
|
||||
const dxcallsign = item.dxcallsign;
|
||||
// Check if dxcallsign already exists as a property in the result object
|
||||
if (!chat.sorted_beacon_list[dxcallsign]) {
|
||||
|
@ -969,16 +969,20 @@ let filter = {
|
|||
|
||||
getFromDBByFilter(filter)
|
||||
.then(result => {
|
||||
// @ts-expect-error
|
||||
let message = "Found " + result.docs.length + " waiting messages for " + dxcall
|
||||
|
||||
console.log(message);
|
||||
displayToast("info", "bi bi-info-circle", message, 5000);
|
||||
|
||||
// handle result
|
||||
// @ts-expect-error
|
||||
if (result.docs.length > 0) {
|
||||
// only want to process the first available item object, then return
|
||||
// this ensures, we are only sending one message at once
|
||||
|
||||
if (result.docs[0].attempt < config.max_retry_attempts) {
|
||||
// @ts-expect-error
|
||||
if (result.docs[0].attempt < settings.max_retry_attempts) {
|
||||
// @ts-expect-error
|
||||
repeatMessageTransmission(result.docs[0].uuid)
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue