@@ -135,6 +135,12 @@ async function get_trx() {
135135 let currentCat = { } ;
136136 currentCat . vfo = await getInfo ( 'rig.get_vfo' ) ;
137137 currentCat . mode = await getInfo ( 'rig.get_mode' ) ;
138+ currentCat . ptt = await getInfo ( 'rig.get_ptt' ) ;
139+ currentCat . power = await getInfo ( 'rig.get_power' ) ;
140+ currentCat . split = await getInfo ( 'rig.get_split' ) ;
141+ currentCat . vfoB = await getInfo ( 'rig.get_vfoB' ) ;
142+ currentCat . modeB = await getInfo ( 'rig.get_modeB' ) ;
143+
138144 $ ( "#current_trx" ) . html ( ( currentCat . vfo / ( 1000 * 1000 ) ) + " MHz / " + currentCat . mode ) ;
139145 if ( ! ( isDeepEqual ( oldCat , currentCat ) ) ) {
140146 // console.log(currentCat);
@@ -199,7 +205,24 @@ const isObject = (object) => {
199205} ;
200206
201207async function informWavelog ( CAT ) {
202- let data = { radio : "WLGate" , key : cfg . wavelog_key , radio : cfg . wavelog_radioname , frequency : ( CAT . vfo ) , mode : CAT . mode } ;
208+ let data = {
209+ radio : "WLGate" ,
210+ key : cfg . wavelog_key ,
211+ radio : cfg . wavelog_radioname ,
212+ power : CAT . power ,
213+ // ptt: CAT.ptt, // maybe later
214+ } ;
215+ if ( CAT . split == '1' ) {
216+ // data.split=true; // not implemented yet in Wavelog
217+ data . frequency = CAT . vfoB ;
218+ data . mode = CAT . modeB ;
219+ data . frequency_rx = CAT . vfo ;
220+ data . mode_rx = CAT . mode ;
221+ } else {
222+ data . frequency = CAT . vfo ;
223+ data . mode = CAT . mode ;
224+ }
225+
203226 let x = await fetch ( cfg . wavelog_url + '/api/radio' , {
204227 method : 'POST' ,
205228 rejectUnauthorized : false ,
0 commit comments