File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -22,6 +22,7 @@ const input_key=select("#wavelog_key");
2222const input_url = select ( "#wavelog_url" ) ;
2323
2424var oldCat = { vfo : 0 , mode : "SSB" } ;
25+ var lastCat = 0 ;
2526
2627$ ( document ) . ready ( function ( ) {
2728
@@ -179,7 +180,7 @@ async function get_trx() {
179180 currentCat . modeB = await getInfo ( 'rig.get_modeB' ) ;
180181
181182 $ ( "#current_trx" ) . html ( ( currentCat . vfo / ( 1000 * 1000 ) ) + " MHz / " + currentCat . mode ) ;
182- if ( ! ( isDeepEqual ( oldCat , currentCat ) ) ) {
183+ if ( ( ( Date . now ( ) - lastCat ) > ( 30 * 60 * 1000 ) ) || ( ! ( isDeepEqual ( oldCat , currentCat ) ) ) ) {
183184 console . log ( await informWavelog ( currentCat ) ) ;
184185 }
185186 oldCat = currentCat ;
@@ -286,6 +287,7 @@ const isObject = (object) => {
286287} ;
287288
288289async function informWavelog ( CAT ) {
290+ lastCat = Date . now ( ) ;
289291 let data = {
290292 radio : "WLGate" ,
291293 key : cfg . profiles [ active_cfg ] . wavelog_key ,
You can’t perform that action at this time.
0 commit comments