File tree Expand file tree Collapse file tree 1 file changed +12
-6
lines changed
Expand file tree Collapse file tree 1 file changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -478,23 +478,29 @@ function startserver() {
478478 res . setHeader ( 'Access-Control-Allow-Origin' , '*' ) ;
479479 res . writeHead ( 200 , { 'Content-Type' : 'text/plain' } ) ;
480480 res . end ( '' ) ;
481- let qrg = req . url . substr ( 1 ) ;
481+ let parts = req . url . substr ( 1 ) . split ( '/' ) ;
482+ let qrg = parts [ 0 ] ;
483+ let mode = parts [ 1 ] || '' ;
482484 if ( Number . isInteger ( Number . parseInt ( qrg ) ) ) {
483- settrx ( qrg ) ;
485+ settrx ( qrg , mode ) ;
484486 }
485487 } ) . listen ( 54321 ) ;
486488 } catch ( e ) {
487489 tomsg ( 'Some other Tool blocks Port 2333 or 54321. Stop it, and restart this' ) ;
488490 }
489491}
490492
491- async function settrx ( qrg ) {
493+ async function settrx ( qrg , mode = '' ) {
492494 let to = { } ;
493495 to . qrg = qrg ;
494- if ( ( to . qrg ) < 7999000 ) {
495- to . mode = 'LSB ' ;
496+ if ( mode == 'cw' ) {
497+ to . mode = 'CW ' ;
496498 } else {
497- to . mode = 'USB' ;
499+ if ( ( to . qrg ) < 7999000 ) {
500+ to . mode = 'LSB' ;
501+ } else {
502+ to . mode = 'USB' ;
503+ }
498504 }
499505 if ( defaultcfg . profiles [ defaultcfg . profile ?? 0 ] . flrig_ena ) {
500506 postData = '<?xml version="1.0"?>' ;
You can’t perform that action at this time.
0 commit comments