@@ -147,6 +147,13 @@ type VFO =
147147 */
148148type RadioMode = 'USB' | 'LSB' | 'FM' | 'PKTFM' | 'AM' | 'CW' | 'RTTY' | 'DIG' | string ;
149149
150+ type PassbandSelector = 'narrow' | 'wide' | 'normal' | 'nochange' | number ;
151+
152+ interface PassbandConstants {
153+ NORMAL : 0 ;
154+ NOCHANGE : - 1 ;
155+ }
156+
150157/**
151158 * Frequency range information
152159 */
@@ -604,14 +611,16 @@ declare class HamLib extends EventEmitter {
604611 /**
605612 * Set radio mode
606613 * @param mode Radio mode (such as 'USB', 'LSB', 'FM', 'PKTFM')
607- * @param bandwidth Optional bandwidth setting ('narrow', 'wide', or default)
614+ * @param bandwidth Optional bandwidth selector ('narrow', 'wide', 'normal', 'nochange') or width in Hz
608615 * @param vfo Optional VFO to set mode on ('VFOA' or 'VFOB'). If not specified, uses current VFO
609616 * @example
610617 * await rig.setMode('USB');
611618 * await rig.setMode('FM', 'narrow');
619+ * await rig.setMode('USB', 'nochange');
620+ * await rig.setMode('USB', PASSBAND.NOCHANGE);
612621 * await rig.setMode('USB', 'wide', 'VFOA');
613622 */
614- setMode ( mode : RadioMode , bandwidth ?: 'narrow' | 'wide' , vfo ?: VFO ) : Promise < number > ;
623+ setMode ( mode : RadioMode , bandwidth ?: PassbandSelector , vfo ?: VFO ) : Promise < number > ;
615624
616625 /**
617626 * Set PTT (Push-to-Talk) status
@@ -1711,8 +1720,11 @@ interface VfoInfo {
17111720declare const nodeHamlib : {
17121721 HamLib : typeof HamLib ;
17131722 Rotator : typeof Rotator ;
1723+ PASSBAND : PassbandConstants ;
17141724} ;
17151725
1726+ declare const PASSBAND : PassbandConstants ;
1727+
17161728// Export types for use elsewhere
17171729export { ConnectionInfo , ModeInfo , SupportedRigInfo , SupportedRotatorInfo , AntennaInfo , RotatorConnectionInfo ,
17181730 RotatorPosition , RotatorStatus , RotatorDirection , RotatorResetType , RotatorCaps , VFO , RadioMode , MemoryChannelData ,
@@ -1722,7 +1734,7 @@ export { ConnectionInfo, ModeInfo, SupportedRigInfo, SupportedRotatorInfo, Anten
17221734 HamlibConfigFieldType , HamlibConfigFieldDescriptor , HamlibPortType , HamlibPortCaps ,
17231735 SpectrumScopeInfo , SpectrumModeInfo , SpectrumAverageModeInfo , SpectrumLine ,
17241736 SpectrumCapabilities , SpectrumSupportSummary , SpectrumConfig , SpectrumDisplayState ,
1725- ClockInfo , VfoInfo , HamLib , Rotator } ;
1737+ ClockInfo , VfoInfo , PassbandSelector , PassbandConstants , HamLib , Rotator , PASSBAND } ;
17261738
17271739// Support both CommonJS and ES module exports
17281740// @ts -ignore
0 commit comments