mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
Prettified Code!
This commit is contained in:
parent
9e03ef3da4
commit
56fb5536b0
|
@ -952,8 +952,7 @@ ipcMain.on("request-check-rigctld", (event, data) => {
|
|||
rigctld_events_wired = true;
|
||||
mainLog.info("Starting rigctld event listeners");
|
||||
rigctld_connection_state = true;
|
||||
Data["state"] =
|
||||
"Connected";
|
||||
Data["state"] = "Connected";
|
||||
Data["active"] = true;
|
||||
if (win !== null && win !== "" && typeof win != "undefined") {
|
||||
// try catch for being sure we have a clean app close
|
||||
|
|
|
@ -1403,12 +1403,16 @@ window.addEventListener("DOMContentLoaded", () => {
|
|||
FD.saveConfig(config, configPath);
|
||||
|
||||
//Display a message if hamlib control is enabled and not running
|
||||
if (config.radiocontrol == "rigctld" && rigctldActive == false && (config.auto_start == 0 || tncStartCount > 1 )) {
|
||||
|
||||
if (
|
||||
!window.confirm("Rig control is set to hamlib/rigctl, but it doesn't appear to be running.\n\nPlease start rigctld (start button in Rig Control area), or use rigctl mode 'none'. If you're having issues starting rigctld please review the Hamlib tab in settings.\n\nClick OK to continue or cancel to abort.")
|
||||
config.radiocontrol == "rigctld" &&
|
||||
rigctldActive == false &&
|
||||
(config.auto_start == 0 || tncStartCount > 1)
|
||||
) {
|
||||
if (
|
||||
!window.confirm(
|
||||
"Rig control is set to hamlib/rigctl, but it doesn't appear to be running.\n\nPlease start rigctld (start button in Rig Control area), or use rigctl mode 'none'. If you're having issues starting rigctld please review the Hamlib tab in settings.\n\nClick OK to continue or cancel to abort."
|
||||
)
|
||||
{
|
||||
) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -3215,17 +3219,14 @@ function checkRigctld() {
|
|||
ipcRenderer.on("action-check-rigctld", (event, data) => {
|
||||
document.getElementById("hamlib_rigctld_status").value = data["state"];
|
||||
rigctldActive = data["active"];
|
||||
if (data["active"] == true)
|
||||
{
|
||||
document.getElementById("hamlib_rigctld_stop").disabled=false;
|
||||
document.getElementById("hamlib_rigctld_start").disabled=true;
|
||||
document.getElementById("testHamlib").disabled=false;
|
||||
|
||||
|
||||
if (data["active"] == true) {
|
||||
document.getElementById("hamlib_rigctld_stop").disabled = false;
|
||||
document.getElementById("hamlib_rigctld_start").disabled = true;
|
||||
document.getElementById("testHamlib").disabled = false;
|
||||
} else {
|
||||
document.getElementById("hamlib_rigctld_stop").disabled=true;
|
||||
document.getElementById("hamlib_rigctld_start").disabled=false;
|
||||
document.getElementById("testHamlib").disabled=true;
|
||||
document.getElementById("hamlib_rigctld_stop").disabled = true;
|
||||
document.getElementById("hamlib_rigctld_start").disabled = false;
|
||||
document.getElementById("testHamlib").disabled = true;
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue