Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion renderer.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ const input_key=select("#wavelog_key");
const input_url=select("#wavelog_url");

var oldCat={ vfo: 0, mode: "SSB" };
var lastCat=0;

$(document).ready(function() {

Expand Down Expand Up @@ -179,7 +180,7 @@ async function get_trx() {
currentCat.modeB=await getInfo('rig.get_modeB');

$("#current_trx").html((currentCat.vfo/(1000*1000))+" MHz / "+currentCat.mode);
if (!(isDeepEqual(oldCat,currentCat))) {
if (((Date.now()-lastCat) > (30*60*1000)) || (!(isDeepEqual(oldCat,currentCat)))) {
console.log(await informWavelog(currentCat));
}
oldCat=currentCat;
Expand Down Expand Up @@ -286,6 +287,7 @@ const isObject = (object) => {
};

async function informWavelog(CAT) {
lastCat=Date.now();
let data = {
radio: "WLGate",
key: cfg.profiles[active_cfg].wavelog_key,
Expand Down