flrig-1.3.24/0000755000175000017500000000000012650266613007714 500000000000000flrig-1.3.24/ChangeLog0000644000175000017500000005062612650265605011417 00000000000000 =Version 1.3.24= 2016-01-16 David Freese 29f82e6: K3 KX3 mods c1645f0: xmlserver update 69ae54a: FTdx9000 295ed35: FT5000 update 754ba24: FTdx3000 update e5429b9: RIG ENUMERATION 976d2df: FT991 1d29d8a: TS2000 7cb8293: FT900 f511fd9: IC7100 data mode detect =Version 1.3.23= 424c33b: FT817 FT857D FT897D 86cc66f: xmlrpc server b4bd89b: FT900 b6303c1: TS590SG 76d12b0: MXE update 47d053c: FT990a cd39b31: Set Mode/BW controls f5da410: restore xml client 9d994e6: KENWOOD mods 7d4054f: IC7800 7c41ac6: fldigi BW interface 2015-06-08 Kamal Mostafa 74450a4: BUILD_{DATE,USER,HOST} =Version 1.3.22= 2015-04-17 David Freese f7f87cb: xmlrpcpp 48a04fb: xml server e6b132d: K3/KX3 bandwidth =Version 1.3.21= b02f095: KX3 45dc545: K3 update 1f086c2: FSF address =Version 1.3.20= 399b37b: TT550 update 6739d81: fix ab ad9bc7e: Rig server 3bdebb6: no xmlrpc_c io 179392e: ts2000 update 418fe19: FT950 962b96c: xmlrpc timing =Version 1.3.19= 08b5c44: xmlrpc error handling 4aad930: Kenwood transceivers f8f01c8: TS450S d759736: Transceiver timeout b21600f: Scripts 998fe5d: Yaesu ef3ee28: Kenwood 967734b: TS870S =Version 1.3.18= cb03871: fltk 1.3.3 d488690: TS2000 83691fc: Docs b85fbff: subdir objects 696b824: FT950 Osc adjust ed5a6ea: FT100D bc3fd65: File versus Files =Version 1.3.17= b5721aa: Documentation update 506125a: FT450D Notch 1d38b34: IC-9100 update c634a85: Power meter remote c678b79: Smeter remote 9f8aeca: touch panel da7068a: xml-fix f25bd7c: FT450D 1cf4388: Freq Control e94924e: IC 7410 2014-06-12 Robert Stiles 4bf4a58: doxygen documentation =Version 1.3.16= 2014-06-06 David Freese ca9bbce: Socket i/o 0e8e450: FTdx1200 mode 2014-06-04 Kamal Mostafa 67286b3: RTS/DTR restore 2014-05-31 David Freese cce02f3: wait_char e93a4fb: virtual-tty-port 41a0e82: update build scripts a244acf: rig home dir 4e751e2: Dir reorg fabad10: FL_APPS folder f3a91fc: TT599 2014-03-28 Arvo Järve b37ce11: FT847 2014-03-26 David Freese f7e0959: TT550 split 1791191: Disable meter averaging ac55457: ic7000 again e9d7a8e: ComboBox/ListBox cfa02f2: IC756 45efe8a: License Declaration =Version 1.3.15= 3422195: 64 bit void pointer fa317c3: tty search 7732b22: TT566 6964cb6: TS590S/TS990S/TS2000 controls 5b340a9: FTdx1200 e199a62: Send cmd debug 718f46f: TS-990 05898d5: Sliders c13a20e: Notch controls 86f1d0b: 7600 split 9f08704: Restore debug =Version 1.3.14= 7f0b9b7: IC7100 mods 9b1c856: Restore read_bandwidth d592682: Default event log level 224cde7: vfprintf bug on 64 bit Linux systems =Version 1.3.13= a8b451f: default debug level f8b1bf7: Compile cleanup 8ccb54e: Debug level switch 34530b1: TS590S init ff26de5: IC7100 0016960: FTdx3000 86dc11b: FT5000 c53c0a8: MXE build 899e226: TT588 VfoB =Version 1.3.12= a50060b: Build bin 79aa597: FT-990 3c88685: Serial by-id c6e9748: FT950 f04eed9: TS870 split =Version 1.3.11= 6aae7e6: fltk m4 script =Version 1.3.10= 5d5e739: X11 Package check a6d99d4: FT747GX 2012-12-07 Michael Corbin 42a12bb: PCR1000 =Version 1.3.09= 2012-12-03 Dave Freese (none) de5c622: TS480 data port 2012-10-27 David Freese d0e137b: NBEMSapps folder d76049e: IC746Pro NR/Split 77bf112: Combo box update =Version 1.3.08= d7a3b46: IC7600 bw tables =Version 1.3.07= 426c50d: IC746/756 family 46b114d: IC9100 50351e5: IC735 update =Version 1.3.06= 1305004: PCR1000 =Version 1.3.05= b6a1cdb: FT450 - TS570 =Version 1.3.04= 71f1a09: PCR1000 ec35a89: TS570 series =Version 1.3.03= 2012-06-04 Terry Embry c68f48f: Polling loop fixes 2012-06-04 David Freese a2de5bf: Font Initialization =Version 1.3.02= 2012-05-31 Brian Miezejewski K5HFI 11ad48f: PCR1000 2012-05-31 Terry Embry f5cd783: FT950 Band Select 2012-05-07 David Freese 6e5c31d: Kenwood transceivers =Version 1.3.01= 8aae5bc: Xcvr setup d9a461b: FT950 pkt bandwidth 2012-05-02 Terry Embry 9bd9f5e: FT950/xml_io 2012-05-01 David Freese 5df2691: FT950 PKT_U/PKT_L e22066c: Kenwood DSP Hi/Lo e654106: XMLRPC post to Que e6ce673: FT950 defaults d474e82: A/B bypass serial loop 54ce87c: TS590S d72e2b9: SWAP A/B 2012-04-19 Terry Embry d408b05: IC7000 compression 2012-04-19 David Freese b1c794e: FreqControl 2012-04-19 Terry Embry 704aa65: FT950 compression c58ba5d: FT950 external tuner 2012-04-16 David Freese e8363f2: New User Interface 2f894b8: BW control color =Version 1.1.13= 20fa614: TT516 2012-04-11 Terry Embry 1069bf5: FT950 2012-04-06 David Freese 7169864: VFO paste 2012-04-06 Terry Embry 3b465e5: FT950 VFO switch 2012-04-01 David Freese feecd1b: FT950 60m offset c0d355e: FT960 60m selector 2012-04-01 Terry Embry 15f2c60: FT950 60 meter 2012-04-01 Andy Hart ad0e023: IC7600 =Version 1.2.12= 2012-03-26 Dave (G8KBV) 592e08d: TS870S 2012-03-25 David Freese e772a4d: xml_io 64 bit compiler =Version 1.2.11= 3c715ec: Fix fldigi compatibility =Version 1.2.10= 6c8e520: FT950 ALC 2012-03-23 Terry Embry 2f280d1: FT950 2012-03-21 David Freese c47dd35: IC718 9ce61a6: XML notch 2012-03-14 Terry Embry fd977ac: FT950/5000 2012-03-07 David Freese d0f6679: FT950 PKT bandwidth a308e49: TT588 mods 2012-03-06 Terry Embry 73b0aaa: Code cleanup 2012-03-05 David Freese 830ad59: TT599 split b7bdaf7: FT100 split 7c68269: TS 480/590S/2000 Split Vfo 344641d: Xmlrpc reset 17f61fd: Win32 bottom bar 245584d: TS-870 fix to rig numbering 171e3f9: BW control update 2012-02-25 Terry Embry 4be7250: Read Mode 2012-02-24 David Freese fa1cbee: TS2000 split query 2012-02-23 Terry Embry 4debc06: serviceAB2 2012-02-23 David Freese 35d23c6: TS870 519f3af: TS590S split 29a13fc: FT950 bandwidths 2012-02-22 Terry Embry 610803e: Service A/B 2012-02-22 David Freese 87c3f70: TS2000 split 2012-02-20 Terry Embry 6599ae2: Freq List Alpha Tag - About Change =Version 1.2.9= 2012-02-20 David Freese 0b5bbba: Freq list alpha tag 808e864: TS2000 Noise Blanker 2012-02-18 Terry Embry 758be7a: FT950 PKT/FM Bandwidths 2012-02-17 David Freese 6c3259a: TS2000 SL/SH 2012-02-17 Terry Embry ad07190: Rigbase value initialization =Version 1.2.8= d6c88cc: Service A/B 2721d1d: On line test 2012-02-16 David Freese 3fb4a06: Disabled control bug af5641a: Debug Level 2012-02-13 Terry Embry 80712bc: Saved BW =Version 1.2.7= db19ce7: FT2000 mic input fbd12d2: FT950 60m 10d4a62: FT950 mods db3f77b: FT450 mods 5e4f4a5: Band select 2012-02-01 David Freese 4359fb0: FT950 controls 5498d45: Redraw fault bc94a32: FLTK version 1013a74: FT950 / FT450 mods d26af58: TT588 update 3169bfe: Debug revision 2012-01-03 Terry Embry 9664223: FT950 defaults 2012-01-03 David Freese 4209922: Desktop generic name =Version 1.2.6= 8e2982b: Lstep for timing controls 2012-01-02 Terry Embry 2d92636: FT950 fixes c75cebf: Init notch from xcvr 21bc472: Xcvr auto-on-off 2011-12-29 David Freese 3aff859: FLTK-1.3 mods 2011-12-29 Terry Embry eb7262a: Poll frequency 2011-12-29 David Freese 17c0ed7: IC703 - corrections 706b6c0: IC7600 additions 55a4f58: IC703 controls eee8a62: Power meter scales =Version 1.2.5= e8402b8: Polling intervals 2011-12-20 Terry Embry 6d40a12: FT950 Noise reduction e4b8c48: FT450 Noise Reduction 2011-12-19 David Freese ef680de: Extras Tabs 1f91ddd: Meter dialog 2011-12-19 Terry Embry 36d5fb5: FT450/950/2000/5000 a04ea4d: Volume mute d35a878: Bandchange race fix =Version 1.2.4= 2843ca7: FT950 Mic Gain 25a229c: FT5000 mods 48a2dfb: FT-450 CW controls 2011-12-16 David Freese 13b7e4f: Slider size 2011-12-16 Terry Embry df51d9c: FT950 2011-12-16 Terry Embry (KJ4EED) 1533a56: Send Command exclusive 2011-12-16 David Freese d970cf3: Meter filters a897030: FT950 BW 9ebc94b: Meter mods 54f6b16: FT1000MP meter scales 20f66e2: Hide controls ddf83b1: BAND selector 2011-12-06 Terry Embry af88aa1: FT950 corrections 2011-12-06 David Freese 45997d9: Vox On Dataport 8bddd77: Pwr Metering =Version 1.2.3= 9b03699: UI minimize 8538d05: TS480 =Version 1.2.2= b3ae963: TS590S =Version 1.2.1= b8efca5: TS590 SH/SL/IS mod efad166: TS590S sh/sl 1d06f83: key fldigi 65f3fbd: FT5000 364c5f8: TS480 center/width 5c173d5: TS480 fixes d0b764e: TS480 DataPort select a5bada1: TS480 Mic/RF/Shift 78434b3: TS590/480 series 06766bf: TS480 menu_045 93aefad: IC703 6a1f7e3: TS480 metering 627beb6: Volume restore 45696b3: IC7000 read notch 4fccae4: K2 smeter/pout aab7579: K2 split =Version 1.2.0= 9d02acf: K2 get split 29953d7: K2 ptt/vfo-select 12942c5: K2 low/high power 9114a67: TS2000 swr/po d7d549c: FT950 manual notch 5367c5d: TS2000 set volume 66cbe4b: TS2000 queries, AM 431ca8f: TS2000 defaults f082550: Deprecate d3572dc 654f07f: FT950 Manual Notch d3572dc: TS2000 BC string 2270d84: T2000 MBC ccbe938: TS590S SL/SH/FW corrections a971b72: K3 power control 27bf270: FT950 manual notch f098dc3: TS2000 fixes e21d24f: TS480 series ff95d7f: TS590S 455e650: TS480 series 8913e9e: TS2000 93d08c6: DSP lo/hi cut controls 66b3b13: FT450 Notch 7a6b96d: FT950 Manual Notch dc28189: TS480 HX/SAT e77ff21: K3 power control query aaedcf8: Copyright 51310a9: K2 A/B 2011-06-10 Rich Newsom 9551b86: FT857D meters 2011-06-09 David Freese 7253b0b: FT450/950 0ada8a5: TT588 RADIO/REMOTE 22507e2: FT950 bandwidth 8d70315: IC7xxx xcvrs 46c3fd1: FT450 extras 9d550ba: FT847 read freq/mode 41b1251: FT950 extra controls b09df7f: Serial Port Discovery 7365f30: FT950 AF/RF dff9047: FT950 split 869dedb: rig_io DEBUG ee2ec21: Variable polling e4f8155: FT847 6e98ae0: K3 PTT 2426653: FT950 update cc0d347: Debug mods 8c0e996: FT857/897 6a9f177: Xcvr Extras 33ed8c3: IC746/756 PRO series a8dddc8: TT550 controls 1b82bc3: Queue mutex 57e08ce: TT550 initialization 95d455c: Xml queue 2e02a2f: User interface 80e7dda: waitN 4c239f4: TT550 start up df5c74f: FT100D 6d3cff3: A/B button initialize 29340a5: Poll frequency 0ac0323: IC746PRO 0046e10: FT100D parse info b07e66f: DTR/RTS PTT e44a2d4: FT950 update 2925b80: Connect indicators 56daafa: K3 rfgain limits 8c30bdb: FT100D 1f23cf3: TT588 get data eb1c5d2: K3 Fine tune test ccd8d0d: TT588 two vfos e143e58: FT100D get info 15690a5: XMLRPC address/port ccabe29: ICbase WARN c7dd9b4: K3 if-shift / mic gain 78fc39d: TS570 duplicate statement 3fb4cf7: Initialize Notch/IF_shift 3c6bfc3: FT950 update 654171a: TT588 Orion-II 4b9f92f: TT566 update a3a2618: FT100D update a7c16ec: TT588 update 9ae9a2a: IC756PRO3 split 974d78c: FT100D bug fix b1c536e: TT588 if shift range e143828: K3 read options a47b892: IC7000 aa77fff: IC756PRO3 284a765: Memory List 27eb3d1: TT588 additions d51a394: PTT for Voice 60bad67: TS480HX events 00bd636: IC706MKIIG set mode/bandwidth d3c9e8e: IC7000 bug fixes 5fae473: FT100D event levels befcb95: Polling bug e4c0edf: TT550 events bf34ec1: IC756 A2B 90a32a6: K3 revert 2a68d6f: IC718 split a8fdef6: IC7000 missing controls 32f3154: IC756 Series 7c52305: Yaeusu series d5a3a0a: IC series 9fb9fe8: K3 command query b4f2298: K3 OM fix f003d7d: K3 alt_vfo 5958e0c: TT550 A/B a695ac3: IC7000 erroneous code bug ba79896: TT550 control panel a70a812: TS570 IF shift 78253b3: IC746PRO 807ad16: K3 controls bf04b82: Debugging 67240d9: Alt Vfo Adjust 8a7e582: K3 delayed response 755a91f: FT920 c5be00b: IC746 series bbd87b7: Xcvr DEAD 344433a: Poll split 50b8101: K3 get split cb6c3e5: KENWOOD split 109c911: K3 initialization 3b39099: TS450S vfoB 5c75da9: TS590s showresp e97c2a6: IC7000 notch calibration 02d1ed5: Icom Notch conversion e15db3c: TS590S vol control 4581863: Split 68f35a1: IC7200 mic gain 66f3cb4: TT599 shutdown 8d79846: TS570 metering 8186404: IC7000 Notch/IF shift cbce8e9: Control polling 3fec974: TT599 get power 1c3053a: TS570 bug fixes 00ef8a5: IC7000 bug fixes bdfcca0: Get power control 63277a4: ICOM response bb40e21: TT599 Pwr-Swr 0323877: Freq List 78e7760: IC718 dfa146b: FT920 980ad5e: IC7000 bug fix 4a74378: IC xcvr family 7f2ae93: IC7000 4406d39: TT599 2011-04-24 David Kjellquist e1748e5: TS570 2011-04-23 David Freese 170a5a7: Polling abf4489: TS480HX d77da92: IC7000 361e437: IC7200 5b2e35e: IC718 57ace2f: IC7000 3ddd26d: Event Log bc487a9: K3 split a2dcfe8: IC7200 metering baf9fea: Keep - Restore ad5116a: K3 bandwidth control ab17344: Color Dialog 3221cdb: A-B Select force display value 10e4b23: Compile Warning bd5755f: K3 0f22450: Select A/B fd99d18: Select A/B b11057e: RAY152 c7dff8d: TS480HX/SAT 29f6884: IC7200 44566d0: K3 35ec168: FT857D s-meter 26d8185: TS480XH power control 70bd622: TT588 RF gain 9df14fb: Serial Stream Parsing 68ac858: Colors-Scheme 2fbec07: TT599 927db3d: TS2000 1361905: TT538 code clean up 7e55bda: System colors 65dc4b1: Meter colors f9204b6: TT588 5ff58ac: TT550 Auto Notch ef7b1ce: TT550 smeter =Version 1.1.3= 7fad31f: IC7200 Vfo B adfb091: TT550 0c7b089: IC7600 RTTY fault 71649a4: Adjust bandwidth ffd29d7: IC7200 7600 TT550 c0c3821: FT100D ABA init c38b844: TS590S s/pwr meter =Version 1.1.2= b54df4a: TS480HX/SAT update 3444ca3: TT550 noise reduction 4465b45: Meters / Colors 4c5b946: Serial thread timing 95ca6ce: TS590S smeter =Version 1.1.1= 145649f: TS590S update =Version 1.1.0= 8258086: TT550 update 0a5bdc1: TT538 vfob 2c5ade4: TS590S vfo read-write 2b915d6: TT550 remote ef29ed7: A-B startup race 7e07540: TT550 keypad 95d95bc: FT847 bcab820: TS590 ptt 493b695: TS2000 update 277941b: FT1000MP Tuner 6abfdd2: TS570 compile error 25946ef: IC7000 auto notch b4708a3: FT100D d814bc8: FT1000MP def bw 5f1fbcd: IC series split 4d20762: Default BW c53afce: IC7600 A/B mods c541e1a: FT1000MP swr/alc 6abdb0c: RAY 152 smeter 21b2310: FT1000MP power scale bb21b62: IC7600 update c01be68: FT1000MP Bandwidth b1fe8c6: Button A/B 268f4fb: ICOM select race 867f0d0: RAY152 - vfo =Version 1.0.1.1= 80633b6: FT1000MP vfo precision 78c3697: TT516 update beaff06: Raytheon 152 de3bebd: TS590S fbf17df: FT1000MP mods 7432862: IC746 family =Version 1.0.1= f960a7d: TT599 cleanup 2011-01-31 Terry Embry, KJ4EED d33ef33: FT950 update 2011-01-26 David Freese d3a2af4: Que management ae0347b: IC7600 IC746 FT450 9cb6b9d: Orion-II smeter d2a5697: Eagle CWU-smeter e78c7fb: Orion-II Smeter 0f1eea4: Exception handling c10115c: TS450S init 01d6148: Orion-II 72b812d: Eagle split 55d653b: Eagle-Orion-II ff67b97: Eagle-Orion getBW fix a9ab74c: Home Dir 346c3c0: ft450 tests 04c86fd: Que processing 43e4ead: 64 bit recast 535ba2f: TT566-TT599 correction 61b6eba: Orion-II TT566 997229c: TT599-Eagle e3a3124: TT 535 Delta-II 9ef17a0: TT516 dual vfo 397984a: A B vfo select ffebee9: IC706 mode type 8a07b42: IC7200 digi mode 4e7d1f3: H/W PTT control 4022e57: ICOM dual vfo 4ec4702: Parse Args 92d90b9: Dual VFO mod 61ea3d2: VFO A-B 3d64fc0: K2 Update 68ae4e4: Rig Ordering 699c420: IC703 626d3b0: Config Dir c1027a8: TS480 HX/SAT 9b8479b: Combo Widget bc9b4c3: TS480 HX/SAT 054e92a: TS450 update 2010-07-30 Frank Tomesh, AB2ZO f1a4670: IC703 seg fault fix 2010-07-17 David Freese 6e82fef: Echo suppression d57238d: IC703 bug fixes 9a6e9c4: IC703-CIV 1d5dc71: IC7200 update 7b3adae: IC718 update 7cacc8a: TT550 Auto Tuner 6654181: RTS-DTR ptt 8091162: TT-538 Po/SWR 66f7861: Menu update b567f0f: Restore Xcvr a58d4f6: FT817 mods eda4e7e: Fluid source 8654ddb: Read Stream 2010-04-30 Jason Turning, N6WBL 2594d0a: IC718 Auto Notch 2010-04-29 David Freese b97848d: ICgeneric split 500628b: IC703 Compression 739a7b4: IC703 / TS450S 2010-04-29 Jason Turning, N6WBL 32492ac: IC718 additions 2010-04-27 David Freese 3f5e11e: IC718 rf gain 52f8e17: Added rigpanel.fl 04ef71f: IC7200 Data mode cf066d3: IC718 corrections 5df3c55: ICOM update b0b0afc: Freq Control Widget 9d9864b: IC7200 changes 195fcd9: IC718 526150b: K3 mode a2a004d: IC7200 70f138e: K3 bug fixes 8ff9611: Build static distribution 90250ee: K3 mods 3f7ac25: Exec during config 5c111de: SWR enable b36ef3c: Power - 7600 2010-04-13 Andrew Hart, VE3NVK 96005f5: IC7600 update 2010-03-29 David Freese 3fbeee1: FT1000 series fa215e2: OS X serial device e2a1ff0: FT1000 FT1000MV update fe2bc28: TT550 AM mod 8079933: DLL dependency 462bc39: IC7000 mods e087a07: TT550 bug fixes 713b0a7: TT-538 gain table c324e27: IC746 / Pro Disassociation 37f9660: FT1000MV 018b344: FT1000 5c232a5: FT450 Volume range e53f04c: FT2000 debug strings a59c478: TS2000 Mic Gain b240047: IC-746 BW 20c3253: Split Operation 5b17be2: TT-550 update f8b355b: K2 serial baud rate 8ee433c: Pegasus TT550 mic gain 2792b74: On Line Help link 3c372e6: Omni-VII TT588 568ff59: Jupiter-TT538 update ae6a40a: TS570 update ae2ccbd: FT450 update 5a807ed: Jupiter update 800af3a: Jupiter-TT538 update ecbe0a5: TT550 Vfo Adjust c018a65: TT550 new mode 4d56b12: XMLRPC sync delay 881c3ed: OS X missing include f7dbe5d: WIN32 build fix 61f1e71: Status File Change 1329194: Serial Port Discovery 3373096: TT-570 update 8a0f254: TT-538 update 2010-02-04 André - M0JEK 9f0d0bc: OS X exit on start 2010-02-04 Chris Sylvain ee6911a: TS-570 S-meter scale adjusted 4341cab: Add initial Kenwood TS-570 support 35e8af5: Use modulo arithmetic on loopcount in serial loop c581acc: TS570 bandwidth control and basic metering 2010-01-17 David Freese 4e275fe: Use defaults fix 658c462: TS2000 fix d517094: Use rig data 1b13be1: TT550 noise blanker addition 02a6077: TT538 / TT550 additional controls edc73ce: TT538 / TT550 8ecf733: FT450 Preamp Read 5ff0ca1: TT550 work c9a9206: Jupiter-Pegasus DTR line ca14ecd: FT767 transceiver 88db85e: XML_IO Race Condition 8b336f5: FT100D fix 98fc2e9: XMLRPC mod 681d3ca: Mode-Bandwidth Annunciation bdbc63a: FT-857D update =Version 0.9.98= 84f04dd: FT-857D get_mode correction =Version 0.9.97= 2a4f12a: Socket not available checks =Version 0.9.96= 8017748: Improve transceiver response 848b980: Exception handler =Version 0.9.95= 2009-12-05 Stelios Bounanos 40c3797: Use XML-RPC 2009-12-01 David Freese ab5c7e5: Thread conflict fix f0acfb4: Socket allocation a5f326a: Mem Leak Fix =Version 0.9.94= 0b301f0: FT857D mod b5ef8e3: Window Decoration 09ec7ef: OSX Build mods =Version 0.9.93= 2009-11-27 Stelios Bounanos 0a75d3d: Disable win32 snprintf workaround =Version 0.9.92= 2009-11-26 David Freese e126caa: No Curl Mod =Version 0.9.91= f902afc: Dependencies bd30e7a: Build fixes 2009-11-23 Stelios Bounanos 59a7b99: Fix OS X compilation 7cb8e32: Fix resource include 818bb9d: Add pthreads-w32 build flags =Version 0.9.9= flrig-1.3.24/Makefile.am0000644000175000017500000000032612562731644011674 00000000000000ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src if DARWIN appbundle: (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) endif if HAVE_NSIS nsisinst: (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) endif #EXTRA_DIST = build-aux/config.rpath flrig-1.3.24/configure.ac0000644000175000017500000000763412650265543012135 00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. # Generic support for FLTK applications AC_COPYRIGHT([Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com)]) AC_PREREQ([2.63]) dnl major and minor must be integers; patch may dnl contain other characters or be empty m4_define(FLRIG_MAJOR, [1]) m4_define(FLRIG_MINOR, [3]) m4_define(FLRIG_PATCH, [.24]) AC_INIT([FLRIG], FLRIG_MAJOR.FLRIG_MINOR[]FLRIG_PATCH, [w1hkj AT w1hkj DOT com]) AC_SUBST([FLRIG_VERSION_MAJOR], [FLRIG_MAJOR]) AC_SUBST([FLRIG_VERSION_MINOR], [FLRIG_MINOR]) AC_SUBST([FLRIG_VERSION_PATCH], [FLRIG_PATCH]) AC_SUBST([FLRIG_VERSION], [FLRIG_MAJOR.FLRIG_MINOR[]FLRIG_PATCH]) AC_DEFINE([FLRIG_VERSION_MAJOR], [FLRIG_MAJOR], [major version number]) AC_DEFINE([FLRIG_VERSION_MINOR], [FLRIG_MINOR], [minor version number]) AC_DEFINE([FLRIG_VERSION_PATCH], ["FLRIG_PATCH"], [patch/alpha version string]) AC_DEFINE([FLRIG_VERSION], ["FLRIG_MAJOR.FLRIG_MINOR[]FLRIG_PATCH"], [version string]) AC_SUBST([AC_CONFIG_ARGS], [$ac_configure_args]) AC_CONFIG_AUX_DIR([build-aux]) # define build, build_cpu, build_vendor, build_os AC_CANONICAL_BUILD # define host, host_cpu, host_vendor, host_os AC_CANONICAL_HOST # define target, target_cpu, target_vendor, target_os AC_CANONICAL_TARGET AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign std-options subdir-objects 1.9.6]) #change the next config item for the specific application src's AC_CONFIG_SRCDIR([src/main.cxx]) AC_CONFIG_HEADERS([src/config.h]) AC_CONFIG_MACRO_DIR([m4]) # Checks for programs. AC_PROG_CXX AC_PROG_CC AC_USE_SYSTEM_EXTENSIONS # Checks for libraries. # Checks for header files. AC_CHECK_HEADERS([stdlib.h string.h]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_TYPE_SIZE_T # Checks for library functions. AC_CHECK_FUNCS([getaddrinfo gethostbyname hstrerror gmtime_r localtime_r memmove memset mkdir select setenv snprintf socket socketpair strcasecmp strcasestr strchr strdup strerror strlcpy strncasecmp strrchr strstr strtol uname unsetenv vsnprintf]) ### static flag # Set ac_cv_static to yes/no # Substitute RTLIB in Makefile AC_FL_STATIC ### optimizations # Set ac_cv_opt to arg # Substitute OPT_FLAGS in Makefile AC_FL_OPT ### debug flag # Set ac_cv_debug to yes/no # Override CXXFLAGS # Set ENABLE_DEBUG Makefile conditional # Substitute RDYNAMIC in Makefile AC_FL_DEBUG ###### OS support ### OSX # Set ac_cv_mac_universal to yes/no # Set DARWIN Makefile conditional # Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile AC_FL_MACOSX ### win32 # Set WIN32 Makefile conditional # Set HAVE_WINDRES Makefile conditional # Substitute WINDRES in Makefile AC_FL_WIN32 ### Non-POSIX compatibility (i.e. mingw32) # Sets various Makefile conditionals; see m4/np-compat.m4 AC_FLRIG_NP_COMPAT ### FLTK # Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile # Set FLUID variable # Set HAVE_FLUID Makefile conditional AC_CHECK_FLTK ### X11 # Set ac_cv_x to yes/no # Define USE_X in config.h # Substitute X_CFLAGS and X_LIBS in Makefile if test "x$target_darwin" = "xno" && test "x$target_win32" = "xno"; then AC_FLRIG_PKG_CHECK([x], [x11], [no], [yes]) fi ### libflxmlrpc # Set ac_cv_flxmlrpc to yes/no # Define USE_FLXMLRPC in config.h # Substitute FLXMLRPC_CFLAGS and FLXMLRPC_LIBS in Makefile AC_FLRIG_PKG_CHECK([flxmlrpc], [flxmlrpc >= 0.1.0], [yes], [yes], [use external flxmlrpc library @<:@autodetect@:>@], [ENABLE_FLXMLRPC]) ### build info # Define various build variables in config.h AC_FLRIG_BUILD_INFO AC_CONFIG_FILES([Makefile src/Makefile]) AC_OUTPUT ### summary AC_MSG_RESULT([ Configuration summary: Version ..................... $VERSION Target OS ................... $target_os Have flxmlrpc library ....... $ac_cv_flxmlrpc Static linking .............. $ac_cv_static CPU optimizations ........... $ac_cv_opt Debugging ................... $ac_cv_debug ]) flrig-1.3.24/README0000644000175000017500000000120412562731646010516 00000000000000Flrig is a transceiver control program for Amateur Radio use. It does not use any 3rd party transceiver control libraries. It is a c++ pro- gram that encapsulates each transceiver in it's own class. Where ever possible the transceiver class(s) use polymorphism to reuse code that is portable across a series of transceivers. The latest version can always be found at: http://www.w1hkj.com/ Join the linuxham, NBEMSham or win-fldigi Yahoo group for support, news and updates on W1HKJ software: http://groups.yahoo.com/group/linuxham/join http://groups.yahoo.com/group/NBEMSham/join http://groups.yahoo.com/group/win-fldigi/join flrig-1.3.24/aclocal.m40000644000175000017500000013534712650265654011515 00000000000000# generated automatically by aclocal 1.14.1 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.14' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.14.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.14.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([m4/build.m4]) m4_include([m4/debug.m4]) m4_include([m4/fltk.m4]) m4_include([m4/funcs.m4]) m4_include([m4/macosx.m4]) m4_include([m4/np-compat.m4]) m4_include([m4/opt.m4]) m4_include([m4/pkg-config.m4]) m4_include([m4/static.m4]) m4_include([m4/win32.m4]) flrig-1.3.24/COPYING0000644000175000017500000004313312562731644010676 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. flrig-1.3.24/src/0000755000175000017500000000000012650266613010503 500000000000000flrig-1.3.24/src/xmlrpcpp/0000755000175000017500000000000012650266613012350 500000000000000flrig-1.3.24/src/xmlrpcpp/XmlRpcMutex.cpp0000644000175000017500000000342412562731652015231 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #if defined(XMLRPC_THREADS) #include #include "XmlRpcMutex.h" #if defined(_WINDOWS) # define WIN32_LEAN_AND_MEAN # include #else # include #endif using namespace XmlRpc; //! Destructor. XmlRpcMutex::~XmlRpcMutex() { if (_pMutex) { #if defined(_WINDOWS) ::CloseHandle((HANDLE)_pMutex); #else ::pthread_mutex_destroy((pthread_mutex_t*)_pMutex); delete _pMutex; #endif _pMutex = 0; } } //! Wait for the mutex to be available and then acquire the lock. void XmlRpcMutex::acquire() { #if defined(_WINDOWS) if ( ! _pMutex) _pMutex = ::CreateMutex(0, TRUE, 0); else ::WaitForSingleObject(_pMutex, INFINITE); #else if ( ! _pMutex) { _pMutex = new pthread_mutex_t; ::pthread_mutex_init((pthread_mutex_t*)_pMutex, 0); } ::pthread_mutex_lock((pthread_mutex_t*)_pMutex); #endif } //! Release the mutex. void XmlRpcMutex::release() { if (_pMutex) #if defined(_WINDOWS) ::ReleaseMutex(_pMutex); #else ::pthread_mutex_unlock((pthread_mutex_t*)_pMutex); #endif } #endif // XMLRPC_THREADS flrig-1.3.24/src/xmlrpcpp/XmlRpcSource.h0000644000175000017500000000642212562731652015035 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCSOURCE_H_ #define _XMLRPCSOURCE_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include "XmlRpcSocket.h" namespace XmlRpc { //! Proxy for Ssl data to avoid including headers here. struct SslProxy; //! An RPC source represents a file descriptor to monitor class XmlRpcSource { public: //! Constructor //! @param fd The socket file descriptor to monitor. //! @param deleteOnClose If true, the object deletes itself when close is called. XmlRpcSource(XmlRpcSocket::Socket fd = XmlRpcSocket::Invalid, bool deleteOnClose = false); //! Destructor virtual ~XmlRpcSource(); //! Return the file descriptor being monitored. XmlRpcSocket::Socket getfd() const { return _fd; } //! Specify the file descriptor to monitor. void setfd(XmlRpcSocket::Socket fd) { _fd = fd; } //! Return whether the file descriptor should be kept open if it is no longer monitored. bool getKeepOpen() const { return _keepOpen; } //! Specify whether the file descriptor should be kept open if it is no longer monitored. void setKeepOpen(bool b=true) { _keepOpen = b; } //! Return whether ssl is enabled. bool getSslEnabled() const { return _sslEnabled; } //! Specify whether to enable ssl. Use getSslEnabled() to verify that Ssl is available. void setSslEnabled(bool b=true); //! Close the owned fd. If deleteOnClose was specified at construction, the object is deleted. virtual void close(); //! Return true to continue monitoring this source virtual unsigned handleEvent(unsigned eventType) = 0; protected: // Execution processing helpers virtual bool doConnect(); //! Read text from the source. Returns false on error. bool nbRead(std::string& s, bool *eof); //! Write text to the source. Returns false on error. bool nbWrite(std::string const& s, int *bytesSoFar); private: // Socket. This is an int for linux/unix, and unsigned on win32, and unsigned __int64 on win64. // Casting to int/long/unsigned on win64 is a bad idea. XmlRpcSocket::Socket _fd; // In the server, a new source (XmlRpcServerConnection) is created // for each connected client. When each connection is closed, the // corresponding source object is deleted. bool _deleteOnClose; // In the client, keep connections open if you intend to make multiple calls. bool _keepOpen; // Enable use of SSL bool _sslEnabled; // SSL data SslProxy *_ssl; }; } // namespace XmlRpc #endif //_XMLRPCSOURCE_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcServerMethod.cpp0000644000175000017500000000216212562731652016534 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcServerMethod.h" #include "XmlRpcServer.h" namespace XmlRpc { XmlRpcServerMethod::XmlRpcServerMethod(std::string const& name, XmlRpcServer* server) { _name = name; _server = server; if (_server) _server->addMethod(this); } XmlRpcServerMethod::~XmlRpcServerMethod() { if (_server) _server->removeMethod(this); } } // namespace XmlRpc flrig-1.3.24/src/xmlrpcpp/XmlRpcServerConnection.cpp0000644000175000017500000001575312562731652017425 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcServerConnection.h" #include "XmlRpcDispatch.h" #include "XmlRpcServer.h" #include "XmlRpcSocket.h" #include "XmlRpcUtil.h" #include #include #include #include using namespace XmlRpc; // The server delegates handling client requests to a serverConnection object. XmlRpcServerConnection::XmlRpcServerConnection(XmlRpcSocket::Socket fd, XmlRpcServer* server, bool deleteOnClose /*= false*/) : XmlRpcSource(fd, deleteOnClose) { XmlRpcUtil::log(2,"XmlRpcServerConnection: new socket %d.", fd); _server = server; _connectionState = READ_HEADER; _keepAlive = true; } XmlRpcServerConnection::~XmlRpcServerConnection() { XmlRpcUtil::log(4,"XmlRpcServerConnection dtor."); _server->removeConnection(this); } // Handle input on the server socket by accepting the connection // and reading the rpc request. Return true to continue to monitor // the socket for events, false to remove it from the dispatcher. unsigned XmlRpcServerConnection::handleEvent(unsigned /*eventType*/) { if (_connectionState == READ_HEADER) if ( ! readHeader()) return 0; if (_connectionState == READ_REQUEST) if ( ! readRequest()) return 0; if (_connectionState == WRITE_RESPONSE) if ( ! writeResponse()) return 0; return (_connectionState == WRITE_RESPONSE) ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent; } bool XmlRpcServerConnection::readHeader() { // Read available data bool eof; if ( ! nbRead(_header, &eof)) { // Its only an error if we already have read some data if (_header.length() > 0) XmlRpcUtil::error("XmlRpcServerConnection::readHeader: error while reading header (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(4, "XmlRpcServerConnection::readHeader: read %d bytes.", _header.length()); char *hp = (char*)_header.c_str(); // Start of header char *ep = hp + _header.length(); // End of string char *bp = 0; // Start of body char *lp = 0; // Start of content-length value char *kp = 0; // Start of connection value for (char *cp = hp; (bp == 0) && (cp < ep); ++cp) { if ((ep - cp > 16) && (strncasecmp(cp, "Content-length: ", 16) == 0)) lp = cp + 16; else if ((ep - cp > 12) && (strncasecmp(cp, "Connection: ", 12) == 0)) kp = cp + 12; else if ((ep - cp > 4) && (strncmp(cp, "\r\n\r\n", 4) == 0)) bp = cp + 4; else if ((ep - cp > 2) && (strncmp(cp, "\n\n", 2) == 0)) bp = cp + 2; } // If we haven't gotten the entire header yet, return (keep reading) if (bp == 0) { // EOF in the middle of a request is an error, otherwise its ok if (eof) { XmlRpcUtil::log(4, "XmlRpcServerConnection::readHeader: EOF"); if (_header.length() > 0) XmlRpcUtil::error("XmlRpcServerConnection::readHeader: EOF while reading header"); return false; // Either way we close the connection } return true; // Keep reading } // Decode content length if (lp == 0) { XmlRpcUtil::error("XmlRpcServerConnection::readHeader: No Content-length specified"); return false; // We could try to figure it out by parsing as we read, but for now... } _contentLength = atoi(lp); if (_contentLength <= 0) { XmlRpcUtil::error("XmlRpcServerConnection::readHeader: Invalid Content-length specified (%d).", _contentLength); return false; } XmlRpcUtil::log(3, "XmlRpcServerConnection::readHeader: specified content length is %d.", _contentLength); // Otherwise copy non-header data to request buffer and set state to read request. _request = bp; // Parse out any interesting bits from the header (HTTP version, connection) _keepAlive = true; if (_header.find("HTTP/1.0") != std::string::npos) { if (kp == 0 || strncasecmp(kp, "keep-alive", 10) != 0) _keepAlive = false; // Default for HTTP 1.0 is to close the connection } else { if (kp != 0 && strncasecmp(kp, "close", 5) == 0) _keepAlive = false; } XmlRpcUtil::log(3, "KeepAlive: %d", _keepAlive); _header = ""; _connectionState = READ_REQUEST; return true; // Continue monitoring this source } bool XmlRpcServerConnection::readRequest() { // If we dont have the entire request yet, read available data if (int(_request.length()) < _contentLength) { bool eof; if ( ! nbRead(_request, &eof)) { XmlRpcUtil::error("XmlRpcServerConnection::readRequest: read error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } // If we haven't gotten the entire request yet, return (keep reading) if (int(_request.length()) < _contentLength) { if (eof) { XmlRpcUtil::error("XmlRpcServerConnection::readRequest: EOF while reading request"); return false; // Either way we close the connection } return true; } } // Otherwise, parse and dispatch the request XmlRpcUtil::log(3, "XmlRpcServerConnection::readRequest read %d bytes.", _request.length()); //XmlRpcUtil::log(5, "XmlRpcServerConnection::readRequest:\n%s\n", _request.c_str()); _connectionState = WRITE_RESPONSE; return true; // Continue monitoring this source } bool XmlRpcServerConnection::writeResponse() { if (_response.length() == 0) { executeRequest(); _bytesWritten = 0; if (_response.length() == 0) { XmlRpcUtil::error("XmlRpcServerConnection::writeResponse: empty response."); return false; } } // Try to write the response if ( ! nbWrite(_response, &_bytesWritten)) { XmlRpcUtil::error("XmlRpcServerConnection::writeResponse: write error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(3, "XmlRpcServerConnection::writeResponse: wrote %d of %d bytes.", _bytesWritten, _response.length()); // Prepare to read the next request if (_bytesWritten == int(_response.length())) { _header = ""; _request = ""; _response = ""; _connectionState = READ_HEADER; } return _keepAlive; // Continue monitoring this source if true } //! Helper method to execute the client request void XmlRpcServerConnection::executeRequest() { _response = _server->executeRequest(_request); } flrig-1.3.24/src/xmlrpcpp/XmlRpcClient.cpp0000644000175000017500000003612512562731652015351 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcClient.h" #include "XmlRpcSocket.h" #include "XmlRpc.h" #include "XmlRpcBase64.h" // For HTTP authentication encoding #include #include #include #include #include using namespace XmlRpc; using namespace std; // Static data const char REQUEST_BEGIN[] = "\r\n" ""; const char REQUEST_END_METHODNAME[] = "\r\n"; const char PARAMS_TAG[] = ""; const char PARAMS_ETAG[] = ""; const char PARAM_TAG[] = ""; const char PARAM_ETAG[] = ""; const char REQUEST_END[] = "\r\n"; XmlRpcClient::XmlRpcClient(const char* host, int port, const char* uri/*=0*/) { XmlRpcUtil::log(1, "XmlRpcClient new client: host %s, port %d.", host, port); _host = host; _port = port; if (uri && *uri) _uri = uri; else _uri = "/RPC2"; _connectionState = NO_CONNECTION; _executing = false; _eof = false; // Default to keeping the connection open until an explicit close is done setKeepOpen(); } XmlRpcClient::XmlRpcClient(const char* host, int port, const char* login, const char* password, const char* uri/*=0*/) { XmlRpcUtil::log(1, "XmlRpcClient new client: host %s, port %d, login %s.", host, port, login); _host = host; _port = port; _login = login ? login : ""; _password = password ? password : ""; _uri = uri ? uri : "/RPC2"; _connectionState = NO_CONNECTION; _executing = false; _eof = false; // Default to keeping the connection open until an explicit close is done setKeepOpen(); } XmlRpcClient::~XmlRpcClient() { XmlRpcUtil::log(1, "XmlRpcClient dtor client: host %s, port %d.", _host.c_str(), _port); if (_connectionState != NO_CONNECTION) close(); } // Close the owned fd void XmlRpcClient::close() { XmlRpcUtil::log(4, "XmlRpcClient::close: fd %d.", getfd()); _connectionState = NO_CONNECTION; _disp.exit(); _disp.removeSource(this); XmlRpcSource::close(); } // Clear the referenced flag even if exceptions or errors occur. struct ClearFlagOnExit { ClearFlagOnExit(bool& flag) : _flag(flag) {} ~ClearFlagOnExit() { _flag = false; } bool& _flag; }; // Execute the named procedure on the remote server. // Params should be an array of the arguments for the method. // Returns true if the request was sent and a result received (although the result // might be a fault). bool XmlRpcClient::execute(const char* method, XmlRpcValue const& params, XmlRpcValue& result, double timeoutSeconds) { XmlRpcUtil::log(1, "XmlRpcClient::execute: method %s (_connectionState %d).", method, _connectionState); // This is not a thread-safe operation, if you want to do multithreading, use separate // clients for each thread. If you want to protect yourself from multiple threads // accessing the same client, replace this code with a real mutex. if (_executing) return false; _executing = true; ClearFlagOnExit cf(_executing); _sendAttempts = 0; _isFault = false; if ( ! setupConnection()) return false; if ( ! generateRequest(method, params)) return false; result.clear(); // Process until either a response is received or the timeout period passes _disp.work(timeoutSeconds); if (_connectionState != IDLE || ! parseResponse(result)) return false; XmlRpcUtil::log(1, "XmlRpcClient::execute: method %s completed.", method); _response.clear(); return true; } // XmlRpcSource interface implementation // Handle server responses. Called by the event dispatcher during execute. unsigned XmlRpcClient::handleEvent(unsigned eventType) { if (eventType == XmlRpcDispatch::Exception) { //if (XmlRpcSocket::nonFatalError()) // return (_connectionState == WRITE_REQUEST) // ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent; if (_connectionState == WRITE_REQUEST && _bytesWritten == 0) XmlRpcUtil::error("Error in XmlRpcClient::handleEvent: could not connect to server (%s).", XmlRpcSocket::getErrorMsg().c_str()); else XmlRpcUtil::error("Error in XmlRpcClient::handleEvent (state %d): %s.", _connectionState, XmlRpcSocket::getErrorMsg().c_str()); return 0; } if (_connectionState == WRITE_REQUEST) if ( ! writeRequest()) return 0; if (_connectionState == READ_HEADER) if ( ! readHeader()) return 0; if (_connectionState == READ_RESPONSE) if ( ! readResponse()) return 0; // This should probably always ask for Exception events too return (_connectionState == WRITE_REQUEST) ? XmlRpcDispatch::WritableEvent : XmlRpcDispatch::ReadableEvent; } // Create the socket connection to the server if necessary bool XmlRpcClient::setupConnection() { // If an error occurred last time through, or if the server closed the connection, close our end if ((_connectionState != NO_CONNECTION && _connectionState != IDLE) || _eof) close(); _eof = false; if (_connectionState == NO_CONNECTION) if (! doConnect()) return false; // Prepare to write the request _connectionState = WRITE_REQUEST; _bytesWritten = 0; // Notify the dispatcher to listen on this source (calls handleEvent when the socket is writable) _disp.removeSource(this); // Make sure nothing is left over _disp.addSource(this, XmlRpcDispatch::WritableEvent | XmlRpcDispatch::Exception); return true; } // Connect to the xmlrpc server bool XmlRpcClient::doConnect() { XmlRpcSocket::Socket fd = XmlRpcSocket::socket(); if (fd == XmlRpcSocket::Invalid) { XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not create socket (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(3, "XmlRpcClient::doConnect: fd %d.", fd); this->setfd(fd); // Don't block on connect/reads/writes if ( ! XmlRpcSocket::setNonBlocking(fd)) { this->close(); XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not set socket to non-blocking IO mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } if ( ! XmlRpcSocket::connect(fd, _host, _port)) { this->close(); XmlRpcUtil::error("Error in XmlRpcClient::doConnect: Could not connect to server (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } return XmlRpcSource::doConnect(); } // Encode the request to call the specified method with the specified parameters into xml bool XmlRpcClient::generateRequest(const char* methodName, XmlRpcValue const& params) { std::string body = REQUEST_BEGIN; body += methodName; body += REQUEST_END_METHODNAME; // If params is an array, each element is a separate parameter if (params.valid()) { body += PARAMS_TAG; if (params.getType() == XmlRpcValue::TypeArray) { for (int i=0; i base64data; int iostatus = 0; xmlrpc_base64 encoder; std::back_insert_iterator > ins = std::back_inserter(base64data); std::string authBuf = _login + ":" + _password; encoder.put(authBuf.begin(), authBuf.end(), ins, iostatus, xmlrpc_base64<>::crlf()); header += "Authorization: Basic "; std::string authEnc(base64data.begin(), base64data.end()); // handle pesky linefeed characters string::size_type lf; while ( (lf = authEnc.find("\r")) != string::npos ) { authEnc.erase(lf, 1); } while ( (lf = authEnc.find("\n")) != string::npos ) { authEnc.erase(lf, 1); } header += authEnc; header += "\r\n"; } header += "Content-Type: text/xml\r\nContent-length: "; sprintf(buff,"%d\r\n\r\n", static_cast(body.size())); return header + buff; } bool XmlRpcClient::writeRequest() { if (_bytesWritten == 0) XmlRpcUtil::log(5, "XmlRpcClient::writeRequest (attempt %d):\n%s\n", _sendAttempts+1, _request.c_str()); // Try to write the request if ( ! nbWrite(_request, &_bytesWritten)) { XmlRpcUtil::error("Error in XmlRpcClient::writeRequest: write error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(3, "XmlRpcClient::writeRequest: wrote %d of %d bytes.", _bytesWritten, _request.length()); // Wait for the result if (_bytesWritten == int(_request.length())) { _header = ""; _response = ""; _connectionState = READ_HEADER; } return true; } // Read the header from the response bool XmlRpcClient::readHeader() { // Read available data if ( ! nbRead(_header, &_eof) || (_eof && _header.length() == 0)) { // If we haven't read any data yet and this is a keep-alive connection, the server may // have timed out, so we try one more time. if (getKeepOpen() && _header.length() == 0 && _sendAttempts++ == 0) { XmlRpcUtil::log(4, "XmlRpcClient::readHeader: re-trying connection"); XmlRpcSource::close(); _connectionState = NO_CONNECTION; _eof = false; return setupConnection(); } XmlRpcUtil::error("Error in XmlRpcClient::readHeader: error while reading header (%s) on fd %d.", XmlRpcSocket::getErrorMsg().c_str(), getfd()); return false; } XmlRpcUtil::log(4, "XmlRpcClient::readHeader: client has read %d bytes", _header.length()); return parseHeader(); } bool XmlRpcClient::parseHeader() { char const *hp = _header.c_str(); // Start of header char const *ep = hp + _header.length(); // End of string char const *bp = 0; // Start of body char const *lp = 0; // Start of content-length value std::string const CONTINUE100("100 Continue"); int nc100 = int(CONTINUE100.length()); for (char const *cp = hp; (bp == 0) && (cp < ep); ++cp) { if ((ep - cp > 16) && (strncasecmp(cp, "Content-length: ", 16) == 0)) { lp = cp + 16; } else if ((ep - cp > 4) && (strncmp(cp, "\r\n\r\n", 4) == 0)) { if (cp - hp > nc100 && strncmp(cp-CONTINUE100.length(), CONTINUE100.c_str(), CONTINUE100.length()) == 0) cp += 3; else bp = cp + 4; } else if ((ep - cp > 2) && (strncmp(cp, "\n\n", 2) == 0)) { if (cp - hp > nc100 && strncmp(cp-CONTINUE100.length(), CONTINUE100.c_str(), CONTINUE100.length()) == 0) ++ cp; else bp = cp + 2; } } // If we haven't gotten the entire header yet, return (keep reading) if (bp == 0) { if (_eof) // EOF in the middle of a response is an error { XmlRpcUtil::error("Error in XmlRpcClient::readHeader: EOF while reading header"); return false; // Close the connection } return true; // Keep reading } // Decode content length if (lp == 0) { XmlRpcUtil::error("Error XmlRpcClient::readHeader: No Content-length specified"); return false; // We could try to figure it out by parsing as we read, but for now... } _contentLength = atoi(lp); if (_contentLength <= 0) { XmlRpcUtil::error("Error in XmlRpcClient::readHeader: Invalid Content-length specified (%d).", _contentLength); return false; } XmlRpcUtil::log(4, "client read content length: %d", _contentLength); // Otherwise copy non-header data to response buffer and set state to read response. _response = bp; _header = ""; // should parse out any interesting bits from the header (connection, etc)... _connectionState = READ_RESPONSE; return true; // Continue monitoring this source } bool XmlRpcClient::readResponse() { // If we dont have the entire response yet, read available data if (int(_response.length()) < _contentLength) { if ( ! nbRead(_response, &_eof)) { XmlRpcUtil::error("Error in XmlRpcClient::readResponse: read error (%s).",XmlRpcSocket::getErrorMsg().c_str()); return false; } // If we haven't gotten the entire _response yet, return (keep reading) if (int(_response.length()) < _contentLength) { if (_eof) { XmlRpcUtil::error("Error in XmlRpcClient::readResponse: EOF while reading response"); return false; } return true; } } // Otherwise, parse and return the result XmlRpcUtil::log(3, "XmlRpcClient::readResponse (read %d bytes)", _response.length()); XmlRpcUtil::log(5, "response:\n%s", _response.c_str()); _connectionState = IDLE; return false; // Stop monitoring this source (causes return from work) } // Convert the response xml into a result value bool XmlRpcClient::parseResponse(XmlRpcValue& result) { std::string r; _response.swap(r); // Parse response xml into result bool emptyParam; int offset = 0; if ( ! XmlRpcUtil::findTag("methodResponse",r,&offset,&emptyParam) || emptyParam) { XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response - no methodResponse. Response:\n%s", r.c_str()); return false; } // Expect either ... or ... if (XmlRpcUtil::nextTagIs("params",r,&offset,&emptyParam) && XmlRpcUtil::nextTagIs("param",r,&offset,&emptyParam)) { if (emptyParam) { result = 0; // No result? } else if ( ! result.fromXml(r, &offset)) { XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response value. Response:\n%s", r.c_str()); return false; } } else if (XmlRpcUtil::nextTagIs("fault",r,&offset,&emptyParam)) { _isFault = true; if (emptyParam || ! result.fromXml(r, &offset)) { result = 0; // No result? return false; } } else { XmlRpcUtil::error("Error in XmlRpcClient::parseResponse: Invalid response - no param or fault tag. Response:\n%s", r.c_str()); return false; } return result.valid(); } flrig-1.3.24/src/xmlrpcpp/XmlRpcSocket.h0000644000175000017500000000537212562731652015030 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCSOCKET_H_ #define _XMLRPCSOCKET_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include namespace XmlRpc { //! A platform-independent socket API. class XmlRpcSocket { public: // On windows, a socket is an unsigned int large enough to hold a ptr // This should match the definition of SOCKET in winsock2.h #if defined(_WINDOWS) # if defined(_WIN64) typedef unsigned __int64 Socket; # else typedef unsigned int Socket; # endif #else typedef int Socket; #endif //! An invalid socket constant. static const Socket Invalid = (Socket) -1; //! Creates a stream (TCP) socket. Returns XmlRpcSocket::Invalid on failure. static Socket socket(); //! Closes a socket. static void close(Socket socket); //! Sets a stream (TCP) socket to perform non-blocking IO. Returns false on failure. static bool setNonBlocking(Socket socket); // The next four methods are appropriate for servers. //! Allow the port the specified socket is bound to to be re-bound immediately so //! server re-starts are not delayed. Returns false on failure. static bool setReuseAddr(Socket socket); //! Bind to a specified port static bool bind(Socket socket, int port); //! Set socket in listen mode static bool listen(Socket socket, int backlog); //! Accept a client connection request static Socket accept(Socket socket); //! Connect a socket to a server (from a client) static bool connect(Socket socket, std::string& host, int port); //! Get the port of a bound socket static int getPort(Socket socket); //! Returns true if the last error was not a fatal one (eg, EWOULDBLOCK) static bool nonFatalError(); //! Returns last errno static int getError(); //! Returns message corresponding to last error static std::string getErrorMsg(); //! Returns message corresponding to error static std::string getErrorMsg(int error); }; } // namespace XmlRpc #endif flrig-1.3.24/src/xmlrpcpp/XmlRpcSource.cpp0000644000175000017500000001112112625402056015351 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcSource.h" #include "XmlRpcUtil.h" #if defined(_WINDOWS) # include # include #else extern "C" { # include # include } #endif #if USE_OPENSSL # include # include # include # include # include #endif namespace XmlRpc { struct SslProxy { #if USE_OPENSSL SSL_CTX* _ssl_ctx; SSL_METHOD* _ssl_meth; SSL* _ssl_ssl; #endif }; XmlRpcSource::XmlRpcSource(XmlRpcSocket::Socket fd /*= -1*/, bool deleteOnClose /*= false*/) : _fd(fd) , _deleteOnClose(deleteOnClose) , _keepOpen(false) , _sslEnabled(false) , _ssl(0) { } XmlRpcSource::~XmlRpcSource() { delete _ssl; } void XmlRpcSource::setSslEnabled(bool b /*=true*/) { #if USE_OPENSSL _sslEnabled = b; #endif } bool XmlRpcSource::doConnect() { #if USE_OPENSSL // Perform SSL if needed if (_sslEnabled) { _ssl = new SslProxy; SSLeay_add_ssl_algorithms(); _ssl->_ssl_meth = SSLv23_client_method(); SSL_load_error_strings(); _ssl->_ssl_ctx = SSL_CTX_new(_ssl->_ssl_meth); _ssl->_ssl_ssl = SSL_new(_ssl->_ssl_ctx); SSL_set_fd(_ssl->_ssl_ssl, _fd); return SSL_connect(_ssl->_ssl_ssl) == 1; } #endif return true; } // Read available text from the specified socket. Returns false on error. bool XmlRpcSource::nbRead(std::string& s, bool *eof) { const int READ_SIZE = 4096; // Number of bytes to attempt to read at a time char readBuf[READ_SIZE]; bool wouldBlock = false; *eof = false; while ( ! wouldBlock && ! *eof) { int n; #if USE_OPENSSL // Perform SSL if needed if (_ssl && _ssl->_ssl_ssl) { n = SSL_read(_ssl->_ssl_ssl, readBuf, READ_SIZE-1); } else #endif #if defined(_WINDOWS) n = recv(_fd, readBuf, READ_SIZE-1, 0); #else n = read(_fd, readBuf, READ_SIZE-1); #endif XmlRpcUtil::log(5, "XmlRpcSocket::nbRead: read/recv returned %d.", n); if (n > 0) { readBuf[n] = 0; s.append(readBuf, n); } else if (n == 0) { *eof = true; } else if (XmlRpcSocket::nonFatalError()) { wouldBlock = true; } else { return false; // Error } } return true; } // Write text to the socket. Returns false on error. bool XmlRpcSource::nbWrite(std::string const& s, int *bytesSoFar) { int nToWrite = int(s.length()) - *bytesSoFar; const char *sp = s.c_str() + *bytesSoFar; bool wouldBlock = false; while ( nToWrite > 0 && ! wouldBlock ) { int n; #if USE_OPENSSL // Perform SSL if needed if (_ssl && _ssl->_ssl_ssl) { n = SSL_write(_ssl->_ssl_ssl, sp, nToWrite); } else #endif #if defined(_WINDOWS) n = send(_fd, sp, nToWrite, 0); #else n = write(_fd, sp, nToWrite); #endif XmlRpcUtil::log(5, "XmlRpcSocket::nbWrite: send/write returned %d.", n); if (n > 0) { sp += n; *bytesSoFar += n; nToWrite -= n; } else if (XmlRpcSocket::nonFatalError()) { wouldBlock = true; } else { return false; // Error } } return true; } void XmlRpcSource::close() { #if USE_OPENSSL if (_ssl && _ssl->_ssl_ssl) { SSL_shutdown(_ssl->_ssl_ssl); // Should close be called here ? ... SSL_free(_ssl->_ssl_ssl); SSL_CTX_free(_ssl->_ssl_ctx); delete _ssl; _ssl = 0; } #endif if ( (int)_fd != -1) { XmlRpcUtil::log(2,"XmlRpcSource::close: closing socket %d.", _fd); XmlRpcSocket::close(_fd); _fd = -1; } if (_deleteOnClose) { XmlRpcUtil::log(2,"XmlRpcSource::close: deleting this"); _deleteOnClose = false; delete this; } } } // namespace XmlRpc flrig-1.3.24/src/xmlrpcpp/XmlRpc.h0000644000175000017500000000577212562731652013663 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPC_H_ #define _XMLRPC_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #include "XmlRpcClient.h" #include "XmlRpcException.h" #include "XmlRpcServer.h" #include "XmlRpcServerMethod.h" #include "XmlRpcValue.h" #include "XmlRpcUtil.h" namespace XmlRpc { //! An interface allowing custom handling of error message reporting. class XmlRpcErrorHandler { public: XmlRpcErrorHandler() {} virtual ~XmlRpcErrorHandler() {} //! Returns a pointer to the currently installed error handling object. static XmlRpcErrorHandler* getErrorHandler() { return _errorHandler; } //! Specifies the error handler. static void setErrorHandler(XmlRpcErrorHandler* eh) { _errorHandler = eh; } //! Report an error. Custom error handlers should define this method. virtual void error(const char* msg) = 0; protected: static XmlRpcErrorHandler* _errorHandler; }; //! An interface allowing custom handling of informational message reporting. class XmlRpcLogHandler { public: XmlRpcLogHandler() {} virtual ~XmlRpcLogHandler() {} //! Returns a pointer to the currently installed message reporting object. static XmlRpcLogHandler* getLogHandler() { return _logHandler; } //! Specifies the message handler. static void setLogHandler(XmlRpcLogHandler* lh) { _logHandler = lh; } //! Returns the level of verbosity of informational messages. 0 is no output, 5 is very verbose. static int getVerbosity() { return _verbosity; } //! Specify the level of verbosity of informational messages. 0 is no output, 5 is very verbose. static void setVerbosity(int v) { _verbosity = v; } //! Output a message. Custom error handlers should define this method. virtual void log(int level, const char* msg) = 0; protected: static XmlRpcLogHandler* _logHandler; static int _verbosity; }; //! Returns log message verbosity. This is short for XmlRpcLogHandler::getVerbosity() int getVerbosity(); //! Sets log message verbosity. This is short for XmlRpcLogHandler::setVerbosity(level) void setVerbosity(int level); //! Version identifier extern const char XMLRPC_VERSION[]; } // namespace XmlRpc #endif // _XMLRPC_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcValue.h0000644000175000017500000002721212562731652014651 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCVALUE_H_ #define _XMLRPCVALUE_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #include #include #include namespace XmlRpc { enum xmlrpc_nil_t { nil }; //! A class to represent RPC arguments and results. //! Each XmlRpcValue object contains a typed value, //! where the type is determined by the initial value //! assigned to the object. // should probably refcount them... class XmlRpcValue { public: //! XmlRpcValue types enum Type { TypeInvalid, TypeNil, TypeBoolean, TypeInt, TypeUnsigned, TypeLongLong, TypeDouble, TypeString, TypeDateTime, TypeBase64, TypeArray, TypeStruct }; // Non-primitive types typedef std::vector BinaryData; typedef std::vector ValueArray; typedef std::map ValueStruct; // Constructors //! Construct an empty XmlRpcValue XmlRpcValue() : _type(TypeInvalid) { _value.asBinary = 0; } //! Construct an XmlRpcValue with a nil value XmlRpcValue(xmlrpc_nil_t value) : _type(TypeNil) { } //! Construct an XmlRpcValue with a bool value XmlRpcValue(bool value) : _type(TypeBoolean) { _value.asBool = value; } //! Construct an XmlRpcValue with an int value XmlRpcValue(int value) : _type(TypeInt) { _value.asInt = value; } XmlRpcValue(unsigned int value) : _type(TypeUnsigned) { _value.asUnsigned = value; } XmlRpcValue(long long value) : _type(TypeLongLong) { _value.asLongLong = value; } //! Construct an XmlRpcValue with a double value XmlRpcValue(double value) : _type(TypeDouble) { _value.asDouble = value; } //! Construct an XmlRpcValue with a string value XmlRpcValue(std::string const& value) : _type(TypeString) { _value.asString = new std::string(value); } //! Construct an XmlRpcValue with a string value. //! @param value A null-terminated (C) string. XmlRpcValue(const char* value) : _type(TypeString) { _value.asString = new std::string(value); } XmlRpcValue(BinaryData const& value) : _type(TypeBase64) { _value.asBinary = new BinaryData(value); } XmlRpcValue(ValueStruct const& value) : _type(TypeStruct) { _value.asStruct = new ValueStruct(value); } XmlRpcValue(ValueArray const& value) : _type(TypeArray) { _value.asArray = new ValueArray(value); } //! Construct an XmlRpcValue with a date/time value. //! @param value A pointer to a struct tm (see localtime) XmlRpcValue(struct tm* value) : _type(TypeDateTime) { _value.asTime = new struct tm(*value); } //! Construct an XmlRpcValue with a binary data value //! @param value A pointer to data //! @param nBytes The length of the data pointed to, in bytes XmlRpcValue(void* value, int nBytes) : _type(TypeBase64) { _value.asBinary = new BinaryData((char*)value, ((char*)value)+nBytes); } //! Construct from xml, beginning at *offset chars into the string, updates offset XmlRpcValue(std::string const& xml, int* offset) : _type(TypeInvalid) { if ( ! fromXml(xml,offset)) _type = TypeInvalid; } //! Copy constructor XmlRpcValue(XmlRpcValue const& rhs) : _type(TypeInvalid) { *this = rhs; } //! Destructor (make virtual if you want to subclass) /*virtual*/ ~XmlRpcValue() { invalidate(); } //! Erase the current value void clear() { invalidate(); } // Operators //! Assignment from one XmlRpcValue to this one. //! @param rhs The value in rhs is copied to this value. XmlRpcValue& operator=(XmlRpcValue const& rhs); //! Assign nil to this XmlRpcValue. XmlRpcValue& operator=(xmlrpc_nil_t const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign a bool to this XmlRpcValue. XmlRpcValue& operator=(bool const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign an int to this XmlRpcValue. XmlRpcValue& operator=(int const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign a double to this XmlRpcValue. XmlRpcValue& operator=(double const& rhs) { return operator=(XmlRpcValue(rhs)); } //! Assign a string to this XmlRpcValue. XmlRpcValue& operator=(const char* rhs) { return operator=(XmlRpcValue(std::string(rhs))); } //! Tests two XmlRpcValues for equality bool operator==(XmlRpcValue const& other) const; //! Tests two XmlRpcValues for inequality bool operator!=(XmlRpcValue const& other) const; //! Treat an XmlRpcValue as a bool. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeBoolean. operator bool&() { assertType(TypeBoolean); return _value.asBool; } operator bool() const { assertType(TypeBoolean); return _value.asBool; } //! Treat an XmlRpcValue as an int. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeInt. operator int&() { assertType(TypeInt); return _value.asInt; } operator int() const { assertType(TypeInt); return _value.asInt; } operator unsigned int&() { assertType(TypeUnsigned); return _value.asUnsigned; } operator unsigned int() const { assertType(TypeUnsigned); return _value.asUnsigned; } operator long long&() { assertType(TypeLongLong); return _value.asLongLong; } operator long long() const { assertType(TypeLongLong); return _value.asLongLong; } //! Treat an XmlRpcValue as a double. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeDouble. operator double&() { assertType(TypeDouble); return _value.asDouble; } operator double() const { assertType(TypeDouble); return _value.asDouble; } //! Treat an XmlRpcValue as a string. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeString. operator std::string&() { assertType(TypeString); return *_value.asString; } operator std::string const&() const { assertType(TypeString); return *_value.asString; } //! Access the BinaryData value. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeBase64. operator BinaryData&() { assertType(TypeBase64); return *_value.asBinary; } operator BinaryData const&() const { assertType(TypeBase64); return *_value.asBinary; } //! Access the DateTime value. //! Throws XmlRpcException if the value is initialized to //! a type that is not TypeDateTime. operator struct tm&() { assertType(TypeDateTime); return *_value.asTime; } operator struct tm const&() const { assertType(TypeDateTime); return *_value.asTime; } //! Const array value accessor. //! Access the ith value of the array. //! Throws XmlRpcException if the value is not an array or if the index i is //! not a valid index for the array. XmlRpcValue const& operator[](int i) const { assertArray(i+1); return _value.asArray->at(i); } //! Array value accessor. //! Access the ith value of the array, growing the array if necessary. //! Throws XmlRpcException if the value is not an array. XmlRpcValue& operator[](int i) { assertArray(i+1); return _value.asArray->at(i); } //! Struct entry accessor. //! Returns the value associated with the given entry, creating one if necessary. XmlRpcValue& operator[](std::string const& k) { assertStruct(); return (*_value.asStruct)[k]; } //! Struct entry accessor. //! Returns the value associated with the given entry, creating one if necessary. XmlRpcValue& operator[](const char* k) { assertStruct(); std::string s(k); return (*_value.asStruct)[s]; } //! Access the struct value map. //! Can be used to iterate over the entries in the map to find all defined entries. operator ValueStruct const&() { assertStruct(); return *_value.asStruct; } operator ValueArray const&() const { assertType(TypeArray); return *_value.asArray; } // Accessors //! Return true if the value has been set to something. bool valid() const { return _type != TypeInvalid; } //! Return the type of the value stored. \see Type. Type const &getType() const { return _type; } //! Return the size for string, base64, array, and struct values. int size() const; //! Specify the size for array values. Array values will grow beyond this size if needed. void setSize(int size) { assertArray(size); } //! Check for the existence of a struct member by name. bool hasMember(const std::string& name) const; //! Decode xml. Destroys any existing value. bool fromXml(std::string const& valueXml, int* offset); //! Encode the Value in xml std::string toXml() const; //! Write the value (no xml encoding) std::ostream& write(std::ostream& os) const; // Formatting //! Return the format used to write double values. static std::string const& getDoubleFormat() { return _doubleFormat; } //! Specify the format used to write double values. static void setDoubleFormat(const char* f) { _doubleFormat = f; } protected: // Clean up void invalidate(); // Type checking. Non-const versions coerce to the desired type if currently un-typed. void assertType(Type t) const; void assertType(Type t); void assertArray(int size) const; void assertArray(int size); void assertStruct(); // XML decoding bool boolFromXml(std::string const& valueXml, int* offset); bool intFromXml(std::string const& valueXml, int* offset); bool doubleFromXml(std::string const& valueXml, int* offset); bool stringFromXml(std::string const& valueXml, int* offset); bool timeFromXml(std::string const& valueXml, int* offset); bool binaryFromXml(std::string const& valueXml, int* offset); bool arrayFromXml(std::string const& valueXml, int* offset); bool structFromXml(std::string const& valueXml, int* offset); // XML encoding std::string nilToXml() const; std::string boolToXml() const; std::string intToXml() const; std::string doubleToXml() const; std::string stringToXml() const; std::string timeToXml() const; std::string binaryToXml() const; std::string arrayToXml() const; std::string structToXml() const; // Format strings static std::string _doubleFormat; // Type tag and values Type _type; // At some point I will split off Arrays and Structs into // separate ref-counted objects for more efficient copying. union { bool asBool; int asInt; unsigned int asUnsigned; long long asLongLong; double asDouble; struct tm* asTime; std::string* asString; BinaryData* asBinary; ValueArray* asArray; ValueStruct* asStruct; } _value; }; } // namespace XmlRpc std::ostream& operator<<(std::ostream& os, XmlRpc::XmlRpcValue& v); #endif // _XMLRPCVALUE_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcUtil.h0000644000175000017500000000565312562731652014517 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCUTIL_H_ #define _XMLRPCUTIL_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #if defined(_MSC_VER) # define snprintf _snprintf # define vsnprintf _vsnprintf # define strcasecmp _stricmp # define strncasecmp _strnicmp #elif defined(__BORLANDC__) # define strcasecmp stricmp # define strncasecmp strnicmp #endif namespace XmlRpc { //! Utilities for XML parsing, encoding, and decoding and message handlers. class XmlRpcUtil { public: //! Parses the specified tag. No attributes are parsed, no validation is done. //! Sets val to the contents between and , or an empty string if is found. //! Returns true if the tag is parsed. Updates offset to char after static bool parseTag(const char* tag, std::string const& xml, int* offset, std::string &val); //! Returns true if the tag is found and updates offset to the char after the tag. //! If the tag is of the form , emptyTag is set to true. static bool findTag(const char* tag, std::string const& xml, int* offset, bool* emptyTag); //! Returns true if the tag is found at the specified offset (modulo any whitespace) //! and updates offset to the char after the tag. If an empty tag is found (eg, //! ), true is returned, offset is updated to be after the close of the tag, and //! emptyTag is set to true. static bool nextTagIs(const char* tag, std::string const& xml, int* offset, bool* emptyTag); //! Passes over the next tag found at the specified offset is , //! offset is updated to be after the close of the tag. //! Will skip over all characters until < is seen. static bool nextTagIsEnd(const char* tag, std::string const& xml, int* offset); //! Convert raw text to encoded xml. static std::string xmlEncode(const std::string& raw); //! Convert encoded xml to raw text static std::string xmlDecode(const std::string& encoded); //! Dump messages somewhere static void log(int level, const char* fmt, ...); //! Dump error messages somewhere static void error(const char* fmt, ...); }; } // namespace XmlRpc #endif // _XMLRPCUTIL_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcUtil.cpp0000644000175000017500000002000212625402056015024 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcUtil.h" #include #include #include #include #include #include "XmlRpc.h" using namespace XmlRpc; //#define USE_WINDOWS_DEBUG // To make the error and log messages go to VC++ debug output #ifdef USE_WINDOWS_DEBUG #define WIN32_LEAN_AND_MEAN #include #endif // Version id const char XmlRpc::XMLRPC_VERSION[] = "XMLRPC++ 0.8"; // Default log verbosity: 0 for no messages through 5 (writes everything) int XmlRpcLogHandler::_verbosity = 0; // Default log handler static class DefaultLogHandler : public XmlRpcLogHandler { public: void log(int level, const char* msg) { #ifdef USE_WINDOWS_DEBUG if (level <= _verbosity) { OutputDebugString(msg); OutputDebugString("\n"); } #else if (level <= _verbosity) std::cout << msg << std::endl; #endif } } defaultLogHandler; // Message log singleton XmlRpcLogHandler* XmlRpcLogHandler::_logHandler = &defaultLogHandler; // Default error handler static class DefaultErrorHandler : public XmlRpcErrorHandler { public: void error(const char* msg) { #ifdef USE_WINDOWS_DEBUG // OutputDebugString(msg); OutputDebugString("\n"); #else // std::cerr << msg << std::endl; #endif } } defaultErrorHandler; // Error handler singleton XmlRpcErrorHandler* XmlRpcErrorHandler::_errorHandler = &defaultErrorHandler; // Easy API for log verbosity int XmlRpc::getVerbosity() { return XmlRpcLogHandler::getVerbosity(); } void XmlRpc::setVerbosity(int level) { XmlRpcLogHandler::setVerbosity(level); } void XmlRpcUtil::log(int level, const char* fmt, ...) { if (level <= XmlRpcLogHandler::getVerbosity()) { va_list va; char buf[1024]; va_start( va, fmt); vsnprintf(buf,sizeof(buf)-1,fmt,va); buf[sizeof(buf)-1] = 0; XmlRpcLogHandler::getLogHandler()->log(level, buf); } } void XmlRpcUtil::error(const char* fmt, ...) { va_list va; va_start(va, fmt); char buf[1024]; vsnprintf(buf,sizeof(buf)-1,fmt,va); buf[sizeof(buf)-1] = 0; XmlRpcErrorHandler::getErrorHandler()->error(buf); } // Returns true if the tag is parsed. No attributes are parsed. // Sets val to the contents between and , or an empty string if is found. // Updates offset to char after bool XmlRpcUtil::parseTag(const char* tag, std::string const& xml, int* offset, std::string &val) { size_t nxml = xml.length(); if (*offset >= int(nxml)) return false; // Find or /> bool lastSlash = false; while (istart < nxml && xml[istart] != '>') { lastSlash = (xml[istart] == '/'); ++ istart; } if (istart == nxml) return false; val.clear(); if (lastSlash) // { *offset = int(istart+1); // 1 after > } else // Find { std::string etag = ""; size_t iend = xml.find(etag, istart); if (iend == std::string::npos) return false; *offset = int(iend + etag.length()); ++ istart; val = xml.substr(istart, iend-istart); } return true; } // Returns true if the tag is found and updates offset to the char after the tag bool XmlRpcUtil::findTag(const char* tag, std::string const& xml, int* offset, bool* emptyTag) { size_t nxml = xml.length(); if (*offset >= int(nxml)) return false; std::string stag = "<"; stag += tag; size_t istart = xml.find(stag, *offset); if (istart == std::string::npos) return false; istart += stag.length(); // Advance istart past > or />, skips attribs bool lastSlash = false; while (istart < nxml && xml[istart] != '>') { lastSlash = (xml[istart] == '/'); ++ istart; } if (istart == nxml) return false; *emptyTag = lastSlash; *offset = int(istart+1); // char after > return true; } // Returns true if the or is found at the specified offset (modulo any whitespace) // and updates offset to the char after the tag. *emptyTag is set to true if is found, false otherwise bool XmlRpcUtil::nextTagIs(const char* tag, std::string const& xml, int* offset, bool *emptyTag) { if (*offset >= int(xml.length())) return false; const char* cp = xml.c_str() + *offset; int nc = 0; while (*cp && isspace(*cp)) { ++cp; ++nc; } int len = int(strlen(tag)); if (*cp == '<' && (strncmp(cp+1, tag, len) == 0)) { cp += len + 1; if (*cp == '>') // { *offset += nc + len + 2; *emptyTag = false; return true; } while (*cp && isspace(*cp)) { ++cp; ++nc; } if (*cp == '/' && *(cp + 1) == '>') // { *offset += nc + len + 3; *emptyTag = true; return true; } } return false; } // Returns true if the next tag found at the specified offset is // and updates offset to the char after the tag. bool XmlRpcUtil::nextTagIsEnd(const char* tag, std::string const& xml, int* offset) { if (*offset >= int(xml.length())) return false; const char* cp = xml.c_str() + *offset; int nc = 0; while (*cp && *cp != '<') { ++cp; ++nc; } int len = int(strlen(tag)); if (*cp == '<' && *(cp+1) == '/' && (strncmp(cp+2, tag, len) == 0) && *(cp + len + 2) == '>') { *offset += nc + len + 3; return true; } return false; } // xml encodings (xml-encoded entities are preceded with '&') static const char AMP = '&'; static const char rawEntity[] = { '<', '>', '&', '\'', '\"', 0 }; static const char* xmlEntity[] = { "lt;", "gt;", "amp;", "apos;", "quot;", 0 }; static const int xmlEntLen[] = { 3, 3, 4, 5, 5 }; // Replace xml-encoded entities with the raw text equivalents. std::string XmlRpcUtil::xmlDecode(const std::string& encoded) { std::string::size_type iAmp = encoded.find(AMP); if (iAmp == std::string::npos) return encoded; std::string decoded(encoded, 0, iAmp); std::string::size_type iSize = encoded.size(); decoded.reserve(iSize); const char* ens = encoded.c_str(); while (iAmp != iSize) { if (encoded[iAmp] == AMP && iAmp+1 < iSize) { int iEntity; for (iEntity=0; xmlEntity[iEntity] != 0; ++iEntity) //if (encoded.compare(iAmp+1, xmlEntLen[iEntity], xmlEntity[iEntity]) == 0) if (strncmp(ens+iAmp+1, xmlEntity[iEntity], xmlEntLen[iEntity]) == 0) { decoded += rawEntity[iEntity]; iAmp += xmlEntLen[iEntity]+1; break; } if (xmlEntity[iEntity] == 0) // unrecognized sequence decoded += encoded[iAmp++]; } else { decoded += encoded[iAmp++]; } } return decoded; } // Replace raw text with xml-encoded entities. std::string XmlRpcUtil::xmlEncode(const std::string& raw) { std::string::size_type iRep = raw.find_first_of(rawEntity); if (iRep == std::string::npos) return raw; std::string encoded(raw, 0, iRep); std::string::size_type iSize = raw.size(); while (iRep != iSize) { int iEntity; for (iEntity=0; rawEntity[iEntity] != 0; ++iEntity) if (raw[iRep] == rawEntity[iEntity]) { encoded += AMP; encoded += xmlEntity[iEntity]; break; } if (rawEntity[iEntity] == 0) encoded += raw[iRep]; ++iRep; } return encoded; } flrig-1.3.24/src/xmlrpcpp/XmlRpcException.h0000644000175000017500000000313112562731652015525 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCEXCEPTION_H_ #define _XMLRPCEXCEPTION_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #ifndef MAKEDEPEND # include #endif namespace XmlRpc { //! A class representing an error. //! If server methods throw this exception, a fault response is returned //! to the client. class XmlRpcException { public: //! Constructor //! @param message A descriptive error message //! @param code An integer error code XmlRpcException(const std::string& message, int code=-1) : _message(message), _code(code) {} //! Return the error message. const std::string& getMessage() const { return _message; } //! Return the error code. int getCode() const { return _code; } private: std::string _message; int _code; }; } #endif // _XMLRPCEXCEPTION_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcSocket.cpp0000644000175000017500000001201512562731652015353 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcSocket.h" #include "XmlRpcUtil.h" #if defined(_WINDOWS) # include # include //# pragma lib(WS2_32.lib) # define EINPROGRESS WSAEINPROGRESS # define EWOULDBLOCK WSAEWOULDBLOCK # define ETIMEDOUT WSAETIMEDOUT typedef int socklen_t; #include "compat.h" #else extern "C" { # include # include # include # include # include # include # include # include # include # include } #endif // _WINDOWS using namespace XmlRpc; // One-time initializations static bool initialized = false; static void initialize() { initialized = true; #if defined(_WINDOWS) { WORD wVersionRequested = MAKEWORD( 2, 0 ); WSADATA wsaData; WSAStartup(wVersionRequested, &wsaData); atexit((void(*)(void)) WSACleanup); } #else { // Ignore SIGPIPE (void) signal(SIGPIPE, SIG_IGN); } #endif // _WINDOWS } // These errors are not considered fatal for an IO operation; the operation will be re-tried. bool XmlRpcSocket::nonFatalError() { int err = XmlRpcSocket::getError(); return (err == EINPROGRESS || #if defined(EAGAIN) err == EAGAIN || #endif #if defined(EINTR) err == EINTR || #endif err == EWOULDBLOCK); } XmlRpcSocket::Socket XmlRpcSocket::socket() { if ( ! initialized) initialize(); return ::socket(AF_INET, SOCK_STREAM, 0); } void XmlRpcSocket::close(XmlRpcSocket::Socket fd) { XmlRpcUtil::log(4, "XmlRpcSocket::close: fd %d.", fd); #if defined(_WINDOWS) closesocket(fd); #else ::close(fd); #endif // _WINDOWS } bool XmlRpcSocket::setNonBlocking(XmlRpcSocket::Socket fd) { #if defined(_WINDOWS) unsigned long flag = 1; return (ioctlsocket(fd, FIONBIO, &flag) == 0); #else return (fcntl(fd, F_SETFL, O_NONBLOCK) == 0); #endif // _WINDOWS } bool XmlRpcSocket::setReuseAddr(XmlRpcSocket::Socket fd) { // Allow this port to be re-bound immediately so server re-starts are not delayed int sflag = 1; return (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char *)&sflag, sizeof(sflag)) == 0); } // Bind to a specified port bool XmlRpcSocket::bind(XmlRpcSocket::Socket fd, int port) { struct sockaddr_in saddr; memset(&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; saddr.sin_addr.s_addr = htonl(INADDR_ANY); saddr.sin_port = htons((u_short) port); return (::bind(fd, (struct sockaddr *)&saddr, sizeof(saddr)) == 0); } // Set socket in listen mode bool XmlRpcSocket::listen(XmlRpcSocket::Socket fd, int backlog) { return (::listen(fd, backlog) == 0); } XmlRpcSocket::Socket XmlRpcSocket::accept(XmlRpcSocket::Socket fd) { struct sockaddr_in addr; socklen_t addrlen = sizeof(addr); return ::accept(fd, (struct sockaddr*)&addr, &addrlen); } // Connect a socket to a server (from a client) bool XmlRpcSocket::connect(XmlRpcSocket::Socket fd, std::string& host, int port) { struct sockaddr_in saddr; memset(&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; struct hostent *hp = gethostbyname(host.c_str()); if (hp == 0) return false; saddr.sin_family = hp->h_addrtype; memcpy(&saddr.sin_addr, hp->h_addr, hp->h_length); saddr.sin_port = htons((u_short) port); // For asynch operation, this will return EWOULDBLOCK (windows) or // EINPROGRESS (linux) and we just need to wait for the socket to be writable... int result = ::connect(fd, (struct sockaddr *)&saddr, sizeof(saddr)); return result == 0 || nonFatalError(); } // Get the port of a bound socket int XmlRpcSocket::getPort(XmlRpcSocket::Socket socket) { struct sockaddr_in saddr; socklen_t saddr_len = sizeof(saddr); int port; int result = ::getsockname(socket, (sockaddr*) &saddr, &saddr_len); if (result != 0) { port = -1; } else { port = ntohs(saddr.sin_port); } return port; } // Returns last errno int XmlRpcSocket::getError() { #if defined(_WINDOWS) return WSAGetLastError(); #else return errno; #endif } // Returns message corresponding to last errno std::string XmlRpcSocket::getErrorMsg() { return getErrorMsg(getError()); } // Returns message corresponding to errno... well, it should anyway std::string XmlRpcSocket::getErrorMsg(int error) { char err[60]; snprintf(err,sizeof(err),"error %d", error); return std::string(err); } flrig-1.3.24/src/xmlrpcpp/XmlRpcServerConnection.h0000644000175000017500000000541112562731652017060 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCSERVERCONNECTION_H_ #define _XMLRPCSERVERCONNECTION_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #include "XmlRpcValue.h" #include "XmlRpcSource.h" namespace XmlRpc { // The server waits for client connections and provides support for executing methods class XmlRpcServer; class XmlRpcServerMethod; //! A class to handle XML RPC requests from a particular client class XmlRpcServerConnection : public XmlRpcSource { public: //! Constructor XmlRpcServerConnection(XmlRpcSocket::Socket fd, XmlRpcServer* server, bool deleteOnClose = false); //! Destructor virtual ~XmlRpcServerConnection(); // XmlRpcSource interface implementation //! Handle IO on the client connection socket. //! @param eventType Type of IO event that occurred. @see XmlRpcDispatch::EventType. virtual unsigned handleEvent(unsigned eventType); protected: //! Reads the http header bool readHeader(); //! Reads the request (based on the content-length header value) bool readRequest(); //! Executes the request and writes the resulting response bool writeResponse(); //! Helper method to execute the client request virtual void executeRequest(); //! The XmlRpc server that accepted this connection XmlRpcServer* _server; //! Possible IO states for the connection enum ServerConnectionState { READ_HEADER, READ_REQUEST, WRITE_RESPONSE }; //! Current IO state for the connection ServerConnectionState _connectionState; //! Request headers std::string _header; //! Number of bytes expected in the request body (parsed from header) int _contentLength; //! Request body std::string _request; //! Response std::string _response; //! Number of bytes of the response written so far int _bytesWritten; //! Whether to keep the current client connection open for further requests bool _keepAlive; }; } // namespace XmlRpc #endif // _XMLRPCSERVERCONNECTION_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcValue.cpp0000644000175000017500000005037112562731652015206 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcValue.h" #include "XmlRpcException.h" #include "XmlRpcUtil.h" #include "XmlRpcBase64.h" #include #include #include #include namespace XmlRpc { static const char VALUE_TAG[] = "value"; static const char NIL_TAG[] = "nil"; static const char BOOLEAN_TAG[] = "boolean"; static const char DOUBLE_TAG[] = "double"; static const char INT_TAG[] = "int"; static const char I4_TAG[] = "i4"; static const char STRING_TAG[] = "string"; static const char DATETIME_TAG[] = "dateTime.iso8601"; static const char BASE64_TAG[] = "base64"; static const char ARRAY_TAG[] = "array"; static const char DATA_TAG[] = "data"; static const char STRUCT_TAG[] = "struct"; static const char MEMBER_TAG[] = "member"; static const char NAME_TAG[] = "name"; // Format strings std::string XmlRpcValue::_doubleFormat("%f"); // Clean up void XmlRpcValue::invalidate() { switch (_type) { case TypeString: delete _value.asString; break; case TypeDateTime: delete _value.asTime; break; case TypeBase64: delete _value.asBinary; break; case TypeArray: delete _value.asArray; break; case TypeStruct: delete _value.asStruct; break; default: break; } _type = TypeInvalid; _value.asBinary = 0; } // Type checking void XmlRpcValue::assertType(Type t) const { if (_type != t) { throw XmlRpcException("type error"); } } void XmlRpcValue::assertType(Type t) { if (_type == TypeInvalid) { _type = t; switch (_type) { // Ensure there is a valid value for the type case TypeString: _value.asString = new std::string(); break; case TypeDateTime: _value.asTime = new struct tm(); break; case TypeBase64: _value.asBinary = new BinaryData(); break; case TypeArray: _value.asArray = new ValueArray(); break; case TypeStruct: _value.asStruct = new ValueStruct(); break; default: _value.asBinary = 0; break; } } else if (_type != t) { throw XmlRpcException("type error"); } } void XmlRpcValue::assertArray(int size) const { if (_type != TypeArray) throw XmlRpcException("type error: expected an array"); else if (int(_value.asArray->size()) < size) throw XmlRpcException("range error: array index too large"); } void XmlRpcValue::assertArray(int size) { if (_type == TypeInvalid) { _type = TypeArray; _value.asArray = new ValueArray(size); } else if (_type == TypeArray) { if (int(_value.asArray->size()) < size) _value.asArray->resize(size); } else throw XmlRpcException("type error: expected an array"); } void XmlRpcValue::assertStruct() { if (_type == TypeInvalid) { _type = TypeStruct; _value.asStruct = new ValueStruct(); } else if (_type != TypeStruct) throw XmlRpcException("type error: expected a struct"); } // Operators XmlRpcValue& XmlRpcValue::operator=(XmlRpcValue const& rhs) { if (this != &rhs) { invalidate(); _type = rhs._type; switch (_type) { case TypeBoolean: _value.asBool = rhs._value.asBool; break; case TypeInt: _value.asInt = rhs._value.asInt; break; case TypeDouble: _value.asDouble = rhs._value.asDouble; break; case TypeDateTime: _value.asTime = new struct tm(*rhs._value.asTime); break; case TypeString: _value.asString = new std::string(*rhs._value.asString); break; case TypeBase64: _value.asBinary = new BinaryData(*rhs._value.asBinary); break; case TypeArray: _value.asArray = new ValueArray(*rhs._value.asArray); break; case TypeStruct: _value.asStruct = new ValueStruct(*rhs._value.asStruct); break; default: _value.asBinary = 0; break; } } return *this; } // Predicate for tm equality static bool tmEq(struct tm const& t1, struct tm const& t2) { return t1.tm_sec == t2.tm_sec && t1.tm_min == t2.tm_min && t1.tm_hour == t2.tm_hour && t1.tm_mday == t1.tm_mday && t1.tm_mon == t2.tm_mon && t1.tm_year == t2.tm_year; } bool XmlRpcValue::operator==(XmlRpcValue const& other) const { if (_type != other._type) return false; switch (_type) { case TypeBoolean: return ( !_value.asBool && !other._value.asBool) || ( _value.asBool && other._value.asBool); case TypeInt: return _value.asInt == other._value.asInt; case TypeDouble: return _value.asDouble == other._value.asDouble; case TypeDateTime: return tmEq(*_value.asTime, *other._value.asTime); case TypeString: return *_value.asString == *other._value.asString; case TypeBase64: return *_value.asBinary == *other._value.asBinary; case TypeArray: return *_value.asArray == *other._value.asArray; // The map<>::operator== requires the definition of value< for kcc case TypeStruct: //return *_value.asStruct == *other._value.asStruct; { if (_value.asStruct->size() != other._value.asStruct->size()) return false; ValueStruct::const_iterator it1=_value.asStruct->begin(); ValueStruct::const_iterator it2=other._value.asStruct->begin(); while (it1 != _value.asStruct->end()) { const XmlRpcValue& v1 = it1->second; const XmlRpcValue& v2 = it2->second; if ( ! (v1 == v2)) return false; it1++; it2++; } return true; } default: break; } return true; // Both invalid values ... } bool XmlRpcValue::operator!=(XmlRpcValue const& other) const { return !(*this == other); } // Works for strings, binary data, arrays, and structs. int XmlRpcValue::size() const { switch (_type) { case TypeString: return int(_value.asString->size()); case TypeBase64: return int(_value.asBinary->size()); case TypeArray: return int(_value.asArray->size()); case TypeStruct: return int(_value.asStruct->size()); default: break; } throw XmlRpcException("type error"); } // Checks for existence of struct member bool XmlRpcValue::hasMember(const std::string& name) const { return _type == TypeStruct && _value.asStruct->find(name) != _value.asStruct->end(); } // Set the value from xml. The chars at *offset into valueXml // should be the start of a tag. Destroys any existing value. bool XmlRpcValue::fromXml(std::string const& valueXml, int* offset) { int savedOffset = *offset; invalidate(); bool emptyTag; if ( ! XmlRpcUtil::nextTagIs(VALUE_TAG, valueXml, offset, &emptyTag)) return false; // Not a value, offset not updated // No value? Pretend its an empty string... if (emptyTag) { *this = ""; return true; } // No type tag? Assume string // bool result = true; bool result = false; int valueOffset = *offset; if (XmlRpcUtil::nextTagIsEnd(VALUE_TAG, valueXml, offset)) { result = true; return stringFromXml(valueXml, &valueOffset); } else if (XmlRpcUtil::nextTagIs(NIL_TAG, valueXml, offset, &emptyTag)) { _type = TypeNil; result = true; } else if (XmlRpcUtil::nextTagIs(BOOLEAN_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = false; result = true; } else result = boolFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(BOOLEAN_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(I4_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = 0; result = true; } else result = intFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(I4_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(INT_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = 0; result = true; } else result = intFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(INT_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(DOUBLE_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = 0.0; result = true; } else result = doubleFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(DOUBLE_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(STRING_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) { *this = ""; result = true; } else result = stringFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(STRING_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(DATETIME_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = timeFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(DATETIME_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(BASE64_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = binaryFromXml("", 0); else result = binaryFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(BASE64_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(ARRAY_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = arrayFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(ARRAY_TAG, valueXml, offset); } else if (XmlRpcUtil::nextTagIs(STRUCT_TAG, valueXml, offset, &emptyTag)) { if (emptyTag) result = false; else result = structFromXml(valueXml, offset) && XmlRpcUtil::nextTagIsEnd(STRUCT_TAG, valueXml, offset); } // Unrecognized tag after or no if ( ! result || ! XmlRpcUtil::nextTagIsEnd(VALUE_TAG, valueXml, offset)) { *offset = savedOffset; return false; } return true; } // Encode the Value in xml std::string XmlRpcValue::toXml() const { switch (_type) { case TypeNil: return nilToXml(); case TypeBoolean: return boolToXml(); case TypeInt: return intToXml(); case TypeDouble: return doubleToXml(); case TypeString: return stringToXml(); case TypeDateTime: return timeToXml(); case TypeBase64: return binaryToXml(); case TypeArray: return arrayToXml(); case TypeStruct: return structToXml(); default: break; } return std::string(); // Invalid value } // Boolean bool XmlRpcValue::boolFromXml(std::string const& valueXml, int* offset) { const char* valueStart = valueXml.c_str() + *offset; char* valueEnd; long ivalue = strtol(valueStart, &valueEnd, 10); if (valueEnd == valueStart || (ivalue != 0 && ivalue != 1)) return false; _type = TypeBoolean; _value.asBool = (ivalue == 1); *offset += int(valueEnd - valueStart); return true; } std::string XmlRpcValue::nilToXml() const { return ""; } std::string XmlRpcValue::boolToXml() const { static std::string booleanTrueXml("1"); static std::string booleanFalseXml("0"); return _value.asBool ? booleanTrueXml : booleanFalseXml; } // Int bool XmlRpcValue::intFromXml(std::string const& valueXml, int* offset) { const char* valueStart = valueXml.c_str() + *offset; char* valueEnd; long ivalue = strtol(valueStart, &valueEnd, 10); if (valueEnd == valueStart) return false; _type = TypeInt; _value.asInt = int(ivalue); *offset += int(valueEnd - valueStart); return true; } std::string XmlRpcValue::intToXml() const { char buf[256]; snprintf(buf, sizeof(buf)-1, "%d", _value.asInt); buf[sizeof(buf)-1] = 0; return std::string(buf); } // Double bool XmlRpcValue::doubleFromXml(std::string const& valueXml, int* offset) { const char* valueStart = valueXml.c_str() + *offset; char* valueEnd; double dvalue = strtod(valueStart, &valueEnd); if (valueEnd == valueStart) return false; _type = TypeDouble; _value.asDouble = dvalue; *offset += int(valueEnd - valueStart); return true; } std::string XmlRpcValue::doubleToXml() const { char fmtbuf[256], buf[256]; snprintf(fmtbuf, sizeof(fmtbuf)-1, "%s", getDoubleFormat().c_str()); fmtbuf[sizeof(fmtbuf)-1] = 0; snprintf(buf, sizeof(buf)-1, fmtbuf, _value.asDouble); buf[sizeof(buf)-1] = 0; return std::string(buf); } // String bool XmlRpcValue::stringFromXml(std::string const& valueXml, int* offset) { size_t valueEnd = valueXml.find('<', *offset); if (valueEnd == std::string::npos) return false; // No end tag; _type = TypeString; _value.asString = new std::string(XmlRpcUtil::xmlDecode(valueXml.substr(*offset, valueEnd-*offset))); *offset += int(_value.asString->length()); return true; } std::string XmlRpcValue::stringToXml() const { return std::string("") + XmlRpcUtil::xmlEncode(*_value.asString) + std::string(""); } // DateTime (stored as a struct tm) bool XmlRpcValue::timeFromXml(std::string const& valueXml, int* offset) { size_t valueEnd = valueXml.find('<', *offset); if (valueEnd == std::string::npos) return false; // No end tag; std::string stime = valueXml.substr(*offset, valueEnd-*offset); struct tm t; if (sscanf(stime.c_str(),"%4d%2d%2dT%2d:%2d:%2d",&t.tm_year,&t.tm_mon,&t.tm_mday,&t.tm_hour,&t.tm_min,&t.tm_sec) != 6) return false; t.tm_isdst = -1; _type = TypeDateTime; _value.asTime = new struct tm(t); *offset += int(stime.length()); return true; } std::string XmlRpcValue::timeToXml() const { struct tm* t = _value.asTime; char buf[20]; snprintf(buf, sizeof(buf)-1, "%04d%02d%02dT%02d:%02d:%02d", 1900+t->tm_year,1+t->tm_mon,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); buf[sizeof(buf)-1] = 0; return std::string("") + buf + std::string(""); } // Base64 bool XmlRpcValue::binaryFromXml(std::string const& valueXml, int* offset) { size_t valueEnd = valueXml.find('<', *offset); if (valueEnd == std::string::npos) return false; // No end tag; _type = TypeBase64; std::string asString = valueXml.substr(*offset, valueEnd-*offset); _value.asBinary = new BinaryData(); // check whether base64 encodings can contain chars xml encodes... // convert from base64 to binary int iostatus = 0; xmlrpc_base64 decoder; std::back_insert_iterator ins = std::back_inserter(*(_value.asBinary)); decoder.get(asString.begin(), asString.end(), ins, iostatus); *offset += int(asString.length()); return true; } std::string XmlRpcValue::binaryToXml() const { // convert to base64 std::vector base64data; int iostatus = 0; xmlrpc_base64 encoder; std::back_insert_iterator > ins = std::back_inserter(base64data); encoder.put(_value.asBinary->begin(), _value.asBinary->end(), ins, iostatus, xmlrpc_base64<>::crlf()); // Wrap with xml std::string xml = ""; xml.append(base64data.begin(), base64data.end()); xml += ""; return xml; } // Array bool XmlRpcValue::arrayFromXml(std::string const& valueXml, int* offset) { bool emptyTag; if ( ! XmlRpcUtil::nextTagIs(DATA_TAG, valueXml, offset, &emptyTag)) return false; _type = TypeArray; _value.asArray = new ValueArray; if ( ! emptyTag) { XmlRpcValue v; while (v.fromXml(valueXml, offset)) _value.asArray->push_back(v); // copy... // Skip the trailing (void) XmlRpcUtil::nextTagIsEnd(DATA_TAG, valueXml, offset); } return true; } // In general, its preferable to generate the xml of each element of the // array as it is needed rather than glomming up one big string. std::string XmlRpcValue::arrayToXml() const { std::string xml = ""; int s = int(_value.asArray->size()); for (int i=0; iat(i).toXml(); xml += ""; return xml; } // Struct bool XmlRpcValue::structFromXml(std::string const& valueXml, int* offset) { _type = TypeStruct; _value.asStruct = new ValueStruct; std::string name; bool emptyTag; while (XmlRpcUtil::nextTagIs(MEMBER_TAG, valueXml, offset, &emptyTag)) { if ( ! emptyTag) { if (XmlRpcUtil::parseTag(NAME_TAG, valueXml, offset, name)) { // value XmlRpcValue val(valueXml, offset); if ( ! val.valid()) { invalidate(); return false; } const std::pair p(name, val); _value.asStruct->insert(p); (void) XmlRpcUtil::nextTagIsEnd(MEMBER_TAG, valueXml, offset); } } } return true; } // In general, its preferable to generate the xml of each element // as it is needed rather than glomming up one big string. std::string XmlRpcValue::structToXml() const { std::string xml = ""; ValueStruct::const_iterator it; for (it=_value.asStruct->begin(); it!=_value.asStruct->end(); ++it) { xml += ""; xml += XmlRpcUtil::xmlEncode(it->first); xml += ""; xml += it->second.toXml(); xml += ""; } xml += ""; return xml; } // Write the value without xml encoding it std::ostream& XmlRpcValue::write(std::ostream& os) const { switch (_type) { default: break; case TypeBoolean: os << _value.asBool; break; case TypeInt: os << _value.asInt; break; case TypeDouble: os << _value.asDouble; break; case TypeString: os << *_value.asString; break; case TypeDateTime: { struct tm* t = _value.asTime; char buf[20]; snprintf(buf, sizeof(buf)-1, "%4d%02d%02dT%02d:%02d:%02d", t->tm_year,t->tm_mon,t->tm_mday,t->tm_hour,t->tm_min,t->tm_sec); buf[sizeof(buf)-1] = 0; os << buf; break; } case TypeBase64: { int iostatus = 0; std::ostreambuf_iterator out(os); xmlrpc_base64 encoder; encoder.put(_value.asBinary->begin(), _value.asBinary->end(), out, iostatus, xmlrpc_base64<>::crlf()); break; } case TypeArray: { int s = int(_value.asArray->size()); os << '{'; for (int i=0; i 0) os << ','; _value.asArray->at(i).write(os); } os << '}'; break; } case TypeStruct: { os << '['; ValueStruct::const_iterator it; for (it=_value.asStruct->begin(); it!=_value.asStruct->end(); ++it) { if (it!=_value.asStruct->begin()) os << ','; os << it->first << ':'; it->second.write(os); } os << ']'; break; } } return os; } } // namespace XmlRpc // ostream std::ostream& operator<<(std::ostream& os, XmlRpc::XmlRpcValue& v) { // If you want to output in xml format: //return os << v.toXml(); return v.write(os); } flrig-1.3.24/src/xmlrpcpp/XmlRpcMutex.h0000644000175000017500000000334512562731652014700 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCMUTEX_H_ #define _XMLRPCMUTEX_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif namespace XmlRpc { //! A simple platform-independent mutex API implemented for posix and windows. class XmlRpcMutex { public: //! Construct a Mutex object. XmlRpcMutex() : _pMutex(0) {} //! Destroy a Mutex object. ~XmlRpcMutex(); //! Wait for the mutex to be available and then acquire the lock. void acquire(); //! Release the mutex. void release(); //! Utility class to acquire a mutex at construction and release it when destroyed. struct AutoLock { //! Acquire the mutex at construction AutoLock(XmlRpcMutex& m) : _m(m) { _m.acquire(); } //! Release at destruction ~AutoLock() { _m.release(); } //! The mutex being held XmlRpcMutex& _m; }; private: //! Native Mutex object void* _pMutex; }; // class XmlRpcMutex } // namespace XmlRpc #endif // _XMLRPCMUTEX_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcServerMethod.h0000644000175000017500000000353512562731652016206 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCSERVERMETHOD_H_ #define _XMLRPCSERVERMETHOD_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include namespace XmlRpc { // Representation of a parameter or result value class XmlRpcValue; // The XmlRpcServer processes client requests to call RPCs class XmlRpcServer; //! Abstract class representing a single RPC method class XmlRpcServerMethod { public: //! Constructor XmlRpcServerMethod(std::string const& name, XmlRpcServer* server = 0); //! Destructor virtual ~XmlRpcServerMethod(); //! Returns the name of the method std::string& name() { return _name; } //! Execute the method. Subclasses must provide a definition for this method. virtual void execute(XmlRpcValue& params, XmlRpcValue& result) = 0; //! Returns a help string for the method. //! Subclasses should define this method if introspection is being used. virtual std::string help() { return std::string(); } protected: std::string _name; XmlRpcServer* _server; }; } // namespace XmlRpc #endif // _XMLRPCSERVERMETHOD_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcClient.h0000644000175000017500000001270012562731652015007 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCCLIENT_H_ #define _XMLRPCCLIENT_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #include "XmlRpcDispatch.h" #include "XmlRpcSource.h" namespace XmlRpc { // Arguments and results are represented by XmlRpcValues class XmlRpcValue; //! A class to send XML RPC requests to a server and return the results. class XmlRpcClient : public XmlRpcSource { public: //! Construct a client to connect to the server at the specified host:port address //! @param host The name of the remote machine hosting the server, eg "myserver.mycompany.com" //! @param port The port on the remote machine where the server is listening //! @param uri An optional string to be sent as the URI in the HTTP GET header //! Note that the host is not a URL, do not prepend "http://" or other protocol specifiers. XmlRpcClient(const char* host, int port, const char* uri=0); //! Construct a client to connect to the server at the specified host:port address including HTTP authentication //! @param host The name of the remote machine hosting the server //! @param port The port on the remote machine where the server is listening //! @param login The username passed to the server //! @param pass The password passed to the server //! @param uri An optional string to be sent as the URI in the HTTP GET header XmlRpcClient(const char* host, int port, const char* login, const char* password, const char* uri=0); //! Destructor virtual ~XmlRpcClient(); //! Execute the named procedure on the remote server. //! @param method The name of the remote procedure to execute //! @param params An array of the arguments for the method //! @param result The result value to be returned to the client //! @param timeoutSeconds Seconds to wait for a response (defaults to forever) //! @return true if the request was sent and a result received //! (although the result might be a fault). //! //! Currently this is a synchronous (blocking) implementation (execute //! does not return until it receives a response or an error). Use isFault() //! to determine whether the result is a fault response. bool execute(const char* method, XmlRpcValue const& params, XmlRpcValue& result, double timeoutSeconds = -1); //! Returns true if the result of the last execute() was a fault response. bool isFault() const { return _isFault; } //! Return the host name of the server const char* const host() const { return _host.c_str(); } //! Return the port int port() const { return _port; } //! Return the URI const char* const uri() const { return _uri.c_str(); } // XmlRpcSource interface implementation //! Close the connection virtual void close(); //! Handle server responses. Called by the event dispatcher during execute. //! @param eventType The type of event that occurred. //! @see XmlRpcDispatch::EventType virtual unsigned handleEvent(unsigned eventType); protected: // Execution processing helpers virtual bool doConnect(); virtual bool setupConnection(); virtual bool generateRequest(const char* method, XmlRpcValue const& params); virtual std::string generateHeader(std::string const& body); virtual bool writeRequest(); virtual bool readHeader(); virtual bool parseHeader(); virtual bool readResponse(); virtual bool parseResponse(XmlRpcValue& result); // Possible IO states for the connection enum ClientConnectionState { NO_CONNECTION, CONNECTING, WRITE_REQUEST, READ_HEADER, READ_RESPONSE, IDLE }; ClientConnectionState _connectionState; // Server location std::string _host; std::string _uri; int _port; // Login information for HTTP authentication std::string _login; std::string _password; // The xml-encoded request, http header of response, and response xml std::string _request; std::string _header; std::string _response; // Number of times the client has attempted to send the request int _sendAttempts; // Number of bytes of the request that have been written to the socket so far int _bytesWritten; // True if we are currently executing a request. If you want to multithread, // each thread should have its own client. bool _executing; // True if the server closed the connection bool _eof; // True if a fault response was returned by the server bool _isFault; // Number of bytes expected in the response body (parsed from response header) int _contentLength; // Event dispatcher XmlRpcDispatch _disp; }; // class XmlRpcClient } // namespace XmlRpc #endif // _XMLRPCCLIENT_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcServer.h0000644000175000017500000001266612562731652015052 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCSERVER_H_ #define _XMLRPCSERVER_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include #include #include "XmlRpcDispatch.h" #include "XmlRpcSource.h" namespace XmlRpc { // An abstract class supporting XML RPC methods class XmlRpcServerMethod; // Class representing connections to specific clients class XmlRpcServerConnection; // Class representing argument and result values class XmlRpcValue; //! A class to handle XML RPC requests class XmlRpcServer : public XmlRpcSource { public: //! Create a server object. XmlRpcServer(); //! Destructor. virtual ~XmlRpcServer(); //! Specify whether introspection is enabled or not. Default is not enabled. void enableIntrospection(bool enabled=true); //! Add a command to the RPC server void addMethod(XmlRpcServerMethod* method); //! Remove a command from the RPC server void removeMethod(XmlRpcServerMethod* method); //! Remove a command from the RPC server by name void removeMethod(const std::string& methodName); //! Look up a method by name XmlRpcServerMethod* findMethod(const std::string& name) const; //! Create a socket, bind to the specified port, and //! set it in listen mode to make it available for clients. //! @param port The port to bind and listen on (zero to choose an arbitrary port) bool bindAndListen(int port, int backlog = 5); //! Get the port number this server is listening on. int getPort(void) const; //! Process client requests for the specified time (in seconds) void work(double timeSeconds); //! Temporarily stop processing client requests and exit the work() method. void exit(); //! Close all connections with clients and the socket file descriptor void shutdown(); //! Introspection support void listMethods(XmlRpcValue& result); //! Parses the request xml, runs the method, generates the response (header+xml). //! Returns a fault response if an error occurs during method execution. virtual std::string executeRequest(std::string const& request); // XmlRpcSource interface implementation //! Handle client connection requests virtual unsigned handleEvent(unsigned eventType); //! Remove a connection from the dispatcher virtual void removeConnection(XmlRpcServerConnection*); protected: // Static data static const char METHODNAME_TAG[]; static const char PARAMS_TAG[]; static const char PARAM_TAG[]; static const std::string SYSTEM_MULTICALL; static const std::string METHODNAME; static const std::string PARAMS; static const std::string FAULTCODE; static const std::string FAULTSTRING; //! Accept a client connection request virtual void acceptConnection(); //! Create a new connection object for processing requests from a specific client. //! If the client is not authorized to connect, close the socket and return 0. virtual XmlRpcServerConnection* createConnection(XmlRpcSocket::Socket socket); //! Hand off a new connection object to a dispatcher. virtual void dispatchConnection(XmlRpcServerConnection* sc); //! Parse the methodName and parameters from the request. //! @returns the methodName std::string parseRequest(std::string const& request, XmlRpcValue& params); //! Execute a named method with the specified params. bool executeMethod(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result); //! Execute multiple calls and return the results in an array. //! System.multicall implementation bool executeMulticall(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result); //! Construct a response from the result XML. std::string generateResponse(std::string const& resultXml); //! Construct a fault response. std::string generateFaultResponse(std::string const& msg, int errorCode = -1); //! Return the appropriate headers for the response. std::string generateHeader(std::string const& body); //! Whether the introspection API is supported by this server bool _introspectionEnabled; //! Event dispatcher XmlRpcDispatch _disp; //! Collection of methods. This could be a set keyed on method name if we wanted... typedef std::map< std::string, XmlRpcServerMethod* > MethodMap; //! Registered RPC methods. MethodMap _methods; //! List all registered RPC methods (only available if introspection is enabled) XmlRpcServerMethod* _listMethods; //! Return help string for a specified method (only available if introspection is enabled) XmlRpcServerMethod* _methodHelp; }; } // namespace XmlRpc #endif //_XMLRPCSERVER_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcDispatch.h0000644000175000017500000000646212562731652015340 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _XMLRPCDISPATCH_H_ #define _XMLRPCDISPATCH_H_ #if defined(_MSC_VER) # pragma warning(disable:4786) // identifier was truncated in debug info #endif #include namespace XmlRpc { // An RPC source represents a file descriptor to monitor class XmlRpcSource; //! An object which monitors file descriptors for events and performs //! callbacks when interesting events happen. class XmlRpcDispatch { public: //! Constructor XmlRpcDispatch(); ~XmlRpcDispatch(); //! Values indicating the type of events a source is interested in enum EventType { ReadableEvent = 1, //!< data available to read WritableEvent = 2, //!< connected/data can be written without blocking Exception = 4 //!< uh oh }; //! Monitor this source for the event types specified by the event mask //! and call its event handler when any of the events occur. //! @param source The source to monitor //! @param eventMask Which event types to watch for. \see EventType void addSource(XmlRpcSource* source, unsigned eventMask); //! Stop monitoring this source. //! @param source The source to stop monitoring //! The source socket is not closed. void removeSource(XmlRpcSource* source); //! Modify the types of events to watch for on this source void setSourceEvents(XmlRpcSource* source, unsigned eventMask); //! Watch current set of sources and process events for the specified //! duration (in seconds, -1 implies wait forever, or until exit is called) void work(double timeSeconds); //! Exit from work routine void exit(); //! Clear all sources from the monitored sources list. Sources are closed. void clear(); protected: //! Wait for I/O on any source, timeout, or interrupt signal. bool waitForAndProcessEvents(double timeoutSeconds); //! Returns current time in seconds since something double getTime(); // A source to monitor and what to monitor it for struct MonitoredSource { MonitoredSource(XmlRpcSource* src, unsigned mask) : _src(src), _mask(mask) {} XmlRpcSource* getSource() const { return _src; } unsigned& getMask() { return _mask; } XmlRpcSource* _src; unsigned _mask; }; // A list of sources to monitor typedef std::vector< MonitoredSource > SourceList; // Sources being monitored SourceList _sources; // When work should stop (-1 implies wait forever, or until exit is called) double _endTime; bool _doClear; bool _inWork; }; } // namespace XmlRpc #endif // _XMLRPCDISPATCH_H_ flrig-1.3.24/src/xmlrpcpp/XmlRpcDispatch.cpp0000644000175000017500000001527412562731652015674 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcDispatch.h" #include "XmlRpcSource.h" #include "XmlRpcUtil.h" #include #include #if defined(__FreeBSD__) || defined(__OpenBSD__) # ifdef USE_FTIME # include # endif #else # include #endif // __FreeBSD__ #if defined(_WINDOWS) # include # define USE_FTIME # if defined(_MSC_VER) # define timeb _timeb # define ftime _ftime # endif #else # include #endif // _WINDOWS using namespace XmlRpc; XmlRpcDispatch::XmlRpcDispatch() { _endTime = -1.0; _doClear = false; _inWork = false; } XmlRpcDispatch::~XmlRpcDispatch() { } // Monitor this source for the specified events and call its event handler // when the event occurs void XmlRpcDispatch::addSource(XmlRpcSource* source, unsigned mask) { _sources.push_back(MonitoredSource(source, mask)); } // Stop monitoring this source. Does not close the source. void XmlRpcDispatch::removeSource(XmlRpcSource* source) { for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it) if (it->getSource() == source) { _sources.erase(it); break; } } // Modify the types of events to watch for on this source void XmlRpcDispatch::setSourceEvents(XmlRpcSource* source, unsigned eventMask) { for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it) if (it->getSource() == source) { it->getMask() = eventMask; break; } } // Watch current set of sources and process events void XmlRpcDispatch::work(double timeoutSeconds) { // Compute end time double timeNow = getTime(); _endTime = (timeoutSeconds < 0.0) ? -1.0 : (timeNow + timeoutSeconds); _doClear = false; _inWork = true; // Only work while there is something to monitor while (_sources.size() > 0) { // Wait for and dispatch events if ( ! waitForAndProcessEvents(timeoutSeconds)) { _inWork = false; return; } // Check whether to clear all sources if (_doClear) { SourceList sourcesToClose; _sources.swap(sourcesToClose); for (SourceList::iterator it=sourcesToClose.begin(); it!=sourcesToClose.end(); ++it) { XmlRpcSource *src = it->getSource(); src->close(); } _doClear = false; } // Check whether end time has passed or exit has been called if (_endTime == 0.0) // Exit { break; } else if (_endTime > 0.0) // Check for timeout { double t = getTime(); if (t > _endTime) break; // Decrement timeout by elapsed time timeoutSeconds -= (t - timeNow); if (timeoutSeconds < 0.0) timeoutSeconds = 0.0; // Shouldn't happen but its fp math... timeNow = t; } } _inWork = false; } // Exit from work routine. Presumably this will be called from // one of the source event handlers. void XmlRpcDispatch::exit() { _endTime = 0.0; // Return from work asap } // Clear all sources from the monitored sources list void XmlRpcDispatch::clear() { if (_inWork) { _doClear = true; // Finish reporting current events before clearing } else { SourceList sourcesToClose; _sources.swap(sourcesToClose); for (SourceList::iterator it=sourcesToClose.begin(); it!=sourcesToClose.end(); ++it) it->getSource()->close(); } } // Time utility- return time in seconds double XmlRpcDispatch::getTime() { #ifdef USE_FTIME struct timeb tbuff; ftime(&tbuff); return ((double) tbuff.time + ((double)tbuff.millitm / 1000.0) + ((double) tbuff.timezone * 60)); #else struct timeval tv; struct timezone tz; gettimeofday(&tv, &tz); return (tv.tv_sec + tv.tv_usec / 1000000.0); #endif /* USE_FTIME */ } // Wait for I/O on any source, timeout, or interrupt signal. bool XmlRpcDispatch::waitForAndProcessEvents(double timeoutSeconds) { // Construct the sets of descriptors we are interested in fd_set inFd, outFd, excFd; FD_ZERO(&inFd); FD_ZERO(&outFd); FD_ZERO(&excFd); XmlRpcSocket::Socket maxFd = 0; for (SourceList::iterator it=_sources.begin(); it!=_sources.end(); ++it) { XmlRpcSocket::Socket fd = it->getSource()->getfd(); if (it->getMask() & ReadableEvent) FD_SET(fd, &inFd); if (it->getMask() & WritableEvent) FD_SET(fd, &outFd); if (it->getMask() & Exception) FD_SET(fd, &excFd); if (it->getMask() && fd > maxFd) maxFd = fd; } // Check for events int nEvents; if (_endTime < 0.0) { nEvents = select(int(maxFd+1), &inFd, &outFd, &excFd, NULL); } else { struct timeval tv; tv.tv_sec = (int)floor(timeoutSeconds); tv.tv_usec = ((int)floor(1000000.0 * (timeoutSeconds-floor(timeoutSeconds)))) % 1000000; nEvents = select(int(maxFd+1), &inFd, &outFd, &excFd, &tv); } if (nEvents < 0 && errno != EINTR) { XmlRpcUtil::error("Error in XmlRpcDispatch::work: error in select (%d).", nEvents); return false; } // Process events. Copy source list to avoid invalidating iterator by removing sources. SourceList s(_sources); for (SourceList::iterator it=s.begin(); it != s.end(); ++it) { XmlRpcSource* src = it->getSource(); XmlRpcSocket::Socket fd = src->getfd(); if (fd <= maxFd) { // handleEvent is called once per event type signalled unsigned newMask = 0; int nset = 0; if (FD_ISSET(fd, &inFd)) { newMask |= src->handleEvent(ReadableEvent); ++nset; } if (FD_ISSET(fd, &outFd)) { newMask |= src->handleEvent(WritableEvent); ++nset; } if (FD_ISSET(fd, &excFd)) { newMask |= src->handleEvent(Exception); ++nset; } // Some event occurred if (nset) { // This bit is not terribly efficient if many connections are active... if (newMask) { setSourceEvents(src, newMask); } else // Stop monitoring this one { removeSource(src); if ( ! src->getKeepOpen()) src->close(); } } } } return true; } flrig-1.3.24/src/xmlrpcpp/XmlRpcBase64.h0000644000175000017500000002066412562731652014625 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #if !defined(__BASE64_H_INCLUDED__) #define __BASE64_H_INCLUDED__ 1 #include static int _xmlrpc_base64Chars[]= {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z', 'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z', '0','1','2','3','4','5','6','7','8','9', '+','/' }; #define _0000_0011 0x03 #define _1111_1100 0xFC #define _1111_0000 0xF0 #define _0011_0000 0x30 #define _0011_1100 0x3C #define _0000_1111 0x0F #define _1100_0000 0xC0 #define _0011_1111 0x3F #define _EQUAL_CHAR (-1) #define _UNKNOWN_CHAR (-2) #define _IOS_FAILBIT std::ios_base::failbit #define _IOS_EOFBIT std::ios_base::eofbit #define _IOS_BADBIT std::ios_base::badbit #define _IOS_GOODBIT std::ios_base::goodbit // TEMPLATE CLASS xmlrpc_base64_put template > class xmlrpc_base64 { public: typedef unsigned char byte_t; typedef _E char_type; typedef _Tr traits_type; // xmlrpc_base64 requires max line length <= 72 characters // you can fill end of line // it may be crlf, crlfsp, noline or other class like it struct crlf { template _OI operator()(_OI _To) const{ *_To = _Tr::to_char_type('\r'); ++_To; *_To = _Tr::to_char_type('\n'); ++_To; return (_To); } }; struct crlfsp { template _OI operator()(_OI _To) const{ *_To = _Tr::to_char_type('\r'); ++_To; *_To = _Tr::to_char_type('\n'); ++_To; *_To = _Tr::to_char_type(' '); ++_To; return (_To); } }; struct noline { template _OI operator()(_OI _To) const{ return (_To); } }; struct three2four { void zero() { _data[0] = 0; _data[1] = 0; _data[2] = 0; } byte_t get_0() const { return _data[0]; } byte_t get_1() const { return _data[1]; } byte_t get_2() const { return _data[2]; } void set_0(byte_t _ch) { _data[0] = _ch; } void set_1(byte_t _ch) { _data[1] = _ch; } void set_2(byte_t _ch) { _data[2] = _ch; } // 0000 0000 1111 1111 2222 2222 // xxxx xxxx xxxx xxxx xxxx xxxx // 0000 0011 1111 2222 2233 3333 int b64_0() const {return (_data[0] & _1111_1100) >> 2;} int b64_1() const {return ((_data[0] & _0000_0011) << 4) + ((_data[1] & _1111_0000)>>4);} int b64_2() const {return ((_data[1] & _0000_1111) << 2) + ((_data[2] & _1100_0000)>>6);} int b64_3() const {return (_data[2] & _0011_1111);} void b64_0(int _ch) {_data[0] = ((_ch & _0011_1111) << 2) | (_0000_0011 & _data[0]);} void b64_1(int _ch) { _data[0] = ((_ch & _0011_0000) >> 4) | (_1111_1100 & _data[0]); _data[1] = ((_ch & _0000_1111) << 4) | (_0000_1111 & _data[1]); } void b64_2(int _ch) { _data[1] = ((_ch & _0011_1100) >> 2) | (_1111_0000 & _data[1]); _data[2] = ((_ch & _0000_0011) << 6) | (_0011_1111 & _data[2]); } void b64_3(int _ch){ _data[2] = (_ch & _0011_1111) | (_1100_0000 & _data[2]);} private: byte_t _data[3]; }; template _II put(_II _First, _II _Last, _OI _To, _State& _St, _Endline _Endl) const { three2four _3to4; int line_octets = 0; while(_First != _Last) { _3to4.zero(); // 3 _3to4.set_0(*_First); _First++; if(_First == _Last) { *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_0()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_1()]); ++_To; *_To = _Tr::to_char_type('='); ++_To; *_To = _Tr::to_char_type('='); ++_To; goto __end; } _3to4.set_1(*_First); _First++; if(_First == _Last) { *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_0()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_1()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_2()]); ++_To; *_To = _Tr::to_char_type('='); ++_To; goto __end; } _3to4.set_2(*_First); _First++; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_0()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_1()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_2()]); ++_To; *_To = _Tr::to_char_type(_xmlrpc_base64Chars[_3to4.b64_3()]); ++_To; if(line_octets == 17) // xmlrpc_base64 72 { //_To = _Endl(_To); *_To = '\n'; ++_To; line_octets = 0; } else ++line_octets; } __end: ; return (_First); } template _II get(_II _First, _II _Last, _OI _To, _State& _St) const { three2four _3to4; int _Char; while(_First != _Last) { // Take octet _3to4.zero(); // -- 0 -- // Search next valid char... while((_Char = _getCharType(*_First)) < 0 && _Char == _UNKNOWN_CHAR) { if(++_First == _Last) { _St |= _IOS_FAILBIT|_IOS_EOFBIT; return _First; // unexpected EOF } } if(_Char == _EQUAL_CHAR){ // Error! First character in octet can't be '=' _St |= _IOS_FAILBIT; return _First; } else _3to4.b64_0(_Char); // -- 1 -- // Search next valid char... while(++_First != _Last) if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR) break; if(_First == _Last) { _St |= _IOS_FAILBIT|_IOS_EOFBIT; // unexpected EOF return _First; } if(_Char == _EQUAL_CHAR){ // Error! Second character in octet can't be '=' _St |= _IOS_FAILBIT; return _First; } else _3to4.b64_1(_Char); // -- 2 -- // Search next valid char... while(++_First != _Last) if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR) break; if(_First == _Last) { // Error! Unexpected EOF. Must be '=' or xmlrpc_base64 character _St |= _IOS_FAILBIT|_IOS_EOFBIT; return _First; } if(_Char == _EQUAL_CHAR){ // OK! _3to4.b64_2(0); _3to4.b64_3(0); // chek for EOF if(++_First == _Last) { // Error! Unexpected EOF. Must be '='. Ignore it. //_St |= _IOS_BADBIT|_IOS_EOFBIT; _St |= _IOS_EOFBIT; } else if(_getCharType(*_First) != _EQUAL_CHAR) { // Error! Must be '='. Ignore it. //_St |= _IOS_BADBIT; } else ++_First; // Skip '=' // write 1 byte to output *_To = (byte_t) _3to4.get_0(); return _First; } else _3to4.b64_2(_Char); // -- 3 -- // Search next valid char... while(++_First != _Last) if((_Char = _getCharType(*_First)) != _UNKNOWN_CHAR) break; if(_First == _Last) { // Unexpected EOF. It's error. But ignore it. //_St |= _IOS_FAILBIT|_IOS_EOFBIT; _St |= _IOS_EOFBIT; return _First; } if(_Char == _EQUAL_CHAR) { // OK! _3to4.b64_3(0); // write to output 2 bytes *_To = (byte_t) _3to4.get_0(); *_To = (byte_t) _3to4.get_1(); ++_First; // set position to next character return _First; } else _3to4.b64_3(_Char); // write to output 3 bytes *_To = (byte_t) _3to4.get_0(); *_To = (byte_t) _3to4.get_1(); *_To = (byte_t) _3to4.get_2(); ++_First; } // while(_First != _Last) return (_First); } protected: int _getCharType(int _Ch) const { if(_xmlrpc_base64Chars[62] == _Ch) return 62; if(_xmlrpc_base64Chars[63] == _Ch) return 63; if((_xmlrpc_base64Chars[0] <= _Ch) && (_xmlrpc_base64Chars[25] >= _Ch)) return _Ch - _xmlrpc_base64Chars[0]; if((_xmlrpc_base64Chars[26] <= _Ch) && (_xmlrpc_base64Chars[51] >= _Ch)) return _Ch - _xmlrpc_base64Chars[26] + 26; if((_xmlrpc_base64Chars[52] <= _Ch) && (_xmlrpc_base64Chars[61] >= _Ch)) return _Ch - _xmlrpc_base64Chars[52] + 52; if(_Ch == _Tr::to_int_type('=')) return _EQUAL_CHAR; return _UNKNOWN_CHAR; } }; #endif flrig-1.3.24/src/xmlrpcpp/XmlRpcServer.cpp0000644000175000017500000003320512562731652015375 00000000000000// ---------------------------------------------------------------------------- // // flxmlrpc Copyright (c) 2015 by W1HKJ, Dave Freese // // XmlRpc++ Copyright (c) 2002-2008 by Chris Morley // // This file is part of fldigi // // flxmlrpc is free software; you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "XmlRpcServer.h" #include "XmlRpcServerConnection.h" #include "XmlRpcServerMethod.h" #include "XmlRpcSocket.h" #include "XmlRpcUtil.h" #include "XmlRpcException.h" #include "XmlRpc.h" #include using namespace XmlRpc; // Static data const char XmlRpcServer::METHODNAME_TAG[] = "methodName"; const char XmlRpcServer::PARAMS_TAG[] = "params"; const char XmlRpcServer::PARAM_TAG[] = "param"; const std::string XmlRpcServer::METHODNAME = "methodName"; const std::string XmlRpcServer::PARAMS = "params"; const std::string XmlRpcServer::FAULTCODE = "faultCode"; const std::string XmlRpcServer::FAULTSTRING = "faultString"; XmlRpcServer::XmlRpcServer() { _introspectionEnabled = false; _listMethods = 0; _methodHelp = 0; } XmlRpcServer::~XmlRpcServer() { this->shutdown(); _methods.clear(); delete _listMethods; delete _methodHelp; } // Add a command to the RPC server void XmlRpcServer::addMethod(XmlRpcServerMethod* method) { _methods[method->name()] = method; } // Remove a command from the RPC server void XmlRpcServer::removeMethod(XmlRpcServerMethod* method) { MethodMap::iterator i = _methods.find(method->name()); if (i != _methods.end()) _methods.erase(i); } // Remove a command from the RPC server by name void XmlRpcServer::removeMethod(const std::string& methodName) { MethodMap::iterator i = _methods.find(methodName); if (i != _methods.end()) _methods.erase(i); } // Look up a method by name XmlRpcServerMethod* XmlRpcServer::findMethod(const std::string& name) const { MethodMap::const_iterator i = _methods.find(name); if (i == _methods.end()) return 0; return i->second; } // Create a socket, bind to the specified port, and // set it in listen mode to make it available for clients. bool XmlRpcServer::bindAndListen(int port, int backlog /*= 5*/) { XmlRpcSocket::Socket fd = XmlRpcSocket::socket(); if (XmlRpcSocket::Invalid == fd) { XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not create socket (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } this->setfd(fd); // Don't block on reads/writes if ( ! XmlRpcSocket::setNonBlocking(fd)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set socket to non-blocking input mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } // Allow this port to be re-bound immediately so server re-starts are not delayed if ( ! XmlRpcSocket::setReuseAddr(fd)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set SO_REUSEADDR socket option (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } // Bind to the specified port on the default interface if ( ! XmlRpcSocket::bind(fd, port)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not bind to specified port (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } // Set in listening mode if ( ! XmlRpcSocket::listen(fd, backlog)) { this->close(); XmlRpcUtil::error("XmlRpcServer::bindAndListen: Could not set socket in listening mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); return false; } XmlRpcUtil::log(2, "XmlRpcServer::bindAndListen: server listening on port %d fd %d", port, fd); // Notify the dispatcher to listen on this source when we are in work() _disp.addSource(this, XmlRpcDispatch::ReadableEvent); return true; } // Get port number that this server is listening on int XmlRpcServer::getPort(void) const { return XmlRpcSocket::getPort(getfd()); } // Process client requests for the specified time (in seconds) void XmlRpcServer::work(double timeSeconds) { XmlRpcUtil::log(2, "XmlRpcServer::work: waiting for a connection"); _disp.work(timeSeconds); } // Handle input on the server socket by accepting the connection // and reading the rpc request. unsigned XmlRpcServer::handleEvent(unsigned mask) { acceptConnection(); return XmlRpcDispatch::ReadableEvent; // Continue to monitor this fd } // Accept a client connection request and create a connection to // handle method calls from the client. void XmlRpcServer::acceptConnection() { XmlRpcSocket::Socket s = XmlRpcSocket::accept(this->getfd()); XmlRpcUtil::log(2, "XmlRpcServer::acceptConnection: socket %d", s); if (XmlRpcSocket::Invalid == s) { //this->close(); XmlRpcUtil::error("XmlRpcServer::acceptConnection: Could not accept connection (%s).", XmlRpcSocket::getErrorMsg().c_str()); } else if ( ! XmlRpcSocket::setNonBlocking(s)) { XmlRpcSocket::close(s); XmlRpcUtil::error("XmlRpcServer::acceptConnection: Could not set socket to non-blocking input mode (%s).", XmlRpcSocket::getErrorMsg().c_str()); } else // Notify the dispatcher to listen for input on this source when we are in work() { XmlRpcUtil::log(2, "XmlRpcServer::acceptConnection: creating a connection"); XmlRpcServerConnection* c = this->createConnection(s); if (c) this->dispatchConnection(c); } } // Create a new connection object for processing requests from a specific client. XmlRpcServerConnection* XmlRpcServer::createConnection(XmlRpcSocket::Socket s) { // Specify that the connection object be deleted when it is closed return new XmlRpcServerConnection(s, this, true); } // Hand off a new connection to a dispatcher void XmlRpcServer::dispatchConnection(XmlRpcServerConnection* sc) { _disp.addSource(sc, XmlRpcDispatch::ReadableEvent); } // Remove a connection. Called by the connection when it closes down. void XmlRpcServer::removeConnection(XmlRpcServerConnection* sc) { _disp.removeSource(sc); } // Stop processing client requests void XmlRpcServer::exit() { _disp.exit(); } // Close the server socket file descriptor and stop monitoring connections void XmlRpcServer::shutdown() { // This closes and destroys all connections as well as closing this socket _disp.clear(); } // Introspection support static const std::string LIST_METHODS("system.listMethods"); static const std::string METHOD_HELP("system.methodHelp"); static const std::string MULTICALL("system.multicall"); // List all methods available on a server class ListMethods : public XmlRpcServerMethod { public: ListMethods(XmlRpcServer* s) : XmlRpcServerMethod(LIST_METHODS, s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { _server->listMethods(result); } std::string help() { return std::string("List all methods available on a server as an array of strings"); } }; // Retrieve the help string for a named method class MethodHelp : public XmlRpcServerMethod { public: MethodHelp(XmlRpcServer* s) : XmlRpcServerMethod(METHOD_HELP, s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { if (params[0].getType() != XmlRpcValue::TypeString) throw XmlRpcException(METHOD_HELP + ": Invalid argument type"); XmlRpcServerMethod* m = _server->findMethod(params[0]); if ( ! m) throw XmlRpcException(METHOD_HELP + ": Unknown method name"); result = m->help(); } std::string help() { return std::string("Retrieve the help string for a named method"); } }; // Specify whether introspection is enabled or not. Default is enabled. void XmlRpcServer::enableIntrospection(bool enabled) { if (_introspectionEnabled == enabled) return; _introspectionEnabled = enabled; if (enabled) { if ( ! _listMethods) { _listMethods = new ListMethods(this); _methodHelp = new MethodHelp(this); } else { addMethod(_listMethods); addMethod(_methodHelp); } } else { removeMethod(LIST_METHODS); removeMethod(METHOD_HELP); } } void XmlRpcServer::listMethods(XmlRpcValue& result) { int i = 0; result.setSize(int(_methods.size())+1); for (MethodMap::iterator it=_methods.begin(); it != _methods.end(); ++it) result[i++] = it->first; // Multicall support is built into XmlRpcServer::executeRequest result[i] = MULTICALL; } // Parse the request, run the method, generate a response string. std::string XmlRpcServer::executeRequest(std::string const& request) { XmlRpcValue params, resultValue; std::string methodName = parseRequest(request, params); XmlRpcUtil::log(2, "XmlRpcServer::executeRequest: server calling method '%s'", methodName.c_str()); std::string response; try { if ( ! executeMethod(methodName, params, resultValue) && ! executeMulticall(methodName, params, resultValue)) response = generateFaultResponse(methodName + ": unknown method name"); else response = generateResponse(resultValue.toXml()); } catch (const XmlRpcException& fault) { XmlRpcUtil::log(2, "XmlRpcServer::executeRequest: fault %s.", fault.getMessage().c_str()); response = generateFaultResponse(fault.getMessage(), fault.getCode()); } return response; } // Parse the method name and the argument values from the request. std::string XmlRpcServer::parseRequest(std::string const& request, XmlRpcValue& params) { std::string methodName; int offset = 0; // Number of chars parsed from the request bool emptyTag; if (XmlRpcUtil::parseTag(METHODNAME_TAG, request, &offset, methodName) && XmlRpcUtil::findTag(PARAMS_TAG, request, &offset, &emptyTag) && ! emptyTag) { int nArgs = 0; while (XmlRpcUtil::nextTagIs(PARAM_TAG, request, &offset, &emptyTag)) { if (emptyTag) { params[nArgs++] = XmlRpcValue(""); } else { params[nArgs++] = XmlRpcValue(request, &offset); (void) XmlRpcUtil::nextTagIsEnd(PARAM_TAG, request, &offset); } } (void) XmlRpcUtil::nextTagIsEnd(PARAMS_TAG, request, &offset); } return methodName; } // Execute a named method with the specified params. bool XmlRpcServer::executeMethod(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result) { XmlRpcServerMethod* method = findMethod(methodName); if ( ! method) return false; method->execute(params, result); // Ensure a valid result value if ( ! result.valid()) result = std::string(); return true; } // Execute multiple calls and return the results in an array. bool XmlRpcServer::executeMulticall(const std::string& methodName, XmlRpcValue& params, XmlRpcValue& result) { if (methodName != MULTICALL) return false; // There ought to be 1 parameter, an array of structs if (params.size() != 1 || params[0].getType() != XmlRpcValue::TypeArray) throw XmlRpcException(MULTICALL + ": Invalid argument (expected an array)"); int nc = params[0].size(); result.setSize(nc); for (int i=0; i\r\n" "\r\n\t"; const char RESPONSE_2[] = "\r\n\r\n"; std::string body = RESPONSE_1 + resultXml + RESPONSE_2; std::string header = generateHeader(body); std::string response = header + body; XmlRpcUtil::log(5, "XmlRpcServer::generateResponse:\n%s\n", response.c_str()); return response; } // Prepend http headers std::string XmlRpcServer::generateHeader(std::string const& body) { std::string header = "HTTP/1.1 200 OK\r\n" "Server: "; header += XMLRPC_VERSION; header += "\r\n" "Content-Type: text/xml\r\n" "Content-length: "; char buffLen[40]; sprintf(buffLen,"%d\r\n\r\n", static_cast(body.size())); return header + buffLen; } std::string XmlRpcServer::generateFaultResponse(std::string const& errorMsg, int errorCode) { const char RESPONSE_1[] = "\r\n" "\r\n\t"; const char RESPONSE_2[] = "\r\n\r\n"; XmlRpcValue faultStruct; faultStruct[FAULTCODE] = errorCode; faultStruct[FAULTSTRING] = errorMsg; std::string body = RESPONSE_1 + faultStruct.toXml() + RESPONSE_2; std::string header = generateHeader(body); return header + body; } flrig-1.3.24/src/Makefile.am0000644000175000017500000002000212646444222012450 00000000000000# Copyright (c) 2008 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) bin_PROGRAMS = flrig MINGW32_SRC = \ flrig-rc.rc \ include/flrigrc.h \ support/mingw.c \ include/compat.h \ include/compat-mingw.h # Build the xmlrpcpp source if libflxmlrpc is not found XMLRPCPP_SRC = \ xmlrpcpp/XmlRpcBase64.h \ xmlrpcpp/XmlRpcClient.cpp \ xmlrpcpp/XmlRpcClient.h \ xmlrpcpp/XmlRpcDispatch.cpp \ xmlrpcpp/XmlRpcDispatch.h \ xmlrpcpp/XmlRpcException.h \ xmlrpcpp/XmlRpc.h \ xmlrpcpp/XmlRpcMutex.cpp \ xmlrpcpp/XmlRpcMutex.h \ xmlrpcpp/XmlRpcServerConnection.cpp \ xmlrpcpp/XmlRpcServerConnection.h \ xmlrpcpp/XmlRpcServer.cpp \ xmlrpcpp/XmlRpcServer.h \ xmlrpcpp/XmlRpcServerMethod.cpp \ xmlrpcpp/XmlRpcServerMethod.h \ xmlrpcpp/XmlRpcSocket.cpp \ xmlrpcpp/XmlRpcSocket.h \ xmlrpcpp/XmlRpcSource.cpp \ xmlrpcpp/XmlRpcSource.h \ xmlrpcpp/XmlRpcUtil.cpp \ xmlrpcpp/XmlRpcUtil.h \ xmlrpcpp/XmlRpcValue.cpp \ xmlrpcpp/XmlRpcValue.h # We distribute these but do not always compile them EXTRA_flrig_SOURCES = $(FLRIG_WIN32_RES_SRC) $(MINGW32_SRC) $(XMLRPCPP_SRC) flrig_SOURCES = if !ENABLE_FLXMLRPC flrig_SOURCES += $(XMLRPCPP_SRC) flrig_CPPFLAGS = @FLRIG_BUILD_CPPFLAGS@ flrig_CXXFLAGS = @FLRIG_BUILD_CXXFLAGS@ flrig_CFLAGS = $(flrig_CXXFLAGS) flrig_LDFLAGS = @FLRIG_BUILD_LDFLAGS@ flrig_LDADD = @FLRIG_BUILD_LDADD@ else flrig_CPPFLAGS = @FLRIG_BUILD_CPPFLAGS@ @FLXMLRPC_CFLAGS@ flrig_CXXFLAGS = @FLRIG_BUILD_CXXFLAGS@ @FLXMLRPC_CFLAGS@ flrig_CFLAGS = $(flrig_CXXFLAGS) flrig_LDFLAGS = @FLRIG_BUILD_LDFLAGS@ @FLXMLRPC_LIBS@ flrig_LDADD = @FLRIG_BUILD_LDADD@ endif if MINGW32 if HAVE_WINDRES flrig_SOURCES += $(MINGW32_SRC) endif endif ######################################################################## FLRIG_VERSION_MAJOR = @FLRIG_VERSION_MAJOR@ FLRIG_VERSION_MINOR = @FLRIG_VERSION_MINOR@ FLRIG_VERSION_PATCH = @FLRIG_VERSION_PATCH@ FLRIG_VERSION = @FLRIG_VERSION@ .EXPORT_ALL_VARIABLES: nsisinst appbundle # Sources that are generated, BUILT_SOURCES = # not distributed, nodist_flrig_SOURCES = $(BUILT_SOURCES) # and deleted by the clean targets CLEANFILES = $(BUILT_SOURCES) CLEAN_LOCAL = if MINGW32 if HAVE_WINDRES .rc.o: $(WINDRES) -I$(srcdir)/include -I$(srcdir)/../data/win32 $< -O coff $@ endif endif install-data-local: if test -f $(srcdir)/../data/flrig.xpm; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \ $(INSTALL_DATA) $(srcdir)/../data/flrig.xpm $(DESTDIR)/$(datadir)/pixmaps; \ fi if test -f $(srcdir)/../data/flrig.desktop; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/applications; \ $(INSTALL_DATA) $(srcdir)/../data/flrig.desktop $(DESTDIR)/$(datadir)/applications; \ fi uninstall-local: rm -f $(DESTDIR)/$(datadir)/pixmaps/flrig.xpm rm -f $(DESTDIR)/$(datadir)/applications/flrig.desktop INSTALLER_FILE = flrig-$(FLRIG_VERSION)_setup.exe APPBUNDLE=flrig-$(FLRIG_VERSION) APPBUNDLE_NOLIBS=$(APPBUNDLE)-nolibs if HAVE_NSIS nsisinst: $(bin_PROGRAMS) sh $(srcdir)/../scripts/mknsisinst.sh "$(srcdir)/../data" . CLEANFILES += $(INSTALLER_FILE) endif if DARWIN appbundle: $(bin_PROGRAMS) sh $(srcdir)/../scripts/mkappbundle.sh "$(srcdir)/../data" . CLEAN_LOCAL += $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg endif clean-local: -rm -rf $(CLEAN_LOCAL) # Sources that we build. It is OK to have headers here. flrig_SOURCES += \ graphics/pixmaps.cxx \ graphics/icons.cxx \ graphics/images.cxx \ main.cxx \ rigs/rigbase.cxx \ rigs/rigs.cxx \ rigs/FT100D.cxx \ rigs/FT450.cxx \ rigs/FT450D.cxx \ rigs/FT747.cxx \ rigs/FT767.cxx \ rigs/FT817.cxx \ rigs/FT847.cxx \ rigs/FT857D.cxx \ rigs/FT890.cxx \ rigs/FT900.cxx \ rigs/FT920.cxx \ rigs/FT950.cxx \ rigs/FT990.cxx \ rigs/FT990a.cxx \ rigs/FT991.cxx \ rigs/FT1000.cxx \ rigs/FT1000MP.cxx \ rigs/FT2000.cxx \ rigs/FTdx1200.cxx \ rigs/FTdx3000.cxx \ rigs/FT5000.cxx \ rigs/FTdx9000.cxx \ rigs/ICbase.cxx \ rigs/IC703.cxx \ rigs/IC706MKIIG.cxx \ rigs/IC718.cxx \ rigs/IC728.cxx \ rigs/IC735.cxx \ rigs/IC746.cxx \ rigs/IC756.cxx \ rigs/IC756PRO2.cxx \ rigs/IC756PRO3.cxx \ rigs/IC910.cxx \ rigs/IC7000.cxx \ rigs/IC7100.cxx \ rigs/IC7200.cxx \ rigs/IC7410.cxx \ rigs/IC7600.cxx \ rigs/IC7800.cxx \ rigs/IC9100.cxx \ rigs/IC7700.cxx \ rigs/K2.cxx \ rigs/K3.cxx \ rigs/KX3.cxx \ rigs/PCR1000.cxx \ rigs/RAY152.cxx \ rigs/TS140.cxx \ rigs/TS450S.cxx \ rigs/TS480HX.cxx \ rigs/TS480SAT.cxx \ rigs/TS570.cxx \ rigs/TS590S.cxx \ rigs/TS590SG.cxx \ rigs/TS990.cxx \ rigs/TS870S.cxx \ rigs/TS2000.cxx \ rigs/TT516.cxx \ rigs/DELTA-II.cxx \ rigs/TT538.cxx \ rigs/TT550.cxx \ rigs/TT563.cxx \ rigs/TT566.cxx \ rigs/TT588.cxx \ rigs/TT599.cxx \ support/debug.cxx \ support/dialogs.cxx \ support/ptt.cxx \ support/rig_io.cxx \ support/serial.cxx \ support/socket.cxx \ support/socket_io.cxx \ support/status.cxx \ support/support.cxx \ support/threads.cxx \ support/util.cxx \ support/xml_io.cxx \ UI/K3_ui.cxx \ UI/KX3_ui.cxx \ UI/rigpanel.cxx \ widgets/combo.cxx \ widgets/Fl_SigBar.cxx \ widgets/flinput2.cxx \ widgets/flslider2.cxx \ widgets/font_browser.cxx \ widgets/FreqControl.cxx \ widgets/hspinner.cxx \ widgets/ValueSlider.cxx \ server/xml_server.cxx # Additional source files that are distributed EXTRA_DIST = \ config.h \ flrig_icon.cxx \ UI/ui_bitmaps.cxx \ UI/ui_wide.cxx \ UI/ui_small.cxx \ UI/ui_touch.cxx \ UI/ui_setup.cxx \ UI/ui_memory.cxx \ UI/xcvr_setup.cxx \ UI/meters_setup.cxx \ UI/power_meter_setup.cxx \ include/combo.h \ include/debug.h \ include/dialogs.h \ include/fileselect.h \ include/font_browser.h \ include/flrigrc.h \ include/flinput2.h \ include/icons.h \ include/pixmaps.h \ include/flslider2.h \ include/Fl_SigBar.h \ include/FreqControl.h \ include/hspinner.h \ include/FT100D.h \ include/FT450.h \ include/FT450D.h \ include/FT747.h \ include/FT767.h \ include/FT817.h \ include/FT847.h \ include/FT857D.h \ include/FT920.h \ include/FT890.h \ include/FT900.h \ include/FT950.h \ include/FT990.h \ include/FT990a.h \ include/FT991.h \ include/FT1000.h \ include/FT1000MP.h \ include/FT2000.h \ include/FTdx1200.h \ include/FTdx3000.h \ include/FT5000.h \ include/FTdx9000.h \ include/generic.h \ include/gettext.h \ include/ICbase.h \ include/IC703.h \ include/IC706MKIIG.h \ include/IC718.h \ include/IC728.h \ include/IC735.h \ include/IC746.h \ include/IC756.h \ include/IC756PRO2.h \ include/IC756PRO3.h \ include/IC910.h \ include/IC7000.h \ include/IC7100.h \ include/IC7410.h \ include/IC7200.h \ include/IC7600.h \ include/IC7700.h \ include/IC7800.h \ include/IC9100.h \ include/images.h \ include/K2.h \ include/K3.h \ include/K3_ui.h \ include/KX3.h \ include/KX3_ui.h \ include/PCR1000.h \ include/RAY152.h \ include/mingw.h \ include/ptt.h \ include/rig.h \ include/rigs.h \ include/rigbase.h \ include/rig_io.h \ include/rigpanel.h \ include/serial.h \ include/xml_io.h \ include/socket.h \ include/socket_io.h \ include/status.h \ include/support.h \ include/threads.h \ include/TS140.h \ include/TS450S.h \ include/TS480HX.h \ include/TS480SAT.h \ include/TS570.h \ include/TS590S.h \ include/TS590SG.h \ include/TS870S.h \ include/TS990.h \ include/TS2000.h \ include/TT516.h \ include/DELTA-II.h \ include/TT538.h \ include/TT550.h \ include/TT563.h \ include/TT566.h \ include/TT588.h \ include/TT599.h \ include/ui.h \ include/util.h \ include/ValueSlider.h \ include/xml_server.h \ images/alc.xbm \ images/P25.xbm \ images/P50.xbm \ images/P100.xbm \ images/P200.xbm \ images/P200log.xbm \ images/S60.xbm \ images/SWR.xbm # Additional non-source files that are distributed # Additional source files that support non-Linux cross compilation EXTRA_DIST += \ $(srcdir)/../data/flrig.desktop \ $(srcdir)/../data/flrig.xpm \ $(srcdir)/../data/win32/fl_app.nsi \ $(srcdir)/../data/win32/flrig.ico \ $(srcdir)/../scripts/mknsisinst.sh \ $(srcdir)/../scripts/buildmxe.sh \ $(srcdir)/../scripts/builddist.sh \ $(srcdir)/../data/mac/Info.plist.in \ $(srcdir)/../data/mac/flrig.icns \ $(srcdir)/../scripts/mkappbundle.sh \ $(FLRIG_WIN32_SRC) \ $(FLRIG_FL_SRC) flrig-1.3.24/src/images/0000755000175000017500000000000012650266613011750 500000000000000flrig-1.3.24/src/images/P200log.xbm0000644000175000017500000000571312562731646013536 00000000000000#define P200log_width 205 #define P200log_height 18 static unsigned char P200log_bits[] = { 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x04, 0x00, 0x41, 0x44, 0x04, 0x82, 0x10, 0x22, 0x02, 0x82, 0x20, 0x08, 0x42, 0x00, 0x01, 0x01, 0x01, 0x81, 0x40, 0x20, 0x08, 0x82, 0x20, 0x84, 0x20, 0x04, 0x04, 0x00, 0x41, 0x44, 0x04, 0x82, 0x10, 0x22, 0x02, 0x82, 0x20, 0x08, 0x42, 0x00, 0x01, 0x01, 0x01, 0x81, 0x40, 0x20, 0x08, 0x82, 0x20, 0x84, 0x20, 0x04, 0x04, 0x00, 0x41, 0x44, 0x04, 0x82, 0x10, 0x22, 0x02, 0x82, 0x20, 0x08, 0x42, 0x00, 0x01, 0x01, 0x01, 0x81, 0x40, 0x20, 0x08, 0x82, 0x20, 0x84, 0x20, 0x04, 0x04, 0x00, 0x41, 0x44, 0x04, 0x80, 0x00, 0x02, 0x02, 0x80, 0x00, 0x08, 0x40, 0x00, 0x01, 0x01, 0x01, 0x81, 0x40, 0x20, 0x08, 0x82, 0x20, 0x84, 0x20, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x80, 0x00, 0x02, 0x02, 0x80, 0x00, 0x08, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0xe0, 0x38, 0x00, 0x00, 0x00, 0x3e, 0x07, 0x00, 0x00, 0x00, 0x71, 0x1c, 0x00, 0x00, 0xe4, 0x73, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x10, 0x45, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x00, 0xc0, 0x89, 0x22, 0x00, 0x00, 0x27, 0x88, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x82, 0x08, 0x00, 0x00, 0x00, 0x89, 0x22, 0x00, 0x00, 0x24, 0x88, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x00, 0x9c, 0x08, 0x00, 0x00, 0x00, 0x89, 0x22, 0x00, 0x00, 0xc4, 0x89, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x10, 0x00, 0x00, 0x80, 0x44, 0x00, 0x00, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x89, 0x22, 0x00, 0x00, 0x04, 0x8a, 0x00, 0x00, 0x00, 0xf0, 0x0c, 0x00, 0x00, 0x10, 0x00, 0x00, 0x40, 0x44, 0x00, 0x00, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x89, 0x22, 0x00, 0x00, 0x04, 0x8a, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x10, 0x00, 0x00, 0x20, 0x44, 0x00, 0x00, 0x00, 0xa0, 0x08, 0x00, 0x00, 0x00, 0x89, 0x22, 0x00, 0x00, 0x04, 0x8a, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x11, 0x00, 0x00, 0x10, 0x44, 0x00, 0x00, 0x00, 0xa2, 0x08, 0x00, 0x00, 0x00, 0x89, 0x22, 0x00, 0x00, 0x24, 0x8a, 0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x0e, 0x00, 0x00, 0xf0, 0x39, 0x00, 0x00, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x00, 0x71, 0x1c, 0x00, 0x00, 0xc4, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; flrig-1.3.24/src/images/P50.xbm0000644000175000017500000000567712562731646012770 00000000000000#define P50_width 205 #define P50_height 18 static unsigned char P50_bits[] = { 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0xc0, 0x89, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x80, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x40, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x40, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x80, 0x89, 0x00, 0x00, 0x00, 0x20, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0c, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x80, 0x88, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0xe0, 0x8b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x20, 0x88, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0xe0, 0x73, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; flrig-1.3.24/src/images/alc.xbm0000644000175000017500000000567712562731646013163 00000000000000#define alc_width 205 #define alc_height 18 static unsigned char alc_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x02, 0x07, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x82, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x82, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x0a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x82, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x82, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x82, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x82, 0x08, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x3e, 0x07, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07 }; flrig-1.3.24/src/images/SWR.xbm0000644000175000017500000000567712562731646013077 00000000000000#define SWR_width 205 #define SWR_height 18 static unsigned char SWR_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xf0, 0x01, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x00, 0xc0, 0x10, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0x00, 0x80, 0x10, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x80, 0xf0, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xa2, 0x82, 0x00, 0x01, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xa2, 0x85, 0x00, 0x01, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xaa, 0x80, 0x00, 0x01, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x88, 0xaa, 0x80, 0x10, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x94, 0x80, 0xe4, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7b, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x84, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x84, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7b, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x24, 0x49, 0x92, 0x24, 0x49, 0x92, 0x04, 0x41, 0x10, 0x04, 0x41, 0x10, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07 }; flrig-1.3.24/src/images/S60.xbm0000644000175000017500000000567712562731646012774 00000000000000#define S60_width 205 #define S60_height 18 static unsigned char S60_bits[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc3, 0x01, 0x00, 0x00, 0x1c, 0x0e, 0x00, 0x00, 0x0e, 0x07, 0x00, 0x00, 0x1c, 0x0e, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x00, 0x40, 0x24, 0x02, 0x00, 0x00, 0x22, 0x11, 0x00, 0x00, 0x91, 0x08, 0x00, 0x00, 0x22, 0x11, 0x00, 0x00, 0x80, 0x89, 0x00, 0x00, 0xa2, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x81, 0x08, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x80, 0x89, 0x00, 0x20, 0x82, 0x08, 0x00, 0x00, 0x00, 0x40, 0x00, 0x02, 0x00, 0x00, 0x02, 0x01, 0x00, 0x00, 0x81, 0x08, 0x00, 0x40, 0x20, 0x11, 0x00, 0x00, 0x42, 0x89, 0x00, 0x20, 0x82, 0x08, 0x00, 0x00, 0x00, 0x80, 0x83, 0x01, 0x00, 0x00, 0x1c, 0x0f, 0x00, 0x00, 0x0e, 0x0f, 0x00, 0x40, 0x10, 0x11, 0x00, 0x00, 0x42, 0x89, 0x00, 0xf8, 0x9e, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x10, 0x08, 0x00, 0xf0, 0x09, 0x11, 0x00, 0x80, 0x2f, 0x89, 0x00, 0x20, 0xa2, 0x08, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x20, 0x11, 0x00, 0x00, 0x10, 0x08, 0x00, 0x40, 0x04, 0x11, 0x00, 0x00, 0xe2, 0x8b, 0x00, 0x20, 0xa2, 0x08, 0x00, 0x00, 0x00, 0x40, 0x24, 0x02, 0x00, 0x00, 0x22, 0x11, 0x00, 0x00, 0x91, 0x08, 0x00, 0x40, 0x02, 0x11, 0x00, 0x00, 0x02, 0x89, 0x00, 0x00, 0xa2, 0x08, 0x00, 0x00, 0x00, 0x80, 0xc3, 0x01, 0x00, 0x00, 0x1c, 0x0e, 0x00, 0x00, 0x0e, 0x07, 0x00, 0x00, 0x3e, 0x0e, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x1c, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x04, 0x04, 0x20, 0x00, 0x02, 0x10, 0x00, 0x01, 0x08, 0x80, 0x00, 0x02, 0x08, 0x40, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x04, 0x20, 0x00, 0x02, 0x10, 0x00, 0x01, 0x08, 0x80, 0x00, 0x02, 0x08, 0x40, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x04, 0x20, 0x00, 0x02, 0x10, 0x00, 0x01, 0x08, 0x80, 0x00, 0x02, 0x08, 0x40, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0x04, 0x20, 0x00, 0x02, 0x10, 0x00, 0x01, 0x08, 0x80, 0x00, 0x02, 0x08, 0x40, 0x00, 0x40, 0x00, 0x80, 0x00, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x04, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07 }; flrig-1.3.24/src/images/P100.xbm0000644000175000017500000000570212562731646013031 00000000000000#define P100_width 205 #define P100_height 18 static unsigned char P100_bits[] = { 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x05, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x05, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x80, 0x89, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x80, 0x89, 0x00, 0x00, 0x00, 0x20, 0x88, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x40, 0x89, 0x00, 0x00, 0x00, 0x20, 0x88, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x40, 0x89, 0x00, 0x00, 0x00, 0xe0, 0x8b, 0x00, 0x00, 0x00, 0xc0, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0c, 0x00, 0x00, 0x80, 0x88, 0x00, 0x00, 0x00, 0x20, 0x89, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0xe0, 0x8b, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x20, 0x88, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0xe0, 0x73, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; flrig-1.3.24/src/images/P25.xbm0000644000175000017500000000567712562731646012772 00000000000000#define P25_width 205 #define P25_height 18 static unsigned char P25_bits[] = { 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x44, 0x04, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x80, 0x71, 0x00, 0x00, 0x00, 0x00, 0xf9, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x89, 0x00, 0x00, 0x00, 0xc0, 0x09, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x79, 0x00, 0x00, 0x00, 0x00, 0x8a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0c, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x80, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x00, 0x40, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x00, 0x11, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x20, 0x88, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0xe0, 0x73, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; flrig-1.3.24/src/images/P200.xbm0000644000175000017500000000570212562731646013032 00000000000000#define P200_width 205 #define P200_height 18 static unsigned char P200_bits[] = { 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x07, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x05, 0x54, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x55, 0x05, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x10, 0x40, 0x00, 0x01, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x40, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0x20, 0x8e, 0x03, 0x00, 0x00, 0x20, 0x8e, 0x03, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x80, 0x89, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x38, 0x51, 0x04, 0x00, 0x00, 0x38, 0x51, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x80, 0x89, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x20, 0x50, 0x04, 0x00, 0x00, 0x20, 0x41, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x40, 0x89, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x20, 0x50, 0x04, 0x00, 0x00, 0x20, 0x41, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x01, 0x00, 0x00, 0x40, 0x89, 0x00, 0x00, 0x00, 0xc0, 0x89, 0x00, 0x00, 0x00, 0x20, 0x48, 0x04, 0x00, 0x00, 0x20, 0x4f, 0x04, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x0c, 0x00, 0x00, 0x20, 0x89, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x20, 0x44, 0x04, 0x00, 0x00, 0x20, 0x51, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0xe0, 0x8b, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x20, 0x42, 0x04, 0x00, 0x00, 0x20, 0x51, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x12, 0x00, 0x00, 0x00, 0x89, 0x00, 0x00, 0x00, 0x20, 0x8a, 0x00, 0x00, 0x00, 0x20, 0x41, 0x04, 0x00, 0x00, 0x20, 0x51, 0x04, 0x00, 0x00, 0x00, 0x00, 0x10, 0x0c, 0x00, 0x00, 0x00, 0x71, 0x00, 0x00, 0x00, 0xc0, 0x71, 0x00, 0x00, 0x00, 0x20, 0x9f, 0x03, 0x00, 0x00, 0x20, 0x8e, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; flrig-1.3.24/src/config.h.in0000644000175000017500000001335312650265711012451 00000000000000/* src/config.h.in. Generated from configure.ac by autoheader. */ /* Build platform */ #undef BUILD_BUILD_PLATFORM /* Compiler */ #undef BUILD_COMPILER /* Configure arguments */ #undef BUILD_CONFIGURE_ARGS /* Build date */ #undef BUILD_DATE /* Build host */ #undef BUILD_HOST /* Host platform */ #undef BUILD_HOST_PLATFORM /* Target platform */ #undef BUILD_TARGET_PLATFORM /* Build user */ #undef BUILD_USER /* FLRIG compiler flags */ #undef FLRIG_BUILD_CXXFLAGS /* FLRIG linker flags */ #undef FLRIG_BUILD_LDFLAGS /* FLTK API major version */ #undef FLRIG_FLTK_API_MAJOR /* FLTK API minor version */ #undef FLRIG_FLTK_API_MINOR /* version string */ #undef FLRIG_VERSION /* major version number */ #undef FLRIG_VERSION_MAJOR /* minor version number */ #undef FLRIG_VERSION_MINOR /* patch/alpha version string */ #undef FLRIG_VERSION_PATCH /* FLTK version */ #undef FLTK_BUILD_VERSION /* flxmlrpc version */ #undef FLXMLRPC_BUILD_VERSION /* Define to 1 if we have clock_gettime */ #undef HAVE_CLOCK_GETTIME /* Define to 0 if not using dbg::stack */ #undef HAVE_DBG_STACK /* Define to 1 if we have dlopen */ #undef HAVE_DLOPEN /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* Define to 1 if you have the `gethostbyname' function. */ #undef HAVE_GETHOSTBYNAME /* Define to 1 if you have the `gmtime_r' function. */ #undef HAVE_GMTIME_R /* Define to 1 if you have the `hstrerror' function. */ #undef HAVE_HSTRERROR /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `localtime_r' function. */ #undef HAVE_LOCALTIME_R /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* Define to 1 if we have sem_timedwait */ #undef HAVE_SEM_TIMEDWAIT /* Define to 1 if we have sem_unlink */ #undef HAVE_SEM_UNLINK /* Define to 1 if you have the `setenv' function. */ #undef HAVE_SETENV /* Define to 1 if you have the `snprintf' function. */ #undef HAVE_SNPRINTF /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if you have the `socketpair' function. */ #undef HAVE_SOCKETPAIR /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strcasecmp' function. */ #undef HAVE_STRCASECMP /* Define to 1 if you have the `strcasestr' function. */ #undef HAVE_STRCASESTR /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strlcpy' function. */ #undef HAVE_STRLCPY /* Define to 1 if you have the `strncasecmp' function. */ #undef HAVE_STRNCASECMP /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* Define to 1 if you have the `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the `strtol' function. */ #undef HAVE_STRTOL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the `uname' function. */ #undef HAVE_UNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `unsetenv' function. */ #undef HAVE_UNSETENV /* Define to 1 if you have the `vsnprintf' function. */ #undef HAVE_VSNPRINTF /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if we are using flxmlrpc */ #undef USE_FLXMLRPC /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif /* Define to 1 if we are using x */ #undef USE_X /* Version number of package */ #undef VERSION /* x version */ #undef X_BUILD_VERSION /* Define to 1 if on MINIX. */ #undef _MINIX /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ #undef _POSIX_1_SOURCE /* Define to 1 if you need to in order for `stat' and other things to work. */ #undef _POSIX_SOURCE /* Define to 1 if we are building on mingw */ #undef __WOE32__ /* Define to `unsigned int' if does not define. */ #undef size_t flrig-1.3.24/src/flrig-rc.rc0000644000175000017500000000026312562731646012464 00000000000000#include // include for version info constants #include "flrigrc.h" IDI_ICON ICON DISCARDABLE "flrig.ico" //A ICON MOVEABLE PURE LOADONCALL DISCARDABLE "flrig.ico" flrig-1.3.24/src/widgets/0000755000175000017500000000000012650266613012151 500000000000000flrig-1.3.24/src/widgets/flinput2.cxx0000644000175000017500000001205212562731647014366 00000000000000// ===================================================================== // // flinput2.cxx // // Author: Stelios Buononos, M0GLD // Copyright: 2010 // // This file is part of flrig. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. It is // copyright under the GNU General Public License. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== #include "config.h" #include #include #include #include #include #include #include #include "icons.h" #include "flinput2.h" #include "gettext.h" #include "util.h" enum { OP_UNDO, OP_CUT, OP_COPY, OP_PASTE, OP_DELETE, OP_CLEAR, OP_SELECT_ALL }; static Fl_Menu_Item cmenu[] = { { icons::make_icon_label(_("Undo"), edit_undo_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Cut"), edit_cut_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Copy"), edit_copy_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Paste"), edit_paste_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Delete"), trash_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Clear"), edit_clear_icon), 0, 0, 0, FL_MENU_DIVIDER, _FL_MULTI_LABEL }, { icons::make_icon_label(_("Select All"), edit_select_all_icon), 0, 0, 0, 0, _FL_MULTI_LABEL }, { 0 } }; static bool cmenu_init = false; Fl_Input2::Fl_Input2(int x, int y, int w, int h, const char* l) : Fl_Input(x, y, w, h, l) { if (!cmenu_init) { for (size_t i = 0; i < sizeof(cmenu)/sizeof(*cmenu) - 1; i++) if (cmenu[i].labeltype() == _FL_MULTI_LABEL) icons::set_icon_label(&cmenu[i]); cmenu_init = true; } } int Fl_Input2::handle(int event) { switch (event) { case FL_KEYBOARD: { int b = Fl::event_key(); int p = position(); // stop the move-to-next-field madness, we have Tab for that! if (unlikely((b == FL_Left && p == 0) || (b == FL_Right && p == size()) || (b == FL_Up && line_start(p) == 0) || (b == FL_Down && line_end(p) == size()))) return 1; else if (unlikely(Fl::event_state() & (FL_ALT | FL_META))) { switch (b) { case 'c': { // capitalise if (readonly() || p == size()) return 1; while (p < size() && isspace(*(value() + p))) p++; if (p == size()) return 1; char c = toupper(*(value() + p)); replace(p, p + 1, &c, 1); position(word_end(p)); } return 1; case 'u': case 'l': { // upper/lower case if (readonly() || p == size()) return 1; while (p < size() && isspace(*(value() + p))) p++; int n = word_end(p) - p; if (n == 0) return 1; char* s = new char[n]; memcpy(s, value() + p, n); if (b == 'u') for (int i = 0; i < n; i++) s[i] = toupper(s[i]); else for (int i = 0; i < n; i++) s[i] = tolower(s[i]); replace(p, p + n, s, n); position(p + n); delete [] s; return 1; } default: break; } } } return Fl_Input::handle(event); case FL_MOUSEWHEEL: { if (!((type() & (FL_MULTILINE_INPUT | FL_MULTILINE_OUTPUT)) && Fl::event_inside(this))) return Fl_Input::handle(event); int d; if (!((d = Fl::event_dy()) || (d = Fl::event_dx()))) return Fl_Input::handle(event); if (Fl::focus() != this) take_focus(); up_down_position(d + (d > 0 ? line_end(position()) : line_start(position()))); return 1; } case FL_PUSH: if (Fl::event_button() == FL_RIGHT_MOUSE) break; // fall through default: return Fl_Input::handle(event); } bool sel = position() != mark(), ro = readonly(); icons::set_active(&cmenu[OP_UNDO], !ro); icons::set_active(&cmenu[OP_CUT], !ro && sel); icons::set_active(&cmenu[OP_COPY], sel); icons::set_active(&cmenu[OP_PASTE], !ro); icons::set_active(&cmenu[OP_DELETE], !ro && sel); icons::set_active(&cmenu[OP_CLEAR], !ro && size()); icons::set_active(&cmenu[OP_SELECT_ALL], size()); take_focus(); window()->cursor(FL_CURSOR_DEFAULT); int t = Fl_Tooltip::enabled(); Fl_Tooltip::disable(); const Fl_Menu_Item* m = cmenu->popup(Fl::event_x(), Fl::event_y()); Fl_Tooltip::enable(t); if (!m) return 1; switch (m - cmenu) { case OP_UNDO: undo(); break; case OP_CUT: cut(); copy_cuts(); break; case OP_COPY: copy(1); break; case OP_PASTE: Fl::paste(*this, 1); break; case OP_DELETE: cut(); break; case OP_CLEAR: cut(0, size()); break; case OP_SELECT_ALL: position(0, size()); break; } return 1; } flrig-1.3.24/src/widgets/font_browser.cxx0000644000175000017500000002110712562731647015335 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // based on similar widget by Mariwan Jalal and distributed with fltk // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include "font_browser.h" #include "flslider2.h" #include "gettext.h" using namespace std; Font_Browser* font_browser; // Font Color selected void Font_Browser::ColorSelect() { unsigned char r, g, b; Fl::get_color(fontcolor, r, g, b); if (fl_color_chooser(_("Font color"), r, g, b) == 0) return; fontcolor = fl_rgb_color(r, g, b); btn_Color->color(fontcolor); } void Font_Browser::fb_callback(Fl_Widget* w, void* arg) { Font_Browser* fb = reinterpret_cast(arg); if (w == fb->btn_Cancel) fb->hide(); else if (w == fb->btn_OK) { if (fb->callback_) (*fb->callback_)(fb, fb->data_); } else if (w == fb->btn_Color) fb->ColorSelect(); else if (w == fb->lst_Font) fb->FontNameSelect(); else { if (w == fb->lst_Size) fb->txt_Size->value(strtol(fb->lst_Size->text(fb->lst_Size->value()), NULL, 10)); fb->fontsize = static_cast(fb->txt_Size->value()); } fb->box_Example->SetFont(fb->fontnbr, fb->fontsize, fb->fontcolor); } // Sort the font list void Font_Browser::FontSort() { int size = lst_Font->size(); for ( int t = 1; t <= size - 1; t++ ) for ( int r = t+1; r <= size; r++ ) if ( strcasecmp(lst_Font->text(t), lst_Font->text(r)) > 0 ) lst_Font->swap(t,r); } // Font Name changed callback void Font_Browser::FontNameSelect() { int fn = lst_Font->value(); if (!fn) return; fontnbr = (Fl_Font)reinterpret_cast(lst_Font->data(fn)); // get sizes and fill browser; skip first element if it is zero lst_Size->clear(); int nsizes, *sizes; char buf[4]; nsizes = Fl::get_font_sizes(fontnbr, sizes); // for (int i = !*sizes; i < nsizes; i++) if ((size_t)snprintf(buf, sizeof(buf), "%d", sizes[i]) < sizeof(buf)) lst_Size->add(buf, reinterpret_cast(sizes[i])); // scalable font with no suggested sizes if (!lst_Size->size()) { for (int i = 1; i <= 48; i++) { snprintf(buf, sizeof(buf), "%d", i); lst_Size->add(buf, reinterpret_cast(i)); } } fontSize(fontsize); } Font_Browser::Font_Browser(int x, int y, int w, int h, const char *lbl ) : Fl_Window(x, y, w, h, lbl) { lst_Font = new Fl_Browser(5, 15, 280, 125, _("Font:")); lst_Font->align(FL_ALIGN_TOP_LEFT); lst_Font->type(FL_HOLD_BROWSER); lst_Font->callback(fb_callback, this); txt_Size = new Fl_Value_Input2(290, 15, 50, 22, _("Size:")); txt_Size->align(FL_ALIGN_TOP_LEFT); txt_Size->range(1.0, 48.0); txt_Size->step(1.0); txt_Size->callback(fb_callback, this); lst_Size = new Fl_Browser(290, 40, 50, 100); lst_Size->type(FL_HOLD_BROWSER); lst_Size->callback(fb_callback, this); btn_OK = new Fl_Return_Button(345, 40, 50, 25, _("&OK")); btn_OK->shortcut(0x8006f); btn_OK->callback(fb_callback, this); btn_Cancel = new Fl_Button(345, 70, 50, 25, _("Cancel")); btn_Cancel->labelsize(12); btn_Cancel->callback(fb_callback, this); btn_Color = new Fl_Button(345, 100, 50, 25, _("Color")); btn_Color->down_box(FL_BORDER_BOX); btn_Color->color(FL_FOREGROUND_COLOR); btn_Color->callback(fb_callback, this); box_Example = new Preview_Box(5, 145, 390, 75, _("That crazy fox jumped over the dog again!\n" "ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789\n" "!\"#$%&'()*+,-./:;<=>?@@[\\]^_`{|}~")); box_Example->box(FL_DOWN_BOX); box_Example->align(FL_ALIGN_WRAP|FL_ALIGN_CLIP|FL_ALIGN_CENTER|FL_ALIGN_INSIDE); resizable(box_Example); set_modal(); end(); // Initializations this->callback_ = 0; // Initialize Widgets callback this->data_ = 0; // And the data numfonts = Fl::set_fonts(0); // Nr of fonts available on the server const char* name; for(int i = 0; i < numfonts; i++) { name = Fl::get_font_name((Fl_Font)i); if (isalpha(*name)) lst_Font->add(name, reinterpret_cast(i)); } FontSort(); fontnbr = FL_HELVETICA;; fontsize = FL_NORMAL_SIZE; // Font Size to be used fontcolor = FL_FOREGROUND_COLOR; filter = ALL_TYPES; lst_Font->value(1); FontNameSelect(); //! Fl::focus(lst_Font); xclass(PACKAGE_NAME); } void Font_Browser::fontNumber(Fl_Font n) { fontnbr = n; lst_Font->value(1); int s = lst_Font->size(); for (int i = 1; i < s; i++ ) { if ((Fl_Font)reinterpret_cast(lst_Font->data(i)) == n) { lst_Font->value(i); FontNameSelect(); break; } } } void Font_Browser::fontSize(int s) { fontsize = s; int n = lst_Size->size(); for (int i = 1; i < n; i++) { if ((intptr_t)lst_Size->data(i) == fontsize) { lst_Size->value(i); break; } } txt_Size->value(s); } void Font_Browser::fontColor(Fl_Color c) { btn_Color->color(fontcolor = c); box_Example->SetFont(fontnbr, fontsize, fontcolor); box_Example->redraw(); } void Font_Browser::fontName(const char* n) { int s = lst_Font->size(); for (int i = 1; i < s; i++) { if (!strcmp(lst_Font->text(i), n)) { lst_Font->value(i); FontNameSelect(); } } } bool Font_Browser::fixed_width(Fl_Font f) { fl_font(f, FL_NORMAL_SIZE); return fl_width('X') == fl_width('i'); } #include #include #include class Progress_Window : public Fl_Double_Window { public: Progress_Window(float min = 0.0f, float max = 100.0f, const char* l = 0) : Fl_Double_Window(200, 34), ps(5, 5, 190, 24, l) { end(); range(min, max); ps.align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE); ps.selection_color(FL_SELECTION_COLOR); set_modal(); callback(nop); if (l && *l) { fl_font(FL_HELVETICA, FL_NORMAL_SIZE); int s = (int)(fl_width(l) + fl_width('W')); if (s > ps.w()) { ps.size(s, ps.h()); size(ps.w() + 10, h()); } } position(Fl::event_x_root() - w() / 2, Fl::event_y_root() - h()); xclass(PACKAGE_TARNAME); show(); } void range(float min, float max) { ps.minimum(min); ps.maximum(max); } void value(float val) { ps.value(val); } static void nop(Fl_Widget*, void*) { } private: Fl_Progress ps; }; void Font_Browser::fontFilter(filter_t filter) { if (this->filter == filter) return; int s = lst_Font->size(); static vector fixed; if (fixed.empty()) { Progress_Window pw(1, s, _("Reading fonts...")); fixed.resize(s); for (int i = 1; i < s; i++) { fixed[i] = fixed_width((Fl_Font)(intptr_t)(lst_Font->data(i))); pw.value(i); Fl::check(); } } switch (this->filter = filter) { case FIXED_WIDTH: for (int i = 1; i < s; i++) { if (fixed[i]) lst_Font->show(i); else lst_Font->hide(i); } break; case VARIABLE_WIDTH: for (int i = 1; i < s; i++) { if (!fixed[i]) lst_Font->show(i); else lst_Font->hide(i); } break; case ALL_TYPES: for (int i = 1; i < s; i++) lst_Font->show(i); break; } lst_Font->topline(lst_Font->value()); } ////////////////////////////////////////////////////////////////////// Preview_Box::Preview_Box(int x, int y, int w, int h, const char* l) : Fl_Widget(x, y, w, h, l) { fontName = 1; fontSize = FL_NORMAL_SIZE; box(FL_DOWN_BOX); color(FL_BACKGROUND2_COLOR); fontColor = FL_FOREGROUND_COLOR; } void Preview_Box::draw() { draw_box(); fl_font((Fl_Font)fontName, fontSize); fl_color(fontColor); fl_draw(label(), x()+3, y()+3, w()-6, h()-6, align()); } void Preview_Box::SetFont(int fontname, int fontsize, Fl_Color c) { fontName = fontname; fontSize = fontsize; fontColor = c; redraw(); } flrig-1.3.24/src/widgets/flslider2.cxx0000644000175000017500000000445412562731647014520 00000000000000// ---------------------------------------------------------------------------- // flslider2.cxx // // Copyright (C) 2010 // Stelios Bounanos, M0GLD // // This file is part of fldigi. // // Fldigi is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // Fldigi is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with fldigi. If not, see . // ---------------------------------------------------------------------------- #include #include "flslider2.h" #include "util.h" inline static int handle_scroll(Fl_Valuator* w, int event) { if (!(event == FL_MOUSEWHEEL && Fl::event_inside(w))) return 0; double d; if ((d = Fl::event_dy()) || (d = Fl::event_dx())) { if (Fl::event_state() & FL_SHIFT) d *= 10.0; if (!dynamic_cast(w) && !dynamic_cast(w) && !(w->type() & FL_HOR_SLIDER)) d = -d; w->value(w->clamp(w->increment(w->value(), static_cast(-d)))); w->do_callback(); } return 1; } int Fl_Slider2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Slider::handle(event); } int Fl_Value_Slider2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Value_Slider::handle(event); } int Fl_Counter2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Counter::handle(event); } int Fl_Value_Input2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Value_Input::handle(event); } inline static int handle_scroll(Fl_Spinner* w, int event) { if (!(event == FL_MOUSEWHEEL && Fl::event_inside(w))) return 0; double d; if ((d = Fl::event_dy()) || (d = Fl::event_dx())) { if (Fl::event_state() & FL_SHIFT) d *= 10.0; d = w->value() - d * w->step(); w->value(WCLAMP(d, w->minimum(), w->maximum())); w->do_callback(); } return 1; } int Fl_Spinner2::handle(int event) { return handle_scroll(this, event) ? 1 : Fl_Spinner::handle(event); } flrig-1.3.24/src/widgets/Fl_SigBar.cxx0000644000175000017500000000742212562731647014420 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- // // Please report all bugs and problems to: w1hkj@w1hkj.com // // Contents: // // Fl_SigBar::draw() - Draw the check button. // Fl_SigBar::Fl_SigBar() - Construct a Fl_SigBar widget. // // // Include necessary header files... // #include #include #include #include #include "Fl_SigBar.h" // // Fl_SigBar is a SigBar bar widget based off Fl_Widget that shows a // standard Signal Bar with a peak reading indicator ... // // // 'Fl_SigBar::draw()' - Draw the check button. // void Fl_SigBar::draw() { // Get the box borders... int bx = Fl::box_dx(box()); int by = Fl::box_dy(box()); int bw = Fl::box_dw(box()); int bh = Fl::box_dh(box()); // Size of SigBar bar... int SigBar; int PeakPos; // Draw the SigBar bar... // Draw the box and label... if (horiz == true) { int tx, tw; // Temporary X + width tx = x() + bx; tw = w() - bw; SigBar = (int)(tw * (value_ - minimum_) / (maximum_ - minimum_) + 0.5f); PeakPos = (int)(tw * (peakv_ - minimum_) / (maximum_ - minimum_) + 0.5f); if (SigBar > 0 ) { //|| PeakPos > 0) { fl_clip(x(), y(), SigBar + bx, h()); draw_box(box(), x(), y(), w(), h(), active_r() ? color() : fl_inactive(color())); fl_pop_clip(); fl_clip(tx + SigBar, y(), w() - SigBar, h()); draw_box(box(), x(), y(), w(), h(), active_r() ? color2() : fl_inactive(color2())); fl_pop_clip(); fl_clip(tx + PeakPos, y(), 2, h()); draw_box(box(), x(), y(), w(), h(), pkcolor); fl_pop_clip(); } else draw_box(box(), x(), y(), w(), h(), color2()); } else { int ty, th; // Temporary Y + height ty = y() + by; th = h() - bh; SigBar = (int)(th * (value_ - minimum_) / (maximum_ - minimum_) + 0.5f); PeakPos = (int)(th * (peakv_ - minimum_) / (maximum_ - minimum_) + 0.5f); if (SigBar > 0 ) { //|| PeakPos > 0) { fl_clip(x(), y(), w(), SigBar + by); draw_box(box(), x(), y(), w(), h(), FL_BLACK); fl_pop_clip(); fl_clip(x(), ty + SigBar, w(), h() - SigBar); draw_box(box(), x(), y(), w(), h(), color()); fl_pop_clip(); fl_clip(x(), ty + PeakPos, w(), 2); draw_box(box(), x(), y(), w(), h(), pkcolor); fl_pop_clip(); } else draw_box(box(), x(), y(), w(), h(), color2()); } } // // 'Fl_SigBar::Fl_SigBar()' - Construct a Fl_SigBar widget. // Fl_SigBar::Fl_SigBar(int X, int Y, int W, int H, const char* l) : Fl_Widget(X, Y, W, H, l) { align(FL_ALIGN_INSIDE); peakv_ = 0.0f; value_ = 0.0f; horiz = true; pkcolor = FL_RED; clear(); avg_ = 5; aging_ = 5; } void Fl_SigBar::peak( float v) { peakv_ = v; for (int i = 1; i < aging_; i++) if (peakv_ < (peak_[i-1] = peak_[i])) peakv_ = peak_[i]; peak_[aging_ - 1] = v; } void Fl_SigBar::value(float v) { // value_ -= vals_[0]; // for (int i = 1; i < avg_; i++) vals_[i-1] = vals_[i]; // value_ += (vals_[avg_- 1] = v / avg_); // peak(value_); peak(value_ = v); }; // // End of "$Id: Fl_SigBar.cxx 4288 2005-04-16 00:13:17Z mike $". // flrig-1.3.24/src/widgets/FreqControl.cxx0000644000175000017500000003343212562731647015066 00000000000000// ---------------------------------------------------------------------------- // Frequency Control Widget // // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include "FreqControl.h" #include "util.h" #include "gettext.h" const char *cFreqControl::Label[10] = { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9" }; void cFreqControl::IncFreq (int nbr) { double v = val; v += mult[nbr] * precision; if (v <= maxVal) { val += mult[nbr] * precision; updatevalue(); } do_callback(); } void cFreqControl::DecFreq (int nbr) { long v = 1; v = val - mult[nbr] * precision; if (v >= minVal) val = v; updatevalue(); do_callback(); } void cbSelectDigit (Fl_Widget *btn, void * nbr) { Fl_Button *b = (Fl_Button *)btn; int Nbr = (int)(reinterpret_cast (nbr)); cFreqControl *fc = (cFreqControl *)b->parent(); if (fc->hrd_buttons) { int yclick = Fl::event_y(); int fc_yc = fc->y() + fc->h()/2; if (yclick <= fc_yc) fc->IncFreq(Nbr); else fc->DecFreq(Nbr); } else { if (Fl::event_button1()) fc->IncFreq(Nbr); else if (Fl::event_button3()) fc->DecFreq(Nbr); } fc->redraw(); } cFreqControl::cFreqControl(int x, int y, int w, int h, const char *lbl): Fl_Group(x,y,w,h,"") { font_number = FL_COURIER; ONCOLOR = FL_YELLOW; OFFCOLOR = FL_BLACK; SELCOLOR = fl_rgb_color(100, 100, 100); ILLUMCOLOR = FL_GREEN; oldval = val = 0; precision = 1; dpoint = 3; W = w; nD = atoi(lbl); if (nD > MAX_DIGITS) nD = MAX_DIGITS; if (nD < MIN_DIGITS) nD = MIN_DIGITS; bdr = 2; fcHeight = h - 2 * bdr; int fw, fh, ht = fcHeight; fl_font(font_number, ++ht); fh = fl_height() + 1; while (fh > fcHeight) { ht--; fl_font(font_number, ht); fh = fl_height(); } fl_font(font_number, ht); fw = fl_width("0") + 4; pw = fw / 2; while( (nD * fw + pw) >= (W - 2*bdr)) { ht--; fl_font(font_number, ht); fw = fl_width("0") + 4; pw = fw / 2; } fh = fl_height(); wfill = (w - nD * fw - pw - 2*bdr) / 2; int wf2 = w - nD * fw - pw - 2*bdr - wfill; fcWidth = fw; fcTop = y + bdr; int xpos; box(FL_DOWN_BOX); color(OFFCOLOR); minVal = 0; maxVal = (long int)(pow(10, nD) - 1) * precision; double fmaxval = maxVal / 1000.0; static char tt[100]; snprintf(tt, sizeof(tt), "Enter frequency (max %.3f) or\nLeft/Right/Up/Down/Pg_Up/Pg_Down", fmaxval); tooltip(tt); hfill2 = new Fl_Box(x + w - bdr - wf2, fcTop, wf2, fcHeight, ""); hfill2->box(FL_FLAT_BOX); hfill2->labelcolor(ONCOLOR); hfill2->color(OFFCOLOR); xpos = x + w - bdr - wfill; for (int n = 0; n < 3; n++) { xpos -= fcWidth; Digit[n] = new Fl_Repeat_Button ( xpos, fcTop, fcWidth, fcHeight, " "); Digit[n]->box(FL_FLAT_BOX); Digit[n]->labelfont(font_number); Digit[n]->labelcolor(ONCOLOR); Digit[n]->color(OFFCOLOR, SELCOLOR); Digit[n]->labelsize(fh); Digit[n]->callback(cbSelectDigit, reinterpret_cast(n)); if (n == 0) mult[n] = 1; else mult[n] = 10 * mult[n-1]; } xpos -= pw; decbx = new Fl_Box(xpos, fcTop, pw, fcHeight,"."); decbx->box(FL_FLAT_BOX); decbx->labelfont(font_number); decbx->labelcolor(ONCOLOR); decbx->color(OFFCOLOR); decbx->labelsize(fh); for (int n = 3; n < nD; n++) { xpos -= fcWidth; Digit[n] = new Fl_Repeat_Button ( xpos, fcTop, fcWidth, fcHeight, " "); Digit[n]->box(FL_FLAT_BOX); Digit[n]->labelfont(font_number); Digit[n]->labelcolor(ONCOLOR); Digit[n]->color(OFFCOLOR, SELCOLOR); Digit[n]->labelsize(fh); Digit[n]->callback(cbSelectDigit, reinterpret_cast(n)); if (n == 0) mult[n] = 1; else mult[n] = 10 * mult[n-1]; } hfill1 = new Fl_Box(x + bdr, fcTop, Digit[nD-1]->x() - x - bdr, fcHeight, ""); hfill1->box(FL_FLAT_BOX); hfill1->labelcolor(ONCOLOR); hfill1->color(OFFCOLOR); cbFunc = NULL; end(); finp = new Fl_Float_Input(0, 0, 24,24);//1, 1); finp->callback(freq_input_cb, this); finp->when(FL_WHEN_CHANGED); parent()->remove(finp); precision = 1; hrd_buttons = true; colors_reversed = false; } cFreqControl::~cFreqControl() { for (int i = 0; i < nD; i++) { delete Digit[i]; } delete finp; } void cFreqControl::updatevalue() { long v = val / precision; int i; if (likely(v > 0L)) { for (i = 0; i < nD; i++) { Digit[i]->label(v == 0 ? "" : Label[v % 10]); v /= 10; } } else { for (i = 0; i < 4; i++) Digit[i]->label("0"); for (; i < nD; i++) Digit[i]->label(""); } decbx->label("."); redraw();//damage(); } void cFreqControl::font(Fl_Font fnt) { font_number = fnt; set_ndigits(nD); updatevalue(); } void cFreqControl::SetONOFFCOLOR( Fl_Color ONcolor, Fl_Color OFFcolor) { OFFCOLOR = REVONCOLOR = OFFcolor; ONCOLOR = REVOFFCOLOR = ONcolor; for (int n = 0; n < nD; n++) { Digit[n]->labelcolor(ONCOLOR); Digit[n]->color(OFFCOLOR); Digit[n]->redraw(); Digit[n]->redraw_label(); } decbx->labelcolor(ONCOLOR); decbx->color(OFFCOLOR); decbx->redraw(); decbx->redraw_label(); hfill1->labelcolor(ONCOLOR); hfill1->color(OFFCOLOR); hfill1->redraw(); hfill1->redraw_label(); hfill2->labelcolor(ONCOLOR); hfill2->color(OFFCOLOR); hfill2->redraw(); hfill2->redraw_label(); color(OFFCOLOR); redraw(); } void cFreqControl::SetONCOLOR (uchar r, uchar g, uchar b) { ONCOLOR = fl_rgb_color (r, g, b); REVOFFCOLOR = ONCOLOR; for (int n = 0; n < nD; n++) { Digit[n]->labelcolor(ONCOLOR); Digit[n]->color(OFFCOLOR); Digit[n]->redraw(); Digit[n]->redraw_label(); } decbx->labelcolor(ONCOLOR); decbx->color(OFFCOLOR); decbx->redraw(); decbx->redraw_label(); hfill1->color(OFFCOLOR); hfill1->labelcolor(ONCOLOR); hfill1->redraw(); hfill1->redraw_label(); hfill2->labelcolor(ONCOLOR); hfill2->color(OFFCOLOR); hfill2->redraw(); hfill2->redraw_label(); color(OFFCOLOR); redraw(); } void cFreqControl::SetOFFCOLOR (uchar r, uchar g, uchar b) { OFFCOLOR = fl_rgb_color (r, g, b); REVONCOLOR = OFFCOLOR; for (int n = 0; n < nD; n++) { Digit[n]->labelcolor(ONCOLOR); Digit[n]->color(OFFCOLOR); } decbx->labelcolor(ONCOLOR); decbx->color(OFFCOLOR); decbx->redraw(); decbx->redraw_label(); hfill1->color(OFFCOLOR); hfill1->labelcolor(ONCOLOR); hfill1->redraw(); hfill1->redraw_label(); hfill2->labelcolor(ONCOLOR); hfill2->color(OFFCOLOR); hfill2->redraw(); hfill2->redraw_label(); color(OFFCOLOR); redraw(); } static void blink_point(Fl_Widget* w) { w->label(*w->label() ? "" : "."); Fl::add_timeout(0.2, (Fl_Timeout_Handler)blink_point, w); } void cFreqControl::value(long lv) { oldval = val = lv; Fl::remove_timeout((Fl_Timeout_Handler)blink_point, decbx); updatevalue(); } void cFreqControl::restore_colors() { colors_reversed = false; for (int n = 0; n < nD; n++) { Digit[n]->labelcolor(ONCOLOR); Digit[n]->color(OFFCOLOR); Digit[n]->redraw(); Digit[n]->redraw_label(); } decbx->labelcolor(ONCOLOR); decbx->color(OFFCOLOR); decbx->redraw(); decbx->redraw_label(); hfill1->labelcolor(ONCOLOR); hfill1->color(OFFCOLOR); hfill1->redraw(); hfill1->redraw_label(); hfill2->labelcolor(ONCOLOR); hfill2->color(OFFCOLOR); hfill2->redraw(); hfill2->redraw_label(); color(OFFCOLOR); redraw(); } void cFreqControl::reverse_colors() { colors_reversed = true; for (int n = 0; n < nD; n++) { Digit[n]->labelcolor(REVONCOLOR); Digit[n]->color(REVOFFCOLOR); Digit[n]->redraw(); Digit[n]->redraw_label(); } decbx->labelcolor(REVONCOLOR); decbx->color(REVOFFCOLOR); decbx->redraw(); decbx->redraw_label(); hfill1->labelcolor(REVONCOLOR); hfill1->color(REVOFFCOLOR); hfill1->redraw(); hfill1->redraw_label(); hfill2->labelcolor(REVONCOLOR); hfill2->color(REVOFFCOLOR); hfill2->redraw(); hfill2->redraw_label(); color(REVOFFCOLOR); redraw(); } int cFreqControl::handle(int event) { int d; switch (event) { case FL_KEYBOARD: switch (d = Fl::event_key()) { case FL_Page_Up: if (Fl::event_shift()) IncFreq(1); else IncFreq(0); return 1; break; case FL_Page_Down: if (Fl::event_shift()) DecFreq(1); else DecFreq(0); return 1; break; case FL_Right: if (Fl::event_shift()) IncFreq(4); else IncFreq(2); return 1; break; case FL_Left: if (Fl::event_shift()) DecFreq(4); else DecFreq(2); return 1; break; case FL_Up: if (Fl::event_shift()) IncFreq(5); else IncFreq(3); return 1; break; case FL_Down: if (Fl::event_shift()) DecFreq(5); else DecFreq(3); return 1; break; default: if (Fl::event_ctrl()) { if (Fl::event_key() == 'v') { finp->handle(event); Fl::remove_timeout((Fl_Timeout_Handler)blink_point, decbx); return 1; } } if (Fl::has_timeout((Fl_Timeout_Handler)blink_point, decbx)) { if (d == FL_Escape) { Fl::remove_timeout((Fl_Timeout_Handler)blink_point, decbx); val = oldval; updatevalue(); return 1; } else if (d == FL_Enter || d == FL_KP_Enter) { // append finp->position(finp->size()); finp->replace(finp->position(), finp->mark(), "\n", 1); } } else { int ch = Fl::event_text()[0]; if (ch < '0' || ch > '9') return Fl_Group::handle(event); Fl::add_timeout(0.0, (Fl_Timeout_Handler)blink_point, decbx); finp->static_value(""); oldval = val; } return finp->handle(event); } val += d; updatevalue(); do_callback(); break; case FL_MOUSEWHEEL: if ( !((d = Fl::event_dy()) || (d = Fl::event_dx())) ) return 1; for (int i = 0; i < nD; i++) { if (Fl::event_inside(Digit[i])) { d > 0 ? DecFreq(i) : IncFreq(i); return 1; } } break; case FL_PUSH: return Fl_Group::handle(event); // in turn calls the digit[] callback } return Fl_Group::handle(event); } void cFreqControl::freq_input_cb(Fl_Widget*, void* arg) { cFreqControl* fc = reinterpret_cast(arg); double val = strtod(fc->finp->value(), NULL); long lval; val *= 1e3; val += 0.5; lval = (long)val; if (lval <= fc->maxVal) { fc->val = (long)val; fc->updatevalue(); if (fc->finp->index(fc->finp->size() - 1) == '\n' && val > 0.0) { Fl::remove_timeout((Fl_Timeout_Handler)blink_point, fc->decbx); fc->do_callback(); } } } static void restore_color(void* w) { cFreqControl *fc = (cFreqControl *)w; fc->restore_colors(); } void cFreqControl::visual_beep() { reverse_colors(); Fl::add_timeout(0.1, restore_color, this); } void cFreqControl::set_ndigits(int nbr) { delete decbx; for (int n = 0; n < nD; n++) { this->remove(Digit[n]); delete Digit[n]; } nD = nbr; if (nD > MAX_DIGITS) nD = MAX_DIGITS; if (nD < MIN_DIGITS) nD = MIN_DIGITS; int fw, fh, ht = h() - 2*bdr; fl_font(font_number, ht); fh = fl_height() + 1; while (fh > fcHeight) { ht--; fl_font(font_number, ht); fh = fl_height(); } fl_font(font_number, ht); fw = fl_width("0") + 4; pw = fw / 2; while( (nD * fw + pw) >= (W - 2*bdr)) { ht--; fl_font(font_number, ht); fw = fl_width("0") + 4; pw = fw / 2; } fh = fl_height(); fcWidth = fw; int wf1 = (w() - nD * fcWidth - pw - 2*bdr)/2; int wf2 = w() - nD * fcWidth - pw - 2*bdr - wf1; fcTop = y() + bdr; int xpos; minVal = 0; maxVal = (long int)(pow(10, nD) - 1) * precision; double fmaxval = maxVal / 1000.0; static char tt[100]; snprintf(tt, sizeof(tt), "Enter frequency (max %.3f) or\nLeft/Right/Up/Down/Pg_Up/Pg_Down", fmaxval); tooltip(tt); hfill2->resize(x() + w() - bdr - wf2, fcTop, wf2, fcHeight); xpos = x() + w() - bdr - wf2; for (int n = 0; n < dpoint; n++) { xpos -= fcWidth; Digit[n] = new Fl_Repeat_Button ( xpos, fcTop, fcWidth, fcHeight, " "); Digit[n]->box(FL_FLAT_BOX); Digit[n]->labelfont(font_number); Digit[n]->labelcolor(ONCOLOR); Digit[n]->color(OFFCOLOR, SELCOLOR); Digit[n]->labelsize(fh); Digit[n]->callback(cbSelectDigit, reinterpret_cast(n)); if (n == 0) mult[n] = 1; else mult[n] = 10 * mult[n-1]; this->add(Digit[n]); } xpos -= pw; decbx = new Fl_Box(xpos, fcTop, pw, fcHeight,"."); decbx->box(FL_FLAT_BOX); decbx->labelfont(font_number); decbx->labelcolor(ONCOLOR); decbx->color(OFFCOLOR); decbx->labelsize(fh); this->add(decbx); for (int n = dpoint; n < nD; n++) { xpos -= fcWidth; Digit[n] = new Fl_Repeat_Button ( xpos, fcTop, fcWidth, fcHeight, " "); Digit[n]->box(FL_FLAT_BOX); Digit[n]->labelfont(font_number); Digit[n]->labelcolor(ONCOLOR); Digit[n]->color(OFFCOLOR, SELCOLOR); Digit[n]->labelsize(fh); Digit[n]->callback(cbSelectDigit, reinterpret_cast(n)); if (n == 0) mult[n] = 1; else mult[n] = 10 * mult[n-1]; this->add(Digit[n]); } hfill1->resize(x() + bdr, fcTop, wf1, fcHeight); redraw(); } void cFreqControl::resize(int x, int y, int w, int h) { Fl_Group::resize(x,y,w,h); int wf1 = (w - nD * fcWidth - pw - 2*bdr) / 2; int wf2 = w - nD * fcWidth - pw - 2*bdr - wf1; hfill2->resize(x + w - bdr - wf2, y + bdr, wf2, h - 2*bdr); int xpos = x + w - bdr - wf2; int ypos = y + bdr; for (int n = 0; n < dpoint; n++) { xpos -= fcWidth; Digit[n]->resize(xpos, ypos, fcWidth, fcHeight); } xpos -= pw; decbx->resize(xpos, ypos, pw, fcHeight); for (int n = dpoint; n < nD; n++) { xpos -= fcWidth; Digit[n]->resize(xpos, ypos, fcWidth, fcHeight); } hfill1->resize(x + bdr, y + bdr, wf1, h - 2*bdr); Fl_Group::redraw(); } flrig-1.3.24/src/widgets/combo.cxx0000644000175000017500000002461412562731647013731 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include "combo.h" #include "util.h" void popbrwsr_cb (Fl_Widget *v, long d); Fl_PopBrowser::Fl_PopBrowser (int X, int Y, int W, int H, const char *label) : Fl_Window (X, Y, W, H, label) { hRow = H; wRow = W; clear_border(); box(FL_BORDER_BOX); align(FL_ALIGN_INSIDE); popbrwsr = new Fl_Select_Browser(0,0,wRow,hRow, ""); popbrwsr->callback ( (Fl_Callback*)popbrwsr_cb); popbrwsr->align(FL_ALIGN_INSIDE); parentCB = 0; end(); set_modal(); } Fl_PopBrowser::~Fl_PopBrowser () { delete popbrwsr; } int Fl_PopBrowser::handle(int event) { Fl_ComboBox *cbx = (Fl_ComboBox*)this->parent(); if (!Fl::event_inside( child(0) ) && event == FL_PUSH) { pophide(); return 1; } if (event == FL_KEYDOWN) { int kbd = Fl::event_key(); char key = Fl::event_text()[0]; if (kbd == FL_Down) { if (popbrwsr->value() < popbrwsr->size()) popbrwsr->select(popbrwsr->value() + 1); popbrwsr->bottomline(popbrwsr->value()); return 1; } if (kbd == FL_Up && popbrwsr->value() > 1) { popbrwsr->select(popbrwsr->value() - 1); return 1; } if (key == '\r' || kbd == FL_Enter) { // kbd test for OS X int n = popbrwsr->value() - 1; pophide(); cbx->index(n); cbx->do_callback(); return 1; } if (key == '\b' || kbd == FL_BackSpace) { // kbd test for OS X if (!keystrokes.empty()) keystrokes.erase(keystrokes.length() - 1, 1); return 1; } if (key == 0x1b || kbd == FL_Escape) { // kbd test for OS X pophide(); return 0; } if (key >= ' ' || key <= 0x7f) { keystrokes += key; for (int i = 0; i < cbx->listsize; i++) { if (strncasecmp(keystrokes.c_str(), cbx->datalist[i]->s, keystrokes.length()) == 0) { popbrwsr->select(i+1); popbrwsr->show(i+1); return 1; } } return 0; } } return Fl_Group::handle(event); } void Fl_PopBrowser::add(char *s, void *d) { popbrwsr->add(s,d); } void Fl_PopBrowser::clear() { popbrwsr->clear(); } void Fl_PopBrowser::sort() { return; } void Fl_PopBrowser::popshow (int x, int y) { int nRows = parentCB->numrows(); int fh = fl_height(); int height = nRows * fh + 4; if (popbrwsr->size() == 0) return; if (nRows > parentCB->lsize()) nRows = parentCB->lsize(); // locate first occurance of inp string value in the list // and display that if found int i = parentCB->index(); if (!(i >= 0 && i < parentCB->listsize)) { for (i = 0; i < parentCB->listsize; i++) if (parentCB->type_ == COMBOBOX) { if (!strcmp(parentCB->val->value(), parentCB->datalist[i]->s)) break; } else { if (!strcmp(parentCB->valbox->label(), parentCB->datalist[i]->s)) break; } if (i == parentCB->listsize) i = 0; } // resize and reposition the popup to insure that it is within the bounds // of the uppermost parent widget // preferred position is just below and at the same x position as the // parent widget Fl_Widget *gparent = parentCB; int hp = gparent->h(); while ((gparent = gparent->parent())) { hp = gparent->h(); parentWindow = gparent; } int nu = nRows, nl = nRows; int hu = nu * fh + 4, hl = nl * fh + 4; int yu = parentCB->y() - hu; int yl = y; while (nl > 1 && (yl + hl > hp)) { nl--; hl -= fh; } while (nu > 1 && yu < 0) { nu--; yu += fh; hu -= fh; } y = yl; height = hl; if (nl < nu) { y = yu; height = hu; } popbrwsr->size (wRow, height); resize (x, y, wRow, height); popbrwsr->topline (i); keystrokes.empty(); popbrwsr->show(); show(); for (const Fl_Widget* o = popbrwsr; o; o = o->parent()) ((Fl_Widget *)o)->set_visible(); parentWindow->damage(FL_DAMAGE_ALL); parentWindow->redraw(); Fl::grab(this); } void Fl_PopBrowser::pophide () { hide (); parentWindow->damage(FL_DAMAGE_ALL); parentWindow->redraw(); Fl::grab(0); Fl::focus(((Fl_ComboBox*)parent())->btn); } void Fl_PopBrowser::popbrwsr_cb_i (Fl_Widget *v, long d) { // update the return values Fl_Select_Browser *SB = (Fl_Select_Browser *)(v); Fl_PopBrowser *PB = (Fl_PopBrowser *)(SB->parent()); Fl_ComboBox *CB = (Fl_ComboBox *)(PB->parent()); int row = SB->value(); if (row == 0) return; SB->deselect(); CB->value(SB->text(row)); CB->idx = row - 1; PB->pophide(); CB->do_callback(); return; } void popbrwsr_cb (Fl_Widget *v, long d) { ((Fl_PopBrowser *)(v))->popbrwsr_cb_i (v, d); return; } void Fl_ComboBox::fl_popbrwsr(Fl_Widget *p) { int xpos = p->x(), ypos = p->h() + p->y(); // pass the calling widget to the popup browser so that the // correct callback function can be called when the user selects an item // from the browser list Brwsr->parentCB = (Fl_ComboBox *) p; Brwsr->clear_kbd(); Brwsr->popshow(xpos, ypos); return; } void btnComboBox_cb (Fl_Widget *v, void *d) { Fl_ComboBox *p = (Fl_ComboBox *)(v->parent()); p->fl_popbrwsr (p); return; } Fl_ComboBox::Fl_ComboBox (int X,int Y,int W,int H, const char *lbl, int wtype) : Fl_Group (X, Y, W, H, lbl), type_(wtype) { width = W; height = H; if (type_ == LISTBOX) { valbox = new Fl_Box (FL_DOWN_BOX, X, Y, W-H, H, ""); valbox->align(FL_ALIGN_INSIDE | FL_ALIGN_LEFT); valbox->color(FL_BACKGROUND2_COLOR); } else { val = new Fl_Input (X, Y, W-H, H, ""); val->align(FL_ALIGN_INSIDE | FL_ALIGN_LEFT); readonly(); } btn = new Fl_Button (X + W - H + 1, Y, H - 1, H, "@2>"); btn->callback ((Fl_Callback *)btnComboBox_cb, 0); Brwsr = 0; datalist = new datambr *[FL_COMBO_LIST_INCR]; maxsize = FL_COMBO_LIST_INCR; for (int i = 0; i < FL_COMBO_LIST_INCR; i++) datalist[i] = 0; listsize = 0; listtype = 0; Brwsr = new Fl_PopBrowser(X, Y, W, H, ""); Brwsr->align(FL_ALIGN_INSIDE); idx = 0; end(); numrows_ = 8; } Fl_ComboBox::~Fl_ComboBox() { delete Brwsr; for (int i = 0; i < listsize; i++) { if (datalist[i]) { if (datalist[i]->s) delete [] datalist[i]->s; delete datalist[i]; } } delete [] datalist; } int Fl_ComboBox::handle(int event) { if (event == FL_KEYDOWN) { int kbd = Fl::event_key(); if (kbd == FL_Down) { fl_popbrwsr (this); return 1; } } return Fl_Group::handle(event); } void Fl_ComboBox::type (int t) { listtype = t; } void Fl_ComboBox::readonly(bool yes) { if (type_ == LISTBOX) return; val->readonly(yes); if (yes) val->selection_color(fl_rgb_color(173,216,230)); else val->selection_color(FL_SELECTION_COLOR); } // ComboBox value is contained in the val widget const char *Fl_ComboBox::value() { if (type_ == LISTBOX) return valbox->label(); else return val->value(); } void Fl_ComboBox::value( const char *s ) { int i; if ((listtype & FL_COMBO_UNIQUE_NOCASE) == FL_COMBO_UNIQUE_NOCASE) { for (i = 0; i < listsize; i++) { if (strcasecmp (s, datalist[i]->s) == 0) break; } } else { for (i = 0; i < listsize; i++) { if (strcmp (s, datalist[i]->s) == 0) break; } } if ( i < listsize) { idx = i; if (type_ == LISTBOX) { valbox->label(datalist[idx]->s); valbox->redraw_label(); } else val->value(datalist[idx]->s); } } void Fl_ComboBox::put_value(const char *s) { value(s); } void Fl_ComboBox::index(int i) { if (i >= 0 && i < listsize) { idx = i; if (type_ == LISTBOX) { valbox->label(datalist[idx]->s); valbox->redraw_label(); } else val->value( datalist[idx]->s); } } int Fl_ComboBox::index() { return idx; } void * Fl_ComboBox::data() { return retdata; } void Fl_ComboBox::insert(const char *str, void *d) { datalist[listsize] = new datambr; datalist[listsize]->s = new char [strlen(str) + 1]; datalist[listsize]->s[0] = 0; strcpy (datalist[listsize]->s, str); datalist[listsize]->d = 0; Brwsr->add(datalist[listsize]->s,d); listsize++; if (listsize == maxsize) { int nusize = maxsize + FL_COMBO_LIST_INCR; datambr **temparray = new datambr *[nusize]; for (int i = 0; i < listsize; i++) temparray[i] = datalist[i]; delete [] datalist; datalist = temparray; maxsize = nusize; } } void Fl_ComboBox::add( const char *s, void * d) { std::string str = s; std::string sinsert; size_t p = str.find("|"); bool found = false; if (p != std::string::npos) { while (p != std::string::npos) { sinsert = str.substr(0, p); found = false; // test for in list if ((listtype & FL_COMBO_UNIQUE_NOCASE) == FL_COMBO_UNIQUE_NOCASE) { for (int i = 0; i < listsize; i++) { if (sinsert == datalist[i]->s) { found = true; break; } } } // not in list, so add this entry if (!found) insert(sinsert.c_str(), 0); str.erase(0, p+1); p = str.find("|"); } if (str.length()) insert(str.c_str(), 0); } else insert( s, d ); } void Fl_ComboBox::clear() { Brwsr->clear(); if (listsize == 0) return; for (int i = 0; i < listsize; i++) { delete [] datalist[i]->s; delete datalist[i]; } listsize = 0; } int DataCompare( const void *x1, const void *x2 ) { int cmp; datambr *X1, *X2; X1 = *(datambr **)(x1); X2 = *(datambr **)(x2); cmp = strcasecmp (X1->s, X2->s); if (cmp < 0) return -1; if (cmp > 0) return 1; return 0; } void Fl_ComboBox::sort() { Brwsr->clear (); qsort (&datalist[0], listsize, sizeof (datambr *), DataCompare); for (int i = 0; i < listsize; i++) Brwsr->add (datalist[i]->s, datalist[i]->d); } void Fl_ComboBox::textfont (int fnt) { if (type_ == LISTBOX) valbox->labelfont (fnt); else val->textfont (fnt); } void Fl_ComboBox::textsize (uchar n) { if (type_ == LISTBOX) valbox->labelsize(n); else val->textsize (n); } void Fl_ComboBox::textcolor( Fl_Color c) { if (type_ == LISTBOX) valbox->labelcolor (c); else val->textcolor (c); } void Fl_ComboBox::color(Fl_Color c) { _color = c; if (type_ == LISTBOX) valbox->color(c); else val->color(c); if (Brwsr) Brwsr->color(c); } flrig-1.3.24/src/widgets/ValueSlider.cxx0000644000175000017500000000346512562731647015052 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- //====================================================================== // class wheel_slider - based on Fl_Slider // class wheel_value_slider - based on Fl_Value_Slider //====================================================================== #include #include "ValueSlider.h" int Fl_Wheel_Slider::handle(int event) { if (event != FL_MOUSEWHEEL || !Fl::event_inside(this)) return Fl_Slider::handle(event); int d; if ( !((d = Fl::event_dy()) || (d = Fl::event_dx())) ) return Fl_Slider::handle(event); if (reverse_) d = -d; value(clamp(increment(value(), d))); do_callback(); return 1; } int Fl_Wheel_Value_Slider::handle(int event) { if (event != FL_MOUSEWHEEL || !Fl::event_inside(this)) return Fl_Value_Slider::handle(event); int d; if ( !((d = Fl::event_dy()) || (d = Fl::event_dx())) ) return Fl_Value_Slider::handle(event); if (reverse_) d = -d; value(clamp(increment(value(), d))); do_callback(); return 1; } flrig-1.3.24/src/widgets/hspinner.cxx0000644000175000017500000001106712562731647014456 00000000000000#include #include #include #include #include "hspinner.h" Hspinner::Hspinner(int X, int Y, int W, int H, const char *L, int W2) : Fl_Group(X, Y, W, H, L), input_(X + (W2 ? 2*W2 : 6*H/5), Y, (W2 ? W - 2*W2 : W - 6*H/5), H), down_button_(X, Y, (W2 ? W2 : 6*H/10), H), up_button_(X + (W2 ? W2 : 6*H/10), Y, (W2 ? W2 : 6*H/10), H) { end(); value_ = 1.0; minimum_ = 1.0; maximum_ = 100.0; step_ = 1.0; format_ = "%f"; sX = X; sY = Y; sW = W; sH = H; sW2 = (W2 ? W2 : H); align(FL_ALIGN_LEFT); input_.value("1"); input_.type(FL_INT_INPUT); input_.when(FL_WHEN_ENTER_KEY | FL_WHEN_RELEASE); input_.callback((Fl_Callback *)sb_cb, this); if (W2) { down_button_.labelsize( 3 * W2 / 4); up_button_.labelsize( 3 * W2 / 4); } else { down_button_.labelsize( 4*sH / 10); up_button_.labelsize( 4*sH / 10); } down_button_.label("@2>"); down_button_.callback((Fl_Callback *)sb_cb, this); down_button_.align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE); up_button_.label("@8>"); up_button_.callback((Fl_Callback *)sb_cb, this); up_button_.align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE); } /// Resized the widget void Hspinner::resize(int X, int Y, int W, int H, int W2) { sX = X; sY = Y; sW = W; sH = H; sW2 = (W2 ? W2 : 6*H/10); Fl_Group::resize(X,Y,W,H); input_.resize(sX + 2*sW2, sY, sW - 2*sW2, sH); if (W2) { down_button_.labelsize(W2 / 2); up_button_.labelsize(W2 / 2); } else { down_button_.labelsize(sH / 2); up_button_.labelsize(sH / 2); } down_button_.resize(sX, sY, sW2, sH); up_button_.resize(sX + sW2, sY, sW2, sH); } /// Sets or returns the amount to change the value when the user clicks a button. /// Before setting step to a non-integer value, the spinner /// type() should be changed to floating point. void Hspinner::step(double s) { step_ = s; if (step_ != (int)step_) { input_.type(FL_FLOAT_INPUT); if (step_ > 1.0) format ("%.0f"); else if (step_ >= 0.1) format("%.1f"); else if (step_ >= 0.01) format("%.01f"); else if (step_ >= 0.001) format("%.001f"); else if (step_ >= 0.0001) format("%.0001f"); else format("%f"); } else { input_.type(FL_INT_INPUT); format("%.0f"); } update(); } /// Sets the numeric representation in the input field. /// Valid values are FL_INT_INPUT and FL_FLOAT_INPUT. /// Also changes the format() template. /// Setting a new spinner type via a superclass pointer will not work. /// note: type is not a virtual function. void Hspinner::type(unsigned char v) { if (v==FL_FLOAT_INPUT) { if (step_ > 1.0) format ("%.0f"); else if (step_ >= 0.1) format("%.1f"); else if (step_ >= 0.01) format("%.01f"); else if (step_ >= 0.001) format("%.001f"); else if (step_ >= 0.0001) format("%.0001f"); else format("%f"); } else { format("%.0f"); } input_.type(v); } int Hspinner::handle(int event) { switch (event) { case FL_KEYDOWN : case FL_SHORTCUT : if (Fl::event_key() == FL_Up) { up_button_.do_callback(); return 1; } else if (Fl::event_key() == FL_Down) { down_button_.do_callback(); return 1; } else return 0; case FL_FOCUS : if (input_.take_focus()) return 1; else return 0; } return Fl_Group::handle(event); } /// Get/Set label font size void Hspinner::labelsize(Fl_Fontsize sz) { Fl_Group::labelsize(sz); } Fl_Fontsize Hspinner::labelsize() { return Fl_Group::labelsize(); } void Hspinner::sb_cb(Fl_Widget *w, Hspinner *sb) { double v; // New value if (w == &(sb->input_)) { // Something changed in the input field... v = atof(sb->input_.value()); if (v < sb->minimum_) { sb->value_ = sb->minimum_; sb->update(); } else if (v > sb->maximum_) { sb->value_ = sb->maximum_; sb->update(); } else sb->value_ = v; } else if (w == &(sb->up_button_)) { // Up button pressed... v = sb->value_ + sb->step_; if (v > sb->maximum_) sb->value_ = sb->maximum_; else sb->value_ = v; sb->update(); } else if (w == &(sb->down_button_)) { // Down button pressed... v = sb->value_ - sb->step_; if (v < sb->minimum_) sb->value_ = sb->minimum_; else sb->value_ = v; sb->update(); } sb->do_callback(); } void Hspinner::update() { char s[255]; // Value string if (format_[0]=='%'&&format_[1]=='.'&&format_[2]=='*') { int c = 0; char temp[64], *sp = temp; sprintf(temp, "%.12f", step_); while (*sp) sp++; sp--; while (sp>temp && *sp=='0') sp--; while (sp>temp && (*sp>='0' && *sp<='9')) { sp--; c++; } sprintf(s, format_, c, value_); } else { sprintf(s, format_, value_); } input_.value(s); } double Hspinner::value() { return (value_); } void Hspinner::value(double v) { value_ = v; update(); } flrig-1.3.24/src/server/0000755000175000017500000000000012650266613012011 500000000000000flrig-1.3.24/src/server/xml_server.cxx0000644000175000017500000005426212646444222014653 00000000000000// --------------------------------------------------------------------- // // xml_server.cxx, a part of flrig // // Copyright (C) 2014 // Dave Freese, W1HKJ // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with the program; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // --------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include "support.h" #include "debug.h" #include "xml_server.h" #include "XmlRpc.h" using namespace XmlRpc; // The server XmlRpcServer rig_server; //------------------------------------------------------------------------------ // Request for transceiver name //------------------------------------------------------------------------------ class rig_get_xcvr : public XmlRpcServerMethod { public: rig_get_xcvr(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_xcvr", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { result = selrig->name_; } std::string help() { return std::string("returns noun name of transceiver"); } } rig_get_xcvr(&rig_server); //------------------------------------------------------------------------------ // Request for info //------------------------------------------------------------------------------ string uname; string ufreq; string umode; string unotch; string ubw; string utx; static string sname() { string temp; temp.assign("R:").append(selrig->name_).append("\n"); return temp; } static string stx() { string temp; temp.assign("T:").append(btnPTT->value() ? "X" : "R").append("\n"); return temp; } static string tempfreq; static string tempmode; static string tempbw; static void freq_mode_bw() { string temp; int freq; int mode; int BW; static char szval[20]; if (useB) { guard_lock queB_lock(&mutex_queB); if (!queB.empty()) { freq = queB.back().freq; mode = queB.back().imode; } else { freq = vfoB.freq; mode = vfoB.imode; } } else { guard_lock queA_lock(&mutex_queA); if (!queA.empty()) { freq = queA.back().freq; mode = queA.back().imode; } else { freq = vfoA.freq; mode = vfoB.imode; } } snprintf(szval, sizeof(szval), "%d", freq); tempfreq.assign("F").append(useB ? "B:" : "A:").append(szval).append("\n"); BW = useB ? vfoB.iBW : vfoA.iBW; mode = useB ? vfoB.imode : vfoA.imode; const char **bwt = selrig->bwtable(mode); const char **dsplo = selrig->lotable(mode); const char **dsphi = selrig->hitable(mode); tempmode.assign("M:").append(selrig->modes_ ? selrig->modes_[mode] : "none").append("\n"); tempbw.assign("L:").append((BW > 256 && selrig->has_dsp_controls) ? (dsplo ? dsplo[BW & 0x7F] : "") : (bwt ? bwt[BW] : "")).append("\n"); tempbw.append("U:").append((BW > 256 && selrig->has_dsp_controls) ? (dsphi ? dsphi[(BW >> 8) & 0x7F] : "") : "").append("\n"); } static string snotch() { string temp; static char szval[20]; snprintf(szval, sizeof(szval), "%d", (int)(progStatus.notch_val)); temp.assign("N:").append(szval).append("\n"); return temp; } class rig_get_info : public XmlRpcServerMethod { public: rig_get_info(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_info", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { string info; uname = sname(); info.assign(uname); utx = stx(); info.append(utx); freq_mode_bw(); ufreq = tempfreq; info.append(ufreq); umode = tempmode; info.append(umode); ubw = tempbw; info.append(ubw); unotch = snotch(); info.append(unotch); result = info; } std::string help() { return std::string("returns all info in single string"); } } rig_get_info(&rig_server); class rig_get_update : public XmlRpcServerMethod { public: rig_get_update(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_update", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { string info; info.clear(); string temp; temp.clear(); if (selrig->has_smeter && !btnPTT->value()) { static char szval[10]; snprintf(szval, sizeof(szval), "S:%d\n", (int)mval); info.append(szval); } if (selrig->has_power_out && btnPTT->value()) { static char szval[10]; snprintf(szval, sizeof(szval), "P:%d\n", (int)mval); info.append(szval); } if ((temp = sname()) != uname) { uname = temp; info.append(uname); } if ((temp = stx()) != utx) { utx = temp; info.append(utx);} freq_mode_bw(); if (tempfreq != ufreq) { ufreq = tempfreq; info.append(ufreq); } if (tempmode != umode) { umode = tempmode; info.append(umode); } if (tempbw != ubw) { ubw = tempbw; info.append(ubw); } if ((temp = snotch()) != unotch) { unotch = temp; info.append(unotch); } if (info.empty()) info.assign("NIL"); result = info; } std::string help() { return std::string("returns all updates in single string"); } } rig_get_update(&rig_server); //------------------------------------------------------------------------------ // Request for PTT state //------------------------------------------------------------------------------ class rig_get_ptt : public XmlRpcServerMethod { public: rig_get_ptt(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_ptt", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { result = btnPTT->value(); } std::string help() { return std::string("returns state of PTT"); } } rig_get_ptt(&rig_server); //------------------------------------------------------------------------------ // Request for active vfo frequency //------------------------------------------------------------------------------ class rig_get_vfo : public XmlRpcServerMethod { public: rig_get_vfo(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_vfo", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { static char szfreq[20]; int freq; if (useB) { guard_lock queB_lock(&mutex_queB); if (!queB.empty()) freq = queB.back().freq; else freq = vfoB.freq; } else { guard_lock queA_lock(&mutex_queA); if (!queA.empty()) freq = queA.back().freq; else freq = vfoA.freq; } snprintf(szfreq, sizeof(szfreq), "%d", freq); std::string result_string = szfreq; result = result_string; } std::string help() { return std::string("returns active vfo in Hertz"); } } rig_get_vfo(&rig_server); //------------------------------------------------------------------------------ // Request for vfo in use //------------------------------------------------------------------------------ class rig_get_AB : public XmlRpcServerMethod { public: rig_get_AB(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_AB", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { // result[0] = useB ? "B" : "A"; result = useB ? "B" : "A"; } std::string help() { return std::string("returns vfo in use A or B"); } } rig_get_AB(&rig_server); //------------------------------------------------------------------------------ // Get notch value //------------------------------------------------------------------------------ int rig_xml_notch_val = 0; class rig_get_notch : public XmlRpcServerMethod { public: rig_get_notch(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_notch", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { if (progStatus.notch) result = (int)(progStatus.notch_val); else result = (int)0; } std::string help() { return std::string("returns notch value"); } } rig_get_notch(&rig_server); //------------------------------------------------------------------------------ // Set notch value //------------------------------------------------------------------------------ class rig_set_notch : public XmlRpcServerMethod { public: rig_set_notch(XmlRpcServer* s) : XmlRpcServerMethod("rig.set_notch", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { static int ntch; ntch = static_cast((double)(params[0])); progStatus.notch_val = ntch; if (ntch) progStatus.notch = true; else progStatus.notch = false; guard_lock serial_lock(&mutex_serial, 61); selrig->set_notch(progStatus.notch, progStatus.notch_val); Fl::awake(setNotchControl, static_cast(&ntch)); } std::string help() { return std::string("sets notch value"); } } rig_set_notch(&rig_server); //------------------------------------------------------------------------------ // Request list of modes //------------------------------------------------------------------------------ class rig_get_modes : public XmlRpcServerMethod { public : rig_get_modes(XmlRpcServer *s) : XmlRpcServerMethod("rig.get_modes", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { if (!selrig->modes_) { result = "none"; return; } XmlRpcValue modes; int i = 0; for (const char** mode = selrig->modes_; *mode; mode++, i++) modes[i] = *mode; result = modes; } std::string help() { return std::string("returns list of modes"); } } rig_get_modes(&rig_server); //------------------------------------------------------------------------------ // Request for active vfo sideband //------------------------------------------------------------------------------ class rig_get_sideband : public XmlRpcServerMethod { public: rig_get_sideband(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_sideband", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { int mode; if (useB) { guard_lock queB_lock(&mutex_queB); if (!queB.empty()) mode = queB.back().imode; else mode = vfoB.imode; } else { guard_lock queA_lock(&mutex_queA); if (!queA.empty()) mode = queA.back().imode; else mode = vfoA.imode; } std::string result_string = ""; result_string += selrig->get_modetype(mode); result = result_string; } std::string help() { return std::string("returns current xcvr sideband (U/L)"); } } rig_get_sideband(&rig_server); //------------------------------------------------------------------------------ // Request for active vfo mode //------------------------------------------------------------------------------ class rig_get_mode : public XmlRpcServerMethod { public: rig_get_mode(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_mode", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { int mode; if (useB) { guard_lock queB_lock(&mutex_queB); if (!queB.empty()) mode = queB.back().imode; else mode = vfoB.imode; } else { guard_lock queA_lock(&mutex_queA); if (!queA.empty()) mode = queA.back().imode; else mode = vfoA.imode; } std::string result_string = "none"; if (selrig->modes_) result_string = selrig->modes_[mode]; result = result_string; } std::string help() { return std::string("returns current xcvr mode"); } } rig_get_mode(&rig_server); //------------------------------------------------------------------------------ // Request array of bandwidths //------------------------------------------------------------------------------ class rig_get_bws : public XmlRpcServerMethod { public : rig_get_bws(XmlRpcServer *s) : XmlRpcServerMethod("rig.get_bws", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { if (!selrig->bandwidths_) { result = "none"; return; } XmlRpcValue bws; int mode = useB ? vfoB.imode : vfoA.imode; const char **bwt = selrig->bwtable(mode); const char **dsplo = selrig->lotable(mode); const char **dsphi = selrig->hitable(mode); // single bandwidth table if (!selrig->has_dsp_controls || !dsplo || !dsphi) { int i = 0; bws[0][0] = "Bandwidth"; while (*bwt) { bws[0][i+1] = *bwt; bwt++; i++; } } // double table either lo/hi or center/width if (selrig->has_dsp_controls && dsplo && dsphi) { int i = 0; int n = 1; std::string control_label = selrig->SL_label; control_label.append("|").append(selrig->SL_tooltip); bws[0][0] = control_label.c_str(); while (dsplo[i]) { bws[0][n] = dsplo[i]; n++; i++; } i = 0; control_label.assign(selrig->SH_label); control_label.append("|").append(selrig->SH_tooltip); bws[1][0] = control_label.c_str(); n = 1; while (dsphi[i]) { bws[1][n] = dsphi[i]; n++; i++; } } result = bws; } std::string help() { return std::string("returns array of bandwidths"); } } rig_get_bws(&rig_server); //------------------------------------------------------------------------------ // Request for active vfo bandwidth //------------------------------------------------------------------------------ class rig_get_bw : public XmlRpcServerMethod { public: rig_get_bw(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_bw", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { { guard_lock queA_lock(&mutex_queA); guard_lock queB_lock(&mutex_queB); if (! queA.empty() || !queB.empty()) { result[0] = ""; result[1] = ""; return; } } int BW = useB ? vfoB.iBW : vfoA.iBW; int mode = useB ? vfoB.imode : vfoA.imode; const char **bwt = selrig->bwtable(mode); const char **dsplo = selrig->lotable(mode); const char **dsphi = selrig->hitable(mode); //std::cout << "BW " << std::hex << BW << std::dec << "\n"; result[0] = (BW > 256 && selrig->has_dsp_controls) ? (dsplo ? dsplo[BW & 0x7F] : "") : (bwt ? bwt[BW] : ""); result[1] = (BW > 256 && selrig->has_dsp_controls) ? (dsphi ? dsphi[(BW >> 8) & 0x7F] : "") : ""; } std::string help() { return std::string("returns current bw L/U value"); } } rig_get_bw(&rig_server); class rig_get_smeter : public XmlRpcServerMethod { public: rig_get_smeter(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_smeter", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { if (!selrig->has_smeter) result = (int)(0); else result = (int)(mval); } } rig_get_smeter(&rig_server); class rig_get_pwrmeter : public XmlRpcServerMethod { public: rig_get_pwrmeter(XmlRpcServer* s) : XmlRpcServerMethod("rig.get_pwrmeter", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { if (!selrig->has_power_out) result = (int)(0); else result = (int)(mval); } } rig_get_pwrmeter(&rig_server); //============================================================================== // set interface //============================================================================== #include #include "rigbase.h" extern char *print(FREQMODE); extern queue queA; extern queue queB; extern queue quePTT; extern FREQMODE vfoA; extern FREQMODE vfoB; FREQMODE srvr_vfo; static void push_xml() { srvr_vfo.src = SRVR; char pr[200]; snprintf(pr, sizeof(pr), "srvr: %ld, mode: %i, bw-HI: %i | bw-LO %i", srvr_vfo.freq, srvr_vfo.imode, (srvr_vfo.iBW / 256), (srvr_vfo.iBW & 0xFF)); //std::cout << pr << "\n"; LOG_DEBUG("%s", pr); if (useB) { guard_lock gl_xmlqueB(&mutex_queB, 101); queB.push(srvr_vfo); } else { guard_lock gl_xmlqueA(&mutex_queA, 102); queA.push(srvr_vfo); } } //------------------------------------------------------------------------------ // Set PTT on (1) or off (0) //------------------------------------------------------------------------------ class rig_set_ptt : public XmlRpcServerMethod { public: rig_set_ptt(XmlRpcServer* s) : XmlRpcServerMethod("rig.set_ptt", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { int state = int(params[0]); if (state) Fl::awake(setPTT, (void *)1); else Fl::awake(setPTT, (void *)0); } std::string help() { return std::string("sets PTT on (1) or off (0)"); } } rig_set_ptt(&rig_server); //------------------------------------------------------------------------------ // Set vfo in use A or B //------------------------------------------------------------------------------ static void selectA(void *) { cb_selectA(); } static void selectB(void *) { cb_selectB(); } class rig_set_AB : public XmlRpcServerMethod { public: rig_set_AB(XmlRpcServer* s) : XmlRpcServerMethod("rig.set_AB", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { std::string ans = std::string(params[0]); if (ans == "A" && useB) Fl::awake(selectA); if (ans == "B" && !useB) Fl::awake(selectB); } std::string help() { return std::string("sets vfo in use A or B"); } } rig_set_AB(&rig_server); //------------------------------------------------------------------------------ // Set active vfo frequency //------------------------------------------------------------------------------ class rig_set_vfo : public XmlRpcServerMethod { public: rig_set_vfo(XmlRpcServer* s) : XmlRpcServerMethod("rig.set_vfo", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { long freq = static_cast(double(params[0])); // set the frequency in vfoA or vfoB if (useB) srvr_vfo = vfoB; else srvr_vfo = vfoA; srvr_vfo.freq = freq; push_xml(); } std::string help() { return std::string("rig.set_vfo NNNNNNNN (Hz)"); } } rig_set_vfo(&rig_server); //------------------------------------------------------------------------------ // Set mode //------------------------------------------------------------------------------ class rig_set_mode : public XmlRpcServerMethod { public: rig_set_mode(XmlRpcServer* s) : XmlRpcServerMethod("rig.set_mode", s) {} void execute(XmlRpcValue& params, XmlRpcValue &result) { if (useB) { guard_lock queB_lock(&mutex_queB); if (!queB.empty()) srvr_vfo = queB.back(); else srvr_vfo = vfoB; } else { guard_lock queA_lock(&mutex_queA); if (!queA.empty()) srvr_vfo = queA.back(); else srvr_vfo = vfoA; } std::string numode = string(params[0]); int i = 0; if (!selrig->modes_) return; if (numode == selrig->modes_[srvr_vfo.imode]) return; while (selrig->modes_[i] != NULL) { if (numode == selrig->modes_[i]) { srvr_vfo.imode = i; srvr_vfo.iBW = 0; push_xml(); break; } i++; } } std::string help() { return std::string("set_mode MODE_NAME"); } } rig_set_mode(&rig_server); //------------------------------------------------------------------------------ // Set bandwidth //------------------------------------------------------------------------------ class rig_set_bw : public XmlRpcServerMethod { public: rig_set_bw(XmlRpcServer* s) : XmlRpcServerMethod("rig.set_bw", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { int bw = int(params[0]); if (useB) { guard_lock queB_lock(&mutex_queB); if (!queB.empty()) srvr_vfo = queB.back(); else srvr_vfo = vfoB; } else { guard_lock queA_lock(&mutex_queA); if (!queA.empty()) srvr_vfo = queA.back(); else srvr_vfo = vfoA; } srvr_vfo.iBW = bw; printf("srvr_vfo.iBW: %X\n", bw); push_xml(); } std::string help() { return std::string("set_bw to VAL"); } } rig_set_bw(&rig_server); class rig_set_BW : public XmlRpcServerMethod { public: rig_set_BW(XmlRpcServer* s) : XmlRpcServerMethod("rig.set_BW", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { string bwstr = params; std::cout << bwstr << "\n"; /* int bw = int(params[0]); if (useB) { guard_lock queB_lock(&mutex_queB); if (!queB.empty()) srvr_vfo = queB.back(); else srvr_vfo = vfoB; } else { guard_lock queA_lock(&mutex_queA); if (!queA.empty()) srvr_vfo = queA.back(); else srvr_vfo = vfoA; } srvr_vfo.iBW = bw; push_xml(); */ } std::string help() { return std::string("set_bw to VAL"); } } rig_set_BW(&rig_server); struct MLIST { string name; string signature; string help; } mlist[] = { { "rig.get_AB", "s:n", "returns vfo in use A or B" }, { "rig.get_bw", "s:n", "return BW of current VFO" }, { "rig.get_bws", "s:n", "return table of BW values" }, { "rig.get_info", "s:n", "return an info string" }, { "rig.get_mode", "s:n", "return MODE of current VFO" }, { "rig.get_modes", "s:n", "return table of MODE values" }, { "rig.get_sideband", "s:n", "return sideband (U/L)" }, { "rig.get_notch", "s:n", "return notch value" }, { "rig.get_ptt", "s:n", "return PTT state" }, { "rig.get_pwrmeter", "s:n", "return PWR out" }, { "rig.get_smeter", "s:n", "return Smeter" }, { "rig.get_update", "s:n", "return update to info" }, { "rig.get_vfo", "s:n", "return current VFO in Hz" }, { "rig.get_xcvr", "s:n", "returns name of transceiver" }, { "rig.set_AB", "s:s", "set VFO A/B" }, { "rig.set_bw", "i:i", "set BW iaw BW table" }, { "rig.set_BW", "i:i", "set L/U pair" }, { "rig.set_mode", "i:i", "set MODE iaw MODE table" }, { "rig.set_notch", "d:d", "set NOTCH value in Hz" }, { "rig.set_ptt", "i:i", "set PTT 1/0 (on/off)" }, { "rig.set_vfo", "d:d", "set current VFO in Hz" } }; class rig_list_methods : public XmlRpcServerMethod { public: rig_list_methods(XmlRpcServer *s) : XmlRpcServerMethod("rig.list_methods", s) {} void execute(XmlRpcValue& params, XmlRpcValue& result) { vector methods; for (size_t n = 0; n < sizeof(mlist) / sizeof(*mlist); ++n) { XmlRpcValue::ValueStruct item; item["name"] = mlist[n].name; item["signature"] = mlist[n].signature; item["help"] = mlist[n].help; methods.push_back(item); } result = methods; } std::string help() { return std::string("get flrig methods"); } } rig_list_methods(&rig_server); //------------------------------------------------------------------------------ // support thread xmlrpc clients //------------------------------------------------------------------------------ pthread_t *xml_thread = 0; void * xml_thread_loop(void *d) { for(;;) { rig_server.work(-1.0); } return NULL; } void start_server(int port) { XmlRpc::setVerbosity(0); // Create the server socket on the specified port rig_server.bindAndListen(port); // Enable introspection rig_server.enableIntrospection(true); xml_thread = new pthread_t; if (pthread_create(xml_thread, NULL, xml_thread_loop, NULL)) { perror("pthread_create"); exit(EXIT_FAILURE); } } void exit_server() { rig_server.exit(); } flrig-1.3.24/src/include/0000755000175000017500000000000012650266613012126 500000000000000flrig-1.3.24/src/include/flinput2.h0000644000175000017500000000212112562731651013757 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FL_INPUT2_ #define FL_INPUT2_ #include class Fl_Input2 : public Fl_Input { public: Fl_Input2(int x, int y, int w, int h, const char* l = 0); int handle(int event); }; #endif // FL_INPUT2_ flrig-1.3.24/src/include/xml_io.h0000644000175000017500000000312012562731652013504 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef SOCK_XML_IO_H #define SOCK_XML_IO_H extern bool wait_query; extern bool fldigi_online; extern bool run_digi_loop; extern bool bypass_digi_loop; extern bool rig_reset; extern void open_rig_xmlrpc(); extern void close_rig_xmlrpc(); extern void send_new_freq(long); extern void send_smeter_val(int); extern void send_pwrmeter_val(int); extern void send_modes(); extern void send_bandwidths(); extern void send_name(); extern void send_ptt_changed(bool); extern void send_new_mode(int); extern void send_new_bandwidth(int); //! extern void send_rig_info(); extern void send_sideband(); extern void send_no_rig(); extern void send_xml_freq(long); extern void send_new_notch(int); extern void * digi_loop(void *d); #endif flrig-1.3.24/src/include/IC756PRO2.h0000644000175000017500000000515612562731651013427 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC756PRO2_H #define _IC756PRO2_H #include "ICbase.h" class RIG_IC756PRO2 : public RIG_ICOM { public: RIG_IC756PRO2(); ~RIG_IC756PRO2(){} void initialize(); void selectA(); void selectB(); void A2B(); long get_vfoA(void); void set_vfoA(long f); int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_bwA(); long get_vfoB(void); void set_vfoB(long f); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); int get_smeter(); void set_volume_control(int val); int get_volume_control(); void get_vol_min_max_step(int &min, int &max, int &step); void set_PTT_control(int val); void set_noise(bool val); int get_noise(); void set_noise_reduction(int val); int get_noise_reduction(); void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_mic_gain(int val); // int get_mic_gain(); void get_mic_gain_min_max_step(int &min, int &max, int &step); void set_if_shift(int val); // bool get_if_shift(int val); void get_if_min_max_step(int &min, int &max, int &step); void set_squelch(int val); // int get_squelch(); void set_rf_gain(int val); // int get_rf_gain(); void set_power_control(double val); void set_split(bool val); bool can_split() { return true;} void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); int adjust_bandwidth(int); int def_bandwidth(int); int get_swr(); int get_alc(); int get_power_out(); void tune_rig(); void set_notch(bool, int); bool get_notch(int&); void get_notch_min_max_step(int&, int&, int&); bool twovfos() { return false; } const char **bwtable(int); protected: int preamp_level; int atten_level; int ICvol; }; #endif flrig-1.3.24/src/include/support.h0000644000175000017500000002004612562731652013737 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef SUPPORT_H #define SUPPORT_H #include #include #include #include #include #ifndef WIN32 #include #include #include #endif #include #include #include #include #include "rig.h" #include "rigbase.h" #include "rig_io.h" #include "images.h" #include "serial.h" #include "status.h" #define LISTSIZE 200 #define ATAGSIZE 21 extern bool flrig_abort; extern FREQMODE vfo; extern FREQMODE vfoA; extern FREQMODE vfoB; extern FREQMODE xmlvfo; extern bool useB; extern bool PTT; extern bool localptt; extern Cserial RigSerial; extern Cserial AuxSerial; extern Cserial SepSerial; extern bool run_xmlrcp_thread; extern bool bandwidth_changed; extern bool modes_changed; extern bool bandwidths_changed; extern std::vector rigmodes_; extern std::vector rigbws_; extern rigbase *selrig; extern void cbExit(); extern void setVolumeControl(void *); extern void setModeControl(void *); extern void set_bandwidth_control(); extern void updateBandwidthControl(void *d = NULL); extern void updateBW(void *); extern void setBWControl(void *); extern void setNotchControl(void *); extern void adjust_if_shift_control(void *); extern void setIFshiftButton(void *); extern void setIFshiftControl(void *); extern void setPTT( void *); extern void setPreampControl(void *); extern void setAttControl(void *); extern void setMicGainControl(void *); extern void setMode(); extern void setBW(); extern void setDSP(); extern void selectDSP(); extern void addFreq(); extern void delFreq(); extern void buildlist(); extern void clearList(); extern void saveFreqList(); extern void readList(); extern void selectFreq(); extern int movFreqA(); extern int movFreqB(); extern void adjustFreqs(); extern void cbABactive(); extern void cbA2B(); extern void cb_selectA(); extern void cb_selectB(); extern void highlight_vfo(void *); extern void cb_set_split(int); extern void cbAswapB(); extern void cbRIT(); extern void cbXIT(); extern void cbBFO(); extern void cbAuxPort(); extern void cb_line_out(); extern void cb_agc_level(); extern void cb_cw_wpm(); extern void cb_cw_vol(); extern void cb_cw_spot(); extern void cb_cw_spot_tone(); extern void cb_cw_qsk(); extern void cb_cw_delay(); extern void cb_cw_weight(); extern void cb_enable_keyer(); extern void cb_enable_break_in(); extern void cb_vox_gain(); extern void cb_vox_anti(); extern void cb_vox_hang(); extern void cb_vox_onoff(); extern void cb_vox_on_dataport(); extern void cb_compression(); extern void setLower(); extern void setUpper(); extern void cb_vfo_adj(); extern void cb_line_out(); extern void cb_bpf_center(); extern void cb_special(); extern void cb_nb_level(); extern void setFocus(); // callbacks for tt550 transceiver extern void cb_tt550_line_out(); extern void cb_tt550_agc_level(); extern void cb_tt550_cw_wpm(); extern void cb_tt550_cw_vol(); extern void cb_tt550_cw_spot(); extern void cb_tt550_cw_weight(); extern void cb_tt550_spot_onoff(); extern void cb_tt550_enable_keyer(); extern void cb_tt550_vox_gain(); extern void cb_tt550_vox_anti(); extern void cb_tt550_vox_hang(); extern void cb_tt550_vox_onoff(); extern void cb_tt550_compression(); extern void cb_tt550_mon_vol(); extern void cb_tt550_tuner_bypass(); extern void cb_tt550_enable_xmtr(); extern void cb_tt550_enable_tloop(); extern void cb_tt550_nb_level(); extern void cb_tt550_use_line_in(); extern void cb_tt550_setXmtBW(); extern void cb_tt550_cw_qsk(); extern void closeRig(); extern void cbExit(); extern void about(); extern void setNotch(); extern void visit_URL(void* arg); extern void cbAttenuator(); extern void cbPreamp(); extern void cbNR(); extern void setNR(); extern void cbNoise(); extern void cbbtnNotch(); extern void setNotch(); extern void cbAN(); extern void setIFshift(); extern void cbIFsh(); extern void setVolume(); extern void setMicGain(); extern void cbbtnMicLine(); extern void setPower(); extern void setRFGAIN(); extern void setSQUELCH(); extern void cbTune(); extern void cbPTT(); //extern void cbSmeter(); extern void cbALC_SWR(); //extern void cbPWR(); extern void cbMute(); extern void cbEventLog(); extern void cbBandSelect(int band); extern void loadConfig(); extern void saveConfig(); extern void loadState(); extern void saveState(); extern void initRig(); extern void init_title(); extern void initConfigDialog(); extern void initStatusConfigDialog(); extern void initRigCombo(); extern void createXcvrDialog(); extern void open_poll_tab(); extern void open_send_command_tab(); extern void show_controls(); extern void open_xmlrpc_tab(); extern void open_tcpip_tab(); extern void open_ptt_tab(); extern void open_aux_tab(); extern void cb_close_TT550_setup(); extern void cbUseRepeatButtons(bool on); extern void nr_label(const char *, bool on); extern void nb_label(const char *, bool on); extern void preamp_label(const char *, bool on); extern void atten_label(const char *, bool on); extern void auto_notch_label(const char *,bool on); extern void enable_bandselect_btn(int btn_num, bool enable = true); // Display Dialog extern void cbUSBaudio(); extern void cbCIVdefault(); extern void cbCIV(); extern void cbOkXcvrDialog(); extern void cbCancelXcvrDialog(); extern void initCommPortTable (); extern void configXcvr(); extern void setColors(); extern void setDisplayColors(); extern void openMemoryDialog(); extern void cbCloseMemory(); extern void select_and_close(); extern void cbOkDisplayDialog(); extern void cbCancelDisplayDialog(); extern void cbPrefFont(); extern void cbPrefBackground(); extern void cbPrefForeground(); extern void cbSMeterColor(); extern void cbPwrMeterColor(); extern void cbSWRMeterColor(); extern void cbPeakMeterColor(); extern void cbBacklightColor(); extern void cb_sys_defaults(); extern void cb_sys_foreground(); extern void cb_sys_background(); extern void cb_sys_background2(); extern void cb_reset_display_dialog(); extern void cb_slider_background(); extern void cb_slider_select(); extern void cb_slider_defaults(); extern void cb_lighted_button(); extern void cb_lighted_default(); extern void cb_change_hrd_button(); extern Fl_Color flrig_def_color(int); extern void * serial_thread_loop( void * ); extern bool bypass_serial_thread_loop; extern bool bypass_xmlrcp_thread_loop; extern Cserial RigSerial; extern Cserial AuxSerial; extern char szttyport[]; extern int baudttyport; extern void serial_timer(void *); extern void init_xmlrpc(); extern void setFreqDispA(void *d); extern void setFreqDispB(void *d); extern void updateSmeter(void *d); extern void updateFwdPwr(void *d); extern void updateALC(void *d); extern void updateSWR(void *d); extern void updateSquelch(void *d); extern void updateRFgain(void *d); extern void zeroXmtMeters(void *d); extern void set_power_controlImage(double); extern void update_UI_PTT(void *d = NULL); extern void cb_send_command(); extern const string lt_trim(const string& pString, const string& pWhitespace = " \"\t"); extern void editAlphaTag(); extern void adjust_control_positions(); extern bool rig_notch; extern int rig_notch_val; extern void update_notch(void *d); extern int mval; extern queue queA; extern queue queB; extern queue quePTT; #endif flrig-1.3.24/src/include/dialogs.h0000644000175000017500000000220612562731651013642 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "font_browser.h" #include "support.h" extern Fl_Double_Window *dlgDisplayConfig; extern Fl_Double_Window *dlgXcvrConfig; extern Fl_Double_Window *dlgMemoryDialog; extern Fl_Double_Window *dlgControls; extern Font_Browser *fntbrowser; flrig-1.3.24/src/include/KX3.h0000644000175000017500000000470512562731651012633 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef KX3_H #define KX3_H #include "rigbase.h" class RIG_KX3 : public rigbase { #define KX3_WAIT_TIME 800 public: RIG_KX3(); ~RIG_KX3(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void set_volume_control(int val); int get_volume_control(); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); void set_power_control(double val); int get_power_control(); void get_pc_min_max_step(double &, double &, double &); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void get_if_mid(); void set_PTT_control(int val); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); int get_smeter(); void set_noise(bool on); int get_noise(); int get_modetype(int n); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int get_power_out(); int adjust_bandwidth(int m); int def_bandwidth(int m); bool can_split(); void set_split(bool val); int get_split(); bool twovfos() {return true;} void shutdown(); void set_pbt_values(int val); private: double minpwr; double maxpwr; double steppwr; // if shift value int if_mid; int if_min; int if_max; bool split_on; /* int get_swr(); void tune_rig(); */ }; #endif flrig-1.3.24/src/include/IC7100.h0000644000175000017500000000415112562731651013024 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC7100_H #define _IC7100_H #include "IC746.h" class RIG_IC7100 : public RIG_IC746PRO { public: RIG_IC7100(); ~RIG_IC7100(){} void initialize(); void selectA(); void selectB(); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int m); int def_bandwidth(int m); void set_attenuator( int val ); int get_attenuator(); void set_mic_gain(int v); void set_compression(); void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 10; step = 1; } void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void get_vox_hang_min_max_step(int &min, int &max, int &step) { min = 0; max = 200; step = 10; } void get_cw_wpm_min_max(int &min, int &max) { min = 6; max = 48; } void get_cw_qsk_min_max_step(double &min, double &max, double &step) { min = 2.0; max = 13.0; step = 0.1; } void get_cw_spot_tone_min_max_step(int &min, int &max, int &step) { min = 300; max = 900; step = 5; } void set_cw_wpm(); void set_cw_qsk(); void set_cw_spot_tone(); void set_cw_vol(); const char **bwtable(int m) {return bandwidths_;} }; #endif flrig-1.3.24/src/include/mingw.h0000644000175000017500000000514112562731652013343 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef MINGW_H_ #define MINGW_H_ #include #include #include #ifdef __cplusplus extern "C" { #endif typedef int pid_t; typedef long suseconds_t; #define hstrerror strerror #ifndef SIGUSR2 # define SIGUSR2 100 #endif /* * simple adaptors */ static inline int mingw_mkdir(const char *path, int mode) { return mkdir(path); } #define mkdir mingw_mkdir static inline int mingw_unlink(const char *pathname) { /* read-only files cannot be removed */ chmod(pathname, 0666); return unlink(pathname); } #define unlink mingw_unlink /* * implementations of missing functions */ unsigned int sleep (unsigned int seconds); char *mingw_getcwd(char *pointer, int len); #define getcwd mingw_getcwd char *mingw_getenv(const char *name); #define getenv mingw_getenv int mingw_rename(const char*, const char*); #define rename mingw_rename #ifndef SHUT_WR # define SHUT_WR SD_SEND #endif #ifndef SHUT_RD # define SHUT_RD SD_RECEIVE #endif #ifndef SHUT_RDWR # define SHUT_RDWR SD_BOTH #endif #ifndef EADDRINUSE # define EADDRINUSE WSAEADDRINUSE #endif int nanosleep (const struct timespec *req, struct timespec *rem); int socketpair(int family, int type, int protocol, int *sv); /* uname */ #define UTSNAME_MAX_ 257 struct utsname { char sysname[UTSNAME_MAX_]; char nodename[UTSNAME_MAX_]; char release[UTSNAME_MAX_]; char version[UTSNAME_MAX_]; char machine[UTSNAME_MAX_]; }; int uname(struct utsname *name); /* getrusage */ #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN (-1) struct rusage { struct timeval ru_utime; struct timeval ru_stime; }; int getrusage(int who, struct rusage *usage); /* fsync, fdatasync */ #include #define fsync _commit #define fdatasync fsync #ifdef __cplusplus } #endif #endif flrig-1.3.24/src/include/ValueSlider.h0000644000175000017500000000344012562731651014440 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- //====================================================================== // clase wheel_slider - based on Fl_Slider // class wheel_value_slider - based on Fl_Value_Slider //====================================================================== #include #include class Fl_Wheel_Slider : public Fl_Slider { private: bool reverse_; public: Fl_Wheel_Slider(int x, int y, int w, int h, const char *label = 0) : Fl_Slider(x, y, w, h, label), reverse_(false) { } int handle(int event); void reverse(bool rev) { reverse_ = rev;} bool reverse() { return reverse_;} }; class Fl_Wheel_Value_Slider : public Fl_Value_Slider { private: bool reverse_; public: Fl_Wheel_Value_Slider(int x, int y, int w, int h, const char *label = 0) : Fl_Value_Slider(x, y, w, h, label), reverse_(false) { } int handle(int event); void reverse(bool rev) { reverse_ = rev;} bool reverse() { return reverse_;} }; flrig-1.3.24/src/include/FT450D.h0000644000175000017500000000735312562731652013077 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FT450D_H #define _FT450D_H #include "rigbase.h" class RIG_FT450D : public rigbase { private: bool notch_on; int m_60m_indx; public: RIG_FT450D(); ~RIG_FT450D(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void selectA(); void selectB(); void A2B(); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_bwA(int val); int get_bwA(); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); bool twovfos() {return true;} bool can_split() {return true;} void set_split(bool); int get_split(); int get_smeter(); int get_swr(); int get_alc(); int get_power_out(); int get_power_control(); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 100; step = 1; } void set_volume_control(int val); int get_volume_control(); void get_vol_min_max_step(int &min, int &max, int &step); void set_power_control(double val); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_noise(bool b); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); void set_special(int v); void set_vox_onoff(); void set_vox_gain(); void get_vox_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } void set_vox_hang(); void get_vox_hang_min_max_step(int &min, int &max, int &step) { min = 100; max = 3000; step = 100; } void get_cw_wpm_min_max(int &min, int &max) { min = 4; max = 60; } void set_cw_weight(); void set_cw_wpm(); void enable_keyer(); void enable_break_in(); void set_cw_qsk(); void get_cw_qsk_min_max_step(double &min, double &max, double &step) { min = 30; max = 3000; step = 10; } void set_cw_delay(); void get_cw_delay_min_max_step(double &min, double &max, double &step) { min = 30; max = 3000; step = 10; } bool set_cw_spot(); void set_cw_spot_tone(); void get_cw_spot_tone_min_max_step(int &min, int &max, int &step) { min = 400; max = 800; step = 100; } void set_band_selection(int v); void get_nr_min_max_step(int &min, int &max, int &step) { min = 1; max = 11; step = 1; } void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_noise_reduction(int val); int get_noise_reduction(); void set_xcvr_auto_on(); void set_xcvr_auto_off(); int adjust_bandwidth(int); int def_bandwidth(int); const char ** bwtable(int); }; #endif flrig-1.3.24/src/include/rig_io.h0000644000175000017500000000343612646444222013474 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _RIG_IO_H #define _RIG_IO_H #include #include #include enum { QUIET, ERR, WARN, INFO, DEBUG }; enum { ASC, HEX }; using namespace std; enum MODES {LSB, USB, CW}; enum BAUDS { BR300, BR600, BR1200, BR2400, BR4800, BR9600, BR19200, BR38400, BR57600, BR115200, BR230400, BR460800 }; #define RXBUFFSIZE 16384 extern const char *szBaudRates[]; extern bool startXcvrSerial(); extern bool startAuxSerial(); extern bool startSepSerial(); extern int readResponse(); extern int sendCommand(string s, int nread = 0); extern int waitResponse(int); extern bool waitCommand( string command, int nread, string info = "", int msec = 200, char term = 0x0d, // carriage return int how = ASC, int level = INFO ); extern void clearSerialPort(); extern char replybuff[]; extern string replystr; extern void showresp(int level, int how, string s, string tx, string rx); #endif flrig-1.3.24/src/include/FT991.h0000644000175000017500000000710312646444222012773 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FT991_H #define _FT991_H #include "rigbase.h" class RIG_FT991 : public rigbase { private: bool notch_on; int m_60m_indx; protected: int preamp_level; int atten_level; public: RIG_FT991(); ~RIG_FT991(){} void initialize(); void post_initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); bool twovfos() { return true; } bool canswap() { return true; } void selectA(); void selectB(); void A2B(); void B2A(); void swapAB(); bool can_split(); void set_split(bool val); int get_split(); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_modeB(int val); int get_modeB(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int val); int def_bandwidth(int val); int get_smeter(); int get_swr(); int get_alc(); int get_power_out(); int get_power_control(); void set_volume_control(int val); void set_power_control(double val); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 100; step = 1; } int get_volume_control(); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_auto_notch(int v); int get_auto_notch(); void set_noise(bool b); int get_noise(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); const char **bwtable(int); void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void set_vox_on_dataport(); void get_cw_wpm_min_max(int &min, int &max) { min = 4; max = 60; } void set_cw_weight(); void set_cw_wpm(); void enable_keyer(); void set_cw_qsk(); bool set_cw_spot(); void set_cw_spot_tone(); // void set_band_selection(int v); void get_nr_min_max_step(int &min, int &max, int &step) { min = 1; max = 15; step = 1; } void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_noise_reduction(int val); int get_noise_reduction(); void set_xcvr_auto_on(); void set_xcvr_auto_off(); void set_compression(); void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 5; } void setVfoAdj(double v); double getVfoAdj(); void get_vfoadj_min_max_step(int &min, int &max, int &step); }; #endif flrig-1.3.24/src/include/TS480HX.h0000644000175000017500000000521212562731652013243 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TS480HX_H #define _TS480HX_H #include "rigbase.h" class RIG_TS480HX : public rigbase { private: bool beatcancel_on; bool preamp_on; bool att_on; const char *_mode_type; bool menu_45; int alc; bool swralc_polled; public: RIG_TS480HX(); ~RIG_TS480HX(){} bool sendTScommand(string, int); void initialize(); void shutdown(); void check_menu_45(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); int get_smeter(); int get_swr(); int get_alc(); int get_power_out(); void set_PTT_control(int val); void tune_rig(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); void selectA(); void selectB(); void set_split(bool val); bool can_split(); int get_split(); bool twovfos() {return true;} void set_volume_control(int val); int get_volume_control(); void set_power_control(double val); int get_power_control(); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 200; step = 1; } void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); int adjust_bandwidth(int m); int def_bandwidth(int m); int set_widths(int val); const char **bwtable(int); const char **lotable(int); const char **hitable(int); const char * get_bwname_(int bw, int md); }; #endif flrig-1.3.24/src/include/IC7600.h0000644000175000017500000000435612562731651013040 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC7600_H #define _IC7600_H #include "IC746.h" class RIG_IC7600 : public RIG_IC746PRO { public: RIG_IC7600(); ~RIG_IC7600(){} void initialize(); void selectA(); void selectB(); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); bool can_split(); void set_split(bool); int get_split(); void swapvfos(); bool canswap() { return true;} void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int m); int def_bandwidth(int m); void set_attenuator( int val ); //alh int get_attenuator(); //alh void set_mic_gain(int v); void set_compression(); void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 10; step = 1; } void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void get_vox_hang_min_max_step(int &min, int &max, int &step) { min = 0; max = 200; step = 10; } //alh void get_cw_wpm_min_max(int &min, int &max) { min = 6; max = 60; } void get_cw_qsk_min_max_step(double &min, double &max, double &step) { min = 2.0; max = 13.0; step = 0.1; } void get_cw_spot_tone_min_max_step(int &min, int &max, int &step) { min = 300; max = 900; step = 5; } void set_cw_wpm(); void set_cw_qsk(); void set_cw_spot_tone(); void set_cw_vol(); const char **bwtable(int m) {return bandwidths_;} }; #endif flrig-1.3.24/src/include/FTdx3000.h0000644000175000017500000000601012646444222013363 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FTdx3000_H #define _FTdx3000_H #include "rigbase.h" class RIG_FTdx3000 : public rigbase { private: bool notch_on; int m_60m_indx; // void update_bandwidths(); protected: int preamp_level; int atten_level; public: RIG_FTdx3000(); ~RIG_FTdx3000(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); bool twovfos(); void selectA(); void selectB(); void A2B(); bool can_split(); void set_split(bool val); int get_split(); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_modeB(int val); int get_modeB(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int val); int def_bandwidth(int val); int get_smeter(); int get_swr(); int get_power_out(); int get_power_control(); void set_volume_control(int val); void set_power_control(double val); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 200; step = 1; } int get_volume_control(); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_auto_notch(int v); int get_auto_notch(); void set_noise(bool b); int get_noise(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); const char **bwtable(int); void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void set_vox_on_dataport(); void get_cw_wpm_min_max(int &min, int &max) { min = 4; max = 60; } void set_cw_weight(); void set_cw_wpm(); void enable_keyer(); void set_cw_qsk(); // void set_cw_vol(); bool set_cw_spot(); // void set_cw_spot_tone(); void set_band_selection(int v); }; #endif flrig-1.3.24/src/include/generic.h0000644000175000017500000000322512562731651013636 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _GENERIC_H #define _GENERIC_H #include "rig_io.h" extern RIG RIG_GENERIC; extern const char GENERIC_name[]; extern const char *GENERICmodes_[]; extern const char *GENERIC_widths[]; extern long GENERIC_get_vfoA(); extern void GENERIC_set_vfoA(long); extern int GENERIC_get_smeter(); extern int GENERIC_get_swr(); extern int GENERIC_get_power_out(); extern int GENERIC_get_power_control(); extern void GENERIC_set_volume_control(double val); extern void GENERIC_set_power_control(double val); extern void GENERIC_set_PTT_control(int val); extern void GENERIC_tune_rig(); extern void GENERIC_set_attenuator(int val); extern void GENERIC_set_preamp(int val); extern void GENERIC_set_modeA(int val); extern void GENERIC_set_modeA(int val); extern void GENERIC_set_bwA(int val); #endif flrig-1.3.24/src/include/TT550.h0000644000175000017500000001041712562731651013004 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TT550_H #define _TT550_H // TenTec Pegasus computer controlled transceiver #include #include "rigbase.h" class RIG_TT550 : public rigbase { private: double fwdpwr; double refpwr; double fwdv; double refv; int NVal; int FVal; int IVal; int TBfo; int IBfo; int TFreq; int Bfo; int encoder_count; int keypad_timeout; bool onA; int ATTlevel; int RFgain; double VfoAdj; bool auto_notch; bool noise_reduction; std::string pending; void showASCII(string, string); void set_vfoRX(long freq); void set_vfoTX(long freq); void get_302(); void process_encoder( int v ); void process_keypad(char c); void process_freq_entry(char c); void process_fkey(char c); void fkey_clear(); void fkey_cw_plus(); void fkey_cw_minus(); void fkey_band_plus(); void fkey_band_minus(); void fkey_step_plus(); void fkey_step_minus(); public: RIG_TT550(); ~RIG_TT550(){} void initialize(); void shutdown(); void set_vfo(long); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void selectA(); void selectB(); void set_mode(int val); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); int get_modetype(int n); void set_bw(int val); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); bool twovfos() { return true; } void set_split(bool); bool can_split() { return true; } int get_smeter(); int get_swr(); int get_power_out(); // int get_power_control(); void set_volume_control(int val); int get_volume_control(); void set_power_control(double val); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 100; step = 1; } void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); // int get_attenuator() {return 0} void set_preamp(int val); // int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); // void set_notch(bool on, int val); // bool get_notch(int &val); // void get_notch_min_max_step(int &min, int &max, int &step); void set_noise(bool b); void set_mic_gain(int val); // int get_mic_gain(); void set_mic_line(int val); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); int adjust_bandwidth(int m); int def_bandwidth(int m); void setRit(int v); int getRit(); void get_RIT_min_max_step(int &min, int &max, int &step) { min = -500; max = 500; step = 1; } void setXit(int v); int getXit(); void get_XIT_min_max_step(int &min, int &max, int &step) { min = -500; max = 500; step = 1; } void setBfo(int v); int getBfo(); void get_BFO_min_max_step(int &min, int &max, int &step) { min = 0; max = 1000; step = 10; } void setVfoAdj(double v); void set_auto_notch(int v); void set_noise_reduction(int b); void set_line_out(); void set_agc_level(); void set_cw_wpm(); void set_cw_weight(); void enable_keyer(); void set_cw_qsk(); void set_cw_vol(); bool set_cw_spot(); void set_spot_onoff(); void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void set_aux_hang(); void set_mon_vol(); void set_compression(); void set_squelch_level(); void tuner_bypass(); void enable_xmtr(); void enable_tloop(); void set_nb_level(); }; extern const char *TT550_xmt_widths[]; #endif flrig-1.3.24/src/include/TS2000.h0000644000175000017500000000625512637376742013071 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TS2000_H #define _TS2000_H #include "rigbase.h" class RIG_TS2000 : public rigbase { private: bool notch_on; int preamp_level; int att_level; bool rxona; public: enum TS2000MODES { LSB, USB, CW, FM, AM, FSK, CWR, FSKR, DIGI }; RIG_TS2000(); ~RIG_TS2000(){} void initialize(); virtual void shutdown(); long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_bwA(); long get_vfoB(); void set_vfoB(long); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); int def_bandwidth(int); int get_modetype(int n); int adjust_bandwidth(int val); int set_widths(int val); bool can_split() { return true;} void set_split(bool val); int get_split(); void selectA(); void selectB(); bool twovfos() {return true;} int get_smeter(); int get_swr(); int get_alc(); void select_swr(); void select_alc(); int get_power_out(); int get_power_control(); void set_volume_control(int val); int get_volume_control(); void set_power_control(double val); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 100; step = 1; } void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_auto_notch(int v); int get_auto_notch(); void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_noise_reduction(int val); int get_noise_reduction(); void get_nr_min_max_step(int &min, int &max, int &step) { min = 0; max = 9; step = 1; } void set_noise(bool b); int get_noise(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } bool tuning(); bool sendTScommand(string, int, bool); const char **bwtable(int); const char **lotable(int); const char **hitable(int); const char * get_bwname_(int bw, int md); }; #endif flrig-1.3.24/src/include/KX3_ui.h0000644000175000017500000000206312562731651013323 00000000000000// ===================================================================== // KX3 user interface support // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- void read_KX3(); void KX3_set_split(int val); void KX3_A2B(); void cb_KX3_swapAB(); flrig-1.3.24/src/include/FT100D.h0000644000175000017500000000333412562731652013062 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT100D_H #define FT100D_H #include "rigbase.h" class RIG_FT100D : public rigbase { private: double fwdpwr; double refpwr; double fwdv; double refv; int afreq, amode, aBW; int bfreq, bmode, bBW; public: RIG_FT100D(); ~RIG_FT100D(){}; void initialize(); bool get_info(); bool can_split() { return true;} void set_split(bool val); bool twovfos() {return false;} long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_bwA(); long get_vfoB(); void set_vfoB(long); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); int def_bandwidth(int m); void selectA(); void selectB(); void set_PTT_control(int val); int get_smeter(); int get_swr(); int get_power_out(); int adjust_bandwidth(int); private: void init_cmd(); }; #endif flrig-1.3.24/src/include/FT890.h0000644000175000017500000000324212562731651012773 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FT890_H #define _FT890_H #include "rigbase.h" extern const char FT890name_[]; extern const char *FT890modes_[]; extern const char *FT890_widths[]; class RIG_FT890 : public rigbase { private: double fwdpwr; double refpwr; double fwdv; double refv; int afreq, amode, aBW; int bfreq, bmode, bBW; public: RIG_FT890(); ~RIG_FT890(){}; void initialize(); bool get_info(); bool can_split() { return true;} void set_split(bool val); bool twovfos() {return false;} long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); long get_vfoB(); void set_vfoB(long); void set_modeB(int val); int get_modeB(); void selectA(); void selectB(); void set_PTT_control(int val); int get_smeter(); int get_power_out(); private: void init_cmd(); }; #endif flrig-1.3.24/src/include/status.h0000644000175000017500000001163212646444222013544 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _status_H #define _status_H #include #include #include #include "rig.h" using namespace std; struct status { int mainX; int mainY; int mainW; int mainH; int UIsize; bool UIchanged; string xcvr_serial_port; int comm_baudrate; int stopbits; int comm_retries; int comm_wait; int comm_timeout; bool comm_echo; bool comm_catptt; bool comm_rtsptt; bool comm_dtrptt; bool comm_rtscts; bool comm_rtsplus; bool comm_dtrplus; int serloop_timing; int byte_interval; string aux_serial_port; bool aux_rts; bool aux_dtr; string sep_serial_port; bool sep_rtsptt; bool sep_dtrptt; bool sep_rtsplus; bool sep_dtrplus; int CIV; bool USBaudio; int poll_smeter; int poll_frequency; int poll_mode; int poll_bandwidth; int poll_volume; int poll_auto_notch; int poll_notch; int poll_ifshift; int poll_power_control; int poll_pre_att; int poll_micgain; int poll_squelch; int poll_rfgain; int poll_pout; int poll_swr; int poll_alc; int poll_split; int poll_noise; int poll_nr; int poll_vfoAorB; int poll_all; int iBW_A; int imode_A; int freq_A; int iBW_B; int imode_B; int freq_B; bool use_rig_data; bool restore_rig_data; bool spkr_on; int volume; double power_level; int mic_gain; bool notch; int notch_val; bool shift; int shift_val; int rfgain; int squelch; int schema; bool hrd_buttons; int line_out; bool data_port; int agc_level; int cw_wpm; float cw_weight; int cw_vol; int cw_spot; bool spot_onoff; int cw_spot_tone; bool enable_keyer; bool break_in; double cw_qsk; double cw_delay; bool vox_onoff; int vox_gain; int vox_anti; int vox_hang; bool vox_on_dataport; int compression; bool compON; int noise_reduction; int noise_reduction_val; int nb_level; bool noise; int attenuator; int preamp; int auto_notch; int split; bool key_fldigi; int rx_avg; int rx_peak; int pwr_avg; int pwr_peak; int pwr_scale; //============= transceiver specific prameters //tt550 controls int tt550_line_out; int tt550_agc_level; int tt550_cw_wpm; double tt550_cw_weight; int tt550_cw_vol; int tt550_cw_spot; bool tt550_spot_onoff; int tt550_cw_qsk; bool tt550_enable_keyer; bool tt550_vox_onoff; int tt550_vox_gain; int tt550_vox_anti; int tt550_vox_hang; int tt550_mon_vol; int tt550_squelch_level; int tt550_compression; int tt550_nb_level; bool tt550_compON; bool tt550_tuner_bypass; bool tt550_enable_xmtr; bool tt550_enable_tloop; bool tt550_use_line_in; int tt550_xmt_bw; bool tt550_use_xmt_bw; int tt550_AM_level; int tt550_encoder_step; int tt550_encoder_sensitivity; int tt550_keypad_timeout; int tt550_F1_func; int tt550_F2_func; int tt550_F3_func; //and others double vfo_adj; int bfo_freq; int rit_freq; int xit_freq; int bpf_center; bool use_bpf_center; // ========================= int bg_red; int bg_green; int bg_blue; int fg_red; int fg_green; int fg_blue; int swrRed; int swrGreen; int swrBlue; int pwrRed; int pwrGreen; int pwrBlue; int smeterRed; int smeterGreen; int smeterBlue; int peakRed; int peakGreen; int peakBlue; int fg_sys_red; int fg_sys_green; int fg_sys_blue; int bg_sys_red; int bg_sys_green; int bg_sys_blue; int bg2_sys_red; int bg2_sys_green; int bg2_sys_blue; int slider_red; int slider_green; int slider_blue; int slider_btn_red; int slider_btn_green; int slider_btn_blue; int lighted_btn_red; int lighted_btn_green; int lighted_btn_blue; Fl_Font fontnbr; bool tooltips; string ui_scheme; string server_port; string server_addr; string tcpip_port; string tcpip_addr; int tcpip_ping_delay; int tcpip_reconnect_after; int tcpip_drops_allowed; bool use_tcpip; bool xcvr_auto_on; bool xcvr_auto_off; bool external_tuner; bool fldigi_is_server; void saveLastState(); void loadLastState(); bool loadXcvrState(string); void UI_laststate(); }; extern status progStatus; extern string xcvr_name; #endif flrig-1.3.24/src/include/TS990.h0000644000175000017500000001057712562731651013022 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TS990_H #define _TS990_H #include "rigbase.h" class RIG_TS990 : public rigbase { private: enum TS990MODES { LSB, USB, CW, FM, AM, FSK, PSK, CWR, FSKR, PSKR, LSBD1, USBD1, FMD1, AMD1, LSBD2, USBD2, FMD2, AMD2, LSBD3, USBD3, FMD3, AMD3 }; private: bool menu_0607; bool menu_0608; bool save_menu_0607; bool save_menu_0608; bool notch_on; int preamp_level; int att_level; int nb_level; bool data_mode; int active_mode; int active_bandwidth; bool rxtxa; bool att_on; // default mode values int A_default_SH_WI; int A_default_SH_WI_D1; int A_default_SH_WI_D2; int A_default_SH_WI_D3; int A_default_HI_LO; int A_default_FM; int A_default_FM_D1; int A_default_FM_D2; int A_default_FM_D3; int A_default_CW; int A_default_AM; int A_default_AM_D1; int A_default_AM_D2; int A_default_AM_D3; int A_default_FSK; int A_default_PSK; int B_default_SH_WI; int B_default_SH_WI_D1; int B_default_SH_WI_D2; int B_default_SH_WI_D3; int B_default_HI_LO; int B_default_FM; int B_default_FM_D1; int B_default_FM_D2; int B_default_FM_D3; int B_default_CW; int B_default_AM; int B_default_AM_D1; int B_default_AM_D2; int B_default_AM_D3; int B_default_FSK; int B_default_PSK; public: RIG_TS990(); ~RIG_TS990(){} void initialize(); void shutdown(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); void read_menu_0607(); void read_menu_0608(); void set_menu_0607(int); void set_menu_0608(int); int adjust_bandwidth(int val); int def_bandwidth(int val); int set_widths(int val); void set_active_bandwidth(); int get_active_bandwidth(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); void selectA(); void selectB(); bool can_split() { return true;} void set_split(bool val); int get_split(); bool twovfos() {return true;} int get_smeter(); int get_swr(); int get_alc(); int get_agc(); void set_volume_control(int val); int get_volume_control(); void set_power_control(double val); int get_power_control(void); void get_pc_min_max_step(double &min, double &max, double &step) { min = 0; max = 200; step = 1; } int get_power_out(); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_ssbfilter(int val); int get_ssbfilter(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_noise(bool b); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_squelch(int val); int get_squelch(); void get_squelch_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_noise_reduction(int val); int get_noise_reduction(); void get_nr_min_max_step(int &min, int &max, int &step) { min = 1; max = 10; step = 1; } void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_auto_notch(int v); int get_auto_notch(); bool sendTScommand(string, int, bool); const char **bwtable(int); const char **lotable(int); const char **hitable(int); const char * get_bwname_(int bw, int md); }; #endif flrig-1.3.24/src/include/TS140.h0000644000175000017500000000301512562731651012772 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef TS140_H #define TS140_H #include "rigbase.h" class RIG_TS140 : public rigbase { public: RIG_TS140(); ~RIG_TS140(){} long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); int get_modetype(int); int adjust_bandwidth(int val) { return 0; } // void set_attenuator(int val); // int get_attenuator(); // void set_preamp(int val); // int get_preamp(); // int get_smeter(); // int get_swr(); // int get_power_out(); // int get_power_control(); // void set_volume_control(double val); // void set_power_control(double val); void set_PTT_control(int val); // void tune_rig(); // void set_bwA(int val); }; #endif flrig-1.3.24/src/include/rigpanel.h0000644000175000017500000002770712562731651014036 00000000000000//====================================================================== // // flrig user interface include file // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef UI_DIALOGS #define UI_DIALOGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "flinput2.h" #include "Fl_SigBar.h" #include "FreqControl.h" #include "combo.h" #include "ValueSlider.h" #include "hspinner.h" extern Fl_Double_Window* XcvrDialog(); extern Fl_Double_Window* MetersDialog(); extern Fl_Double_Window* power_meter_scale_select(); extern Fl_Double_Window* DisplayDialog(); extern Fl_Double_Window* Memory_Dialog(); extern Fl_Double_Window* Wide_rig_window(); extern Fl_Double_Window* Small_rig_window(); extern Fl_Double_Window* touch_rig_window(); extern void select_power_meter_scales(); extern Fl_Output *txt_encA; extern Fl_Group *grpMeters; extern Fl_Box *scaleSmeter; extern Fl_Button *btnALC_SWR; extern Fl_SigBar *sldrRcvSignal; extern Fl_SigBar *sldrALC; extern Fl_SigBar *sldrSWR; extern Fl_SigBar *sldrFwdPwr; extern Fl_Button *scalePower; extern Fl_Box *meter_fill_box; extern cFreqControl *FreqDispA; extern cFreqControl *FreqDispB; extern Fl_Group *grp_row0a; extern Fl_Light_Button *btnA; extern Fl_Button *btn_K3_swapAB; extern Fl_Button *btn_KX3_swapAB; extern Fl_Light_Button *btnB; extern Fl_Button *btnTune; extern Fl_Box *bx_row0_expander; extern Fl_Button *btn_show_controls; extern Fl_Group *grp_row1; extern Fl_Group *grp_row1a; extern Fl_ComboBox *opBW; extern Fl_Button *btnDSP; extern Fl_ComboBox *opDSP_lo; extern Fl_ComboBox *opDSP_hi; extern Fl_ComboBox *opMODE; extern Fl_Group *grp_row1b; extern Fl_Group *grp_row1b1; extern Fl_Light_Button *btnAttenuator; extern Fl_Light_Button *btnPreamp; extern Fl_Light_Button *btnNOISE; extern Fl_Light_Button *btnAutoNotch; extern Fl_Group *grp_row1b2; extern Fl_Button *btnAswapB; extern Fl_Light_Button *btnSplit; extern Fl_Light_Button *btnPTT; extern Fl_Box *bx_row1_expander2; extern Fl_Group *grp_row2; extern Fl_Group *grp_row2a; extern Fl_Wheel_Value_Slider *sldrSQUELCH; extern Fl_Wheel_Value_Slider *sldrMICGAIN; extern Fl_Box *bx_sep2a; extern Fl_Group *grp_row2b; extern Fl_Light_Button *btnIFsh; extern Fl_Wheel_Value_Slider *sldrIFSHIFT; extern Fl_Light_Button *btnNR; extern Fl_Wheel_Value_Slider *sldrNR; extern Fl_Box *bx_sep2b; extern Fl_Group *grp_row2c; extern Fl_Light_Button *btnNotch; extern Fl_Wheel_Value_Slider *sldrNOTCH; extern Fl_Wheel_Value_Slider *sldrRFGAIN; extern Fl_Box *bx_sep2c; extern Fl_Group *grp_row2d; extern Fl_Wheel_Value_Slider *sldrPOWER; extern Hspinner *spnrPOWER; extern Hspinner *spnrVOLUME; extern Hspinner *spnrRFGAIN; extern Hspinner *spnrSQUELCH; extern Hspinner *spnrNR; extern Hspinner *spnrIFSHIFT; extern Hspinner *spnrNOTCH; extern Hspinner *spnrMICGAIN; extern Fl_Light_Button *btnVol; extern Fl_Wheel_Value_Slider *sldrVOLUME; extern Fl_Group *grpTABS; extern Fl_Tabs *tabsGeneric; extern Fl_Group *genericBands; extern Fl_Button *btnBandSelect_1; extern Fl_Button *btnBandSelect_2; extern Fl_Button *btnBandSelect_3; extern Fl_Button *btnBandSelect_4; extern Fl_Button *btnBandSelect_5; extern Fl_Button *btnBandSelect_6; extern Fl_Button *btnBandSelect_7; extern Fl_Button *btnBandSelect_8; extern Fl_Button *btnBandSelect_9; extern Fl_Button *btnBandSelect_10; extern Fl_Button *btnBandSelect_11; extern Fl_ComboBox *opSelect60; extern Fl_Group *genericCW; extern Fl_Light_Button *btnSpot; extern Fl_Group *genericQSK; extern Fl_Light_Button *btnBreakIn; extern Hspinner *spnr_cw_delay; extern Hspinner *cnt_cw_qsk; extern Hspinner *spnr_cw_spot_tone; extern Hspinner *spnr_cw_qsk; extern Hspinner *spnr_cw_weight; extern Hspinner *spnr_cw_wpm; extern Fl_Check_Button *btn_enable_keyer; extern Fl_Group *genericVOX; extern Hspinner *spnr_vox_gain; extern Hspinner *spnr_anti_vox; extern Hspinner *spnr_vox_hang; extern Fl_Light_Button *btn_vox; extern Fl_Check_Button *btn_vox_on_dataport; extern Fl_Group *genericSpeech; extern Fl_Light_Button *btnCompON; extern Hspinner *spnr_compression; extern Fl_Group *genericRx; extern Fl_ComboBox *cbo_nb_level; extern Fl_ComboBox *cbo_agc_level; extern Hspinner *spnr_bpf_center; extern Fl_Check_Button *btn_use_bpf_center; extern Fl_Group *genericMisc; extern Hspinner *spnr_vfo_adj; extern Hspinner *spnr_line_out; extern Fl_Light_Button *btnSpecial; extern Fl_Check_Button *btn_ext_tuner; extern Fl_Check_Button *btn_xcvr_auto_on; extern Fl_Check_Button *btn_xcvr_auto_off; extern Fl_Group *genericRXB; extern Hspinner *cntRIT; extern Hspinner *cntXIT; extern Hspinner *cntBFO; extern Fl_Group *genericAux; extern Fl_Box *boxControl; extern Fl_Light_Button *btnAuxRTS; extern Fl_Light_Button *btnAuxDTR; extern Fl_Light_Button *btnDataPort; extern Fl_Tabs *tabs550; extern Fl_Group *tt550_CW; extern Hspinner *spnr_tt550_cw_wpm; extern Hspinner *spnr_tt550_cw_weight; extern Hspinner *spnr_tt550_cw_qsk; extern Hspinner *spnr_tt550_cw_vol; extern Hspinner *spnr_tt550_cw_spot; extern Fl_Check_Button *btn_tt550_enable_keyer; extern Fl_Group *tt550_VOX; extern Hspinner *spnr_tt550_vox_gain; extern Hspinner *spnr_tt550_anti_vox; extern Hspinner *spnr_tt550_vox_hang; extern Fl_Light_Button *btn_tt550_vox; extern Fl_Group *tt550_Speech; extern Fl_Light_Button *btn_tt550_CompON; extern Hspinner *spnr_tt550_compression; extern Hspinner *spnr_tt550_mon_vol; extern Fl_Group *tt550_Audio; extern Hspinner *spnr_tt550_line_out; extern Fl_Check_Button *btnAccInp; extern Fl_Group *tt550_Rx; extern Fl_ComboBox *cbo_tt550_nb_level; extern Fl_ComboBox *cbo_tt550_agc_level; extern Hspinner *spnr_tt550_vfo_adj; extern Fl_Group *tt550_Tx; extern Fl_Check_Button *btn_tt550_enable_xmtr; extern Fl_Check_Button *btn_tt550_enable_tloop; extern Fl_Check_Button *btn_tt550_tuner_bypass; extern Fl_ComboBox *op_tt550_XmtBW; extern Fl_Check_Button *btn_tt550_use_xmt_bw; extern Fl_Group *tt550_302A; extern Hspinner *spnr_tt550_keypad_time_out; extern Hspinner *spnr_tt550_encoder_sensitivity; extern Fl_Choice *sel_tt550_encoder_step; extern Fl_Group *tt550_302B; extern Fl_Choice *sel_tt550_F1_func; extern Fl_Choice *sel_tt550_F2_func; extern Fl_Choice *sel_tt550_F3_func; extern Fl_Group *main_group; extern Fl_Button *btnInitializing; extern Fl_Menu_Item *mnuExit; extern Fl_Menu_Item *mnuConfig; extern Fl_Menu_Item *mnuRestoreData; extern Fl_Menu_Item *mnuKeepData; extern Fl_Menu_Item *mnuTooltips; extern Fl_Menu_Item *mnuSchema; extern Fl_Menu_Item *mnuColorConfig; extern Fl_Menu_Item *mnu_meter_filtering; extern Fl_Menu_Item *mnuConfigXcvr; extern Fl_Menu_Item *save_me; extern Fl_Menu_Item *mnuHelp; extern Fl_Menu_Item *mnuOnLineHelp; extern Fl_Menu_Item *mnuAbout; extern Fl_Box *tcpip_menu_box; extern Fl_Group *tcpip_box; extern Fl_Check_Button *chk_use_tcpip; extern Fl_Radio_Light_Button *btn_wide_ui; extern Fl_Radio_Light_Button *btn_narrow_ui; extern Fl_Radio_Light_Button *btn_touch_ui; extern Fl_Box *lblTest; extern Fl_Button *prefFont; extern Fl_Button *prefForeground; extern Fl_Button *btnBacklight; extern Fl_Group *grpMeterColor; extern Fl_Box *scaleSmeterColor; extern Fl_SigBar *sldrRcvSignalColor; extern Fl_SigBar *sldrSWRcolor; extern Fl_Box *scaleSWRcolor; extern Fl_SigBar *sldrPWRcolor; extern Fl_Box *scalePWRcolor; extern Fl_Button *btMeterColor; extern Fl_Button *btnSWRColor; extern Fl_Button *btnPwrColor; extern Fl_Button *btnPeakColor; extern Fl_Choice *mnuScheme; extern Fl_Button *pref_sys_foreground; extern Fl_Button *pref_sys_background; extern Fl_Button *prefsys_background2; extern Fl_Button *prefsys_defaults; extern Fl_Wheel_Value_Slider *sldrColors; extern Fl_Button *pref_slider_background; extern Fl_Button *pref_slider_select; extern Fl_Button *prefslider_defaults; extern Fl_Button *btnReset; extern Fl_Button *btnCancel; extern Fl_Return_Button *btnOkDisplayDialog; extern Fl_Light_Button *btn_lighted; extern Fl_Button *btn_lighted_default; extern Fl_Button *btnAddFreq; extern Fl_Button *btnPickFreq; extern Fl_Button *btnDelFreq; extern Fl_Button *btnClearList; extern Fl_Browser *FreqSelect; extern Fl_Input *inAlphaTag; extern Fl_Tabs *tabsConfig; extern Fl_Group *tabPrimary; extern Fl_ComboBox *selectRig; extern Fl_Counter *cntRigCatRetries; extern Fl_Counter *cntRigCatTimeout; extern Fl_Counter *cntRigCatWait; extern Fl_Counter *query_interval; extern Fl_ComboBox *selectCommPort; extern Fl_ComboBox *mnuBaudrate; extern Fl_Check_Button *btnTwoStopBit; extern Fl_Check_Button *btnOneStopBit; extern Fl_Check_Button *btnRigCatEcho; extern Fl_Input *server_addr; extern Fl_Int_Input *server_port; extern Fl_Round_Button *btncatptt; extern Fl_Round_Button *btnrtsptt; extern Fl_Round_Button *btndtrptt; extern Fl_Check_Button *chkrtscts; extern Fl_Check_Button *btnrtsplus; extern Fl_Check_Button *btndtrplus; extern Fl_Int_Input *txtCIV; extern Fl_Button *btnCIVdefault; extern Fl_Check_Button *btnUSBaudio; extern Fl_Check_Button *btn_key_fldigi; extern Fl_Group *tabPTT; extern Fl_ComboBox *selectSepPTTPort; extern Fl_Round_Button *btnSepRTSptt; extern Fl_Check_Button *btnSepRTSplus; extern Fl_Round_Button *btnSepDTRptt; extern Fl_Check_Button *btnSepDTRplus; extern Fl_Group *tabAux; extern Fl_ComboBox *selectAuxPort; extern Fl_Group *tabPolling; extern Fl_Group *tabTCPIP; extern Fl_Group *tabXMLRPC; extern Fl_Value_Input *poll_smeter; extern Fl_Value_Input *poll_pout; extern Fl_Value_Input *poll_swr; extern Fl_Value_Input *poll_alc; extern Fl_Value_Input *poll_frequency; extern Fl_Value_Input *poll_mode; extern Fl_Value_Input *poll_bandwidth; extern Fl_Value_Input *poll_volume; extern Fl_Value_Input *poll_micgain; extern Fl_Value_Input *poll_rfgain; extern Fl_Value_Input *poll_power_control; extern Fl_Value_Input *poll_ifshift; extern Fl_Value_Input *poll_notch; extern Fl_Value_Input *poll_auto_notch; extern Fl_Value_Input *poll_pre_att; extern Fl_Value_Input *poll_squelch; extern Fl_Value_Input *poll_split; extern Fl_Value_Input *poll_noise; extern Fl_Value_Input *poll_nr; extern Fl_Button *btnClearAddControls; extern Fl_Value_Input *poll_all; extern Fl_Button *btnSetAllAdd; extern Fl_Group *tabSndCmd; extern Fl_Input2 *txt_command; extern Fl_Button *btn_send_command; extern Fl_Output *txt_response; extern Fl_Box *box_xcvr_connect; extern Fl_Box *box_fldigi_connect; extern Fl_Box *box_tcpip_connect; extern Fl_Button *btnCancelCommConfig; extern Fl_Return_Button *btnOkXcvrDialog; extern Fl_Counter *inp_tcpip_ping_delay; extern Fl_Counter *cntRetryAfter; extern Fl_Counter *cntDropsAllowed; extern Fl_Wheel_Value_Slider *sldr_smeter_avg; extern Fl_Wheel_Value_Slider *sldr_smeter_peak; extern Fl_Wheel_Value_Slider *sldr_pout_avg; extern Fl_Wheel_Value_Slider *sldr_pout_peak; extern Fl_Button *sel_25; extern Fl_Button *sel_100; extern Fl_Button *sel_auto; extern Fl_Button *sel_50; extern Fl_Button *sel_200; extern Fl_Output *pwr_scale_description; #endif flrig-1.3.24/src/include/IC706MKIIG.h0000644000175000017500000000263012562731652013533 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC706MKIIG_H #define _IC706MKIIG_H #include "ICbase.h" class RIG_IC706MKIIG : public RIG_ICOM { public: RIG_IC706MKIIG(); ~RIG_IC706MKIIG(){} void selectA(); void selectB(); long get_vfoA (); void set_vfoA (long freq); long get_vfoB(void); void set_vfoB(long f); void set_modeA(int val); int get_modeA(); int get_modetype(int n); // void set_bwA(int val); // int get_bwA(); int get_smeter(); // int get_swr(); void set_attenuator(int val); void set_split(bool); bool can_split() { return true; } }; #endif flrig-1.3.24/src/include/TS870S.h0000644000175000017500000000563212562731652013137 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TS870S_H #define _TS870S_H #include "rigbase.h" class RIG_TS870S : public rigbase { public: enum TS870MODES { tsLSB, tsUSB, tsCW, tsFM, tsAM, tsFSK, tsCWR, tsFSKR }; private: bool notch_on; // int preamp_level; int att_level; int nb_level; // bool data_mode; int active_bandwidth; int active_mode; bool att_on; bool is_TS870S; public: RIG_TS870S(); ~RIG_TS870S(){} void initialize(); virtual void shutdown(); bool get_TS870Sid(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); int vfo; // 0, 1 or 2. = A, B or Memory wbx2 int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); int adjust_bandwidth(int val); int def_bandwidth(int val); int set_widths(int val); void set_active_bandwidth(); int get_active_bandwidth(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); void selectA(); void selectB(); bool can_split() { return true;} void set_split(bool val); // boolean value only int get_split(); // integer value bool twovfos() {return true;} int get_smeter(); // int get_swr(); int get_power_out(); int get_power_control(); void set_volume_control(int val); int get_volume_control(); void set_power_control(double val); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); // void set_preamp(int val); // int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_noise(bool val); int get_noise(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); bool sendTScommand(string, int, bool); const char **bwtable(int); const char **lotable(int); const char **hitable(int); const char * get_bwname_(int bw, int md); }; #endif flrig-1.3.24/src/include/IC756PRO3.h0000644000175000017500000000534412562731651013427 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC756PRO3_H #define _IC756PRO3_H #include "ICbase.h" class RIG_IC756PRO3 : public RIG_ICOM { public: RIG_IC756PRO3(); ~RIG_IC756PRO3(){} void initialize(); void selectA(); void selectB(); void A2B(); long get_vfoA(void); void set_vfoA(long f); int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_bwA(); long get_vfoB(void); void set_vfoB(long f); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); int get_smeter(); int get_swr(void); int get_alc(void); int get_power_out(void); void set_volume_control(int val); int get_volume_control(); void get_vol_min_max_step(int &min, int &max, int &step); void set_PTT_control(int val); void set_noise(bool val); int get_noise(); void set_noise_reduction(int val); int get_noise_reduction(); void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_gain_min_max_step(int &min, int &max, int &step); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_squelch(int val); int get_squelch(); void set_rf_gain(int val); int get_rf_gain(); void set_power_control(double val); int get_power_control(); void set_split(bool val); int get_split(); bool can_split() { return true;} void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); int adjust_bandwidth(int); int def_bandwidth(int); void tune_rig(); void set_notch(bool, int); bool get_notch(int&); void get_notch_min_max_step(int&, int&, int&); void set_auto_notch(int); int get_auto_notch(); bool twovfos() { return false; } const char **bwtable(int); protected: int preamp_level; int atten_level; int ICvol; }; #endif flrig-1.3.24/src/include/FT450.h0000644000175000017500000000645212562731652012772 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FT450_H #define _FT450_H #include "rigbase.h" class RIG_FT450 : public rigbase { private: bool notch_on; int m_60m_indx; public: RIG_FT450(); ~RIG_FT450(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void selectA(); void selectB(); void A2B(); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_bwA(int val); int get_bwA(); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); bool twovfos() {return true;} bool can_split() {return true;} void set_split(bool); int get_split(); int get_smeter(); int get_swr(); int get_power_out(); int get_power_control(); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 100; step = 1; } void set_volume_control(int val); int get_volume_control(); void get_vol_min_max_step(int &min, int &max, int &step); void set_power_control(double val); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_noise(bool b); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_special(int v); int adjust_bandwidth(int m); void set_vox_onoff(); void set_vox_gain(); void get_vox_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } void set_vox_hang(); void get_vox_hang_min_max_step(int &min, int &max, int &step) { min = 100; max = 3000; step = 100; } void get_cw_wpm_min_max(int &min, int &max) { min = 4; max = 60; } void set_cw_weight(); void set_cw_wpm(); void enable_keyer(); void set_cw_qsk(); bool set_cw_spot(); void set_cw_spot_tone(); void get_cw_spot_tone_min_max_step(int &min, int &max, int &step) { min = 400; max = 800; step = 100; } void set_band_selection(int v); void get_nr_min_max_step(int &min, int &max, int &step) { min = 1; max = 11; step = 1; } void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_noise_reduction(int val); int get_noise_reduction(); void set_xcvr_auto_on(); void set_xcvr_auto_off(); }; #endif flrig-1.3.24/src/include/IC7410.h0000644000175000017500000000415112562731651013030 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC7410_H #define _IC7410_H #include "IC746.h" class RIG_IC7410 : public RIG_IC746PRO { public: RIG_IC7410(); ~RIG_IC7410(){} void initialize(); void selectA(); void selectB(); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int m); int def_bandwidth(int m); void set_attenuator( int val ); int get_attenuator(); void set_mic_gain(int v); void set_compression(); void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 10; step = 1; } void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void get_vox_hang_min_max_step(int &min, int &max, int &step) { min = 0; max = 200; step = 10; } void get_cw_wpm_min_max(int &min, int &max) { min = 6; max = 48; } void get_cw_qsk_min_max_step(double &min, double &max, double &step) { min = 2.0; max = 13.0; step = 0.1; } void get_cw_spot_tone_min_max_step(int &min, int &max, int &step) { min = 300; max = 900; step = 5; } void set_cw_wpm(); void set_cw_qsk(); void set_cw_spot_tone(); void set_cw_vol(); const char **bwtable(int m) {return bandwidths_;} }; #endif flrig-1.3.24/src/include/RAY152.h0000644000175000017500000000414512562731651013107 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _RAY152_H #define _RAY152_H #include "rigbase.h" #include "rigpanel.h" class RIG_RAY152 : public rigbase { public: RIG_RAY152(); ~RIG_RAY152(){} void initialize(); void shutdown(); void get_data(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void set_PTT_control(int val); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); int get_modetype(int n); int get_volume_control() {return vol;} void get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void set_volume_control(int val); void set_rf_gain(int val); int get_rf_gain() {return rfg;} void get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void setRit(int v); int getRit(); void get_RIT_min_max_step(int &min, int &max, int &step) { min = -200; max = 200; step = 10; } int get_smeter(void); int get_power_out(void); void set_squelch(int val); int get_squelch(); void set_noise(bool on); int get_noise(); void set_auto_notch(int v); int get_auto_notch(); int adjust_bandwidths(int m) { return 0; } private: int vol; int rfg; int squelch; int nb; int nb_set; int agc; bool dumpdata; }; #endif flrig-1.3.24/src/include/FTdx9000.h0000644000175000017500000000601012646444222013371 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FTdx9000_H #define _FTdx9000_H #include "rigbase.h" class RIG_FTdx9000 : public rigbase { private: bool notch_on; int m_60m_indx; // void update_bandwidths(); protected: int preamp_level; int atten_level; public: RIG_FTdx9000(); ~RIG_FTdx9000(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); bool twovfos(); void selectA(); void selectB(); void A2B(); bool can_split(); void set_split(bool val); int get_split(); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_modeB(int val); int get_modeB(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int val); int def_bandwidth(int val); int get_smeter(); int get_swr(); int get_power_out(); int get_power_control(); void set_volume_control(int val); void set_power_control(double val); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 200; step = 1; } int get_volume_control(); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_auto_notch(int v); int get_auto_notch(); void set_noise(bool b); int get_noise(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); const char **bwtable(int); void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void set_vox_on_dataport(); void get_cw_wpm_min_max(int &min, int &max) { min = 4; max = 60; } void set_cw_weight(); void set_cw_wpm(); void enable_keyer(); void set_cw_qsk(); // void set_cw_vol(); bool set_cw_spot(); // void set_cw_spot_tone(); void set_band_selection(int v); }; #endif flrig-1.3.24/src/include/serial.h0000644000175000017500000001206712562731651013505 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- // SerialComm.h: interface for the Cserial class. // ////////////////////////////////////////////////////////////////////// #ifndef SERIAL_H #define SERIAL_H #include using namespace std; #ifndef __WIN32__ #include class Cserial { public: Cserial(); ~Cserial(); //Methods bool OpenPort(); bool CheckPort(string); bool IsOpen() { return fd < 0 ? 0 : 1; }; void ClosePort(); void Device (std::string dev) { device = dev;}; std::string Device() { return device;}; void Baud(int b) { baud = b;}; int Baud() { return baud;}; void Timeout(int tm) { timeout = tm;} int Timeout() { return timeout; } void Retries(int r) { retries = r;} int Retries() { return retries;} void RTS(bool r){rts = r;} bool RTS(){return rts;} void setRTS(bool r); void RTSptt(bool b){rtsptt = b;} bool RTSptt(){return rtsptt;} void DTR(bool d){dtr = d;} bool DTR(){return dtr;} void setDTR(bool d); void DTRptt(bool b){dtrptt = b;} bool DTRptt(){return dtrptt;} void RTSCTS(bool b){rtscts = b;} bool RTSCTS(){return rtscts;} void SetPTT(bool b); void Stopbits(int n) {stopbits = (n == 1 ? 1 : 2);} int Stopbits() { return stopbits;} int ReadBuffer (char *b, int nbr); int WriteBuffer(const char *str, int nbr); bool WriteByte(char bybyte); void FlushBuffer(); private: //Members std::string device; int fd; int baud; int speed; struct termios oldtio, newtio; int timeout; int retries; int status, origstatus; bool dtr; bool dtrptt; bool rts; bool rtsptt; bool rtscts; int stopbits; char bfr[2048]; //Methods bool IOselect(); }; //============================================================================= // MINGW serial port implemenation //============================================================================= #else //__WIN32__ #include class Cserial { public: Cserial() { rts = dtr = false; rtsptt = dtrptt = false; rtscts = false; baud = CBR_9600; stopbits = 2; hComm = 0; }; Cserial( std::string portname) { device = portname; Cserial(); // OpenPort(); }; virtual ~Cserial() {}; //Methods bool OpenPort(); bool IsOpen(); bool CheckPort(string); void ClosePort(); bool ConfigurePort(DWORD BaudRate,BYTE ByteSize,DWORD fParity,BYTE Parity,BYTE StopBits); bool IsBusy() { return busyflag; }; void IsBusy(bool val) { busyflag = val; }; bool ReadByte(char &resp); int ReadData (char *b, int nbr); int ReadBuffer (char *b, int nbr) { return ReadData (b,nbr); } int ReadChars (char *b, int nbr, int msec); DWORD GetBytesRead(); bool WriteByte(char bybyte); DWORD GetBytesWritten(); int WriteBuffer(const char *str, int nbr); bool SetCommunicationTimeouts(DWORD ReadIntervalTimeout,DWORD ReadTotalTimeoutMultiplier,DWORD ReadTotalTimeoutConstant,DWORD WriteTotalTimeoutMultiplier,DWORD WriteTotalTimeoutConstant); bool SetCommTimeout(); void Timeout(int tm) { timeout = tm; return; }; int Timeout() { return timeout; }; void FlushBuffer(); void Device (std::string dev) { device = dev;}; std::string Device() { return device;}; void Baud(int b) { baud = b;}; int Baud() { return baud;}; void Retries(int r) { retries = r;} int Retries() { return retries;} void RTS(bool r){rts = r;} bool RTS(){return rts;} void setRTS(bool b); void RTSptt(bool b){rtsptt = b;} bool RTSptt(){return rtsptt;} void DTR(bool d){dtr = d;} bool DTR(){return dtr;} void setDTR(bool b); void DTRptt(bool b){dtrptt = b;} bool DTRptt(){return dtrptt;} void RTSCTS(bool b){rtscts = b;} bool RTSCTS(){return rtscts;} void SetPTT(bool b); void Stopbits(int n) {stopbits = (n == 1 ? 1 : 2);} int Stopbits() { return stopbits;} //Members private: std::string device; //For use by CreateFile HANDLE hComm; //DCB Defined in WinBase.h DCB dcb; COMMTIMEOUTS CommTimeoutsSaved; COMMTIMEOUTS CommTimeouts; //Is the Port Ready? bool bPortReady; //Number of Bytes Written to port DWORD nBytesWritten; //Number of Bytes Read from port DWORD nBytesRead; //Number of bytes Transmitted in the cur session DWORD nBytesTxD; int timeout; bool busyflag; int baud; int retries; bool dtr; bool dtrptt; bool rts; bool rtsptt; bool rtscts; int stopbits; }; #endif // __WIN32__ #endif // SERIAL_H flrig-1.3.24/src/include/FT767.h0000644000175000017500000000223312562731651012775 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT767_H #define FT767_H #include "rigbase.h" class RIG_FT767 : public rigbase { public: RIG_FT767(); ~RIG_FT767(){}; long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); bool snd_cmd(string cmd, size_t n); private: void init_cmd(); }; #endif flrig-1.3.24/src/include/FT920.h0000644000175000017500000000327412562731652012773 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT920_H #define FT920_H #include "rigbase.h" class RIG_FT920 : public rigbase { private: double fwdpwr; double refpwr; double fwdv; double refv; int afreq, amode, aBW; int bfreq, bmode, bBW; public: RIG_FT920(); ~RIG_FT920(){}; void initialize(); bool get_info(); bool can_split() { return true;} void set_split(bool val); bool twovfos() {return false;} long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_bwA(); long get_vfoB(); void set_vfoB(long); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); int def_bandwidth(int m); int adjust_bandwidth(int); void selectA(); void selectB(); // int get_smeter(); // int get_swr(); // int get_power_out(); private: void init_cmd(); }; #endif flrig-1.3.24/src/include/FT1000MP.h0000644000175000017500000000347512562731651013300 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT1000MP_H #define FT1000MP_H #include "rigbase.h" class RIG_FT1000MP : public rigbase { public : RIG_FT1000MP(); ~RIG_FT1000MP() {}; void initialize(); bool can_split() { return true;} void set_split(bool val); bool twovfos() {return true;} long get_vfoA(); void set_vfoA(long); long get_vfoB(void); void set_vfoB(long f); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); int get_modetype(int n); void selectA(); void selectB(); int get_bwA(); void set_bwA(int n); int get_bwB(); void set_bwB(int n); void set_PTT_control(int val); void tune_rig(); int get_power_out(void); int get_smeter(void); int get_swr(void); int get_alc(void); void set_auto_notch(int v); // usurped for Tuner ON/OFF control int get_auto_notch(); int def_bandwidth(int m); int adjust_bandwidth(int); private: bool tune_on; void init_cmd(); bool get_info(void); bool tuner_on; }; #endif flrig-1.3.24/src/include/IC718.h0000644000175000017500000000447212562731651012762 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC718_H #define _IC718_H #include "ICbase.h" class RIG_IC718 : public RIG_ICOM { public: RIG_IC718(); ~RIG_IC718(){} void initialize(); long get_vfoA(void); void set_vfoA(long f); int get_bwA(); void set_bwA(int); int get_modeA(); void set_modeA(int val); int get_modetype(int n); long get_vfoB(void); void set_vfoB(long f); int get_bwB(); void set_bwB(int); void set_modeB(int val); int get_modeB(); void selectA(); void selectB(); void set_volume_control(int val); int get_volume_control(); void get_vol_min_max_step(int &min, int &max, int &step); void set_attenuator(int val); int get_smeter(); void set_noise(bool val); int get_noise(); void set_noise_reduction(int val); int get_noise_reduction(); void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_preamp(int val); int get_preamp(); void set_rf_gain(int val); int get_rf_gain(); void set_squelch(int val); void set_power_control(double val); int get_power_control(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_gain_min_max_step(int &min, int &max, int &step); void set_compression(); void set_auto_notch(int val); int get_auto_notch(); void set_vox_onoff(); int adjust_bandwidth(int m); bool can_split() { return true;} void set_split(bool val); int get_split(); protected: int filter_nbr; }; #endif //============================================================================= flrig-1.3.24/src/include/IC7800.h0000644000175000017500000000452412562731652013040 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC7800_H #define _IC7800_H #include "IC746.h" class RIG_IC7800 : public RIG_IC746PRO { public: RIG_IC7800(); ~RIG_IC7800(){} void initialize(); void selectA(); void selectB(); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); bool can_split(); void set_split(bool); int get_split(); void swapvfos(); bool canswap() { return true;} void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int m); int def_bandwidth(int m); void set_attenuator( int val ); //alh int get_attenuator(); //alh void set_mic_gain(int v); void set_compression(); void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 10; step = 1; } void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void get_vox_hang_min_max_step(int &min, int &max, int &step) { min = 0; max = 200; step = 10; } //alh void get_cw_wpm_min_max(int &min, int &max) { min = 6; max = 60; } void get_cw_qsk_min_max_step(double &min, double &max, double &step) { min = 2.0; max = 13.0; step = 0.1; } void get_cw_spot_tone_min_max_step(int &min, int &max, int &step) { min = 300; max = 900; step = 5; } void set_cw_wpm(); void set_cw_qsk(); void set_cw_spot_tone(); void set_cw_vol(); const char **bwtable(int m) {return bandwidths_;} void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 200; step = 1; } }; #endif flrig-1.3.24/src/include/Fl_SigBar.h0000644000175000017500000000403412562731651014011 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _Fl_SigBar_H_ #define _Fl_SigBar_H_ #include // // SigBar class... // class Fl_SigBar : public Fl_Widget { float value_, peakv_, minimum_, maximum_, peak_[10], vals_[10]; int aging_, avg_; bool horiz; Fl_Color pkcolor; protected: virtual void draw(); public: Fl_SigBar(int x, int y, int w, int h, const char *l = 0); void maximum(float v) { maximum_ = v; redraw(); } float maximum() const { return (maximum_); } void minimum(float v) { minimum_ = v; redraw(); } float minimum() const { return (minimum_); } void value(float v); float value() const { return (value_); } void aging (int n) { if (n <= 10 && n > 0) aging_ = n; else aging_ = 5; for (int i = 0; i < aging_; i++) peak_[i] = peakv_; } void avg (int n) { if (n <= 10 && n > 0) avg_ = n; else avg_ = 5; for (int i = 0; i < avg_; i++) vals_[i] = value_ / avg_; } void clear () { for (int i = 0; i < 10; i++) vals_[i] = peak_[i] = 0; peakv_ = value_ = 0; } void peak(float); float peak() { return peakv_;}; void PeakColor(Fl_Color c) { pkcolor = c; }; Fl_Color PeakColor() { return pkcolor; } void horizontal(bool yes) { horiz = yes; }; }; #endif flrig-1.3.24/src/include/gettext.h0000644000175000017500000002362112562731651013710 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ----------------------------------------------------------------------------- // Convenience header for conditional use of GNU . // Copyright (C) 1995-1998, 2000-2002, 2004-2006 Free Software Foundation, Inc. // // This program is free software; you can redistribute it and/or modify it // under the terms of the GNU General Public License as published // by the Free Software Foundation; either version 2, or (at your option) // any later version. //------------------------------------------------------------------------------ #ifndef _LIBGETTEXT_H #define _LIBGETTEXT_H 1 /* NLS can be disabled through the configure --disable-nls option. */ #if ENABLE_NLS /* Get declarations of GNU message catalog functions. */ # include /* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by the gettext() and ngettext() macros. This is an alternative to calling textdomain(), and is useful for libraries. */ # ifdef DEFAULT_TEXT_DOMAIN # undef gettext # define gettext(Msgid) \ dgettext (DEFAULT_TEXT_DOMAIN, Msgid) # undef ngettext # define ngettext(Msgid1, Msgid2, N) \ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N) # endif #else /* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. We don't include as well because people using "gettext.h" will not include , and also including would fail on SunOS 4, whereas is OK. */ #if defined(__sun) # include #endif /* Many header files from the libstdc++ coming with g++ 3.3 or newer include , which chokes if dcgettext is defined as a macro. So include it now, to make later inclusions of a NOP. */ #if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3) # include # if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H # include # endif #endif /* Disabled NLS. The casts to 'const char *' serve the purpose of producing warnings for invalid uses of the value returned from these functions. On pre-ANSI systems without 'const', the config.h file is supposed to contain "#define const". */ # define gettext(Msgid) ((const char *) (Msgid)) # define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid)) # define dcgettext(Domainname, Msgid, Category) \ ((void) (Category), dgettext (Domainname, Msgid)) # define ngettext(Msgid1, Msgid2, N) \ ((N) == 1 \ ? ((void) (Msgid2), (const char *) (Msgid1)) \ : ((void) (Msgid1), (const char *) (Msgid2))) # define dngettext(Domainname, Msgid1, Msgid2, N) \ ((void) (Domainname), ngettext (Msgid1, Msgid2, N)) # define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \ ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N)) # define textdomain(Domainname) ((const char *) (Domainname)) # define bindtextdomain(Domainname, Dirname) \ ((void) (Domainname), (const char *) (Dirname)) # define bind_textdomain_codeset(Domainname, Codeset) \ ((void) (Domainname), (const char *) (Codeset)) #endif /* A pseudo function call that serves as a marker for the automated extraction of messages, but does not call gettext(). The run-time translation is done at a different place in the code. The argument, String, should be a literal string. Concatenated strings and other string expressions won't work. The macro's expansion is not parenthesized, so that it is suitable as initializer for static 'char[]' or 'const char[]' variables. */ #define gettext_noop(String) String /* The separator between msgctxt and msgid in a .mo file. */ #define GETTEXT_CONTEXT_GLUE "\004" /* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be short and rarely need to change. The letter 'p' stands for 'particular' or 'special'. */ #ifdef DEFAULT_TEXT_DOMAIN # define pgettext(Msgctxt, Msgid) \ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #else # define pgettext(Msgctxt, Msgid) \ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #endif #define dpgettext(Domainname, Msgctxt, Msgid) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES) #define dcpgettext(Domainname, Msgctxt, Msgid, Category) \ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category) #ifdef DEFAULT_TEXT_DOMAIN # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #else # define npgettext(Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #endif #define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES) #define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * pgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, int category) { const char *translation = dcgettext (domain, msg_ctxt_id, category); if (translation == msg_ctxt_id) return msgid; else return translation; } #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * npgettext_aux (const char *domain, const char *msg_ctxt_id, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { const char *translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); if (translation == msg_ctxt_id || translation == msgid_plural) return (n == 1 ? msgid : msgid_plural); else return translation; } /* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID can be arbitrary expressions. But for string literals these macros are less efficient than those above. */ #include #define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \ /* || __STDC_VERSION__ >= 199901L */ ) #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS #include #endif #define pgettext_expr(Msgctxt, Msgid) \ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES) #define dpgettext_expr(Domainname, Msgctxt, Msgid) \ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcgettext (domain, msg_ctxt_id, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (translation != msg_ctxt_id) return translation; } return msgid; } #define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES) #ifdef __GNUC__ __inline #else #ifdef __cplusplus inline #endif #endif static const char * dcnpgettext_expr (const char *domain, const char *msgctxt, const char *msgid, const char *msgid_plural, unsigned long int n, int category) { size_t msgctxt_len = strlen (msgctxt) + 1; size_t msgid_len = strlen (msgid) + 1; const char *translation; #if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS char msg_ctxt_id[msgctxt_len + msgid_len]; #else char buf[1024]; char *msg_ctxt_id = (msgctxt_len + msgid_len <= sizeof (buf) ? buf : (char *) malloc (msgctxt_len + msgid_len)); if (msg_ctxt_id != NULL) #endif { memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); msg_ctxt_id[msgctxt_len - 1] = '\004'; memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); #if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS if (msg_ctxt_id != buf) free (msg_ctxt_id); #endif if (!(translation == msg_ctxt_id || translation == msgid_plural)) return translation; } return (n == 1 ? msgid : msgid_plural); } #if ENABLE_NLS #define _(String) gettext (String) #define N_(String) gettext_noop (String) #else #define _(String) (String) #define N_(String) String #endif #if ENABLE_NLS int setup_nls(void); unused__ static const int nls_init_ = setup_nls(); #endif #endif /* _LIBGETTEXT_H */ flrig-1.3.24/src/include/IC7000.h0000644000175000017500000000471212562731652013027 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC7000_H #define _IC7000_H #include "IC746.h" class RIG_IC7000 : public RIG_IC746PRO { public: RIG_IC7000(); ~RIG_IC7000(){} void initialize(); long get_vfoA(void); void set_vfoA(long f); int get_bwA(); void set_bwA(int); int get_modeA(); void set_modeA(int val); long get_vfoB(void); void set_vfoB(long f); int get_bwB(); void set_bwB(int); void set_modeB(int val); int get_modeB(); void selectA(); void selectB(); int adjust_bandwidth(int m); int def_bandwidth(int m); void set_attenuator( int val ); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_volume_control(int val); int get_volume_control(); void get_vol_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void set_squelch(int val); int get_squelch(); void set_power_control(double val); int get_power_control(); int get_auto_notch(); void set_auto_notch(int v); int get_smeter(); int get_power_out(); int get_alc(); void set_split(bool v); int get_split(); int get_mic_gain(); void set_mic_gain(int val); void get_mic_gain_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_noise(bool val); int get_noise(); void set_noise_reduction(int val); int get_noise_reduction(); void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_compression(); void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 10; step = 1; } }; #endif flrig-1.3.24/src/include/K3.h0000644000175000017500000000464412562731652012506 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef K3_H #define K3_H #include "rigbase.h" class RIG_K3 : public rigbase { public: RIG_K3(); ~RIG_K3(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void set_volume_control(int val); int get_volume_control(); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); void set_power_control(double val); int get_power_control(); void get_pc_min_max_step(double &, double &, double &); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void get_if_mid(); void set_PTT_control(int val); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); int get_smeter(); void set_noise(bool on); int get_noise(); int get_modetype(int n); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int get_power_out(); int adjust_bandwidth(int m); int def_bandwidth(int m); bool can_split(); void set_split(bool val); int get_split(); bool twovfos() {return true;} void shutdown(); void set_pbt_values(int val); private: double minpwr; double maxpwr; double steppwr; // if shift value int if_mid; int if_min; int if_max; bool split_on; /* int get_swr(); void tune_rig(); */ }; #endif flrig-1.3.24/src/include/icons.h0000644000175000017500000000235712562731651013342 00000000000000#ifndef ICONS_H_ #define ICONS_H_ #define USE_IMAGE_LABELS 1 #include #include #include #include "pixmaps.h" namespace icons { const char* make_icon_label(const char* text, const char** pixmap = 0); void set_icon_label(Fl_Menu_Item* item); void set_icon_label(Fl_Widget* w); void toggle_icon_labels(void); const char* get_icon_label_text(Fl_Menu_Item* item); const char* get_icon_label_text(Fl_Widget* w); void free_icon_label(Fl_Menu_Item* item); void free_icon_label(Fl_Widget* w); void set_active(Fl_Menu_Item* item, bool v); void set_active(Fl_Widget* w, bool v); // fltk message dialogs with nicer icons void set_message_icon(const char** pixmap); } #define fl_input2(...) ({ icons::set_message_icon(dialog_question_48_icon); fl_input(__VA_ARGS__); }) #define fl_choice2(...) ({ icons::set_message_icon(dialog_question_48_icon); fl_choice(__VA_ARGS__); }) #define fl_message2(...) ({ icons::set_message_icon(dialog_information_48_icon); fl_message(__VA_ARGS__); }) #define fl_alert2(...) ({ icons::set_message_icon(dialog_warning_48_icon); fl_alert(__VA_ARGS__); }) #define fl_warn_choice2(...) ({ icons::set_message_icon(dialog_warning_48_icon); fl_choice(__VA_ARGS__); }) #endif // ICONS_H_ flrig-1.3.24/src/include/TT566.h0000644000175000017500000000450512562731652013015 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TT566_H #define _TT566_H #include "ICbase.h" class RIG_TT566 : public rigbase { private: int fwdpwr; int refpwr; int atten_level; public: RIG_TT566(); ~RIG_TT566(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); void set_bwA(int bw); int get_bwA(); void set_bwB(int bw); int get_bwB(); void set_PTT_control(int val); int get_modetype(int n); void set_preamp(int); int get_preamp(); void set_attenuator(int val); int get_attenuator(); void set_noise(bool); int get_noise(); int get_power_control(void); void set_power_control(double val); void set_auto_notch(int v); int get_auto_notch(); int get_smeter(); int get_power_out(); int get_swr(); int get_volume_control(); void get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void set_volume_control(int val); void set_mic_gain(int val); int get_mic_gain(); // void set_if_shift(int val); // bool get_if_shift(int &val); // void get_if_min_max_step(int &min, int &max, int &step) { // min = -8000; max = 8000; step = 50; } void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } int adjust_bandwidth(int m); int def_bandwidth(int m) {return adjust_bandwidth(m);} // void set_agc_level(); }; #endif flrig-1.3.24/src/include/IC9100.h0000644000175000017500000000475212562731651013035 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC9100_H #define _IC9100_H #include "IC746.h" class RIG_IC9100 : public RIG_IC746PRO { public: RIG_IC9100(); ~RIG_IC9100(){} void initialize(); void selectA(); void selectB(); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int m); int def_bandwidth(int m); void set_attenuator( int val ); int get_attenuator(); void set_mic_gain(int v); void set_compression(); void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 10; step = 1; } void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void get_vox_onoff(); void get_vox_gain(); void get_vox_anti(); void get_vox_hang(); void get_vox_hang_min_max_step(int &min, int &max, int &step) { min = 0; max = 200; step = 10; } void get_cw_wpm_min_max(int &min, int &max) { min = 6; max = 60; } void get_cw_qsk_min_max_step(double &min, double &max, double &step) { min = 2.0; max = 13.0; step = 0.1; } void get_cw_spot_tone_min_max_step(int &min, int &max, int &step) { min = 300; max = 900; step = 5; } void set_cw_wpm(); void set_cw_qsk(); void set_cw_spot_tone(); void set_cw_vol(); void set_split(bool v); int get_split(); int get_smeter(); int get_power_out(); int get_swr(); int get_alc(); int get_auto_notch(); void set_auto_notch(int v); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); const char **bwtable(int m) {return bandwidths_;} }; #endif flrig-1.3.24/src/include/IC756.h0000644000175000017500000000442512562731651012762 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC756_H #define _IC756_H #include "IC746.h" //#include "ICbase.h" class RIG_IC756 : public RIG_IC746 { public: RIG_IC756(); ~RIG_IC756(){} void initialize(); }; class RIG_IC756PRO : public RIG_ICOM { public: RIG_IC756PRO(); ~RIG_IC756PRO(){} void initialize(); void selectA(); void selectB(); long get_vfoA(void); void set_vfoA(long f); int get_modetype(int n); void set_modeA(int val); int get_modeA(); long get_vfoB(void); void set_vfoB(long f); void set_modeB(int val); int get_modeB(); int get_smeter(); void set_volume_control(int val); int get_volume_control(); void get_vol_min_max_step(int &min, int &max, int &step); void set_PTT_control(int val); void set_noise(bool val); int get_noise(); void set_mic_gain(int val); void get_mic_gain_min_max_step(int &min, int &max, int &step); void set_if_shift(int val); void get_if_min_max_step(int &min, int &max, int &step); void set_squelch(int val); void set_rf_gain(int val); void set_power_control(double val); void set_split(bool val); bool can_split() { return true;} void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); int adjust_bandwidth(int); int def_bandwidth(int); void set_auto_notch(int v); int get_auto_notch(); bool twovfos() { return false; } const char **bwtable(int); protected: int preamp_level; int atten_level; int ICvol; }; #endif flrig-1.3.24/src/include/socket.h0000644000175000017500000001005412562731651013510 00000000000000// ---------------------------------------------------------------------------- // socket.h // // Copyright (C) 2008-2009 // Stelios Bounanos, M0GLD // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef SOCKET_H_ #define SOCKET_H_ #include #include #ifndef __MINGW32__ # include # include # include #else # include #endif #include #include #include class SocketException : public std::exception { public: SocketException(int err_ = 0) : err(err_), msg(err_to_str(err_)) { } SocketException(const char* msg_) : err(1), msg(msg_) { } SocketException(int err_, const std::string& prefix) : err(err_), msg(std::string(prefix).append(": ").append(err_to_str(err_))) { } virtual ~SocketException() throw() { } const char* what(void) const throw() { return msg.c_str(); } int error(void) const { return err; } protected: const char* err_to_str(int e) { #if HAVE_GETADDRINFO if (e < 0) return gai_strerror(e); else #endif return strerror(e); } int err; std::string msg; }; #if HAVE_GETADDRINFO typedef struct addrinfo addr_info_t; #else struct addr_info_t { int ai_family; int ai_socktype; int ai_protocol; int ai_addrlen; struct sockaddr* ai_addr; }; #endif class Address { public: Address(const char* host = "", int port = 0, const char* proto_name = "tcp"); Address(const char* host, const char* port_name, const char* proto_name = "tcp"); Address(const Address& addr); ~Address(); Address& operator=(const Address& rhs); size_t size(void) const; const addr_info_t* get(size_t n = 0) const; static std::string get_str(const addr_info_t* addr); private: void lookup(const char* proto_name); std::string node; std::string service; int port; #if HAVE_GETADDRINFO struct addrinfo* info; #else struct hostent host_entry; struct servent service_entry; mutable addr_info_t addr; mutable struct sockaddr_in saddr; #endif bool copied; }; class Socket { public: Socket(const Address& addr); Socket(int fd = -1); Socket(const Socket& s); ~Socket(); Socket& operator=(const Socket& rhs); void open(const Address& addr); void close(void); bool wait(int dir); // Server void bind(void); void listen(int backlog = SOMAXCONN); Socket accept(void); Socket accept1(void); // Client void connect(const Address& addr); void connect(void); // Data Transimission size_t send(const void* buf, size_t len); size_t send(const std::string& buf); size_t recv(void* buf, size_t len); size_t recv(std::string& buf); // Options int get_bufsize(int dir); void set_bufsize(int dir, int len); void set_nonblocking(bool v = true); void set_nodelay(bool v = true); void set_timeout(const struct timeval& t); void set_timeout(double t); void set_autoclose(bool v) const; void set_close_on_exec(bool v, int fd = -1); int fd(void); private: int sockfd; Address address; size_t anum; const addr_info_t* ainfo; char* buffer; struct timeval timeout; bool nonblocking; mutable bool autoclose; }; #endif // SOCKET_H_ // Local Variables: // mode: c++ // c-file-style: "linux" // End: flrig-1.3.24/src/include/util.h0000644000175000017500000001401312562731651013174 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- /* This file is included by config.h */ #ifndef UTIL_H #define UTIL_H #ifdef __cplusplus extern "C" { #endif #ifndef __STDC_FORMAT_MACROS # define __STDC_FORMAT_MACROS 1 #endif #include #ifndef powerof2 # define powerof2(n) ((((n) - 1) & (n)) == 0) #endif #ifndef MAX # define MAX(a, b) (((a) > (b)) ? (a) : (b)) #endif #ifndef MIN # define MIN(a, b) (((a) < (b)) ? (a) : (b)) #endif #ifndef CLAMP # define CLAMP(x, low, high) (((x)>(high))?(high):(((x)<(low))?(low):(x))) #endif #define WCLAMP(x, low, high) (((x)>(high))?(low):(((x)<(low))?(high):(x))) #ifdef __GNUC__ # if (__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 1) # define full_memory_barrier() __sync_synchronize() # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() # elif defined(__i386__) || defined(__i486__) || defined(__i586__) || defined(__i686__) || defined(__x86_64__) # define full_memory_barrier() asm volatile ("lock; addl $0,0(%%esp)":::"memory") # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() /* These would be faster on SSE2-capable processors: # define full_memory_barrier() asm volatile ("mfence":::"memory") # define read_memory_barrier() asm volatile ("lfence":::"memory") # define write_memory_barrier() asm volatile ("sfence":::"memory") */ # elif defined(__ppc__) || defined(__powerpc__) || defined(__PPC__) # define full_memory_barrier() asm volatile("sync":::"memory") # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() # else # warning Memory barriers not defined on this system # define full_memory_barrier() ((void)0) # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() # endif #else # warning Memory barriers not defined on this system # define full_memory_barrier() ((void)0) # define read_memory_barrier() full_memory_barrier() # define write_memory_barrier() full_memory_barrier() #endif /* http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html */ #if defined(__GNUC__) && (__GNUC__ >= 3) # define likely(x) __builtin_expect (!!(x), 1) # define unlikely(x) __builtin_expect (!!(x), 0) # define used__ __attribute__ ((__used__)) # define unused__ __attribute__ ((__unused__)) # define must_check__ __attribute__ ((__warn_unused_result__)) # define deprecated__ __attribute__ ((__deprecated__)) # define noreturn__ __attribute__ ((__noreturn__)) # define pure__ __attribute__ ((__pure__)) # define const__ __attribute__ ((__const__)) # define malloc__ __attribute__ ((__malloc__)) # define packed__ __attribute__ ((__packed__)) # define inline__ inline __attribute__ ((__always_inline__)) # define noinline__ __attribute__ ((__noinline__)) # define nonnull__(x) __attribute__ ((__nonnull__(x))) # define format__(type_, index_, first_) __attribute__ ((format(type_, index_, first_))) #else # define likely(x) (x) # define unlikely(x) (x) # define used__ # define unused__ # define must_check__ # define deprecated__ # define noreturn__ # define pure__ # define const__ # define malloc__ # define packed__ # define inline__ # define noinline__ # define nonnull__(x) # define format__(type_, index_, first_) #endif #if defined(__GNUC__) && ((__GNUC__ > 4) || (__GNUC__ == 4 && __GNUC_MINOR__ >= 3)) # define hot__ __attribute__ ((__hot__)) # define cold__ __attribute__ ((__cold__)) #else # define hot__ # define cold__ #endif #include const__ uint32_t ceil2(uint32_t n); const__ uint32_t floor2(uint32_t n); //#if !HAVE_STRCASESTR //char* strcasestr(const char* haystack, const char* needle); //#endif //#if !HAVE_STRLCPY //size_t strlcpy(char* dest, const char* src, size_t size); //#endif int set_cloexec(int fd, unsigned char v); int set_nonblock(int fd, unsigned char v); int set_nodelay(int fd, unsigned char v); int get_bufsize(int fd, int dir, int* len); int set_bufsize(int fd, int dir, int len); unsigned long ver2int(const char* version); void save_signals(void); void restore_signals(void); void MilliSleep(long msecs); #ifdef __cplusplus } // extern "C" #endif #ifdef __cplusplus uint32_t simple_hash_data(const unsigned char* buf, size_t len, uint32_t code = 0); uint32_t simple_hash_str(const unsigned char* str, uint32_t code = 0); #endif #ifdef __cplusplus const char* str2hex(const unsigned char* str, size_t len); const char* str2hex(const char* str, size_t len = 0); #else const char* str2hex(const unsigned* str, size_t len); #endif const char* uint2bin(unsigned u, size_t len); void MilliSleep(long msecs); #if !defined(NDEBUG) && defined(deprecated__) && defined(__GNUC__) && !defined(__WIN32__) #include #include deprecated__ typeof(sprintf) sprintf; /* there are far too many of these in the qrz code deprecated__ typeof(strcpy) strcpy; deprecated__ typeof(strcat) strcat; */ #endif #ifdef __WIN32__ # define NOMINMAX 1 #endif #ifndef __WIN32__ # define PRIuSZ "zu" # define PRIdSZ "zd" #else # define PRIuSZ "Iu" # define PRIdSZ "Id" #endif #ifndef __WIN32__ # define PATH_SEP "/" #else # define PATH_SEP "\\" #endif #endif /* UTIL_H */ /* Local Variables: mode: c++ c-file-style: "linux" End: */ flrig-1.3.24/src/include/FT857D.h0000644000175000017500000000310312626471743013102 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT857D_H #define FT857D_H #include "FT817.h" class RIG_FT857D : public RIG_FT817 { public: RIG_FT857D(); ~RIG_FT857D(){}; long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void set_PTT_control(int val); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_modeB(int val); int get_modeB(); int get_power_out(void); int get_smeter(void); void selectA(); void selectB(); bool can_split(); void set_split(bool val); int adjust_bandwidth(int m) { return 0; } private: void init_cmd(); void set_getACK(); protected: bool onB; }; class RIG_FT897D : public RIG_FT857D { public : RIG_FT897D(); ~RIG_FT897D() {}; }; #endif flrig-1.3.24/src/include/rigs.h0000644000175000017500000001113512646444222013163 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef RIGS_H #define RIGS_H #include "rigbase.h" #include "FT100D.h" #include "FT450.h" #include "FT450D.h" #include "FT747.h" #include "FT767.h" #include "FT817.h" #include "FT847.h" #include "FT857D.h" #include "FT890.h" #include "FT900.h" #include "FT920.h" #include "FT950.h" #include "FT990.h" #include "FT990a.h" #include "FT991.h" #include "FT1000MP.h" #include "FT2000.h" #include "FTdx1200.h" #include "FTdx3000.h" #include "FTdx9000.h" #include "FT5000.h" #include "ICbase.h" #include "IC703.h" #include "IC706MKIIG.h" #include "IC718.h" #include "IC728.h" #include "IC735.h" #include "IC746.h" #include "IC756.h" #include "IC756PRO2.h" #include "IC756PRO3.h" #include "IC910.h" #include "IC7000.h" #include "IC7100.h" #include "IC7410.h" #include "IC7200.h" #include "IC7600.h" #include "IC7700.h" #include "IC7800.h" #include "IC9100.h" #include "K2.h" #include "K3.h" #include "KX3.h" #include "PCR1000.h" #include "RAY152.h" #include "TS140.h" #include "TS450S.h" #include "TS480HX.h" #include "TS480SAT.h" #include "TS570.h" #include "TS590S.h" #include "TS590SG.h" #include "TS870S.h" // wbx #include "TS990.h" // G0HIX #include "TS2000.h" #include "TT516.h" #include "DELTA-II.h" #include "TT538.h" #include "TT550.h" #include "TT563.h" #include "TT566.h" #include "TT588.h" #include "TT599.h" extern rigbase rig_null; // 0 extern RIG_FT100D rig_FT100D; // 1 extern RIG_FT450 rig_FT450; // 2 extern RIG_FT450D rig_FT450D; // 3 extern RIG_FT747 rig_FT747; // 4 extern RIG_FT767 rig_FT767; // 5 extern RIG_FT817 rig_FT817; // 6 extern RIG_FT847 rig_FT847; // 7 extern RIG_FT857D rig_FT857D; // 8 extern RIG_FT890 rig_FT890; // 9 extern RIG_FT897D rig_FT897D; // 10 extern RIG_FT900 rig_FT900; // 11 extern RIG_FT920 rig_FT920; // 12 extern RIG_FT950 rig_FT950; // 13 extern RIG_FT990 rig_FT990; // 14 extern RIG_FT990A rig_FT990A; // 15 extern RIG_FT991 rig_FT991; // 16 extern RIG_FT1000MP rig_FT1000MP; // 17 extern RIG_FT2000 rig_FT2000; // 18 extern RIG_FTdx1200 rig_FTdx1200; // 19 extern RIG_FTdx3000 rig_FTdx3000; // 20 extern RIG_FT5000 rig_FT5000; // 21 extern RIG_FTdx9000 rig_FTdx9000; // 22 extern RIG_IC703 rig_IC703; // 23 extern RIG_IC706MKIIG rig_IC706MKIIG; // 24 extern RIG_IC718 rig_IC718; // 25 extern RIG_IC728 rig_IC728; // 26 extern RIG_IC735 rig_IC735; // 27 extern RIG_IC746 rig_IC746; // 28 extern RIG_IC746PRO rig_IC746PRO; // 29 extern RIG_IC756 rig_IC756; // 30 extern RIG_IC756PRO rig_IC756PRO; // 31 extern RIG_IC756PRO2 rig_IC756PRO2; // 32 extern RIG_IC756PRO3 rig_IC756PRO3; // 33 extern RIG_IC7000 rig_IC7000; // 34 extern RIG_IC7100 rig_IC7100; // 35 extern RIG_IC7200 rig_IC7200; // 36 extern RIG_IC7410 rig_IC7410; // 37 extern RIG_IC7600 rig_IC7600; // 38 extern RIG_IC7700 rig_IC7700; // 39 extern RIG_IC7800 rig_IC7800; // 40 extern RIG_IC9100 rig_IC9100; // 41 extern RIG_IC910H rig_IC910H; // 42 extern RIG_K2 rig_K2; // 43 extern RIG_K3 rig_K3; // 44 extern RIG_KX3 rig_KX3; // 45 extern RIG_PCR1000 rig_PCR1000; // 46 extern RIG_RAY152 rig_RAY152; // 47 extern RIG_TS140 rig_TS140; // 48 extern RIG_TS450S rig_TS450S; // 49 extern RIG_TS480HX rig_TS480HX; // 50 extern RIG_TS480SAT rig_TS480SAT; // 51 extern RIG_TS570 rig_TS570; // 52 extern RIG_TS590S rig_TS590S; // 53 extern RIG_TS590SG rig_TS590SG; // 54 extern RIG_TS870S rig_TS870S; // 55 wbx extern RIG_TS990 rig_TS990; // 56 G0HIX extern RIG_TS2000 rig_TS2000; // 57 extern RIG_TT516 rig_TT516; // 58 extern RIG_TT535 rig_TT535; // 59 extern RIG_TT538 rig_TT538; // 60 extern RIG_TT550 rig_TT550; // 61 extern RIG_TT563 rig_TT563; // 62 extern RIG_TT566 rig_TT566; // 63 extern RIG_TT588 rig_TT588; // 64 extern RIG_TT599 rig_TT599; // 65 #endif flrig-1.3.24/src/include/TT599.h0000644000175000017500000000401712562731652013021 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TT599_H #define _TT599_H #include "ICbase.h" class RIG_TT599 : public rigbase { private: int fwdpwr; int refpwr; public: RIG_TT599(); ~RIG_TT599(){} void initialize(); void shutdown(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); void set_bwA(int bw); int get_bwA(); void set_bwB(int bw); int get_bwB(); bool can_split() { return true;} void set_split(bool val); int get_split(); bool twovfos() { return false;}//true;} void set_PTT_control(int val); int get_modetype(int n); void set_preamp(int); int get_preamp(); int get_power_control(void); void set_power_control(double val); void set_auto_notch(int v); int get_auto_notch(); void set_attenuator(int val); int get_attenuator(); int get_smeter(); int get_power_out(); int get_swr(); int adjust_bandwidth(int); int def_bandwidth(int); void get_nr_min_max_step(int &min, int &max, int &step) { min = 0; max = 9; step = 1; } int get_noise_reduction_val(); void set_noise_reduction_val(int val); // void set_agc_level(); }; #endif flrig-1.3.24/src/include/FT2000.h0000644000175000017500000000416612562731651013042 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FT2000_H #define _FT2000_H #include "rigbase.h" class RIG_FT2000 : public rigbase { private: bool notch_on; int atten_level; int preamp_level; int m_60m_indx; public: RIG_FT2000(); ~RIG_FT2000(){} void initialize(); long get_vfoA(); void set_vfoA(long); int get_smeter(); int get_swr(); int get_power_out(); int get_power_control(); void set_volume_control(int val); int get_volume_control(); void set_power_control(double val); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_bwA(int val); int get_bwA(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_noise(bool b); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); int adjust_bandwidth(int); int def_bandwidth(int); bool sendFTcommand(string, int, bool); const char **bwtable(int); void set_band_selection(int v); }; #endif flrig-1.3.24/src/include/IC735.h0000644000175000017500000000225712562731651012760 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC735_H #define _IC735_H #include "ICbase.h" class RIG_IC735 : public RIG_ICOM { public: RIG_IC735(); ~RIG_IC735(){} void selectA(); void selectB(); long get_vfoA(); void set_vfoA(long); long get_vfoB(void); void set_vfoB(long f); void set_modeA(int val); int get_modeA(); }; #endif flrig-1.3.24/src/include/font_browser.h0000644000175000017500000000546012562731652014737 00000000000000// ---------------------------------------------------------------------------- // based on similar widget by Mariwan Jalal, in FLTK source // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FONTBROWSER_H #define FONTBROWSER_H #include #include #include #include #include #include #include "flslider2.h" // Preview box for showing font class Preview_Box : public Fl_Widget { private: int fontName; int fontSize; Fl_Color fontColor; void draw(); public: Preview_Box(int x, int y, int w, int h, const char* l); void SetFont( int fontname, int fontsize, Fl_Color c); }; // Font browser widget class Font_Browser : public Fl_Window { public: enum filter_t { FIXED_WIDTH, VARIABLE_WIDTH, ALL_TYPES }; private: int numfonts; Fl_Font fontnbr; int fontsize; Fl_Color fontcolor; filter_t filter; void *data_; Fl_Browser *lst_Font; Fl_Browser *lst_Size; Fl_Value_Input2 *txt_Size; Fl_Return_Button *btn_OK; Fl_Button *btn_Cancel; Fl_Button *btn_Color; Preview_Box *box_Example; void FontSort(); Fl_Callback* callback_; public: Font_Browser(int x = 100, int y = 100, int w = 400, int h = 225, const char *lbl = "Font Browser"); void callback(Fl_Callback* cb, void *d = 0) { callback_ = cb; data_ = d; } static void fb_callback(Fl_Widget* w, void* arg); void FontNameSelect(); void ColorSelect(); int numFonts() { return numfonts; } void fontNumber(Fl_Font n); Fl_Font fontNumber() { return fontnbr; } void fontSize(int s); int fontSize() { return fontsize; } void fontColor(Fl_Color c); Fl_Color fontColor() { return fontcolor; }; const char *fontName() { return lst_Font->text(lst_Font->value()); } void fontName(const char* n); static bool fixed_width(Fl_Font f); void fontFilter(filter_t filter); }; extern Font_Browser* font_browser; #endif flrig-1.3.24/src/include/socket_io.h0000644000175000017500000000243012562731651014176 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef WRAP_H #define WRAP_H #include #include #include "threads.h" #include "socket.h" #ifdef WIN32 # include #else # include #endif using namespace std; extern Socket *tcpip; extern Address *remote_addr; void connect_to_remote(); void disconnect_from_remote(); void send_to_remote(string cmd_string, int pace = 0); int read_from_remote(string &str); #endif flrig-1.3.24/src/include/PCR1000.h0000644000175000017500000000731412562731651013152 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _PCR1000_H #define _PCR1000_H #include "rigbase.h" class RIG_PCR1000 : public rigbase { public: private: static const char get_smeter_command[] ; static char volume_command[] ; static char squelch_command[] ; static char if_shift_command[] ; static char check_power_command[] ; static char power_on_command[] ; static char power_off_command[] ; static const char att_off_command[] ; static const char att_on_command[] ; static const char noise_off_command[] ; static const char noise_on_command[] ; static const char name[] ; static const char *modes[] ; static const char mode_chr[] ; static const char mode_type[] ; static const char *band_widths[] ; int current_volume ; struct freq_cmd { char command[2] ; // The command will always be 'K0' char frequency[10] ; // 10 digit frequency in Hertz char mode[2] ; // Mode code, 00=LSB, 01=USB, 02=AM, 03=CW, 05=NFM, 06=WFM, 04 is NOT USED! char band_width[2] ; // Band width setting 00=2.8kHz, 01=6kHz, 02=15kHz, 03=50kHz, 04=230kHz char pad[5] ; // Always '00\0' } ; static freq_cmd freq_cmds[] ; static const char hex_chars[] ; bool notch_on; int att_level; int nb_level; int active_bandwidth; int active_mode; int sql ; int if_shift ; int attenuator ; int noise ; bool att_on; bool is_PCR1000; FREQMODE& current_vfo ; // Internal methods /* * Since the same command is used for frequency, mode, and bandwidth we'll * use a single private method that is called whenever any of the three is * changed. */ void setFreqModeBW(FREQMODE &freqMode) ; // Set the frequency in the current mode int hexTo(const char c) const ; // Returns int value of c, i.e '2' returns 2, 'A' returns 10, etc. void set2Hex(int ival, char *cptr) ; // Set the hex value of ival into the first 2 chars of cptr public: RIG_PCR1000(); ~RIG_PCR1000(){}; void initialize(); void shutdown() ; void set_volume_control(int val); int get_volume_control(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void selectA() ; void selectB() ; void A2B() ; void swapAB() ; int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); void set_bwA(int val) ; int get_bwA() ; void set_bwB(int val) ; int get_bwB() ; int get_smeter(); void set_squelch(int val) ; int get_squelch() ; void get_squelch_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } void set_if_shift(int val) ; bool get_if_shift(int &val) ; void get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = -800; if_shift_max = max = 800; if_shift_step = step = 10; } void get_if_mid() {if_shift_mid = 0; } void set_attenuator(int val) ; int get_attenuator() ; void set_noise(bool on) ; int get_noise() ; }; #endif flrig-1.3.24/src/include/TS450S.h0000644000175000017500000000332212562731652013123 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TS450S_H #define _TS450S_H #include "rigbase.h" class RIG_TS450S : public rigbase { private: bool beatcancel_on; bool preamp_on; bool att_on; const char *_mode_type; public: RIG_TS450S(); ~RIG_TS450S(){} void initialize(); bool sendTScommand(string, int, bool); long get_vfoA(); void set_vfoA(long); int get_modeA(); void set_modeA(int val); void set_bwA(int val); int get_bwA(); long get_vfoB(); void set_vfoB(long); int get_modeB(); void set_modeB(int val); void set_bwB(int val); int get_bwB(); void selectA(); void selectB(); int get_modetype(int n); int def_bandwidth(int val); int get_smeter(); int get_swr(); void set_PTT_control(int val); int adjust_bandwidth(int val) { return 0; } bool can_split(); void set_split(bool val); int get_split(); bool twovfos() {return true;} }; #endif flrig-1.3.24/src/include/FT747.h0000644000175000017500000000270012562731651012772 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT747_H #define FT747_H #include "rigbase.h" class RIG_FT747 : public rigbase { public: RIG_FT747(); ~RIG_FT747(){}; bool can_split() { return true;} void set_split(bool val); bool twovfos() {return false;} long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); long get_vfoB(); void set_vfoB(long); void set_modeB(int val); int get_modeB(); void selectA(); void selectB(); bool get_info(); bool snd_cmd(string cmd, size_t n); void set_PTT_control(int val); int get_PTT_control(); private: void init_cmd(); }; #endif flrig-1.3.24/src/include/compat.h0000644000175000017500000000443412562731652013511 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef COMPAT_H #define COMPAT_H /* adapted from compat.h in git-1.6.1.2 */ #if !defined(__APPLE__) && !defined(__FreeBSD__) && !defined(__USLC__) && !defined(_M_UNIX) # define _XOPEN_SOURCE 600 /* glibc2 and AIX 5.3L need 500, OpenBSD needs 600 for S_ISLNK() */ # define _XOPEN_SOURCE_EXTENDED 1 /* AIX 5.3L needs this */ #endif #define _ALL_SOURCE 1 #define _GNU_SOURCE 1 #define _BSD_SOURCE 1 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef __WIN32__ # define dirent fl_dirent_no_thanks # else # include # include # include # include #endif #include "compat-mingw.h" #ifdef __cplusplus extern "C" { #endif #if defined(__WOE32__) && (!defined(__GNUC__) || __GNUC__ < 4) # define SNPRINTF_RETURNS_BOGUS 1 #else # define SNPRINTF_RETURNS_BOGUS 0 #endif #if SNPRINTF_RETURNS_BOGUS #define snprintf git_snprintf extern int git_snprintf(char *str, size_t maxsize, const char *format, ...); #define vsnprintf git_vsnprintf extern int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap); #endif #ifdef __cplusplus } #endif #endif // MINGW32_H flrig-1.3.24/src/include/FT847.h0000644000175000017500000000274412562731652013004 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT847_H #define FT847_H #include "rigbase.h" class RIG_FT847 : public rigbase { private: double fwdpwr; int afreq, amode, aBW; public: RIG_FT847(); ~RIG_FT847(){}; void initialize(); bool get_info(); bool can_split() { return false;} bool twovfos() {return false;} long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); long get_vfoB(); void set_vfoB(long); void set_modeB(int val); int get_modeB(); void set_PTT_control(int val); int get_smeter(); int get_power_out(); int adjust_bandwidth(int m) { return 0; } private: void init_cmd(); }; #endif flrig-1.3.24/src/include/ui.h0000644000175000017500000000177612562731651012650 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _UI_H #define _UI_H #define TOUCH_MAINW 1024 #define TOUCH_MAINH 134 #define WIDE_MAINW 735 #define WIDE_MAINH 218 #endif flrig-1.3.24/src/include/TS590SG.h0000644000175000017500000000637712567343707013261 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TS590SG_H #define _TS590SG_H #include "rigbase.h" class RIG_TS590SG : public rigbase { private: bool notch_on; int preamp_level; int att_level; int nb_level; int noise_reduction_level; bool data_mode; int active_mode; int active_bandwidth; bool rxtxa; public: enum TS590MODES { LSB, USB, CW, FM, AM, FSK, CWR, FSKR, LSBD, USBD, FMD }; RIG_TS590SG(); ~RIG_TS590SG(){} void initialize(); void shutdown(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); int adjust_bandwidth(int val); int def_bandwidth(int val); int set_widths(int val); void set_active_bandwidth(); int get_active_bandwidth(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); void selectA(); void selectB(); bool can_split() { return true;} void set_split(bool val); int get_split(); bool twovfos() {return true;} int get_smeter(); int get_swr(); int get_alc(); int get_power_out(); int get_power_control(); void set_volume_control(int val); int get_volume_control(); void set_power_control(double val); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_noise(bool b); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_squelch(int val); int get_squelch(); void get_squelch_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_noise_reduction(int val); int get_noise_reduction(); void get_nr_min_max_step(int &min, int &max, int &step) { min = 1; max = 10; step = 1; } void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_auto_notch(int v); int get_auto_notch(); bool sendTScommand(string, int, bool); const char **bwtable(int); const char **lotable(int); const char **hitable(int); const char * get_bwname_(int bw, int md); }; #endif flrig-1.3.24/src/include/ptt.h0000644000175000017500000000200212562731651013021 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef PTT_H #define PTT_H #include #include #include #include extern void rigPTT(bool); #endif flrig-1.3.24/src/include/threads.h0000644000175000017500000000747012562731652013663 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef THREADS_H_ #define THREADS_H_ #include #include #include #include #if !HAVE_SEM_TIMEDWAIT # include int sem_timedwait(sem_t* sem, const struct timespec* abs_timeout); #endif int sem_timedwait_rel(sem_t* sem, double rel_timeout); int pthread_cond_timedwait_rel(pthread_cond_t* cond, pthread_mutex_t* mutex, double rel_timeout); enum { INVALID_TID = -1, TRX_TID, QRZ_TID, RIGCTL_TID, NORIGCTL_TID, #if USE_XMLRPC XMLRPC_TID, #endif ARQ_TID, ARQSOCKET_TID, FLMAIN_TID, NUM_THREADS, NUM_QRUNNER_THREADS = NUM_THREADS - 1 }; #ifdef __linux__ void linux_log_tid(void); # define LOG_THREAD_ID() linux_log_tid() #else # define LOG_THREAD_ID() /* nothing */ #endif #if USE_TLS # define THREAD_ID_TYPE __thread intptr_t # define CREATE_THREAD_ID() thread_id_ = INVALID_TID # define SET_THREAD_ID(x) do { thread_id_ = (x); LOG_THREAD_ID(); } while (0) # define GET_THREAD_ID() thread_id_ #else # define THREAD_ID_TYPE pthread_key_t # define CREATE_THREAD_ID() pthread_key_create(&thread_id_, NULL) # define SET_THREAD_ID(x) do { pthread_setspecific(thread_id_, (const void *)(x + 1)); LOG_THREAD_ID(); } while (0) # define GET_THREAD_ID() ((intptr_t)pthread_getspecific(thread_id_) - 1) #endif // USE_TLS extern THREAD_ID_TYPE thread_id_; #ifndef NDEBUG # include "debug.h" bool thread_in_list(int id, const int* list); # define ENSURE_THREAD(...) \ do { \ int id_ = GET_THREAD_ID(); \ int t_[] = { __VA_ARGS__, INVALID_TID }; \ if (!thread_in_list(id_, t_)) \ LOG_ERROR("bad thread context: %d", id_); \ } while (0) # define ENSURE_NOT_THREAD(...) \ do { \ int id_ = GET_THREAD_ID(); \ int t_[] = { __VA_ARGS__, INVALID_TID }; \ if (thread_in_list(id_, t_)) \ LOG_ERROR("bad thread context: %d", id_); \ } while (0) #else # define ENSURE_THREAD(...) ((void)0) # define ENSURE_NOT_THREAD(...) ((void)0) #endif // ! NDEBUG // On POSIX systems we cancel threads by sending them SIGUSR2, // which will also interrupt blocking calls. On woe32 we use // pthread_cancel and there is no good/sane way to interrupt. #ifndef __WOE32__ # define SET_THREAD_CANCEL() \ do { \ sigset_t usr2; \ sigemptyset(&usr2); \ sigaddset(&usr2, SIGUSR2); \ pthread_sigmask(SIG_UNBLOCK, &usr2, NULL); \ } while (0) # define TEST_THREAD_CANCEL() /* nothing */ # define CANCEL_THREAD(t__) pthread_kill(t__, SIGUSR2) #else // threads have PTHREAD_CANCEL_ENABLE, PTHREAD_CANCEL_DEFERRED when created # define SET_THREAD_CANCEL() /* nothing */ # define TEST_THREAD_CANCEL() pthread_testcancel() # define CANCEL_THREAD(t__) pthread_cancel(t__); #endif /// This ensures that a mutex is always unlocked when leaving a function or block. class guard_lock { public: guard_lock(pthread_mutex_t* m, int h = 0); ~guard_lock(void); const char *name(pthread_mutex_t *m); private: pthread_mutex_t* mutex; int how; }; #endif // !THREADS_H_ flrig-1.3.24/src/include/TS570.h0000644000175000017500000000463712562731651013014 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TS570_H #define _TS570_H #include "rigbase.h" class RIG_TS570 : public rigbase { private: bool beatcancel_on; bool preamp_on; bool att_on; bool is_TS570S; public: RIG_TS570(); ~RIG_TS570(){} void initialize(); bool get_ts570id(); void selectA(); void selectB(); void set_split(bool val); int get_split(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB (long); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); int get_modetype(int n); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int val); int def_bandwidth(int val); void set_widths(); const char **bwtable(int); int get_smeter(); int get_swr(); int get_power_out(); int get_power_control(); void set_volume_control(int val); int get_volume_control(); void set_power_control(double val); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_noise(bool b); int get_noise(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); void set_squelch(int val); int get_squelch(); void get_squelch_min_max_step(int &min, int &max, int &step); }; #endif flrig-1.3.24/src/include/TT538.h0000644000175000017500000000456312562731651013017 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TT538_H #define _TT538_H #include "rigbase.h" class RIG_TT538 : public rigbase { private: double fwdpwr; double refpwr; double fwdv; double refv; double VfoAdj; public: RIG_TT538(); ~RIG_TT538(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void set_modeA(int val); int get_modeA(); // void set_modeB(int val); // int get_modeB(); int get_modetype(int n); void set_bwA(int val); int get_bwA(); // void set_bwB(int val); // int get_bwB(); bool twovfos() { return false; } // void set_split(bool); bool can_split() {return false;} int get_smeter(); void set_volume_control(int val); int get_volume_control(); void set_attenuator(int val); int get_attenuator(); void set_rf_gain(int val); int get_rf_gain(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void setVfoAdj(double v); int get_swr(); int get_power_out(); // int get_power_control(); // void set_power_control(double val); void set_PTT_control(int val); // void tune_rig(); // void set_preamp(int val); // int get_preamp(); // void set_notch(bool on, int val); // bool get_notch(int &val); // void get_notch_min_max_step(int &min, int &max, int &step); // void set_noise(bool b); // void set_mic_gain(int val); // int get_mic_gain(); // void get_mic_min_max_step(int &min, int &max, int &step); void checkresponse(string s); void shutdown(); int adjust_bandwidth(int m); }; #endif flrig-1.3.24/src/include/IC910.h0000644000175000017500000000241712562731651012751 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _ICgeneric_H #define _ICgeneric_H #include "IC746.h" class RIG_IC910H : public RIG_IC746 { public: RIG_IC910H(); ~RIG_IC910H(){}; void initialize(); void set_vfoA(long); void set_compression(); void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); int get_smeter(); int adjust_bandwidth(int m) { return 0; } private: bool comp_is_on; }; #endif flrig-1.3.24/src/include/FT817.h0000644000175000017500000000244412626450670012775 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT817_H #define FT817_H #include "rigbase.h" class RIG_FT817 : public rigbase { public: RIG_FT817(); ~RIG_FT817(){}; long get_vfoA(); void set_vfoA(long); void set_PTT_control(int val); void set_modeA(int val); int get_modeA(); int get_modetype(int n); int get_power_out(void); int get_smeter(void); int adjust_bandwidth(int m) { return 0;} private: void init_cmd(); void set_getACK(); }; #endif flrig-1.3.24/src/include/hspinner.h0000644000175000017500000000714012562731651014050 00000000000000#ifndef _HSPINNER_H #define _HSPINNER_H // // Include necessary headers... // #include #include #include #include #include #include #include #include #include #include /// This widget is a combination of the input /// widget and repeat buttons. The user can either type into the /// input area or use the buttons to change the value. class Hspinner : public Fl_Group { double value_; // Current value double minimum_; // Minimum value double maximum_; // Maximum value double step_; // Amount to add/subtract for up/down const char *format_; // Format string protected: Fl_Input input_; // Input field for the value Fl_Repeat_Button down_button_; // Up button Fl_Repeat_Button up_button_; // Down button int sH; int sW; int sX; int sY; int sW2; private: static void sb_cb(Fl_Widget *w, Hspinner *sb); void update(); public: /// Creates a new Fl_Spinner widget using the given position, size, /// and label string. /// Inherited destructor Destroys the widget and any value associated with it. Hspinner(int X, int Y, int W, int H, const char *L = 0, int W2 = 0); /// Sets or returns the format string for the value. const char *format() { return (format_); } void format(const char *f) { format_ = f; update(); } int handle(int event); /// Gets/Sets the maximum value of the widget. double maximum() const { return (maximum_); } void maximum(double m) { maximum_ = m; } /// Gets/Sets the minimum value of the widget. double mininum() const { return (minimum_); } void minimum(double m) { minimum_ = m; } /// Sets the minimum and maximum values for the widget. void range(double a, double b) { minimum_ = a; maximum_ = b; } /// Resized the widget void resize(int X, int Y, int W, int H, int W2 = 0); /// Sets or returns the amount to change the value when the user clicks a button. /// Before setting step to a non-integer value, the spinner /// type() should be changed to floating point. double step() const { return (step_); } void step(double s); /// Gets the color of the text in the input field. Fl_Color textcolor() const { return (input_.textcolor()); } /// Sets the color of the text in the input field. void textcolor(Fl_Color c) { input_.textcolor(c); } /// Gets the font of the text in the input field. Fl_Font textfont() const { return (input_.textfont()); } /// Sets the font of the text in the input field. void textfont(Fl_Font f) { input_.textfont(f); } /// Gets the size of the text in the input field. Fl_Fontsize textsize() const { return (input_.textsize()); } /// Sets the size of the text in the input field. void textsize(Fl_Fontsize s) { input_.textsize(s); } /// Gets/Sets the numeric representation in the input field. /// Valid values are FL_INT_INPUT and FL_FLOAT_INPUT. /// Also changes the format() template. /// Setting a new spinner type via a superclass pointer will not work. /// note: type is not a virtual function. unsigned char type() const { return (input_.type()); } void type(unsigned char v); /// Gets/Sets the current value of the widget. /// Before setting value to a non-integer value, the spinner /// type() should be changed to floating point. double value(); void value(double v); /// Get/Set the background color of the spinner widget's input field. void color(Fl_Color v) { input_.color(v); } Fl_Color color() const { return(input_.color()); } /// Get/Set label font size void labelsize(Fl_Fontsize sz); Fl_Fontsize labelsize(); }; #endif // !_HSPINNER_H flrig-1.3.24/src/include/images.h0000644000175000017500000000225012562731651013464 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef IMAGES_H #define IMAGES_H #include extern Fl_Bitmap image_p25; extern Fl_Bitmap image_p50; extern Fl_Bitmap image_p100; extern Fl_Bitmap image_p200; extern Fl_Bitmap image_p200log; extern Fl_Bitmap image_smeter; extern Fl_Bitmap image_swr; extern Fl_Bitmap image_alc; #endif flrig-1.3.24/src/include/flslider2.h0000644000175000017500000000413612562731651014112 00000000000000// ---------------------------------------------------------------------------- // flslider2.h // // Copyright (C) 2010 // Stelios Bounanos, M0GLD // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FL_SLIDER2_ #define FL_SLIDER2_ #include #include #include #include #include class Fl_Slider2 : public Fl_Slider { public: Fl_Slider2(int x, int y, int w, int h, const char* l = 0) : Fl_Slider(x, y, w, h, l) { } int handle(int event); }; class Fl_Value_Slider2 : public Fl_Value_Slider { public: Fl_Value_Slider2(int x, int y, int w, int h, const char* l = 0) : Fl_Value_Slider(x, y, w, h, l) { } int handle(int event); }; class Fl_Counter2 : public Fl_Counter { public: Fl_Counter2(int x, int y, int w, int h, const char* l = 0) : Fl_Counter(x, y, w, h, l) { } int handle(int event); }; class Fl_Value_Input2 : public Fl_Value_Input { public: Fl_Value_Input2(int x, int y, int w, int h, const char* l = 0) : Fl_Value_Input(x, y, w, h, l) { } int handle(int event); }; class Fl_Spinner2 : public Fl_Spinner { public: Fl_Spinner2(int x, int y, int w, int h, const char* l = 0) : Fl_Spinner(x, y, w, h, l) { } int handle(int event); }; #endif // FL_SLIDER2_ flrig-1.3.24/src/include/FT950.h0000644000175000017500000000676212562731651013002 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FT950_H #define _FT950_H #include "rigbase.h" class RIG_FT950 : public rigbase { private: bool notch_on; int m_60m_indx; protected: int preamp_level; int atten_level; public: RIG_FT950(); ~RIG_FT950(){} void initialize(); void post_initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); bool twovfos(); void selectA(); void selectB(); void A2B(); bool can_split(); void set_split(bool val); int get_split(); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_modeB(int val); int get_modeB(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int val); int def_bandwidth(int val); int get_smeter(); int get_swr(); int get_alc(); int get_power_out(); int get_power_control(); void set_volume_control(int val); void set_power_control(double val); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 100; step = 1; } int get_volume_control(); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_auto_notch(int v); int get_auto_notch(); void set_noise(bool b); int get_noise(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); const char **bwtable(int); void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void set_vox_on_dataport(); void get_cw_wpm_min_max(int &min, int &max) { min = 4; max = 60; } void set_cw_weight(); void set_cw_wpm(); void enable_keyer(); void set_cw_qsk(); bool set_cw_spot(); void set_cw_spot_tone(); void set_band_selection(int v); void get_nr_min_max_step(int &min, int &max, int &step) { min = 1; max = 15; step = 1; } void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_noise_reduction(int val); int get_noise_reduction(); void set_xcvr_auto_on(); void set_xcvr_auto_off(); void set_compression(); void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 5; } void setVfoAdj(double v); double getVfoAdj(); void get_vfoadj_min_max_step(int &min, int &max, int &step); }; #endif flrig-1.3.24/src/include/FT1000.h0000644000175000017500000000250412562731651013033 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT1000_H #define FT1000_H #include "rigbase.h" class RIG_FT1000 : public rigbase { public : RIG_FT1000(); ~RIG_FT1000() {}; long get_vfoA(); void set_vfoA(long); void set_PTT_control(int val); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_bwA(int val); int get_bwA(); int get_power_out(void); int get_smeter(void); void tune_rig(); int adjust_bandwidth(int); private: void init_cmd(); }; #endif flrig-1.3.24/src/include/DELTA-II.h0000644000175000017500000000241512562731651013352 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TT535_H #define _TT535_H #include "ICbase.h" class RIG_TT535 : public RIG_ICOM { public: RIG_TT535(); ~RIG_TT535(){} long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); // void set_PTT_control(int val); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); int get_modetype(int n); int adjust_bandwidth(int m); }; #endif flrig-1.3.24/src/include/IC746.h0000644000175000017500000001056512562731651012763 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC746_H #define _IC746_H #include "ICbase.h" class RIG_IC746 : public RIG_ICOM { public: RIG_IC746(); virtual ~RIG_IC746(){} virtual void initialize(); virtual void selectA(); virtual void selectB(); virtual long get_vfoA(void); virtual void set_vfoA(long f); virtual long get_vfoB(void); virtual void set_vfoB(long f); virtual int get_smeter(); virtual void set_volume_control(int val); virtual int get_volume_control(); virtual void get_vol_min_max_step(int &min, int &max, int &step); virtual void set_PTT_control(int val); virtual void set_noise(bool val); virtual int get_noise(); virtual void set_noise_reduction(int val); virtual int get_noise_reduction(); virtual void set_noise_reduction_val(int val); virtual int get_noise_reduction_val(); virtual void set_attenuator(int val); virtual int get_attenuator(); virtual void set_preamp(int val); virtual int get_preamp(); virtual int get_modetype(int n); virtual void set_modeA(int val); virtual int get_modeA(); virtual void set_bwA(int val); virtual int get_bwA(); virtual void set_modeB(int val); virtual int get_modeB(); virtual void set_bwB(int val); virtual int get_bwB(); virtual void set_mic_gain(int val); // virtual int get_mic_gain(); virtual void get_mic_gain_min_max_step(int &min, int &max, int &step); virtual void set_if_shift(int val); // virtual bool get_if_shift(int val); virtual void get_if_min_max_step(int &min, int &max, int &step); virtual void set_squelch(int val); // int get_squelch(); virtual void set_rf_gain(int val); // int get_rf_gain(); virtual void set_power_control(double val); virtual void set_split(bool val); virtual bool can_split() { return true;} protected: int preamp_level; int atten_level; int ICvol; int filter_nbr; }; class RIG_IC746PRO : public RIG_IC746 { public: RIG_IC746PRO(); virtual ~RIG_IC746PRO(){} virtual void set_modeA(int val); virtual int get_modeA(); virtual void set_bwA(int val); virtual int get_bwA(); virtual void set_modeB(int val); virtual int get_modeB(); virtual void set_bwB(int val); virtual int get_bwB(); virtual int get_swr(); virtual int get_alc(); virtual int get_power_out(); virtual void tune_rig(); virtual int adjust_bandwidth(int m); virtual int def_bandwidth(int m); virtual void set_attenuator(int val); virtual int get_attenuator(); virtual void set_preamp(int val); virtual int get_preamp(); virtual void set_mic_gain(int val); virtual int get_mic_gain(); virtual void get_mic_gain_min_max_step(int &min, int &max, int &step); virtual void set_notch(bool on, int val); virtual bool get_notch(int &val); virtual void get_notch_min_max_step(int &min, int &max, int &step); virtual void set_rf_gain(int val); virtual int get_rf_gain(); virtual void set_squelch(int val); virtual int get_squelch(); virtual void set_if_shift(int val); virtual bool get_if_shift(int &val); virtual void get_if_min_max_step(int &min, int &max, int &step); virtual void set_power_control(double val); virtual int get_power_control(); virtual void set_split(bool val); virtual int get_split(); bool can_split() { return true;} bool twovfos() { return false; } const char **bwtable(int); }; extern const char *IC746modes_[]; extern const char IC746_mode_type[]; extern const char *IC746_widths[]; extern const char *IC746PROmodes_[]; extern const char IC746PRO_mode_type[]; extern const char *IC746PRO_SSBwidths[]; extern const char *IC746PRO_RTTYwidths[]; extern const char *IC746PRO_AMFMwidths[]; #endif flrig-1.3.24/src/include/combo.h0000644000175000017500000000763312562731651013330 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FL_COMBOBOX_H #define _FL_COMBOBOX_H #include #include #include #include #include #include #include #include #define FL_COMBO_UNIQUE 1 #define FL_COMBO_UNIQUE_NOCASE 2 #define FL_COMBO_LIST_INCR 100 class Fl_ComboBox; enum {COMBOBOX, LISTBOX}; struct datambr { char *s; void *d; }; class Fl_PopBrowser : public Fl_Window { friend void popbrwsr_cb(Fl_Widget *, long); Fl_Select_Browser *popbrwsr; int hRow; int wRow; std::string keystrokes; public: Fl_PopBrowser (int x, int y, int w, int h, const char *label); ~Fl_PopBrowser (); void popshow (int, int); void pophide (); void popbrwsr_cb_i (Fl_Widget *, long); void add (char *s, void *d = 0); void clear (); void sort (); int handle (int); void clear_kbd() { keystrokes.clear(); } Fl_ComboBox *parentCB; Fl_Widget *parentWindow; }; class Fl_ComboBox : public Fl_Group { friend int DataCompare (const void *, const void *); friend class Fl_PopBrowser; Fl_Button *btn; Fl_Box *valbox; Fl_Input *val; Fl_PopBrowser *Brwsr; datambr **datalist; int listsize; int maxsize; int listtype; int numrows_; int type_; int width; int height; void *retdata; int idx; Fl_Color _color; void insert(const char *, void *); public: Fl_ComboBox (int x, int y, int w, int h, const char *lbl = 0, int wtype = COMBOBOX); ~Fl_ComboBox(); const char *value (); void value (const char *); void put_value( const char *); void fl_popbrwsr(Fl_Widget *); void type (int = 0); void add (const char *s, void *d = 0); void clear (); void sort (); int index (); void index (int i); void *data (); void textfont (int); void textsize (uchar); void textcolor (Fl_Color c); void color (Fl_Color c); void readonly(bool yes = true); int numrows() { return numrows_; } void numrows(int n) { numrows_ = n; } int lsize() { return listsize; } void set_focus() { Fl::focus(btn); }; void labelfont(Fl_Font fnt) { Fl_Group::labelfont(fnt); } Fl_Font labelfont() { return Fl_Group::labelfont(); } void labelsize(Fl_Fontsize n) { Fl_Group::labelsize(n); } Fl_Fontsize labelsize() { return Fl_Group::labelsize(); } int handle(int); // Custom resize behavior -- input stretches, button doesn't inline int val_x() { return x(); } inline int val_y() { return y(); } inline int val_w() { return w() - h(); } inline int val_h() { return h(); } inline int btn_x() { return x() + w() - h(); } inline int btn_y() { return y(); } inline int btn_w() { return h(); } inline int btn_h() { return h(); } void resize(int X, int Y, int W, int H) { Fl_Group::resize(X,Y,W,H); if (type_ == LISTBOX) valbox->resize(val_x(), val_y(), val_w(), val_h()); else val->resize(val_x(), val_y(), val_w(), val_h()); btn->resize(btn_x(), btn_y(), btn_w(), btn_h()); } }; class Fl_ListBox : public Fl_ComboBox { public: Fl_ListBox (int x, int y, int w, int h, const char *lbl = 0) : Fl_ComboBox(x,y,w,h,lbl,LISTBOX) {}; ~Fl_ListBox() {}; }; #endif flrig-1.3.24/src/include/TT588.h0000644000175000017500000000540712562731651013022 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TT588_H #define _TT588_H #include "rigbase.h" class RIG_TT588 : public rigbase { private: double fwdpwr; double refpwr; double fwdv; double refv; double VfoAdj; int vfo_corr; int atten_level; int an_; int nb_; public: RIG_TT588(); ~RIG_TT588(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void setVfoAdj(double v); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_bwA(int val); int get_bwA(); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); bool twovfos() {return true;} int get_smeter(); void set_volume_control(int val); int get_volume_control(); void set_attenuator(int val); int get_attenuator(); void set_rf_gain(int val); int get_rf_gain(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_squelch(int val); int get_squelch(); void get_squelch_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } // void set_auto_notch(int); // int get_auto_notch(); void set_noise(bool); int get_noise(); void set_split(bool val); int get_split(); int get_swr(); int get_power_out(); // int get_power_control(void); // void set_power_control(double val); // void get_pc_min_max_step(double &min, double &max, double &step) { // min = 0; max = 100; step = 1; } void set_PTT_control(int val); // void tune_rig(); // void set_preamp(int val); // int get_preamp(); // void set_notch(bool on, int val); // bool get_notch(int &val); // void get_notch_min_max_step(int &min, int &max, int &step); // void set_mic_gain(int val); // int get_mic_gain(); // void get_mic_min_max_step(int &min, int &max, int &step); void checkresponse(string s); void shutdown(); int adjust_bandwidth(int m); int def_bandwidth(int m); }; #endif flrig-1.3.24/src/include/IC7200.h0000644000175000017500000000464312562731651013033 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC7200_H #define _IC7200_H #include "ICbase.h" class RIG_IC7200 : public RIG_ICOM { public: RIG_IC7200(); ~RIG_IC7200(){} void initialize(); void selectA(); void selectB(); long get_vfoA (); void set_vfoA (long freq); long get_vfoB(void); void set_vfoB(long f); int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_bwA(); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); void set_PTT_control(int val); void set_volume_control(int val); int get_volume_control(); void get_vol_min_max_step(int &min, int &max, int &step); void set_attenuator(int val); int get_smeter(); int get_power_out(void); int get_swr(void); int get_alc(void); void set_noise(bool val); int get_noise(); void set_noise_reduction(int val); int get_noise_reduction(); void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_preamp(int val); int get_preamp(); void set_rf_gain(int val); int get_rf_gain(); void set_squelch(int val); int get_squelch(); void set_power_control(double val); int get_power_control(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_gain_min_max_step(int &min, int &max, int &step); int adjust_bandwidth(int m); int def_bandwidth(int m); void set_compression(); void set_auto_notch(int val); int get_auto_notch(); void set_vox_onoff(); void set_split(bool); bool can_split() { return true; } const char **bwtable(int); void tune_rig(); protected: int filter_nbr; }; #endif flrig-1.3.24/src/include/FT990a.h0000644000175000017500000000333412562731652013140 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT990A_H #define FT990A_H #include "rigbase.h" class RIG_FT990A : public rigbase { private: double fwdpwr; double refpwr; double fwdv; double refv; int afreq, amode, aBW; int bfreq, bmode, bBW; public: RIG_FT990A(); ~RIG_FT990A(){}; void initialize(); bool get_info(); bool can_split() { return true;} void set_split(bool val); bool twovfos() {return false;} long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_bwA(); long get_vfoB(); void set_vfoB(long); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); int def_bandwidth(int m); void selectA(); void selectB(); void set_PTT_control(int val); int get_smeter(); int get_swr(); int get_power_out(); int adjust_bandwidth(int); private: void init_cmd(); }; #endif flrig-1.3.24/src/include/rigbase.h0000644000175000017500000003132712646444222013640 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _RIG_BASE_H #define _RIG_BASE_H #include #include #include #include #include "util.h" #include "debug.h" #include "rig_io.h" using namespace std; struct FREQMODE { long freq; int imode; int iBW; int src; }; struct GUI { Fl_Widget* W; int x; int y; int w; }; enum {onA, onB}; enum {UI, XML, SRVR}; enum {BINARY, STRING}; class rigbase { #define WVALS_LIMIT -1 public: string name_; const char ** modes_; const char ** bandwidths_; const char ** dsp_SL; const char * SL_tooltip; const char * SL_label; const char ** dsp_SH; const char * SH_tooltip; const char * SH_label; const int * bw_vals_; GUI *widgets; int comm_baudrate; int stopbits; int comm_retries; int comm_wait; int comm_timeout; bool comm_echo; bool comm_rtscts; bool comm_rtsplus; bool comm_dtrplus; bool comm_catptt; bool comm_rtsptt; bool comm_dtrptt; int serloop_timing; int CIV; int defaultCIV; bool USBaudio; FREQMODE A; FREQMODE B; int inuse; int modeA; int bwA; long freqA; int modeB; int bwB; long freqB; int precision; int ndigits; bool can_change_alt_vfo; int active_mode; // wbx int def_mode; int def_bw; long def_freq; int max_power; int last_bw; int bpf_center; int pbt; bool PbtActive; int RitFreq; bool RitActive; int XitFreq; bool XitActive; int split; int if_shift_min; int if_shift_max; int if_shift_step; int if_shift_mid; bool has_xcvr_auto_on_off; bool has_a2b; bool has_b2a; bool has_vfo_adj; bool has_rit; bool has_xit; bool has_bfo; bool has_power_control; bool has_volume_control; bool has_mode_control; bool has_bandwidth_control; bool has_dsp_controls; bool has_micgain_control; bool has_mic_line_control; bool has_notch_control; bool has_auto_notch; bool has_noise_control; bool has_noise_reduction_control; bool has_noise_reduction; bool has_attenuator_control; bool has_preamp_control; bool has_ifshift_control; bool has_ptt_control; bool has_tune_control; bool has_swr_control; bool has_alc_control; bool has_rf_control; bool has_sql_control; bool has_smeter; bool has_power_out; bool has_split; bool has_split_AB; bool has_data_port; bool has_getvfoAorB; bool has_extras; bool has_nb_level; bool has_agc_level; bool has_cw_wpm; bool has_cw_vol; bool has_cw_spot; bool has_cw_spot_tone; bool has_cw_qsk; bool has_cw_break_in; bool has_cw_delay; bool has_cw_weight; bool has_cw_keyer; bool has_vox_onoff; bool has_vox_gain; bool has_vox_anti; bool has_vox_hang; bool has_vox_on_dataport; bool has_compression; bool has_compON; bool use_line_in; bool has_bpf_center; bool has_special; bool has_ext_tuner; bool has_band_selection; bool restore_mbw; bool has_get_info; int data_type; // for pia TS2000 without a front panel int _noise_reduction_level; int _nrval1; int _nrval2; int _currmode; protected: string cmd; // command string string rsp; // expected response string (header etc) string to_bcd_be(long freq, int len); string to_bcd(long freq, int len); long fm_bcd (char *bcd, int len); long fm_bcd_be(char *bcd, int len); string to_binary_be(long freq, int len); string to_binary(long freq, int len); long fm_binary(char *binary, int len); long fm_binary_be(char *binary_be, int len); string to_decimal_be(long d, int len); string to_decimal(long d, int len); long fm_decimal(char *decimal, int len); long fm_decimal_be(char *decimal_be, int len); public: rigbase(); virtual ~rigbase(){} virtual void initialize() {} virtual void post_initialize() {} virtual void shutdown() {} virtual bool get_info(void) {return false;} virtual long get_vfoA(void) {return A.freq;} virtual void set_vfoA(long f) {A.freq = f;} virtual long get_vfoB(void) {return B.freq;} virtual void set_vfoB(long f) {B.freq = f; set_vfoA(f);} virtual void set_modeA(int val) {A.imode = val;} virtual int get_modeA() {return A.imode;} virtual int get_modetype(int n) {return 'U';} virtual void set_modeB(int val) {B.imode = val; set_modeA(val);} virtual int get_modeB() {return B.imode;} virtual void selectA(){} virtual void selectB(){} virtual void A2B(){} virtual void B2A(){} virtual int get_vfoAorB(){return 0;} virtual void swapAB(){} virtual void set_bwA(int val) {A.iBW = val;} virtual int get_bwA() {return A.iBW;} virtual void set_bwB(int val) {B.iBW = val; set_bwA(val);} virtual int get_bwB() {return B.iBW;} virtual int adjust_bandwidth(int m) {return 0;} virtual int def_bandwidth(int m) {return 0;} virtual const char **bwtable(int m) {return bandwidths_;} virtual const char **lotable(int m) {return NULL;} virtual const char **hitable(int m) {return NULL;} virtual bool can_split() { return false;} virtual void set_split(bool val) {split = val;} virtual int get_split() {return split;} virtual bool twovfos() {return false;} virtual void swapvfos() {} virtual bool canswap() { return false;} virtual int get_smeter(void) {return -1;} virtual int get_swr(void) {return -1;} virtual int get_alc(void) {return -1;} virtual void select_swr() {} virtual void select_alc() {} virtual int get_power_out(void) {return -1;} virtual int get_power_control(void) {return 0;} virtual void set_power_control(double val) {} virtual void get_pc_min_max_step(double &min, double &max, double &step) { min = 0; max = 100; step = 1; } virtual int get_volume_control() {return 0;} virtual void get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } virtual void set_volume_control(int val) {} virtual void set_PTT_control(int val) {} virtual void tune_rig() {} virtual void set_attenuator(int val) {} virtual int get_attenuator() {return 0;} virtual void set_preamp(int val) {} virtual int get_preamp() {return 0;} virtual void set_if_shift(int val) {} virtual bool get_if_shift(int &val) {val = 0; return false;} virtual void get_if_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } virtual void get_if_mid() {}; virtual void set_notch(bool on, int val) {} virtual bool get_notch(int &val) {val = 0; return false;} virtual void get_notch_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } virtual void set_noise(bool on) {} virtual int get_noise(){return 0;} virtual void set_noise_reduction_val(int val) {} virtual int get_noise_reduction_val() {return 0;} virtual void get_nr_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } virtual void set_noise_reduction(int val) {} virtual int get_noise_reduction() {return 0;} virtual void set_mic_gain(int val) {} virtual int get_mic_gain() {return 0;} virtual void get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } virtual void set_mic_line(int val) {} virtual void set_squelch(int val) {} virtual int get_squelch() {return 0;} virtual void get_squelch_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } virtual void set_rf_gain(int val) {} virtual int get_rf_gain() {return 0;} virtual void get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } virtual const char * get_modename_(int n){ if (modes_ == NULL) return ""; int nmodes = 0; while (modes_[nmodes] != NULL) nmodes++; if (n < nmodes && n > -1) return modes_[n]; else return modes_[0]; } virtual const char * get_bwname_(int bw, int md) { // read bw based on mode const char ** pbwt; pbwt = bwtable(md); if (pbwt == NULL) return ""; int nbw = 0; while (pbwt[nbw] != NULL) nbw++; if (bw < nbw && bw > -1) return pbwt[bw]; else return pbwt[0]; } virtual void setRit(int v) {} virtual int getRit() {return 0;} virtual void get_RIT_min_max_step(int &min, int &max, int &step) { min = -100; max = 100; step = 1; } virtual void setXit(int v) { XitFreq = v;} virtual int getXit() {return XitFreq;} virtual void get_XIT_min_max_step(int &min, int &max, int &step) { min = -100; max = 100; step = 1; } virtual void setBfo(int v) {} virtual int getBfo() {return 0;} virtual void get_BFO_min_max_step(int &min, int &max, int &step) { min = -100; max = 100; step = 1; } virtual void setVfoAdj(double v) {} virtual double getVfoAdj() {return 0;} virtual void get_vfoadj_min_max_step(int &min, int &max, int &step) { min = -100; max = 100; step = 1; } virtual void set_line_out() {} virtual void set_agc_level() {} virtual void set_cw_weight() {} virtual void get_cw_weight_min_max_step(double &min, double &max, double &step) { min = 2.5; max = 4.5; step = 0.1; } // default for FT950/FT450D virtual void set_cw_wpm() {} virtual void get_cw_wpm_min_max(int &min, int &max) { min = 5; max = 50; } // default for FT950/FT450D virtual void enable_keyer() {} virtual void enable_break_in() {} virtual void set_cw_qsk() {} virtual void get_cw_qsk_min_max_step(double &min, double &max, double &step) { min = 15; max = 30; step = 5; } // default for FT950/FT450D virtual void set_cw_delay() {} virtual void get_cw_delay_min_max_step(double &min, double &max, double &step) { min = 30; max = 3000; step = 10; } // default for FT950/FT450D virtual void set_cw_vol() {} virtual bool set_cw_spot() {return false;} virtual void set_cw_spot_tone() {} virtual void get_cw_spot_tone_min_max_step(int &min, int &max, int &step) { min = 300; max = 1050; step = 50; } // default for FT950/FT450D virtual void set_spot_onoff() {} virtual void set_vox_onoff() {} virtual void set_vox_gain() {} virtual void get_vox_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } // default for FT950/FT450D virtual void set_vox_anti() {} virtual void get_vox_anti_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } // default for FT950/FT450D virtual void set_vox_hang() {} virtual void get_vox_hang_min_max_step(int &min, int &max, int &step) { min = 30; max = 3000; step = 10; } // default for FT950/FT450D virtual void set_vox_on_dataport() {} virtual void set_mon_vol() {} virtual void set_squelch_level() {} virtual void set_compression() {} virtual void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } virtual void set_auto_notch(int v) {} virtual int get_auto_notch() {return 0;} virtual void tuner_bypass() {} virtual void enable_xmtr() {} virtual void enable_tloop() {} virtual void set_nb_level() {} virtual void set_special(int v) {} virtual void set_band_selection(int v) {} virtual void set_xcvr_auto_on() {} virtual void set_xcvr_auto_off() {} virtual void adjustCIV(uchar adr) {} virtual void read_stream() {} virtual int parse_vfoA(string){return 0;} virtual int parse_vfoB(string){return 0;} virtual int parse_modeA(string){return 0;} virtual int parse_modeB(string){return 0;} virtual int parse_bwA(string){return 0;} virtual int parse_bwB(string){return 0;} virtual int parse_volume_control(string){return 0;} virtual int parse_power_control(string){return 0;} virtual int parse_rf_gain(string){return 0;} virtual int parse_mic_gain(string){return 0;} virtual int parse_attenuator(string){return 0;} virtual int parse_preamp(string){return 0;} virtual int parse_smeter(string){return 0;} virtual int parse_(string){return 0;} virtual int parse_noise(string){return 0;} virtual int parse_power_out(string){return 0;} virtual int parse_swr(string){return 0;} virtual int parse_alc(string){return 0;} virtual int parse_split(string){return 0;} int waitN(size_t n, int timeout, const char *, int pr = HEX); int wait_char(int ch, size_t n, int timeout, const char *, int pr = HEX); // more pia TS2000 without front panel! int currmode() { return _currmode; } int nrval1() { return _nrval1; } int nrval2() { return _nrval2; } int noise_reduction_level() { return _noise_reduction_level; } }; extern rigbase *rigs[]; extern const char *szNORIG; extern const char *szNOMODES[]; extern const char *szNOBWS[]; #endif flrig-1.3.24/src/include/IC728.h0000644000175000017500000000213412562731652012755 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC728_H #define _IC728_H #include "ICbase.h" class RIG_IC728 : public RIG_ICOM { public: RIG_IC728(); ~RIG_IC728(){} long get_vfoA(); void set_vfoA(long); int adjust_bandwidth(int m) { return 1; } }; #endif flrig-1.3.24/src/include/FTdx1200.h0000644000175000017500000000702312562731651013372 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FTDX1200_H #define _FTDX1200_H #include "rigbase.h" class RIG_FTdx1200 : public rigbase { private: bool notch_on; int m_60m_indx; protected: int preamp_level; int atten_level; public: RIG_FTdx1200(); ~RIG_FTdx1200(){} void initialize(); void post_initialize(); void shutdown(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); bool twovfos(); void selectA(); void selectB(); void A2B(); bool can_split(); void set_split(bool val); int get_split(); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_modeB(int val); int get_modeB(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int val); int def_bandwidth(int val); int get_smeter(); int get_swr(); int get_alc(); int get_power_out(); int get_power_control(); void set_volume_control(int val); void set_power_control(double val); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 100; step = 1; } int get_volume_control(); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_auto_notch(int v); int get_auto_notch(); void set_noise(bool b); int get_noise(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); const char **bwtable(int); void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void set_vox_on_dataport(); void get_cw_wpm_min_max(int &min, int &max) { min = 4; max = 60; } void set_cw_weight(); void set_cw_wpm(); void enable_keyer(); void set_cw_qsk(); bool set_cw_spot(); void set_cw_spot_tone(); void set_band_selection(int v); void get_nr_min_max_step(int &min, int &max, int &step) { min = 1; max = 15; step = 1; } void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_noise_reduction(int val); int get_noise_reduction(); void set_xcvr_auto_on(); void set_xcvr_auto_off(); void set_compression(); void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 5; } void setVfoAdj(double v); double getVfoAdj(); void get_vfoadj_min_max_step(int &min, int &max, int &step); }; #endif flrig-1.3.24/src/include/IC7700.h0000644000175000017500000000201512562731651013027 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC7700_H #define _IC7700_H #include "IC746.h" class RIG_IC7700 : public RIG_IC746PRO { public: RIG_IC7700(); ~RIG_IC7700(){} }; #endif flrig-1.3.24/src/include/compat-mingw.h0000644000175000017500000000513612562731652014630 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef MINGW_H_ #define MINGW_H_ #include #include #include #ifdef __cplusplus extern "C" { #endif typedef int pid_t; typedef long suseconds_t; #define hstrerror strerror #ifndef SIGUSR2 # define SIGUSR2 100 #endif /* * simple adaptors */ static inline int mingw_mkdir(const char *path, int mode) { return mkdir(path); } #define mkdir mingw_mkdir static inline int mingw_unlink(const char *pathname) { /* read-only files cannot be removed */ chmod(pathname, 0666); return unlink(pathname); } #define unlink mingw_unlink /* * implementations of missing functions */ unsigned int sleep (unsigned int seconds); char *mingw_getcwd(char *pointer, int len); #define getcwd mingw_getcwd char *mingw_getenv(const char *name); #define getenv mingw_getenv int mingw_rename(const char*, const char*); #define rename mingw_rename #ifndef SHUT_WR # define SHUT_WR SD_SEND #endif #ifndef SHUT_RD # define SHUT_RD SD_RECEIVE #endif #ifndef SHUT_RDWR # define SHUT_RDWR SD_BOTH #endif #ifndef EADDRINUSE # define EADDRINUSE WSAEADDRINUSE #endif int nanosleep (const struct timespec *req, struct timespec *rem); int socketpair(int family, int type, int protocol, int *sv); /* uname */ #define UTSNAME_MAX_ 257 struct utsname { char sysname[UTSNAME_MAX_]; char nodename[UTSNAME_MAX_]; char release[UTSNAME_MAX_]; char version[UTSNAME_MAX_]; char machine[UTSNAME_MAX_]; }; int uname(struct utsname *name); /* getrusage */ #define RUSAGE_SELF 0 #define RUSAGE_CHILDREN (-1) struct rusage { struct timeval ru_utime; struct timeval ru_stime; }; int getrusage(int who, struct rusage *usage); /* fsync, fdatasync */ #include #define fsync _commit #define fdatasync fsync #ifdef __cplusplus } #endif #endif flrig-1.3.24/src/include/FreqControl.h0000644000175000017500000000707412562731651014466 00000000000000// ---------------------------------------------------------------------------- // // Frequency Control Widget for the Fast Light Tool Kit // // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- // // Usage: // Create a multi-digit receiver / transceiver frequency control widget // // label used to pass # digits & decimal position to control // the widget can be used in Fluid & initialized with the // number of digits as the label string // default is 7; min number is 1, max number is 9 as in // // cFreqControl myFreqConrol(x0, y0, w0, h0, "N"); where N is # digits // cFreqControl *pMyFreqControl = new cFreqControl(x0,y0,w0,h0,"N"); #ifndef _FREQCONTROL_H_ #define _FREQCONTROL_H_ #include #include #include #include #include #ifdef MAX_DIGITS #undef MAX_DIGITS #endif #define MAX_DIGITS 10 #ifdef MIN_DIGITS #undef MIN_DIGITS #endif #define MIN_DIGITS 4 class Fl_Box; class Fl_Float_Input; class cFreqControl : public Fl_Group { friend void cbSelectDigit (Fl_Widget *btn, void * nbr); public: cFreqControl(int x, int y, int w, int h, const char *lbl = "7"); ~cFreqControl(); void updatevalue(); void value(long lv); long value(){return val;}; void font(Fl_Font fnt); void SetONCOLOR (uchar r, uchar g, uchar b); void SetOFFCOLOR (uchar r, uchar g, uchar b); void GetONCOLOR (uchar &r, uchar &g, uchar &b) { Fl::get_color(ONCOLOR, r, g, b); }; void GetOFFCOLOR (uchar &r, uchar &g, uchar &b) { Fl::get_color(OFFCOLOR, r, g, b); }; void SetONOFFCOLOR( Fl_Color, Fl_Color); void setCallBack (int (*cbf)() ){ cbFunc = cbf;}; void do_callback() { if (cbFunc) cbFunc(); } int handle(int event); void visual_beep(); void set_hrd(bool b) {hrd_buttons = b;} void reverse_colors(); void restore_colors(); bool is_reversed_colors() { return colors_reversed; } void resize (int X, int Y, int W, int H); void set_precision(int val) { switch (val) { case 100: dpoint = 1; precision = 100; break; case 10: dpoint = 2; precision = 10; break; default: dpoint = 3; precision = 1; break; } } void set_ndigits(int val); private: Fl_Repeat_Button *Digit[MAX_DIGITS]; Fl_Float_Input *finp; static const char *Label[]; int mult[MAX_DIGITS]; Fl_Box *decbx; Fl_Box *hfill1; Fl_Box *hfill2; Fl_Font font_number; Fl_Color OFFCOLOR; Fl_Color ONCOLOR; Fl_Color SELCOLOR; Fl_Color ILLUMCOLOR; Fl_Color REVONCOLOR; Fl_Color REVOFFCOLOR; int nD; int active; long maxVal; long minVal; int pw; // decimal width int wfill; int bdr; int fcWidth; int fcTop; int fcHeight; int W; void DecFreq(int n); void IncFreq(int n); int (*cbFunc)(); static void freq_input_cb(Fl_Widget* input, void* arg); protected: long val, oldval; int precision; int dpoint; bool hrd_buttons; bool colors_reversed; }; #endif flrig-1.3.24/src/include/FT990.h0000644000175000017500000000332712562731651013000 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FT990_H #define FT990_H #include "rigbase.h" class RIG_FT990 : public rigbase { private: double fwdpwr; double refpwr; double fwdv; double refv; int afreq, amode, aBW; int bfreq, bmode, bBW; public: RIG_FT990(); ~RIG_FT990(){}; void initialize(); bool get_info(); bool can_split() { return true;} void set_split(bool val); bool twovfos() {return false;} long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_bwA(); long get_vfoB(); void set_vfoB(long); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); int def_bandwidth(int m); void selectA(); void selectB(); void set_PTT_control(int val); int get_smeter(); int get_swr(); int get_power_out(); int adjust_bandwidth(int); private: void init_cmd(); }; #endif flrig-1.3.24/src/include/FT900.h0000644000175000017500000000354112642041360012753 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // 2015-10-04 // adapted from FT890.h by Ernst F. Schroeder DJ7HS // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FT900_H #define _FT900_H #include "rigbase.h" extern const char FT900name_[]; extern const char *FT900modes_[]; extern const char *FT900_widths[]; class RIG_FT900 : public rigbase { private: double fwdpwr; double refpwr; double fwdv; double refv; int afreq, amode, aBW; int bfreq, bmode, bBW; int vfoAorB; int splitison; public: RIG_FT900(); ~RIG_FT900(){}; void initialize(); bool get_info(); bool can_split() { return true;} void set_split(bool val); int get_split(); bool twovfos() {return true;} bool canswap() {return true;} void swapvfos(); long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); long get_vfoB(); void set_vfoB(long); void set_modeB(int val); int get_modeB(); int get_vfoAorB(); void selectA(); void selectB(); void set_PTT_control(int val); int get_smeter(); int get_power_out(); private: void init_cmd(); }; #endif flrig-1.3.24/src/include/TS590S.h0000644000175000017500000000637212562731651013137 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TS590S_H #define _TS590S_H #include "rigbase.h" class RIG_TS590S : public rigbase { private: bool notch_on; int preamp_level; int att_level; int nb_level; int noise_reduction_level; bool data_mode; int active_mode; int active_bandwidth; bool rxtxa; public: enum TS590MODES { LSB, USB, CW, FM, AM, FSK, CWR, FSKR, LSBD, USBD, FMD }; RIG_TS590S(); ~RIG_TS590S(){} void initialize(); void shutdown(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); int adjust_bandwidth(int val); int def_bandwidth(int val); int set_widths(int val); void set_active_bandwidth(); int get_active_bandwidth(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); void selectA(); void selectB(); bool can_split() { return true;} void set_split(bool val); int get_split(); bool twovfos() {return true;} int get_smeter(); int get_swr(); int get_alc(); int get_power_out(); int get_power_control(); void set_volume_control(int val); int get_volume_control(); void set_power_control(double val); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_noise(bool b); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_squelch(int val); int get_squelch(); void get_squelch_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_noise_reduction(int val); int get_noise_reduction(); void get_nr_min_max_step(int &min, int &max, int &step) { min = 1; max = 10; step = 1; } void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_auto_notch(int v); int get_auto_notch(); bool sendTScommand(string, int, bool); const char **bwtable(int); const char **lotable(int); const char **hitable(int); const char * get_bwname_(int bw, int md); }; #endif flrig-1.3.24/src/include/flrigrc.h0000644000175000017500000000166712562731651013662 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- // MS include file for application icon #define IDI_ICON 101 flrig-1.3.24/src/include/TT563.h0000644000175000017500000000230412562731651013004 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TT563_H #define _TT563_H #include "ICbase.h" class RIG_TT563 : public RIG_ICOM { public: RIG_TT563(); ~RIG_TT563(){} long get_vfoA(); void set_vfoA(long); void set_PTT_control(int val); void set_modeA(int val); int get_modeA(); int get_modetype(int n); int adjust_bandwidth(int m) { return 1; } }; #endif flrig-1.3.24/src/include/IC703.h0000644000175000017500000000542012562731651012746 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _IC703_H #define _IC703_H #include "ICbase.h" class RIG_IC703 : public RIG_ICOM { public: RIG_IC703(); ~RIG_IC703(){} void initialize(); long get_vfoA(void); void set_vfoA(long); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_modetype(int n); int get_bwA(); int get_smeter(); int get_power_out(); int get_swr(); int get_alc(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_compression(); void get_comp_min_max_step(int &min, int &max, int &step) { min = 0; max = 10; step = 1; } void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void set_PTT_control(int val); void get_cw_wpm_min_max(int &min, int &max) { min = 6; max = 60; } void get_cw_qsk_min_max_step(double &min, double &max, double &step) { min = 2.0; max = 13.0; step = 0.1; } void get_cw_spot_tone_min_max_step(int &min, int &max, int &step) { min = 300; max = 900; step = 300; } void set_cw_wpm(); void set_cw_qsk(); void set_cw_spot_tone(); void set_cw_vol(); void set_noise(bool val); int get_noise(); void set_noise_reduction(int val); int get_noise_reduction(); void set_noise_reduction_val(int val); int get_noise_reduction_val(); void set_volume_control(int val); int get_volume_control(); void get_vol_min_max_step(int &min, int &max, int &step); int get_mic_gain(); void set_mic_gain(int val); void get_mic_gain_min_max_step(int &min, int &max, int &step); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_squelch(int val); int get_squelch(); void set_rf_gain(int val); int get_rf_gain(); void set_power_control(double val); int get_power_control(); void set_split(bool val); int get_split(); void tune_rig(); protected: int preamp_level; int atten_level; }; #endif flrig-1.3.24/src/include/FT5000.h0000644000175000017500000000577612646444222013053 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _FT5000_H #define _FT5000_H #include "rigbase.h" class RIG_FT5000 : public rigbase { private: bool notch_on; int m_60m_indx; // void update_bandwidths(); protected: int preamp_level; int atten_level; public: RIG_FT5000(); ~RIG_FT5000(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); bool twovfos(); void selectA(); void selectB(); void A2B(); bool can_split(); void set_split(bool val); int get_split(); void set_modeA(int val); int get_modeA(); int get_modetype(int n); void set_modeB(int val); int get_modeB(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); int adjust_bandwidth(int val); int def_bandwidth(int val); int get_smeter(); int get_swr(); int get_power_out(); int get_power_control(); void set_volume_control(int val); void set_power_control(double val); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 200; step = 1; } int get_volume_control(); void set_PTT_control(int val); void tune_rig(); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_notch(bool on, int val); bool get_notch(int &val); void get_notch_min_max_step(int &min, int &max, int &step); void set_auto_notch(int v); int get_auto_notch(); void set_noise(bool b); int get_noise(); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); const char **bwtable(int); void set_vox_onoff(); void set_vox_gain(); void set_vox_anti(); void set_vox_hang(); void set_vox_on_dataport(); void get_cw_wpm_min_max(int &min, int &max) { min = 4; max = 60; } void set_cw_weight(); void set_cw_wpm(); void enable_keyer(); void set_cw_qsk(); // void set_cw_vol(); bool set_cw_spot(); // void set_cw_spot_tone(); void set_band_selection(int v); }; #endif flrig-1.3.24/src/include/K2.h0000644000175000017500000000352712562731651012503 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _H #define _H #include "rigbase.h" class RIG_K2 : public rigbase { protected: bool hipower; bool K2split; public: RIG_K2(); ~RIG_K2(){} void initialize(); bool get_info(); bool twovfos() {return true;} long get_vfoA(); void set_vfoA(long); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_bwA(); long get_vfoB(); void set_vfoB(long); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); void selectA(); void selectB(); // void A2B(); int get_modetype(int n); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); void tune_rig(); void set_PTT_control(int val); void get_pc_min_max_step(double &min, double &max, double &step); int get_power_control(); void set_power_control(double val); int get_smeter(); int get_power_out(); bool can_split(); void set_split(bool val); int get_split(); int adjust_bandwidth(int m); }; #endif flrig-1.3.24/src/include/fileselect.h0000644000175000017500000000324412562731651014342 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef FILESELECT_H #define FILESELECT_H #ifdef __WOE32__ # define FSEL_THREAD 1 #endif class Fl_Native_File_Chooser; class FSEL { public: static void create(void); static void destroy(void); static const char* select(const char* title, const char* filter, const char* def = 0, int* fsel = 0); static const char* saveas(const char* title, const char* filter, const char* def = 0, int* fsel = 0); static const char* dir_select(const char* title, const char* filter, const char* def = 0); ~FSEL(); private: FSEL(); FSEL(const FSEL&); FSEL& operator=(const FSEL&); const char* get_file(void); #if FSEL_THREAD static void* thread_func(void* arg); #endif private: static FSEL* inst; Fl_Native_File_Chooser* chooser; int result; }; #endif // FILESELECT_H flrig-1.3.24/src/include/ICbase.h0000644000175000017500000000305112562731651013345 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _ICbase_H #define _ICbase_H #include "rigbase.h" #include "debug.h" #include "support.h" class RIG_ICOM : public rigbase { protected: string pre_to; string pre_fm; string post; string ok; string bad; int waited; const char *_mode_type; public: RIG_ICOM() { CIV = 0x56; pre_to = "\xFE\xFE\x56\xE0"; pre_fm = "\xFE\xFE\xE0\x56"; post = "\xFD"; ok = "\xFE\xFE\xE0\x56\xFB\xFD"; bad = "\xFE\xFE\xE0\x56\xFA\xFD"; } virtual ~RIG_ICOM() {} void checkresponse(); bool sendICcommand(string str, int nbr); void delayCommand(string cmd, int wait); bool waitFB(const char *sz); bool waitFOR(size_t n, const char *sz); void adjustCIV(uchar adr); }; #endif flrig-1.3.24/src/include/xml_server.h0000644000175000017500000000247512562731651014416 00000000000000// --------------------------------------------------------------------- // // xml_server.h, a part of flrig // // Copyright (C) 2014 // Dave Freese, W1HKJ // // This library is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This library is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with the program; if not, write to the // // Free Software Foundation, Inc. // 51 Franklin Street, Fifth Floor // Boston, MA 02110-1301 USA. // // --------------------------------------------------------------------- #ifndef XML_SERVER_H #define XML_SERVER_H #include #include #include #include #ifndef WIN32 #include #include #include #endif #include "status.h" #include #include extern void start_server(int port = 12345); extern void exit_server(); #endif flrig-1.3.24/src/include/TS480SAT.h0000644000175000017500000000521712562731651013357 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TS480SAT_H #define _TS480SAT_H #include "rigbase.h" class RIG_TS480SAT : public rigbase { private: bool beatcancel_on; bool preamp_on; bool att_on; const char *_mode_type; bool menu_45; int alc; bool swralc_polled; public: RIG_TS480SAT(); ~RIG_TS480SAT(){} bool sendTScommand(string, int); void initialize(); void shutdown(); void check_menu_45(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_modeB(int val); int get_modeB(); int get_smeter(); int get_swr(); int get_alc(); int get_power_out(); void set_PTT_control(int val); void tune_rig(); void set_bwA(int val); int get_bwA(); void set_bwB(int val); int get_bwB(); void selectA(); void selectB(); void set_split(bool val); bool can_split(); int get_split(); bool twovfos() {return true;} void set_volume_control(int val); int get_volume_control(); void set_power_control(double val); int get_power_control(); void get_pc_min_max_step(double &min, double &max, double &step) { min = 5; max = 100; step = 1; } void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); void set_mic_gain(int val); int get_mic_gain(); void get_mic_min_max_step(int &min, int &max, int &step); void set_rf_gain(int val); int get_rf_gain(); void get_rf_min_max_step(int &min, int &max, int &step); void set_attenuator(int val); int get_attenuator(); void set_preamp(int val); int get_preamp(); int adjust_bandwidth(int m); int def_bandwidth(int m); int set_widths(int val); const char **bwtable(int); const char **lotable(int); const char **hitable(int); const char * get_bwname_(int bw, int md); }; #endif flrig-1.3.24/src/include/TT516.h0000644000175000017500000000451212562731651013005 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _TT516_H #define _TT516_H #include "rigbase.h" class RIG_TT516 : public rigbase { private: double fwdpwr; double refpwr; double fwdv; double refv; public: RIG_TT516(); ~RIG_TT516(){} void initialize(); long get_vfoA(); void set_vfoA(long); long get_vfoB(); void set_vfoB(long); void selectA(); void selectB(); int get_modetype(int n); void set_modeA(int val); int get_modeA(); void set_bwA(int val); int get_bwA(); void set_modeB(int val); int get_modeB(); void set_bwB(int val); int get_bwB(); bool can_split() { return true;} void set_split(bool val); bool twovfos() {return true;} int get_smeter(); int get_swr(); int get_power_out(); // int get_power_control(); // void set_volume_control(int val); // int get_volume_control(); // void set_power_control(double val); void set_PTT_control(int val); // void tune_rig(); void set_attenuator(int val); int get_attenuator(); // void set_preamp(int val); // int get_preamp(); void set_if_shift(int val); bool get_if_shift(int &val); void get_if_min_max_step(int &min, int &max, int &step); // void set_notch(bool on, int val); // bool get_notch(int &val); // void get_notch_min_max_step(int &min, int &max, int &step); void set_noise(bool b); // void set_mic_gain(int val); // int get_mic_gain(); // void get_mic_min_max_step(int &min, int &max, int &step); void checkresponse(); int adjust_bandwidth(int); int def_bandwidth(int); const char **bwtable(int); }; #endif flrig-1.3.24/src/include/K3_ui.h0000644000175000017500000000205612562731652013176 00000000000000// ===================================================================== // K3 user interface support // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- void read_K3(); void K3_set_split(int val); void K3_A2B(); void cb_K3_swapAB(); flrig-1.3.24/src/include/pixmaps.h0000644000175000017500000000666412562731651013715 00000000000000// ===================================================================== // pixmaps.h // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef PIXMAPS_H_ #define PIXMAPS_H_ extern const char *address_book_icon[]; extern const char *edit_undo_icon[]; extern const char *edit_select_all_icon[]; extern const char *edit_clear_icon[]; extern const char *edit_copy_icon[]; extern const char *edit_cut_icon[]; extern const char *edit_paste_icon[]; extern const char *file_open_icon[]; extern const char *format_indent_more_icon[]; extern const char *left_arrow_icon[]; extern const char *log_out_icon[]; extern const char *minus_icon[]; extern const char *net_icon[]; extern const char *plus_icon[]; extern const char *process_stop_icon[]; extern const char *right_arrow_icon[]; extern const char *save_as_icon[]; extern const char *save_icon[]; extern const char *time_icon[]; extern const char *trash_icon[]; extern const char *image_icon[]; extern const char *weather_clear_icon[]; extern const char *start_here_icon[]; extern const char *help_browser_icon[]; extern const char *system_search_icon[]; extern const char *system_software_update_icon[]; extern const char *utilities_terminal_icon[]; extern const char *emblem_symbolic_link_icon[]; extern const char *emblems_system_icon[]; extern const char *dialog_information_icon[]; extern const char *executable_icon[]; extern const char *other_icon[]; extern const char *folder_open_icon[]; extern const char *preferences_system_icon[]; extern const char *preferences_desktop_font_icon[]; extern const char *system_users_icon[]; extern const char *utilities_system_monitor_icon[]; extern const char *multimedia_player_icon[]; extern const char *chat_icon[]; extern const char *dialog_information_48_icon[]; extern const char *dialog_warning_48_icon[]; extern const char *refresh_icon[]; extern const char *text_editor_icon[]; extern const char *text_icon[]; extern const char *shutdown_icon[]; extern const char *applications_system_icon[]; extern const char *audio_card_icon[]; extern const char *help_about_icon[]; extern const char *insert_link_icon[]; extern const char *close_icon[]; extern const char *enter_key_icon[]; extern const char *dialog_question_48_icon[]; extern const char *clear_sq_icon[]; extern const char *clear_row_icon[]; extern const char *rx1_icon[]; extern const char *tx1_icon[]; extern const char *rx2_icon[]; extern const char *tx2_icon[]; extern const char *rx_icon[]; extern const char *tx_icon[]; extern const char *fldigi_icon[]; extern const char *flarq_icon[]; extern const char *waterfall_icon[]; extern const char *dice_icon[]; extern const char *pskr_icon[]; #endif // PIXMAPS_H_ flrig-1.3.24/src/include/rig.h0000644000175000017500000000365212562731651013007 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _Rig_H #define _Rig_H #include #include #include #include #include #ifndef WIN32 #include #include #endif #include #include #include #include #include "config.h" #include "threads.h" #include "FreqControl.h" #include "rigpanel.h" #include "rig_io.h" #include "serial.h" #include "support.h" #include "xml_io.h" extern Fl_Double_Window *mainwindow; extern string HomeDir; extern string RigHomeDir; extern string TempDir; extern string rigfile; extern string pttfile; extern string defFileName; extern string title; extern pthread_t *serial_thread; extern pthread_t *digi_thread; extern pthread_mutex_t mutex_serial; extern pthread_mutex_t mutex_xmlrpc; extern pthread_mutex_t mutex_queA; extern pthread_mutex_t mutex_queB; extern pthread_mutex_t mutex_ptt; extern bool RIG_DEBUG; extern bool XML_DEBUG; extern bool EXPAND_CONTROLS; enum UISIZE {small_ui, wide_ui, touch_ui}; #endif flrig-1.3.24/src/include/debug.h0000644000175000017500000000720712562731651013314 00000000000000// ---------------------------------------------------------------------------- // debug.h // // Copyright (C) 2008 // Stelios Bounanos, M0GLD // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #ifndef _DEBUG_H_ #define _DEBUG_H_ #include "util.h" class debug { public: enum level_e { QUIET_LEVEL, ERROR_LEVEL, WARN_LEVEL, INFO_LEVEL, DEBUG_LEVEL, LOG_NLEVELS }; enum source_e { LOG_RIGCONTROL = 1 << 0, LOG_RPC = 1 << 1, LOG_OTHER = 1 << 2 }; static void start(const char* filename); static void stop(void); static void log(level_e level, const char* func, const char* srcf, int line, const char* format, ...) format__(printf, 5, 6); static void slog(level_e level, const char* func, const char* srcf, int line, const char* format, ...) format__(printf, 5, 6); static void elog(const char* func, const char* srcf, int line, const char* text); static void show(void); static level_e level; static uint32_t mask; private: static void sync_text(void*); debug(const char* filename); debug(const debug&); debug& operator=(const debug&); ~debug(); static debug* inst; }; #define LOG(level__, source__, ...) \ do { \ if (level__ <= debug::level && source__ & debug::mask) \ debug::log(level__, __func__, __FILE__, __LINE__, __VA_ARGS__); \ } while (0) #define LOG_DEBUG(...) LOG(debug::DEBUG_LEVEL, log_source_, __VA_ARGS__) #define LOG_INFO(...) LOG(debug::INFO_LEVEL, log_source_, __VA_ARGS__) #define LOG_WARN(...) LOG(debug::WARN_LEVEL, log_source_, __VA_ARGS__) #define LOG_ERROR(...) LOG(debug::ERROR_LEVEL, log_source_, __VA_ARGS__) #define LOG_QUIET(...) LOG(debug::QUIET_LEVEL, log_source_, __VA_ARGS__) #define SLOG(level__, source__, ...) \ do { \ if (level__ <= debug::level && source__ & debug::mask) \ debug::slog(level__, __func__, __FILE__, __LINE__, __VA_ARGS__); \ } while (0) #define SLOG_DEBUG(...) SLOG(debug::DEBUG_LEVEL, log_source_, __VA_ARGS__) #define SLOG_INFO(...) SLOG(debug::INFO_LEVEL, log_source_, __VA_ARGS__) #define SLOG_WARN(...) SLOG(debug::WARN_LEVEL, log_source_, __VA_ARGS__) #define SLOG_ERROR(...) SLOG(debug::ERROR_LEVEL, log_source_, __VA_ARGS__) #define SLOG_QUIET(...) SLOG(debug::QUIET_LEVEL, log_source_, __VA_ARGS__) #define LOG_PERROR(msg__) \ do { \ if (debug::ERROR_LEVEL <= debug::level && log_source_ & debug::mask) \ debug::elog(__func__, __FILE__, __LINE__, msg__); \ } while (0) unused__ static uint32_t log_source_ = debug::LOG_OTHER; #if defined(__GNUC__) && (__GNUC__ >= 3) # define LOG_FILE_SOURCE(source__) \ __attribute__((constructor)) \ static void log_set_source_(void) { log_source_ = source__; } #else # define LOG_FILE_SOURCE(source__) #endif #define LOG_SET_SOURCE(source__) log_source_ = source__ #endif // _DEBUG_H_ // Local Variables: // mode: c++ // c-file-style: "linux" // End: flrig-1.3.24/src/config.h0000644000175000017500000001535712650266612012053 00000000000000/* src/config.h. Generated from config.h.in by configure. */ /* src/config.h.in. Generated from configure.ac by autoheader. */ /* Build platform */ #define BUILD_BUILD_PLATFORM "i686-pc-linux-gnu" /* Compiler */ #define BUILD_COMPILER "gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) " /* Configure arguments */ #define BUILD_CONFIGURE_ARGS "" /* Build date */ #define BUILD_DATE "Thu Jan 21 17:45:13 CST 2016" /* Build host */ #define BUILD_HOST "dave-dc7600" /* Host platform */ #define BUILD_HOST_PLATFORM "i686-pc-linux-gnu" /* Target platform */ #define BUILD_TARGET_PLATFORM "i686-pc-linux-gnu" /* Build user */ #define BUILD_USER "dave" /* FLRIG compiler flags */ #define FLRIG_BUILD_CXXFLAGS "-I$(srcdir) -I$(srcdir)/include -I$(srcdir)/xmlrpcpp -I$(srcdir)/xmlrpcpp -I/usr/local/include -I/usr/include/freetype2 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_THREAD_SAFE -D_REENTRANT -I$(srcdir) -I$(srcdir)/include -pipe -Wall -fexceptions -O2 -ffast-math -finline-functions -fomit-frame-pointer -DNDEBUG" /* FLRIG linker flags */ #define FLRIG_BUILD_LDFLAGS "-L/usr/local/lib -lfltk_images -lpng -lz -ljpeg -lfltk -lXft -lfontconfig -lpthread -ldl -lm -lX11 -lX11 -ldl -lpthread" /* FLTK API major version */ #define FLRIG_FLTK_API_MAJOR 1 /* FLTK API minor version */ #define FLRIG_FLTK_API_MINOR 3 /* version string */ #define FLRIG_VERSION "1.3.24" /* major version number */ #define FLRIG_VERSION_MAJOR 1 /* minor version number */ #define FLRIG_VERSION_MINOR 3 /* patch/alpha version string */ #define FLRIG_VERSION_PATCH ".24" /* FLTK version */ #define FLTK_BUILD_VERSION "1.3.3" /* flxmlrpc version */ #define FLXMLRPC_BUILD_VERSION "" /* Define to 1 if we have clock_gettime */ #define HAVE_CLOCK_GETTIME 1 /* Define to 0 if not using dbg::stack */ /* #undef HAVE_DBG_STACK */ /* Define to 1 if we have dlopen */ #define HAVE_DLOPEN 1 /* Define to 1 if you have the `getaddrinfo' function. */ #define HAVE_GETADDRINFO 1 /* Define to 1 if you have the `gethostbyname' function. */ #define HAVE_GETHOSTBYNAME 1 /* Define to 1 if you have the `gmtime_r' function. */ #define HAVE_GMTIME_R 1 /* Define to 1 if you have the `hstrerror' function. */ #define HAVE_HSTRERROR 1 /* Define to 1 if you have the header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the `localtime_r' function. */ #define HAVE_LOCALTIME_R 1 /* Define to 1 if you have the `memmove' function. */ #define HAVE_MEMMOVE 1 /* Define to 1 if you have the header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the `memset' function. */ #define HAVE_MEMSET 1 /* Define to 1 if you have the `mkdir' function. */ #define HAVE_MKDIR 1 /* Define to 1 if you have the `select' function. */ #define HAVE_SELECT 1 /* Define to 1 if we have sem_timedwait */ #define HAVE_SEM_TIMEDWAIT 1 /* Define to 1 if we have sem_unlink */ #define HAVE_SEM_UNLINK 1 /* Define to 1 if you have the `setenv' function. */ #define HAVE_SETENV 1 /* Define to 1 if you have the `snprintf' function. */ #define HAVE_SNPRINTF 1 /* Define to 1 if you have the `socket' function. */ #define HAVE_SOCKET 1 /* Define to 1 if you have the `socketpair' function. */ #define HAVE_SOCKETPAIR 1 /* Define to 1 if stdbool.h conforms to C99. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the `strcasecmp' function. */ #define HAVE_STRCASECMP 1 /* Define to 1 if you have the `strcasestr' function. */ #define HAVE_STRCASESTR 1 /* Define to 1 if you have the `strchr' function. */ #define HAVE_STRCHR 1 /* Define to 1 if you have the `strdup' function. */ #define HAVE_STRDUP 1 /* Define to 1 if you have the `strerror' function. */ #define HAVE_STRERROR 1 /* Define to 1 if you have the header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the `strlcpy' function. */ /* #undef HAVE_STRLCPY */ /* Define to 1 if you have the `strncasecmp' function. */ #define HAVE_STRNCASECMP 1 /* Define to 1 if you have the `strrchr' function. */ #define HAVE_STRRCHR 1 /* Define to 1 if you have the `strstr' function. */ #define HAVE_STRSTR 1 /* Define to 1 if you have the `strtol' function. */ #define HAVE_STRTOL 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the `uname' function. */ #define HAVE_UNAME 1 /* Define to 1 if you have the header file. */ #define HAVE_UNISTD_H 1 /* Define to 1 if you have the `unsetenv' function. */ #define HAVE_UNSETENV 1 /* Define to 1 if you have the `vsnprintf' function. */ #define HAVE_VSNPRINTF 1 /* Define to 1 if the system has the type `_Bool'. */ #define HAVE__BOOL 1 /* Name of package */ #define PACKAGE "flrig" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "w1hkj AT w1hkj DOT com" /* Define to the full name of this package. */ #define PACKAGE_NAME "FLRIG" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "FLRIG 1.3.24" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "flrig" /* Define to the home page for this package. */ #define PACKAGE_URL "" /* Define to the version of this package. */ #define PACKAGE_VERSION "1.3.24" /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Define to 1 if we are using flxmlrpc */ #define USE_FLXMLRPC 0 /* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # define _ALL_SOURCE 1 #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # define _POSIX_PTHREAD_SEMANTICS 1 #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # define _TANDEM_SOURCE 1 #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # define __EXTENSIONS__ 1 #endif /* Define to 1 if we are using x */ #define USE_X 1 /* Version number of package */ #define VERSION "1.3.24" /* x version */ #define X_BUILD_VERSION "1.6.2" /* Define to 1 if on MINIX. */ /* #undef _MINIX */ /* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ /* #undef _POSIX_1_SOURCE */ /* Define to 1 if you need to in order for `stat' and other things to work. */ /* #undef _POSIX_SOURCE */ /* Define to 1 if we are building on mingw */ /* #undef __WOE32__ */ /* Define to `unsigned int' if does not define. */ /* #undef size_t */ flrig-1.3.24/src/main.cxx0000644000175000017500000003015012562731647012100 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "config.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef WIN32 # include "flrigrc.h" # include "compat.h" # define dirent fl_dirent_no_thanks #endif #include #ifdef __MINGW32__ # if FLRIG_FLTK_API_MAJOR == 1 && FLRIG_FLTK_API_MINOR < 3 # undef dirent # include # endif #else # include #endif #include #include #include //#include "images/flrig.xpm" #include "support.h" #include "dialogs.h" #include "rig.h" #include "status.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "xml_server.h" #include "xml_io.h" #include "ui.h" #include "flrig_icon.cxx" int parse_args(int argc, char **argv, int& idx); Fl_Double_Window *mainwindow; string HomeDir; string RigHomeDir; string TempDir; string defFileName; string title; pthread_t *serial_thread = 0; pthread_t *digi_thread = 0; pthread_mutex_t mutex_serial = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex_xmlrpc = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex_queA = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex_queB = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex_ptt = PTHREAD_MUTEX_INITIALIZER; bool RIG_DEBUG = false; bool XML_DEBUG = false; bool EXPAND_CONTROLS = false; //---------------------------------------------------------------------- void about() { string msg = "\ %s\n\ Version %s\n\ copyright W1HKJ \n\ Developer: Dave, W1HKJ"; fl_message(msg.c_str(), PACKAGE_TARNAME, PACKAGE_VERSION); } void visit_URL(void* arg) { const char* url = reinterpret_cast(arg); #ifndef __WOE32__ const char* browsers[] = { # ifdef __APPLE__ getenv("FLDIGI_BROWSER"), // valid for any OS - set by user "open" // OS X # else "fl-xdg-open", // Puppy Linux "xdg-open", // other Unix-Linux distros getenv("FLDIGI_BROWSER"), // force use of spec'd browser getenv("BROWSER"), // most Linux distributions "sensible-browser", "firefox", "mozilla" // must be something out there! # endif }; switch (fork()) { case 0: # ifndef NDEBUG unsetenv("MALLOC_CHECK_"); unsetenv("MALLOC_PERTURB_"); # endif for (size_t i = 0; i < sizeof(browsers)/sizeof(browsers[0]); i++) if (browsers[i]) execlp(browsers[i], browsers[i], url, (char*)0); exit(EXIT_FAILURE); case -1: fl_alert(_("Could not run a web browser:\n%s\n\n" "Open this URL manually:\n%s"), strerror(errno), url); } #else // gurgle... gurgle... HOWL // "The return value is cast as an HINSTANCE for backward // compatibility with 16-bit Windows applications. It is // not a true HINSTANCE, however. The only thing that can // be done with the returned HINSTANCE is to cast it to an // int and compare it with the value 32 or one of the error // codes below." (Error codes omitted to preserve sanity). if ((int)ShellExecute(NULL, "open", url, NULL, NULL, SW_SHOWNORMAL) <= 32) fl_alert(_("Could not open url:\n%s\n"), url); #endif } //---------------------------------------------------------------------- extern void saveFreqList(); void * flrig_terminate(void) { std::cerr << "terminating" << std::endl; fl_message("Closing flrig"); cbExit(); return 0; } void showEvents(void *) { debug::show(); } #if defined(__WIN32__) && defined(PTW32_STATIC_LIB) static void ptw32_cleanup(void) { (void)pthread_win32_process_detach_np(); } void ptw32_init(void) { (void)pthread_win32_process_attach_np(); atexit(ptw32_cleanup); } #endif // __WIN32__ #define KNAME "Flrig" #if !defined(__WIN32__) && !defined(__APPLE__) Pixmap Rig_icon_pixmap; void make_pixmap(Pixmap *xpm, const char **data) { Fl_Window w(0,0, KNAME); w.xclass(KNAME); w.show(); w.make_current(); Fl_Pixmap icon(data); int maxd = (icon.w() > icon.h()) ? icon.w() : icon.h(); *xpm = fl_create_offscreen(maxd, maxd); fl_begin_offscreen(*xpm); fl_color(FL_BACKGROUND_COLOR); fl_rectf(0, 0, maxd, maxd); icon.draw(maxd - icon.w(), maxd - icon.h()); fl_end_offscreen(); } #endif static void checkdirectories(void) { struct { string& dir; const char* suffix; void (*new_dir_func)(void); } dirs[] = { { RigHomeDir, 0, 0 } }; int r; for (size_t i = 0; i < sizeof(dirs)/sizeof(*dirs); i++) { if (dirs[i].suffix) dirs[i].dir.assign(RigHomeDir).append(dirs[i].suffix).append("/"); if ((r = mkdir(dirs[i].dir.c_str(), 0777)) == -1 && errno != EEXIST) { cerr << _("Could not make directory") << ' ' << dirs[i].dir << ": " << strerror(errno) << '\n'; exit(EXIT_FAILURE); } else if (r == 0 && dirs[i].new_dir_func) dirs[i].new_dir_func(); } } void exit_main(Fl_Widget *w) { if (Fl::event_key() == FL_Escape) return; cbExit(); } void expand_controls(void*) { show_controls(); } void close_controls(void*) { switch (progStatus.UIsize) { case wide_ui : if (EXPAND_CONTROLS && selrig->has_extras) return; btn_show_controls->label("@-22->"); btn_show_controls->redraw_label(); grpTABS->hide(); mainwindow->resizable(grpTABS); mainwindow->size(progStatus.mainW, 150); mainwindow->size_range(735, 150, 0, 150); break; case small_ui : if (EXPAND_CONTROLS && selrig->has_extras) Fl::add_timeout(1.0, expand_controls); break; case touch_ui : default : break; } } void startup(void*) { initStatusConfigDialog(); switch (progStatus.UIsize) { case touch_ui : mainwindow->size(progStatus.mainW, TOUCH_MAINH); mainwindow->size_range(TOUCH_MAINW, TOUCH_MAINH, 0, TOUCH_MAINH); mainwindow->redraw(); break; case wide_ui : if (EXPAND_CONTROLS && selrig->has_extras) return; btn_show_controls->label("@-22->"); btn_show_controls->redraw_label(); grpTABS->hide(); mainwindow->resizable(grpTABS); mainwindow->size(progStatus.mainW, 148); mainwindow->size_range(735, 148, 0, 148); mainwindow->redraw(); case small_ui : default : if (EXPAND_CONTROLS && selrig->has_extras) show_controls(); } } int main (int argc, char *argv[]) { std::terminate_handler(flrig_terminate); int arg_idx; HomeDir.clear(); RigHomeDir.clear(); Fl::args(argc, argv, arg_idx, parse_args); Fl::set_fonts(0); char dirbuf[FL_PATH_MAX + 1]; string appdir = argv[0]; size_t p; #ifdef __WIN32__ p = appdir.rfind("flrig.exe"); if (p != string::npos) appdir.erase(p); p = appdir.find("FL_APPS\\"); if (p != string::npos) { HomeDir.assign(appdir.substr(0, p + 8)); RigHomeDir.assign(HomeDir).append("flrig.files\\"); } else if (RigHomeDir.empty()) { fl_filename_expand(dirbuf, sizeof(dirbuf) -1, "$USERPROFILE/"); HomeDir = dirbuf; RigHomeDir.assign(HomeDir).append("flrig.files\\"); } #else p = appdir.rfind("flrig"); if (p != std::string::npos) appdir.erase(p); p = appdir.find("FL_APPS/"); if (p != string::npos) RigHomeDir = appdir.substr(0, p + 8); if (RigHomeDir.empty()) { fl_filename_expand(dirbuf, FL_PATH_MAX, "$HOME/"); HomeDir = dirbuf; } DIR *isdir = 0; string test_dir; test_dir.assign(HomeDir).append("flrig.files/"); isdir = opendir(test_dir.c_str()); if (isdir) { RigHomeDir = test_dir; closedir(isdir); } else if (RigHomeDir.empty()) { RigHomeDir.assign(HomeDir).append(".flrig/"); } #endif checkdirectories(); try { debug::start(string(RigHomeDir).append("debug_log.txt").c_str()); time_t t = time(NULL); // for testing purposes only // debug::level = debug::INFO_LEVEL; // RIG_DEBUG = true; // LOG(debug::INFO_LEVEL, debug::LOG_OTHER, _("%s log started on %s"), PACKAGE_STRING, ctime(&t)); } catch (const char* error) { cerr << error << '\n'; debug::stop(); exit(1); } progStatus.loadLastState(); switch (progStatus.UIsize) { case touch_ui : mainwindow = touch_rig_window(); break; case small_ui : mainwindow = Small_rig_window(); break; case wide_ui : default : mainwindow = Wide_rig_window(); } mainwindow->callback(exit_main); progStatus.UI_laststate(); fntbrowser = new Font_Browser; dlgMemoryDialog = Memory_Dialog(); dlgDisplayConfig = DisplayDialog(); Fl::lock(); #if defined(__WIN32__) && defined(PTW32_STATIC_LIB) ptw32_init(); #endif bypass_serial_thread_loop = true; serial_thread = new pthread_t; if (pthread_create(serial_thread, NULL, serial_thread_loop, NULL)) { perror("pthread_create"); exit(EXIT_FAILURE); } if (progStatus.fldigi_is_server) { open_rig_xmlrpc(); digi_thread = new pthread_t; if (pthread_create(digi_thread, NULL, digi_loop, NULL)) { perror("pthread_create"); exit(EXIT_FAILURE); } } else start_server(); createXcvrDialog(); btnALC_SWR->image(image_swr); sldrRcvSignal->clear(); sldrFwdPwr->clear(); sldrALC->clear(); sldrSWR->clear(); switch (progStatus.UIsize) { case small_ui : mainwindow->resize( progStatus.mainX, progStatus.mainY, mainwindow->w(), btnPTT->y() + btnPTT->h() + 2); break; case wide_ui : mainwindow->resize( progStatus.mainX, progStatus.mainY, progStatus.mainW, btnVol->y() + btnVol->h() + 2); break; case touch_ui : mainwindow->resize( progStatus.mainX, progStatus.mainY, progStatus.mainW, TOUCH_MAINH); default : break; } mainwindow->xclass(KNAME); #if defined(__WOE32__) # ifndef IDI_ICON # define IDI_ICON 101 # endif mainwindow->icon((char*)LoadIcon(fl_display, MAKEINTRESOURCE(IDI_ICON))); mainwindow->show (argc, argv); #elif !defined(__APPLE__) make_pixmap(&Rig_icon_pixmap, flrig_icon); mainwindow->icon((char *)Rig_icon_pixmap); mainwindow->show(argc, argv); #else mainwindow->show(argc, argv); #endif if (progStatus.UIsize != touch_ui) { btn_show_controls->label("@-28->"); btn_show_controls->redraw_label(); } Fl::add_timeout(0, startup);//0.50, startup); return Fl::run(); } int parse_args(int argc, char **argv, int& idx) { if (strcasecmp("--help", argv[idx]) == 0) { printf("Usage: \n\ --help this help text\n\ --version\n\ --config-dir \n\ --debug-level N (0..4)\n\ --rig_debug\n\ --xml_debug\n\ --exp (expand menu tab controls)\n\n"); exit(0); } if (strcasecmp("--version", argv[idx]) == 0) { printf("Version: "VERSION"\n"); exit (0); } if (strcasecmp("--rig_debug", argv[idx]) == 0) { RIG_DEBUG = true; idx++; return 1; } if (strcasecmp("--xml_debug", argv[idx]) == 0) { XML_DEBUG = true; idx++; return 1; } if (strcasecmp("--debug-level", argv[idx]) == 0) { string level = argv[idx + 1]; switch (level[0]) { case '0': debug::level = debug::QUIET_LEVEL; break; case '1': debug::level = debug::ERROR_LEVEL; break; case '2': debug::level = debug::WARN_LEVEL; break; case '3': debug::level = debug::INFO_LEVEL; break; case '4': debug::level = debug::DEBUG_LEVEL; break; default : debug::level = debug::WARN_LEVEL; } idx += 2; return 1; } if (strcasecmp("--config-dir", argv[idx]) == 0) { RigHomeDir = argv[idx + 1]; if (RigHomeDir[RigHomeDir.length()-1] != '/') RigHomeDir += '/'; idx += 2; return 1; } if (strcasecmp("--exp", argv[idx]) == 0) { EXPAND_CONTROLS = true; idx++; return 1; } return 0; } flrig-1.3.24/src/flrig_icon.cxx0000644000175000017500000004153512562731646013277 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- /* XPM */ const char * flrig_icon[] = { "48 48 719 2", " c None", ". c #2F2F2F", "+ c #2D2D2D", "@ c #2E2E2E", "# c #303030", "$ c #2C2C2C", "% c #313131", "& c #424242", "* c #2B2B2B", "= c #505050", "- c #393939", "; c #404040", "> c #333333", ", c #383838", "' c #323232", ") c #3A3A3A", "! c #3D3D3D", "~ c #4B4B4B", "{ c #484848", "] c #353535", "^ c #3B3B3B", "/ c #3C3C3C", "( c #363636", "_ c #444444", ": c #373737", "< c #787878", "[ c #4D4D4D", "} c #181818", "| c #A8A8A8", "1 c #3F3F3F", "2 c #343434", "3 c #7E7E7E", "4 c #434343", "5 c #747474", "6 c #636363", "7 c #2E2E2F", "8 c #676767", "9 c #252525", "0 c #222222", "a c #9E9E9E", "b c #525252", "c c #4E5050", "d c #242424", "e c #606060", "f c #888888", "g c #282828", "h c #898989", "i c #414141", "j c #717171", "k c #555555", "l c #878787", "m c #6A6A6A", "n c #565656", "o c #838383", "p c #2F2F30", "q c #8B8B8B", "r c #272727", "s c #7B7973", "t c #54524B", "u c #3A3832", "v c #52504A", "w c #44423C", "x c #494741", "y c #46433E", "z c #504E49", "A c #36342F", "B c #474540", "C c #43403D", "D c #45423E", "E c #3D3B37", "F c #36332F", "G c #46433F", "H c #4A4843", "I c #44423D", "J c #5D5A55", "K c #322F2A", "L c #37342F", "M c #3D3B35", "N c #3F3D37", "O c #45433C", "P c #3C3A33", "Q c #424039", "R c #44413A", "S c #393730", "T c #39372F", "U c #4F4D44", "V c #37352D", "W c #4A4840", "X c #46443C", "Y c #35332B", "Z c #36342B", "` c #49483E", " . c #424038", ".. c #37352F", "+. c #3C3A32", "@. c #D3C326", "#. c #D7C52A", "$. c #D8C72C", "%. c #D6C42C", "&. c #D7C62E", "*. c #D7C829", "=. c #E0CD36", "-. c #D9C63A", ";. c #D7C52F", ">. c #D9C632", ",. c #D8C431", "'. c #D9C532", "). c #E0CC31", "!. c #E7D333", "~. c #D7C331", "{. c #E1CE33", "]. c #DBC832", "^. c #DAC730", "/. c #EAD62F", "(. c #D9C62D", "_. c #DAC72F", ":. c #E0CE2F", "<. c #E9D62D", "[. c #E9D62C", "}. c #DFCD2A", "|. c #E7D42A", "1. c #E8D629", "2. c #E9D728", "3. c #DAC827", "4. c #E9D626", "5. c #E8D725", "6. c #E8D624", "7. c #DBCA26", "8. c #E9D725", "9. c #E7D626", "0. c #E1D026", "a. c #E8D625", "b. c #E0D023", "c. c #D9C926", "d. c #DAC926", "e. c #DACA26", "f. c #D8CA25", "g. c #FFF206", "h. c #FFF205", "i. c #FFF500", "j. c #FFD548", "k. c #7D6831", "l. c #FBD16A", "m. c #FDEC10", "n. c #E3D605", "o. c #918021", "p. c #322D0A", "q. c #FFFF06", "r. c #837C05", "s. c #E2D505", "t. c #F1E405", "u. c #000000", "v. c #FFF306", "w. c #928A05", "x. c #111103", "y. c #0F0F03", "z. c #978F05", "A. c #403C04", "B. c #111003", "C. c #0C0B03", "D. c #F2E506", "E. c #121103", "F. c #050503", "G. c #F1E406", "H. c #040302", "I. c #3F3C04", "J. c #9F9705", "K. c #898205", "L. c #FFF406", "M. c #FFF107", "N. c #FAE80E", "O. c #F6E219", "P. c #FCE62E", "Q. c #F5CE64", "R. c #EABE40", "S. c #AC8449", "T. c #F5DE19", "U. c #FFF106", "V. c #DED106", "W. c #817A04", "X. c #FFFF07", "Y. c #716B05", "Z. c #EBDE06", "`. c #22200B", " + c #FFFF08", ".+ c #030303", "++ c #6F6905", "@+ c #CCC106", "#+ c #F1E306", "$+ c #100F04", "%+ c #777105", "&+ c #ECDF06", "*+ c #0C0C04", "=+ c #F8EB06", "-+ c #FFFE07", ";+ c #131204", ">+ c #807905", ",+ c #FFFB07", "'+ c #FEF006", ")+ c #FFF207", "!+ c #E1D506", "~+ c #DDD106", "{+ c #EEE106", "]+ c #E5C62B", "^+ c #C1944E", "/+ c #A68258", "(+ c #DFC32E", "_+ c #CBA750", ":+ c #B08654", "<+ c #E1C931", "[+ c #D9B34C", "}+ c #AA7661", "|+ c #FFF702", "1+ c #787205", "2+ c #938B06", "3+ c #706A05", "4+ c #292705", "5+ c #DDD201", "6+ c #FFF724", "7+ c #645E0B", "8+ c #767006", "9+ c #FFF907", "0+ c #C9BE06", "a+ c #726C05", "b+ c #D0C406", "c+ c #E4D706", "d+ c #867F06", "e+ c #6D6705", "f+ c #767005", "g+ c #121104", "h+ c #D9CD06", "i+ c #706A04", "j+ c #C0B506", "k+ c #827B06", "l+ c #6E6805", "m+ c #B7AD06", "n+ c #80633B", "o+ c #D0AE6F", "p+ c #745C39", "q+ c #D5AD73", "r+ c #987A4F", "s+ c #D3A76B", "t+ c #F8E80D", "u+ c #F7E512", "v+ c #F7E511", "w+ c #FFF807", "x+ c #DED206", "y+ c #5F5B02", "z+ c #EBD836", "A+ c #2C2A01", "B+ c #F6E906", "C+ c #797405", "D+ c #EFE206", "E+ c #EADE06", "F+ c #756E05", "G+ c #252305", "H+ c #F4E606", "I+ c #040403", "J+ c #141304", "K+ c #8A8206", "L+ c #EFE005", "M+ c #EADB18", "N+ c #656004", "O+ c #FFF307", "P+ c #695130", "Q+ c #634C2D", "R+ c #695131", "S+ c #644C2D", "T+ c #624B2D", "U+ c #A8814E", "V+ c #FFED0E", "W+ c #FBE812", "X+ c #FEF007", "Y+ c #EEE103", "Z+ c #111004", "`+ c #040303", " @ c #FFFD07", ".@ c #302E05", "+@ c #3C3905", "@@ c #0B0A04", "#@ c #E3D706", "$@ c #F0E306", "%@ c #000001", "&@ c #2E2C05", "*@ c #302E04", "=@ c #967E55", "-@ c #AE8656", ";@ c #A38655", ">@ c #997E53", ",@ c #AD8456", "'@ c #C89E6C", ")@ c #DFAF75", "!@ c #DAA974", "~@ c #EDC33C", "{@ c #FFF304", "]@ c #FDEF06", "^@ c #A08249", "/@ c #FFF90B", "(@ c #C49B50", "_@ c #BB924F", ":@ c #FFF20F", "<@ c #FFEF10", "[@ c #C59060", "}@ c #C99162", "|@ c #FBE11D", "1@ c #FFF400", "2@ c #FFF301", "3@ c #FFF402", "4@ c #FFF201", "5@ c #FFF204", "6@ c #FFF503", "7@ c #FFF903", "8@ c #FFF603", "9@ c #FFF602", "0@ c #FFF300", "a@ c #F9C06B", "b@ c #E0B76C", "c@ c #D6A95F", "d@ c #FDCD64", "e@ c #EFCE2F", "f@ c #FFF007", "g@ c #FFF006", "h@ c #E2CB30", "i@ c #BD9841", "j@ c #FBED06", "k@ c #DBCF06", "l@ c #DCD006", "m@ c #FCEF06", "n@ c #E3D606", "o@ c #B8A31E", "p@ c #DDCD0E", "q@ c #FFF601", "r@ c #FFF203", "s@ c #F6D132", "t@ c #E5CC32", "u@ c #E7CA30", "v@ c #FFDF29", "w@ c #F5E114", "x@ c #FFF403", "y@ c #FFEE15", "z@ c #FFF609", "A@ c #F9DD1E", "B@ c #E4CA1D", "C@ c #FFF804", "D@ c #EDE006", "E@ c #E4D806", "F@ c #282707", "G@ c #000002", "H@ c #282705", "I@ c #7A7405", "J@ c #F8EA07", "K@ c #201F05", "L@ c #080704", "M@ c #817A06", "N@ c #6B6605", "O@ c #E2D606", "P@ c #777005", "Q@ c #BFB406", "R@ c #261E1C", "S@ c #8E6B40", "T@ c #FFED12", "U@ c #C99B52", "V@ c #ECD73A", "W@ c #FFF105", "X@ c #BB9737", "Y@ c #D6AE38", "Z@ c #D5AE32", "`@ c #DCB83B", " # c #B2903C", ".# c #A78222", "+# c #EDC12C", "@# c #D3AE23", "## c #D7B31F", "$# c #C2A61D", "%# c #FFF605", "&# c #FFF507", "*# c #948B06", "=# c #827A08", "-# c #151404", ";# c #E0D406", "># c #E5D806", ",# c #28240A", "'# c #6D5B35", ")# c #F5E60F", "!# c #FEF204", "~# c #FFDB36", "{# c #FDDE1C", "]# c #E2B54A", "^# c #FEF108", "/# c #FFF703", "(# c #FFF705", "_# c #FFF505", ":# c #FFF405", "<# c #5D5805", "[# c #DFD206", "}# c #6B660A", "|# c #0D0C05", "1# c #F9E612", "2# c #0C0B06", "3# c #646008", "4# c #DDD006", "5# c #756F05", "6# c #FFF707", "7# c #FFFF02", "8# c #FFFF00", "9# c #FFF701", "0# c #FFF800", "a# c #FFE90E", "b# c #F4DA21", "c# c #F1DA25", "d# c #FFF801", "e# c #FFF604", "f# c #F5E803", "g# c #756F02", "h# c #6D6802", "i# c #FDF003", "j# c #746E02", "k# c #7C7602", "l# c #FAED03", "m# c #6B6702", "n# c #7C7702", "o# c #FAED04", "p# c #6C6702", "q# c #FFF704", "r# c #BCB203", "s# c #F3E603", "t# c #B99F49", "u# c #B99F47", "v# c #B9A147", "w# c #B9A145", "x# c #B9A144", "y# c #B9A244", "z# c #B9A141", "A# c #B9A240", "B# c #B9A23F", "C# c #B8A23E", "D# c #B9A33E", "E# c #B9A33A", "F# c #B9A339", "G# c #B9A338", "H# c #B9A436", "I# c #B9A435", "J# c #B9A432", "K# c #B9A532", "L# c #B9A530", "M# c #B9A630", "N# c #B8A630", "O# c #BCA831", "P# c #BCA930", "Q# c #B9A531", "R# c #BCA830", "S# c #BCA82F", "T# c #BCAA2F", "U# c #BAA62F", "V# c #BEAC2F", "W# c #BDAA30", "X# c #BEAA30", "Y# c #C0AC31", "Z# c #BFAB30", "`# c #C0AE31", " $ c #C2AE32", ".$ c #C0AE32", "+$ c #C1AD32", "@$ c #B8A52E", "#$ c #B4A22E", "$$ c #B4A12C", "%$ c #B79E3D", "&$ c #25272C", "*$ c #25262C", "=$ c #25262D", "-$ c #24262D", ";$ c #25262E", ">$ c #23242B", ",$ c #25272F", "'$ c #25262F", ")$ c #262730", "!$ c #2C2D35", "~$ c #2D2E37", "{$ c #2F3138", "]$ c #303239", "^$ c #32333C", "/$ c #35363D", "($ c #35373E", "_$ c #373940", ":$ c #2D2F36", "<$ c #24252D", "[$ c #181A21", "}$ c #101116", "|$ c #15161C", "1$ c #191A1F", "2$ c #343433", "3$ c #353536", "4$ c #2B2B2A", "5$ c #353534", "6$ c #3C3C3B", "7$ c #3F3E3E", "8$ c #2A2B2B", "9$ c #2B2C2C", "0$ c #232322", "a$ c #414242", "b$ c #464646", "c$ c #454545", "d$ c #474747", "e$ c #4E4E4E", "f$ c #4F4F4F", "g$ c #494949", "h$ c #434344", "i$ c #454444", "j$ c #171717", "k$ c #141414", "l$ c #181718", "m$ c #0C0C0B", "n$ c #1E1E1E", "o$ c #232323", "p$ c #0D0D0D", "q$ c #0E0E0E", "r$ c #1F1F1F", "s$ c #262626", "t$ c #1C1C1C", "u$ c #1B1B1B", "v$ c #202020", "w$ c #1A1A1A", "x$ c #212121", "y$ c #0C0C0C", "z$ c #333A31", "A$ c #4D5A47", "B$ c #111211", "C$ c #232223", "D$ c #525452", "E$ c #434C44", "F$ c #424441", "G$ c #111111", "H$ c #131313", "I$ c #121212", "J$ c #1D1D1D", "K$ c #0F0F0F", "L$ c #5C5C5C", "M$ c #6D6D6D", "N$ c #626262", "O$ c #101010", "P$ c #151515", "Q$ c #2B2A2B", "R$ c #342E29", "S$ c #322E29", "T$ c #3B632C", "U$ c #58AA3C", "V$ c #151A16", "W$ c #090809", "X$ c #1D271E", "Y$ c #28512A", "Z$ c #233122", "`$ c #8A8A8A", " % c #7A7A7A", ".% c #5D5D5D", "+% c #4A4A4A", "@% c #545454", "#% c #514E4B", "$% c #947041", "%% c #906C3C", "&% c #110E11", "*% c #3C343E", "=% c #605F60", "-% c #6B6B6B", ";% c #5E5D5E", ">% c #3B373B", ",% c #5B5B5B", "'% c #AAAAAA", ")% c #292929", "!% c #3E3E3E", "~% c #ABABAB", "{% c #5A5A5A", "]% c #555453", "^% c #735F42", "/% c #6C593F", "(% c #808080", "_% c #5E5E5E", ":% c #535353", "<% c #959595", "[% c #848484", "}% c #666666", "|% c #868686", "1% c #111110", "2% c #3C3B3B", "3% c #4A4032", "4% c #4A4034", "5% c #5F5F5F", "6% c #595959", "7% c #AEAEAE", "8% c #B7B7B7", "9% c #B9B9B9", "0% c #111112", "a% c #26251D", "b% c #3B3B29", "c% c #2B2B1F", "d% c #646464", "e% c #BABABA", "f% c #191919", "g% c #3F3E24", "h% c #615F30", "i% c #787741", "j% c #6C6C6C", "k% c #B8B8B8", "l% c #BCBCBC", "m% c #939393", "n% c #131312", "o% c #0E0E0F", "p% c #0D0E0E", "q% c #0B0B0C", "r% c #646465", "s% c #121213", "t% c #C3C3C3", "u% c #A7A7A7", "v% c #8C8C8C", "w% c #202019", "x% c #1B1C16", "y% c #626251", "z% c #131310", "A% c #1A1A17", "B% c #202018", "C% c #161614", "D% c #A2A2A2", "E% c #585858", "F% c #696969", "G% c #686739", "H% c #50502E", "I% c #19191A", "J% c #3B3A1F", "K% c #34331D", "L% c #383828", "M% c #47472F", "N% c #24241E", "O% c #656565", "P% c #535354", "Q% c #777777", "R% c #6D6D6E", "S% c #151513", "T% c #151514", "U% c #141413", "V% c #707070", "W% c #757575", "X% c #0F0F10", "Y% c #33331F", "Z% c #555535", "`% c #5F5D38", " & c #61603B", ".& c #0B0B0B", "+& c #767676", "@& c #797979", "#& c #101011", "$& c #333320", "%& c #383723", "&& c #2E2E1D", "*& c #454345", "=& c #565359", "-& c #363737", ";& c #5D5B5D", ">& c #494849", ",& c #575757", "'& c #515151", ")& c #121211", "!& c #0B0C0C", "~& c #0C0C0D", "{& c #131213", "]& c #355228", "^& c #538C37", "/& c #151B16", "(& c #100E10", "_& c #1E271F", ":& c #244526", "<& c #1D2B1E", "[& c #182716", "}& c #405F3A", "|& c #3C3E3D", "1& c #424142", "2& c #414542", "3& c #334033", "4& c #141814", "5& c #727272", "6& c #858585", "7& c #353435", "8& c #6F6E6F", "9& c #3D3C3D", "0& c #272828", "a& c #ADADAD", "b& c #21221A", "c& c #2E2D1E", "d& c #3F3E2A", "e& c #8D8D8D", "f& c #999999", "g& c #393727", "h& c #45442A", "i& c #434325", "j& c #161616", "k& c #6E6E6E", "l& c #0F0F11", "m& c #0D0D0F", "n& c #100F11", "o& c #0C0C0F", "p& c #0B0B0E", "q& c #0C0C0E", "r& c #3C3C22", "s& c #5B5B37", "t& c #171715", "u& c #2A2A2C", "v& c #54542F", "w& c #444429", "x& c #6B6A33", "y& c #797749", "z& c #676640", "A& c #1A1A15", "B& c #7C7C7C", "C& c #7D7D7D", "D& c #303025", "E& c #191814", "F& c #0E0E0D", "G& c #24231C", "H& c #2F2E21", "I& c #27271B", "J& c #141412", ". + @ @ . . . . . . # # # # # . . . . @ @ @ . + + + @ + + + + + $ + $ $ + + + + @ @ . . # # # % ", "& * # = - # - % ; > , + ' ) , ! % @ ~ > { ] @ ^ / ( % . ( > ] # _ @ ) , , > ) : - # . . . . . # ", "< [ } | { $ < [ 1 2 3 4 5 6 7 8 9 0 a b = c d ! e f g h i j k l % @ m m ( n o p q > g g g g g r ", "s t u v w x y u z A B C D E F G F F H I J K L M N O P Q R S O T U V W X Y Z ` .X T ..V V V V +.", "@.#.$.%.&.*.=.-.;.>.,.'.>.).!.~.{.].^./.(._.:.<.[.}.|.1.2.3.4.5.6.7.8.5.9.0.a.8.b.c.d.d.e.f.c.e.", "g.g.h.g.i.j.k.l.m.g.g.g.n.o.p.q.r.s.t.u.t.v.w.x.y.z.A.B.C.D.E.B.F.G.H.x.I.J.x.y.K.L.g.g.g.g.g.g.", "M.N.O.g.P.Q.R.S.T.U.M.M.V.W.B.X.Y.Z.`. +.+X.++@+#+X.$+X.%+&+*+=+-+M.X.X.;+>+@+#+,+'+M.)+!+~+{+M.", "]+^+/+(+_+:+<+[+}+|+M.M.V.1+2+3+4+5+6+7+8+9+0+a+3+b+;+X.3+c+d+e+f+9+X.X.g+h+a+i+j+)+M.9+k+l+m+)+", "n+o+p+q+r+s+t+u+v+U.M.M.V.3+w+x+y+z+A+B+-+)+C+D+E+F+;+X.%+Z.G+X..+H+I+D.J+K+L+M+N+O+M.'+O+O+)+'+", "P+Q+R+S+T+U+V+W+X+X+M.M.!+k+O+O+k+Y+Z+$+`+ @X..@.@X.+@$+@@#@$@%@$@#@I+G.&@X..@*@X.'+M.M.M.M.M.M.", "=@-@;@>@,@'@)@!@~@{@M.M.)+9+'+'+9+)+X.X.X.'+'+ @ @]@ @X.X.)+)+X.)+)+X.M.-+]@ @ @'+M.M.M.M.M.M.M.", "^@/@(@_@:@<@[@}@|@1@2@3@4@5@X+M.M.M.X+5@6@X+M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.M.", "7@M.6@8@X+X+9@9@0@a@b@c@d@e@U.f@U.U.g@h@i@6@M.M.j@k@l@]@~+x+]@~+l@m@k@]@n@D+m@l@~+j@O+)+'+M.M.M.", "o@p@h.M.M.X+q@r@5@s@t@u@v@w@8@x@y@z@f@A@B@C@X+M.D@++1+E@F@G@&+H@I@J@K@&+L@M@#@N@K@O@P@Q@)+M.M.M.", "R@S@T@M.M.6@U@V@W@W@W@8@X@Y@Z@`@ #.#+#@###$#%#M.&#*#I+Z.=#J+D@%@-#D+%@D+%@%@;#>#Y.-+%@P@O+M.M.M.", ",#'#)#M.M.X+9@r@X+M.M.!#~#{#]#^#/#(#{@_#:#_#X+M.k@<#{+[#}#|# @1#2#X.3#4#X.5#~+~+l+)+X.6#'+M.M.M.", "7#8#9#9@9@|+9@|+9@8@8@8@0#a#b#c#d#8@8@e#e#e#e#e#f#g#h#i#j#k#l#m#n#o#p#f#q#r#s#s#r#/#8@e#e#q#q#/#", "t#u#v#w#w#x#y#z#A#B#C#D#E#F#G#H#I#J#K#L#L#L#M#N#M#O#P#Q#P#R#M#S#T#U#V#W#X#Y#Z#`# $.$+$P#@$#$$$%$", "&$&$*$*$*$*$*$=$=$=$=$-$=$;$=$=$=$>$,$;$;$;$;$;$;$;$;$'$;$=$;$;$;$)$!$~${$]$^$/$($_$:$<$[$}$|$1$", "2 2$2 2 ] 2 2 2 2$] ] ] 2$2 3$] ] 4$( > 5$2 > > > > > > > & & ] : ) ) 6$! 7$1 ; ; / r * d 8$9$0$", "& & 4 4 _ 4 4 & a$& & 4 4 _ 4 4 4 4 _ _ _ b$c$b$b$b$d${ { [ [ ~ ~ e$f$f$= b b b = g$& ; ; & h$i$", ": ! j$k$l$p m$n$! i - o$p$q$q$q$p$r$s$# t$t$t$t$t$u$t$n$v$r$r$r$r$t$w$u$u$u$u$u$$ $ x$y$q$p$p$p$", "' ^ + : z$A$B$C$D$E$F$% G$H$H$H$I$J$/ f$} I$I$G$K$x$+ L$M$h l l N$@ o$O$O$I$I$P$) L$n$G$H$Q$R$S$", "I$G$I$I$T$U$V$W$X$Y$Z$G$H$H$H$H$I$v$j$n$H$H$O$t$b$`$ %.%[ +%+%@%6 3 `$d$o$K$H$H$u$w$o$G$H$#%$%%%", "H$H$H$I$&%*%=%-%;%>%I$I$I$H$H$H$I$x$G$I$H$I$> ,%'%c$)%9 % i !%+ 9 $ ~ ~%{%, H$I$I$G$o$G$H$]%^%/%", "H$H$I$} ,%~ & b$/ 5 @%P$H$H$H$H$I$x$G$H$q$# (%_%* r d :%<%[%8 +%) s$s$+ }%|%] O$H$G$o$1%I$2%3%4%", "H$H$O$d$5%4 ! / / 6%h n$H$H$H$H$I$x$G$K$* 7%{ * g r ' 8%9%o N$& 9 - g g $ b 7%> q$I$o$G$0%a%b%c%", "H$H$I$o$= ) ! ! ! ~ j x$G$H$H$H$I$x$O$t$d%:%s$g )%o$j e%e%[%N$_ f%- g )%g r }%L$o$G$o$G$0%g%h%i%", "H$H$G$s$d$i ! / ! g$j%b$q$H$H$H$I$x$I$: q s$g )%)%0 h k%l%[%N$_ f%, g )%)%g * m%) k$o$G$n%o%p%q%", "H$H$H$I$] 4 ^ ^ : r%^ O$s%s%H$H$I$x$P$f i g g )%)%r # t%u%3 N$& s$( g )%)%)%r +%v%P$o$G$G$n$J$n$", "w%x%H$I$O$e f$,%}%y%z%A%B%C%I$H$I$v$d _%% g )%)%)%)%9 6%D%3 6 c$!%r )%)%)%g g > e > 0 G$H$E%(%F%", "G%H%C%H$I$K$n$* I%J%K%L%M%N%I$H$I$n$d$O%)%)%)%)%)%g )%s$!%:%g$, g )%)%)%)%)%g + L$~ x$G$H$P%Q%R%", "S%T%n%H$H$I$I$I$I$I$I$U%n%H$I$H$I$n$k V%s$)%)%)%)%)%g g g g g g g g )%)%)%)%)%g 5 6%r$G$O$U%s%I$", "H$H$H$I$I$I$I$H$I$I$I$I$H$H$H$H$G$v$e$:%r )%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%r W%{%J$X%Y%Z%`% &", "H$H$H$P$' r ; .&1 , ] P$n%H$H$H$G$o$n +&s$)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%r @&E%J$#&B%$&%&&&", "H$H$H$j$*&=&-&y$: ;&>&j$H$n%H$H$I$t$,&< r g )%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%k '&v$)&0%!&y$~&", "H$H$H${&]&^&/&(&_&:&<&I$n%H$H$H$I$} _ .%* )%g )%)%)%)%)%)%)%)%)%)%)%)%)%)%)%g . d%~ } I$H$k k '&", "H$H$H$H$[&}&|&1&2&3&4&I$H$H$H$H$H$O$$ 5&( g )%)%)%)%)%)%)%)%)%)%)%)%)%)%)%)%g - < # H$I$I$ %h 6&", "H$H$H$G$7&8&= e +%!%9&G$I$H$H$H$I$I$r$k _ * g )%)%)%)%)%)%)%)%)%)%)%)%)%)%g g :%,&d I$H$G$)%r 0&", "H$H$G$# W%f$!%) 1 8 6%J$H$H$H$H$H$H$I$> a&)%g g )%)%)%)%)%)%)%)%)%)%)%)%g r ' ~%( k$H$I$I$b&c&d&", "H$H$G$$ ; ^ / ! / [ [%} H$I$H$H$H$I$H$J$& e&. g )%)%)%)%)%)%)%)%)%)%)%)%g 2 f&i x$I$H$H$G$g&h&i&", "H$H$O$; .%! / ! ! +%d%6 y$H$H$I$H$I$G$G$o$N$@%+ g g )%)%)%)%)%)%)%)%g r % 5%6 s$I$I$H$I$H$I$I$I$", "H$H$H$I$@ ! / / / '&F%y$H$H$H$H$O$$ ' j&I$s$6&k&& $ g g g g g g g g $ b$@&6&)%k$I$H$H$H$G$0 o$0 ", "l&m&I$I$$ e$E%; ,&e n&o&p&q&I$I$q$M$6 ] I$I$x$4 q m :%' * o$o$g ] n M$q _ d k$I$H$H$H$I$H$L$f q ", "r&s&t&H$I$} ( ,%u&v&w&x&y&z&A&H$.&B&_%: I$I$I$f%g = [ ~%C&7%a&7%8%[ b * t$I$I$H$H$H$H$I$H$,&}%O%", "D&E&H$H$H$H$G$F&I$X%~&G&H&I&J&H$I$y$q$O$H$H$H$I$I$j$0 2 ) ! ! - > r j$G$I$H$H$H$H$H$H$H$G$.&.&.&", "#&0%)&I$I$I$I$#&I$I$I$#&#&#&I$I$I$I$I$I$I$I$I$I$I$I$O$H$j&H$H$P$H$O$I$I$I$I$I$I$I$I$I$I$I$I$I$I$", "G$0%G$0%G$G$G$O$I$B$G$G$G$G$G$G$G$G$G$G$G$G$G$G$G$G$I$G$G$G$G$G$G$I$G$G$G$G$G$G$G$G$G$G$G$G$G$G$"}; flrig-1.3.24/src/UI/0000755000175000017500000000000012650266613011020 500000000000000flrig-1.3.24/src/UI/xcvr_setup.cxx0000644000175000017500000011040312562731646013672 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- Fl_Tabs *tabsConfig=(Fl_Tabs *)0; Fl_Group *tabPrimary=(Fl_Group *)0; Fl_ComboBox *selectRig=(Fl_ComboBox *)0; Fl_Counter *cntRigCatRetries=(Fl_Counter *)0; Fl_Counter *cntRigCatTimeout=(Fl_Counter *)0; Fl_Counter *cntRigCatWait=(Fl_Counter *)0; Fl_Counter *query_interval=(Fl_Counter *)0; Fl_Counter *byte_interval=(Fl_Counter *)0; Fl_ComboBox *selectCommPort=(Fl_ComboBox *)0; Fl_ComboBox *mnuBaudrate=(Fl_ComboBox *)0; Fl_Check_Button *btnTwoStopBit=(Fl_Check_Button *)0; Fl_Check_Button *btnOneStopBit=(Fl_Check_Button *)0; Fl_Check_Button *btnRigCatEcho=(Fl_Check_Button *)0; Fl_Round_Button *btncatptt=(Fl_Round_Button *)0; Fl_Round_Button *btnrtsptt=(Fl_Round_Button *)0; Fl_Round_Button *btndtrptt=(Fl_Round_Button *)0; Fl_Check_Button *chkrtscts=(Fl_Check_Button *)0; Fl_Check_Button *btnrtsplus=(Fl_Check_Button *)0; Fl_Check_Button *btndtrplus=(Fl_Check_Button *)0; Fl_Int_Input *txtCIV=(Fl_Int_Input *)0; Fl_Button *btnCIVdefault=(Fl_Button *)0; Fl_Check_Button *btnUSBaudio=(Fl_Check_Button *)0; Fl_Check_Button *btn_key_fldigi=(Fl_Check_Button *)0; Fl_Group *tabTCPIP = (Fl_Group *)0; Fl_Input2 *inp_tcpip_addr = (Fl_Input2 *)0; Fl_Input2 *inp_tcpip_port = (Fl_Input2 *)0; Fl_Check_Button *chk_use_tcpip=(Fl_Check_Button *)0; Fl_Box *box_tcpip_connect=(Fl_Box *)0; Fl_Counter *inp_tcpip_ping_delay=(Fl_Counter *)0; Fl_Counter *cntRetryAfter=(Fl_Counter *)0; Fl_Counter *cntDropsAllowed=(Fl_Counter *)0; Fl_Group *tabPTT=(Fl_Group *)0; Fl_ComboBox *selectSepPTTPort=(Fl_ComboBox *)0; Fl_Round_Button *btnSepRTSptt=(Fl_Round_Button *)0; Fl_Check_Button *btnSepRTSplus=(Fl_Check_Button *)0; Fl_Round_Button *btnSepDTRptt=(Fl_Round_Button *)0; Fl_Check_Button *btnSepDTRplus=(Fl_Check_Button *)0; Fl_Group *tabAux=(Fl_Group *)0; Fl_ComboBox *selectAuxPort=(Fl_ComboBox *)0; Fl_Group *tabPolling=(Fl_Group *)0; Fl_Value_Input *poll_smeter=(Fl_Value_Input *)0; Fl_Value_Input *poll_pout=(Fl_Value_Input *)0; Fl_Value_Input *poll_swr=(Fl_Value_Input *)0; Fl_Value_Input *poll_alc=(Fl_Value_Input *)0; Fl_Value_Input *poll_frequency=(Fl_Value_Input *)0; Fl_Value_Input *poll_mode=(Fl_Value_Input *)0; Fl_Value_Input *poll_bandwidth=(Fl_Value_Input *)0; Fl_Value_Input *poll_volume=(Fl_Value_Input *)0; Fl_Value_Input *poll_micgain=(Fl_Value_Input *)0; Fl_Value_Input *poll_rfgain=(Fl_Value_Input *)0; Fl_Value_Input *poll_power_control=(Fl_Value_Input *)0; Fl_Value_Input *poll_ifshift=(Fl_Value_Input *)0; Fl_Value_Input *poll_notch=(Fl_Value_Input *)0; Fl_Value_Input *poll_auto_notch=(Fl_Value_Input *)0; Fl_Value_Input *poll_pre_att=(Fl_Value_Input *)0; Fl_Value_Input *poll_squelch=(Fl_Value_Input *)0; Fl_Value_Input *poll_split=(Fl_Value_Input *)0; Fl_Value_Input *poll_noise=(Fl_Value_Input *)0; Fl_Value_Input *poll_nr=(Fl_Value_Input *)0; Fl_Button *btnClearAddControls=(Fl_Button *)0; Fl_Value_Input *poll_all=(Fl_Value_Input *)0; Fl_Button *btnSetAllAdd=(Fl_Button *)0; Fl_Group *tabSndCmd=(Fl_Group *)0; Fl_Input2 *txt_command=(Fl_Input2 *)0; Fl_Button *btn_send_command=(Fl_Button *)0; Fl_Output *txt_response=(Fl_Output *)0; Fl_Box *box_xcvr_connect=(Fl_Box *)0; Fl_Box *box_fldigi_connect=(Fl_Box *)0; Fl_Button *btnCancelCommConfig=(Fl_Button *)0; Fl_Return_Button *btnOkXcvrDialog=(Fl_Return_Button *)0; Fl_Group *tabXMLRPC=(Fl_Group *)0; Fl_Input *server_addr=(Fl_Input *)0; Fl_Int_Input *server_port=(Fl_Int_Input *)0; Fl_Check_Button *btn_xmlrpc_server=(Fl_Check_Button *)0; static void cb_xmlrpc_server(Fl_Check_Button *w, void *) { progStatus.fldigi_is_server = btn_xmlrpc_server->value(); } static void cb_selectRig(Fl_ComboBox*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); initConfigDialog(); } static void cb_cntRigCatRetries(Fl_Counter* o, void*) { progStatus.comm_retries = (int)o->value(); } static void cb_cntRigCatTimeout(Fl_Counter* o, void*) { progStatus.comm_timeout = (int)o->value(); } static void cb_cntRigCatWait(Fl_Counter* o, void*) { progStatus.comm_wait = (int)o->value(); } static void cb_query_interval(Fl_Counter* o, void*) { progStatus.serloop_timing = (int)o->value(); } static void cb_byte_interval(Fl_Counter* o, void*) { progStatus.byte_interval = (int)o->value(); } static void cb_selectCommPort(Fl_ComboBox*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_mnuBaudrate(Fl_ComboBox*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btnTwoStopBit(Fl_Check_Button* o, void*) { if (o->value() == true) { btnOneStopBit->value(false); progStatus.stopbits = 2; } else o->value(true); btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btnOneStopBit(Fl_Check_Button* o, void*) { if (o->value() == true) { btnTwoStopBit->value(false); progStatus.stopbits = 1; } else o->value(true); btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btnRigCatEcho(Fl_Check_Button*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_server_addr(Fl_Input* o, void*) { progStatus.server_addr = o->value(); } static void cb_server_port(Fl_Int_Input* o, void*) { progStatus.server_port = o->value(); } static void cb_tcpip_addr(Fl_Input2* o, void*) { progStatus.tcpip_addr = o->value(); } static void cb_tcpip_port(Fl_Input2* o, void*) { progStatus.tcpip_port = o->value(); } static void cb_tcpip_ping_delay(Fl_Counter* o, void*) { progStatus.tcpip_ping_delay = o->value(); } static void cb_use_tcpip(Fl_Check_Button* o, void*) { progStatus.use_tcpip = o->value(); if (!progStatus.use_tcpip) disconnect_from_remote(); else try { connect_to_remote(); initRig(); } catch (...) { progStatus.use_tcpip = 0; o->value(0); return; } } static void cb_cntRetryAfter(Fl_Counter* o, void *) { progStatus.tcpip_reconnect_after = o->value(); } static void cb_cntDropsAllowed(Fl_Counter* o, void *) { progStatus.tcpip_drops_allowed = o->value(); } static void cb_btncatptt(Fl_Round_Button* o, void*) { if (o->value()== 1) { btnrtsptt->value(0); btndtrptt->value(0); } btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btnrtsptt(Fl_Round_Button* o, void*) { if (o->value() == 1) btncatptt->value(0); btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btndtrptt(Fl_Round_Button* o, void*) { if (o->value() == 1) btncatptt->value(0); btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_chkrtscts(Fl_Check_Button*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btnrtsplus(Fl_Check_Button*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btndtrplus(Fl_Check_Button*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_txtCIV(Fl_Int_Input* o, void*) { progStatus.CIV = atol(o->value()); cbCIV(); } static void cb_btnCIVdefault(Fl_Button*, void*) { cbCIVdefault(); } static void cb_btnUSBaudio(Fl_Check_Button*, void*) { cbUSBaudio(); } static void cb_btn_key_fldigi(Fl_Check_Button* o, void*) { progStatus.key_fldigi = o->value(); } static void cb_selectSepPTTPort(Fl_ComboBox*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btnSepRTSptt(Fl_Round_Button* o, void*) { if (o->value() == 1) btnSepDTRptt->value(0); btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btnSepRTSplus(Fl_Check_Button*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btnSepDTRptt(Fl_Round_Button* o, void*) { if (o->value() == 1) btnSepRTSptt->value(0); btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_btnSepDTRplus(Fl_Check_Button*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_selectAuxPort(Fl_ComboBox*, void*) { btnOkXcvrDialog->labelcolor(FL_RED); btnOkXcvrDialog->redraw(); } static void cb_poll_smeter(Fl_Value_Input* o, void*) { progStatus.poll_smeter = o->value(); } static void cb_poll_pout(Fl_Value_Input* o, void*) { progStatus.poll_pout = o->value(); } static void cb_poll_swr(Fl_Value_Input* o, void*) { progStatus.poll_swr = o->value(); } static void cb_poll_alc(Fl_Value_Input* o, void*) { progStatus.poll_alc = o->value(); } static void cb_poll_frequency(Fl_Value_Input* o, void*) { progStatus.poll_frequency = o->value(); } static void cb_poll_mode(Fl_Value_Input* o, void*) { progStatus.poll_mode = o->value(); } static void cb_poll_bandwidth(Fl_Value_Input* o, void*) { progStatus.poll_bandwidth = o->value(); } static void cb_poll_volume(Fl_Value_Input* o, void*) { progStatus.poll_volume = o->value(); } static void cb_poll_micgain(Fl_Value_Input* o, void*) { progStatus.poll_micgain = o->value(); } static void cb_poll_rfgain(Fl_Value_Input* o, void*) { progStatus.poll_rfgain = o->value(); } static void cb_poll_power_control(Fl_Value_Input* o, void*) { progStatus.poll_power_control = o->value(); } static void cb_poll_ifshift(Fl_Value_Input* o, void*) { progStatus.poll_ifshift = o->value(); } static void cb_poll_notch(Fl_Value_Input* o, void*) { progStatus.poll_notch = o->value(); } static void cb_poll_auto_notch(Fl_Value_Input* o, void*) { progStatus.poll_auto_notch = o->value(); } static void cb_poll_pre_att(Fl_Value_Input* o, void*) { progStatus.poll_pre_att = o->value(); } static void cb_poll_squelch(Fl_Value_Input* o, void*) { progStatus.poll_squelch = o->value(); } static void cb_poll_split(Fl_Value_Input* o, void*) { progStatus.poll_split = o->value(); } static void cb_poll_noise(Fl_Value_Input* o, void*) { progStatus.poll_noise = o->value(); } static void cb_poll_nr(Fl_Value_Input* o, void*) { progStatus.poll_noise = o->value(); } static void cb_btnClearAddControls(Fl_Button*, void*) { poll_volume->value(0); poll_micgain->value(0); poll_rfgain->value(0); poll_power_control->value(0); poll_ifshift->value(0); poll_notch->value(0); poll_auto_notch->value(0); poll_pre_att->value(0); poll_squelch->value(0); poll_split->value(0); poll_noise->value(0); poll_nr->value(0); progStatus.poll_volume = 0; progStatus.poll_micgain = 0; progStatus.poll_rfgain = 0; progStatus.poll_power_control = 0; progStatus.poll_ifshift = 0; progStatus.poll_notch = 0; progStatus.poll_auto_notch = 0; progStatus.poll_pre_att = 0; progStatus.poll_squelch = 0; progStatus.poll_split = 0; progStatus.poll_noise = 0; progStatus.poll_nr = 0; } static void cb_poll_all(Fl_Value_Input* o, void*) { progStatus.poll_all = o->value(); } static void cb_btnSetAllAdd(Fl_Button*, void*) { poll_volume->value(progStatus.poll_all); poll_micgain->value(progStatus.poll_all); poll_rfgain->value(progStatus.poll_all); poll_power_control->value(progStatus.poll_all); poll_ifshift->value(progStatus.poll_all); poll_notch->value(progStatus.poll_all); poll_auto_notch->value(progStatus.poll_all); poll_pre_att->value(progStatus.poll_all); poll_squelch->value(progStatus.poll_all); poll_split->value(progStatus.poll_all); poll_noise->value(progStatus.poll_all); poll_nr->value(progStatus.poll_all); progStatus.poll_volume = progStatus.poll_all; progStatus.poll_micgain = progStatus.poll_all; progStatus.poll_rfgain = progStatus.poll_all; progStatus.poll_power_control = progStatus.poll_all; progStatus.poll_ifshift = progStatus.poll_all; progStatus.poll_notch = progStatus.poll_all; progStatus.poll_auto_notch = progStatus.poll_all; progStatus.poll_pre_att = progStatus.poll_all; progStatus.poll_squelch = progStatus.poll_all; progStatus.poll_split = progStatus.poll_all; progStatus.poll_noise = progStatus.poll_all; progStatus.poll_nr = progStatus.poll_all; } static void cb_btn_send_command(Fl_Button*, void*) { cb_send_command(); } static void cb_btnCancelCommConfig(Fl_Button*, void*) { cbCancelXcvrDialog(); } static void cb_btnOkXcvrDialog(Fl_Return_Button*, void*) { cbOkXcvrDialog(); } Fl_Double_Window* XcvrDialog() { Fl_Double_Window* w = new Fl_Double_Window(480, 255, _("I/O Ports")); tabsConfig = new Fl_Tabs(0, 8, 482, 246); tabPrimary = new Fl_Group(2, 30, 475, 222, _("Primary")); Fl_Group* xcr_grp1 = new Fl_Group(5, 34, 465, 140); xcr_grp1->box(FL_ENGRAVED_FRAME); selectRig = new Fl_ComboBox(80, 40, 190, 22, _("Rig:")); selectRig->tooltip(_("Select Transceiver")); selectRig->box(FL_DOWN_BOX); selectRig->color(FL_BACKGROUND2_COLOR); selectRig->selection_color(FL_BACKGROUND_COLOR); selectRig->labeltype(FL_NORMAL_LABEL); selectRig->labelfont(0); selectRig->labelsize(14); selectRig->labelcolor(FL_FOREGROUND_COLOR); selectRig->callback((Fl_Callback*)cb_selectRig); selectRig->align(Fl_Align(FL_ALIGN_LEFT)); selectRig->when(FL_WHEN_RELEASE); selectRig->end(); selectCommPort = new Fl_ComboBox(80, 65, 190, 22, _("Ser. Port")); selectCommPort->tooltip(_("Xcvr serial port")); selectCommPort->box(FL_DOWN_BOX); selectCommPort->color(FL_BACKGROUND2_COLOR); selectCommPort->selection_color(FL_BACKGROUND_COLOR); selectCommPort->labeltype(FL_NORMAL_LABEL); selectCommPort->labelfont(0); selectCommPort->labelsize(14); selectCommPort->labelcolor(FL_FOREGROUND_COLOR); selectCommPort->callback((Fl_Callback*)cb_selectCommPort); selectCommPort->align(Fl_Align(FL_ALIGN_LEFT)); selectCommPort->when(FL_WHEN_RELEASE); selectCommPort->end(); mnuBaudrate = new Fl_ComboBox(80, 90, 190, 22, _("Baud:")); mnuBaudrate->tooltip(_("Xcvr baudrate")); mnuBaudrate->box(FL_DOWN_BOX); mnuBaudrate->color(FL_BACKGROUND2_COLOR); mnuBaudrate->selection_color(FL_BACKGROUND_COLOR); mnuBaudrate->labeltype(FL_NORMAL_LABEL); mnuBaudrate->labelfont(0); mnuBaudrate->labelsize(14); mnuBaudrate->labelcolor(FL_FOREGROUND_COLOR); mnuBaudrate->callback((Fl_Callback*)cb_mnuBaudrate); mnuBaudrate->align(Fl_Align(FL_ALIGN_LEFT)); mnuBaudrate->when(FL_WHEN_RELEASE); mnuBaudrate->end(); btnOneStopBit = new Fl_Check_Button(80, 120, 22, 15, _("1")); btnOneStopBit->tooltip(_("One Stop Bit")); btnOneStopBit->down_box(FL_DOWN_BOX); btnOneStopBit->callback((Fl_Callback*)cb_btnOneStopBit); btnOneStopBit->align(Fl_Align(FL_ALIGN_RIGHT)); btnOneStopBit->value(progStatus.stopbits == 1); btnTwoStopBit = new Fl_Check_Button(120, 120, 22, 15, _("2 -StopBits")); btnTwoStopBit->down_box(FL_DOWN_BOX); btnTwoStopBit->callback((Fl_Callback*)cb_btnTwoStopBit); btnTwoStopBit->align(Fl_Align(FL_ALIGN_RIGHT)); btnTwoStopBit->value(progStatus.stopbits == 2); btnRigCatEcho = new Fl_Check_Button(80, 145, 22, 15, _("Echo ")); btnRigCatEcho->down_box(FL_DOWN_BOX); btnRigCatEcho->callback((Fl_Callback*)cb_btnRigCatEcho); btnRigCatEcho->align(Fl_Align(FL_ALIGN_RIGHT)); btnRigCatEcho->value(progStatus.comm_echo); cntRigCatRetries = new Fl_Counter(350, 40, 100, 20, _("Retries")); cntRigCatRetries->tooltip(_("Number of times to resend\ncommand before giving up")); cntRigCatRetries->minimum(1); cntRigCatRetries->maximum(10); cntRigCatRetries->step(1); cntRigCatRetries->value(5); cntRigCatRetries->callback((Fl_Callback*)cb_cntRigCatRetries); cntRigCatRetries->align(Fl_Align(FL_ALIGN_LEFT)); cntRigCatRetries->value(progStatus.comm_retries); cntRigCatRetries->lstep(10); cntRigCatTimeout = new Fl_Counter(350, 65, 100, 20, _("Retry intvl")); cntRigCatTimeout->tooltip(_("Time between retries is msec")); cntRigCatTimeout->minimum(2); cntRigCatTimeout->maximum(200); cntRigCatTimeout->step(1); cntRigCatTimeout->value(10); cntRigCatTimeout->callback((Fl_Callback*)cb_cntRigCatTimeout); cntRigCatTimeout->align(Fl_Align(FL_ALIGN_LEFT)); cntRigCatTimeout->value(progStatus.comm_timeout); cntRigCatTimeout->lstep(10); cntRigCatWait = new Fl_Counter(350, 90, 100, 20, _("Cmds")); cntRigCatWait->tooltip(_("Wait millseconds between sequential commands")); cntRigCatWait->minimum(0); cntRigCatWait->maximum(100); cntRigCatWait->step(1); cntRigCatWait->value(5); cntRigCatWait->callback((Fl_Callback*)cb_cntRigCatWait); cntRigCatWait->align(Fl_Align(FL_ALIGN_LEFT)); cntRigCatWait->value(progStatus.comm_wait); cntRigCatWait->lstep(10); query_interval = new Fl_Counter(350, 115, 100, 22, _("Poll intvl")); query_interval->tooltip(_("Polling interval in msec")); query_interval->minimum(10); query_interval->maximum(5000); query_interval->step(1); query_interval->value(50); query_interval->callback((Fl_Callback*)cb_query_interval); query_interval->align(Fl_Align(FL_ALIGN_LEFT)); query_interval->value(progStatus.serloop_timing); query_interval->lstep(10); byte_interval = new Fl_Counter(350, 140, 100, 22, _("Byte intvl")); byte_interval->tooltip(_("Inter-byte interval (msec)")); byte_interval->minimum(0); byte_interval->maximum(200); byte_interval->step(1); byte_interval->value(0); byte_interval->callback((Fl_Callback*)cb_byte_interval); byte_interval->align(Fl_Align(FL_ALIGN_LEFT)); byte_interval->value(progStatus.byte_interval); byte_interval->lstep(10); xcr_grp1->end(); Fl_Group* xcr_grp4 = new Fl_Group(4, 175, 243, 73); xcr_grp4->box(FL_ENGRAVED_FRAME); btncatptt = new Fl_Round_Button(15, 180, 149, 22, _("PTT via CAT")); btncatptt->tooltip(_("PTT is a CAT command (not hardware)")); btncatptt->down_box(FL_ROUND_DOWN_BOX); btncatptt->callback((Fl_Callback*)cb_btncatptt); btncatptt->value(progStatus.comm_catptt); btnrtsptt = new Fl_Round_Button(15, 203, 149, 22, _("PTT via RTS")); btnrtsptt->tooltip(_("RTS is ptt line")); btnrtsptt->down_box(FL_ROUND_DOWN_BOX); btnrtsptt->callback((Fl_Callback*)cb_btnrtsptt); btnrtsptt->value(progStatus.comm_rtsptt); btndtrptt = new Fl_Round_Button(15, 226, 149, 22, _("PTT via DTR")); btndtrptt->tooltip(_("DTR is ptt line")); btndtrptt->down_box(FL_ROUND_DOWN_BOX); btndtrptt->callback((Fl_Callback*)cb_btndtrptt); btndtrptt->value(progStatus.comm_dtrptt); chkrtscts = new Fl_Check_Button(129, 178, 98, 21, _("RTS/CTS")); chkrtscts->tooltip(_("Xcvr uses RTS/CTS handshake")); chkrtscts->down_box(FL_DOWN_BOX); chkrtscts->callback((Fl_Callback*)cb_chkrtscts); chkrtscts->value(progStatus.comm_rtscts); btnrtsplus = new Fl_Check_Button(129, 201, 102, 21, _("RTS +12 v")); btnrtsplus->tooltip(_("Initial state of RTS")); btnrtsplus->down_box(FL_DOWN_BOX); btnrtsplus->callback((Fl_Callback*)cb_btnrtsplus); btnrtsplus->value(progStatus.comm_rtsplus); btndtrplus = new Fl_Check_Button(129, 224, 100, 21, _("DTR +12 v")); btndtrplus->tooltip(_("Initial state of DTR")); btndtrplus->down_box(FL_DOWN_BOX); btndtrplus->callback((Fl_Callback*)cb_btndtrplus); btndtrplus->value(progStatus.comm_dtrplus); xcr_grp4->end(); Fl_Group* xcr_grp5 = new Fl_Group(247, 175, 225, 36); xcr_grp5->box(FL_ENGRAVED_FRAME); xcr_grp5->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE)); txtCIV = new Fl_Int_Input(261, 183, 58, 22, _("CI-V adr")); txtCIV->tooltip(_("Enter hex value, ie: 0x5F")); txtCIV->type(2); txtCIV->callback((Fl_Callback*)cb_txtCIV); txtCIV->align(Fl_Align(FL_ALIGN_RIGHT)); btnCIVdefault = new Fl_Button(387, 183, 69, 22, _("Default")); btnCIVdefault->callback((Fl_Callback*)cb_btnCIVdefault); xcr_grp5->end(); Fl_Group* xcr_grp6 = new Fl_Group(247, 212, 225, 36); xcr_grp6->box(FL_ENGRAVED_FRAME); btnUSBaudio = new Fl_Check_Button(261, 222, 104, 15, _("USB audio")); btnUSBaudio->down_box(FL_DOWN_BOX); btnUSBaudio->callback((Fl_Callback*)cb_btnUSBaudio); btn_key_fldigi = new Fl_Check_Button(375, 222, 85, 15, _("key fldigi")); btn_key_fldigi->tooltip(_("PTT keys fldigi modem")); btn_key_fldigi->down_box(FL_DOWN_BOX); btn_key_fldigi->callback((Fl_Callback*)cb_btn_key_fldigi); btn_key_fldigi->value(progStatus.key_fldigi); xcr_grp6->end(); tabPrimary->end(); tabXMLRPC = new Fl_Group(2, 30, 475, 222, _("XML")); tabXMLRPC->hide(); Fl_Group* grp_fldigi_server = new Fl_Group(80, 40, 300, 80); grp_fldigi_server->box(FL_ENGRAVED_FRAME); btn_xmlrpc_server = new Fl_Check_Button(200, 44, 80, 20, _("Use fldigi server")); btn_xmlrpc_server->tooltip(_("Change requires restart!\nAre you sure?")); btn_xmlrpc_server->value(progStatus.fldigi_is_server); btn_xmlrpc_server->callback((Fl_Callback*)cb_xmlrpc_server); server_addr = new Fl_Input(200, 68, 140, 22, _("Fldigi address:")); server_addr->tooltip(_("xmlrpc server address (7362)\nchange requires restart!\nAre you sure?")); server_addr->callback((Fl_Callback*)cb_server_addr); server_addr->value(progStatus.server_addr.c_str()); server_port = new Fl_Int_Input(200, 92, 100, 22, _("Fldigi port:")); server_port->tooltip(_("xmlrpc server address (7362)\nchange requires restart!\nAre you sure?")); server_port->type(2); server_port->callback((Fl_Callback*)cb_server_port); server_port->value(progStatus.server_port.c_str()); grp_fldigi_server->end(); Fl_Box *bx_xml_info = new Fl_Box(20, 140, 450, 100, _("\ Changes to any of these values requires an flrig restart\n\n\ before they are effective.\ ")); bx_xml_info->box(FL_ENGRAVED_FRAME); tabXMLRPC->end(); tabTCPIP = new Fl_Group(2, 30, 475, 222, _("TCPIP")); tabTCPIP->hide(); inp_tcpip_addr = new Fl_Input2(120, 50, 300, 22, _("TCPIP address:")); inp_tcpip_addr->tooltip(_("remote tcpip server address")); inp_tcpip_addr->callback((Fl_Callback*)cb_tcpip_addr); inp_tcpip_addr->value(progStatus.tcpip_addr.c_str()); inp_tcpip_port = new Fl_Input2(120, 74, 100, 22, _("TCPIP port:")); inp_tcpip_port->tooltip(_("remote tcpip server port")); inp_tcpip_port->type(2); inp_tcpip_port->callback((Fl_Callback*)cb_tcpip_port); inp_tcpip_port->value(progStatus.tcpip_port.c_str()); inp_tcpip_ping_delay = new Fl_Counter(120, 100, 100, 22, _("Ping delay")); inp_tcpip_ping_delay->tooltip(_("enter round trip ping delay")); inp_tcpip_ping_delay->callback((Fl_Callback*)cb_tcpip_ping_delay); inp_tcpip_ping_delay->minimum(0); inp_tcpip_ping_delay->maximum(500); inp_tcpip_ping_delay->step(5); inp_tcpip_ping_delay->lstep(20); inp_tcpip_ping_delay->value(progStatus.tcpip_ping_delay); inp_tcpip_ping_delay->align(Fl_Align(FL_ALIGN_LEFT)); chk_use_tcpip = new Fl_Check_Button(120, 128, 18, 18, _("Use tcpip")); chk_use_tcpip->tooltip(_("Rig control via tcpip")); chk_use_tcpip->down_box(FL_DOWN_BOX); chk_use_tcpip->callback((Fl_Callback*)cb_use_tcpip); chk_use_tcpip->value(progStatus.use_tcpip); chk_use_tcpip->align(Fl_Align(FL_ALIGN_LEFT)); box_tcpip_connect = new Fl_Box(120, 150, 18, 18, _("Connected")); box_tcpip_connect->tooltip(_("Lit when connected to remote tcpip")); box_tcpip_connect->box(FL_DIAMOND_DOWN_BOX); box_tcpip_connect->color(FL_LIGHT1); box_tcpip_connect->align(Fl_Align(FL_ALIGN_RIGHT)); cntRetryAfter = new Fl_Counter(120, 172, 100, 20, _("Retry (secs)")); cntRetryAfter->tooltip(_("Retry connection if lost")); cntRetryAfter->minimum(1); cntRetryAfter->maximum(120); cntRetryAfter->step(1); cntRetryAfter->lstep(10); cntRetryAfter->callback((Fl_Callback*)cb_cntRetryAfter); cntRetryAfter->align(Fl_Align(FL_ALIGN_LEFT)); cntRetryAfter->value(progStatus.tcpip_reconnect_after); cntDropsAllowed = new Fl_Counter(120, 196, 100, 20, _("Allowed drops")); cntDropsAllowed->tooltip(_("# tcpip drop-outs before connection declared down")); cntDropsAllowed->minimum(1); cntDropsAllowed->maximum(25); cntDropsAllowed->step(1); cntDropsAllowed->lstep(5); cntDropsAllowed->callback((Fl_Callback*)cb_cntDropsAllowed); cntDropsAllowed->align(Fl_Align(FL_ALIGN_LEFT)); cntDropsAllowed->value(progStatus.tcpip_drops_allowed); tabTCPIP->end(); tabPTT = new Fl_Group(2, 30, 475, 222, _("PTT")); tabPTT->hide(); Fl_Box *bxptt = new Fl_Box(53, 73, 399, 37, _("Use only if your setup requires a separate\nSerial Port for a PTT control line")); bxptt->box(FL_FLAT_BOX); selectSepPTTPort = new Fl_ComboBox(128, 121, 192, 22, _("PTT Port")); selectSepPTTPort->tooltip(_("Aux control port")); selectSepPTTPort->box(FL_DOWN_BOX); selectSepPTTPort->color(FL_BACKGROUND2_COLOR); selectSepPTTPort->selection_color(FL_BACKGROUND_COLOR); selectSepPTTPort->labeltype(FL_NORMAL_LABEL); selectSepPTTPort->labelfont(0); selectSepPTTPort->labelsize(14); selectSepPTTPort->labelcolor(FL_FOREGROUND_COLOR); selectSepPTTPort->callback((Fl_Callback*)cb_selectSepPTTPort); selectSepPTTPort->align(Fl_Align(FL_ALIGN_LEFT)); selectSepPTTPort->when(FL_WHEN_RELEASE); selectSepPTTPort->end(); btnSepRTSptt = new Fl_Round_Button(111, 159, 129, 23, _("PTT via RTS")); btnSepRTSptt->tooltip(_("RTS is ptt line")); btnSepRTSptt->down_box(FL_ROUND_DOWN_BOX); btnSepRTSptt->callback((Fl_Callback*)cb_btnSepRTSptt); btnSepRTSptt->value(progStatus.sep_rtsptt); btnSepRTSplus = new Fl_Check_Button(274, 159, 128, 23, _("RTS +12 v")); btnSepRTSplus->tooltip(_("Initial state of RTS")); btnSepRTSplus->down_box(FL_DOWN_BOX); btnSepRTSplus->callback((Fl_Callback*)cb_btnSepRTSplus); btnSepRTSplus->value(progStatus.sep_rtsplus); btnSepDTRptt = new Fl_Round_Button(111, 186, 129, 22, _("PTT via DTR")); btnSepDTRptt->tooltip(_("DTR is ptt line")); btnSepDTRptt->down_box(FL_ROUND_DOWN_BOX); btnSepDTRptt->callback((Fl_Callback*)cb_btnSepDTRptt); btnSepDTRptt->value(progStatus.sep_dtrptt); btnSepDTRplus = new Fl_Check_Button(274, 186, 128, 22, _("DTR +12 v")); btnSepDTRplus->tooltip(_("Initial state of DTR")); btnSepDTRplus->down_box(FL_DOWN_BOX); btnSepDTRplus->callback((Fl_Callback*)cb_btnSepDTRplus); btnSepDTRplus->value(progStatus.sep_dtrplus); tabPTT->end(); tabAux = new Fl_Group(2, 30, 475, 222, _("Aux")); tabAux->hide(); selectAuxPort = new Fl_ComboBox(131, 132, 192, 22, _("Aux")); selectAuxPort->tooltip(_("Aux control port")); selectAuxPort->box(FL_DOWN_BOX); selectAuxPort->color(FL_BACKGROUND2_COLOR); selectAuxPort->selection_color(FL_BACKGROUND_COLOR); selectAuxPort->labeltype(FL_NORMAL_LABEL); selectAuxPort->labelfont(0); selectAuxPort->labelsize(14); selectAuxPort->labelcolor(FL_FOREGROUND_COLOR); selectAuxPort->callback((Fl_Callback*)cb_selectAuxPort); selectAuxPort->align(Fl_Align(FL_ALIGN_LEFT)); selectAuxPort->when(FL_WHEN_RELEASE); selectAuxPort->end(); Fl_Box *bxsep = new Fl_Box(56, 84, 399, 38, _("Use only if your setup requires a separate\nSerial Port for a special Control Signals")); bxsep->box(FL_FLAT_BOX); tabAux->end(); tabPolling = new Fl_Group(2, 30, 476, 222, _("Poll")); tabPolling->hide(); Fl_Group* xcr_grp7 = new Fl_Group(4, 34, 474, 48, _("Meters")); xcr_grp7->box(FL_ENGRAVED_BOX); xcr_grp7->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE)); poll_smeter = new Fl_Value_Input(13, 55, 30, 20, _("S-meter")); poll_smeter->tooltip(_("Poll every Nth interval")); poll_smeter->maximum(10); poll_smeter->step(1); poll_smeter->value(1); poll_smeter->callback((Fl_Callback*)cb_poll_smeter); poll_smeter->align(Fl_Align(FL_ALIGN_RIGHT)); poll_smeter->value(progStatus.poll_smeter); poll_pout = new Fl_Value_Input(132, 55, 30, 20, _("Power out")); poll_pout->tooltip(_("Poll every Nth interval")); poll_pout->maximum(10); poll_pout->step(1); poll_pout->value(1); poll_pout->callback((Fl_Callback*)cb_poll_pout); poll_pout->align(Fl_Align(FL_ALIGN_RIGHT)); poll_pout->value(progStatus.poll_pout); poll_swr = new Fl_Value_Input(252, 55, 30, 20, _("SWR")); poll_swr->tooltip(_("Poll every Nth interval")); poll_swr->maximum(10); poll_swr->step(1); poll_swr->value(1); poll_swr->callback((Fl_Callback*)cb_poll_swr); poll_swr->align(Fl_Align(FL_ALIGN_RIGHT)); poll_swr->value(progStatus.poll_swr); poll_alc = new Fl_Value_Input(372, 55, 30, 20, _("ALC")); poll_alc->tooltip(_("Poll every Nth interval")); poll_alc->maximum(10); poll_alc->step(1); poll_alc->value(1); poll_alc->callback((Fl_Callback*)cb_poll_alc); poll_alc->align(Fl_Align(FL_ALIGN_RIGHT)); poll_alc->value(progStatus.poll_alc); xcr_grp7->end(); Fl_Group* xcr_grp8 = new Fl_Group(4, 82, 474, 48, _("Operating Controls")); xcr_grp8->box(FL_ENGRAVED_BOX); xcr_grp8->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE)); poll_frequency = new Fl_Value_Input(13, 103, 30, 20, _("Frequency")); poll_frequency->tooltip(_("Poll every Nth interval")); poll_frequency->maximum(10); poll_frequency->step(1); poll_frequency->value(1); poll_frequency->callback((Fl_Callback*)cb_poll_frequency); poll_frequency->align(Fl_Align(FL_ALIGN_RIGHT)); poll_frequency->value(progStatus.poll_frequency); poll_mode = new Fl_Value_Input(132, 103, 30, 20, _("Mode")); poll_mode->tooltip(_("Poll every Nth interval")); poll_mode->maximum(10); poll_mode->step(1); poll_mode->value(1); poll_mode->callback((Fl_Callback*)cb_poll_mode); poll_mode->align(Fl_Align(FL_ALIGN_RIGHT)); poll_mode->value(progStatus.poll_mode); poll_bandwidth = new Fl_Value_Input(252, 103, 30, 20, _("Bandwidth")); poll_bandwidth->tooltip(_("Poll every Nth interval")); poll_bandwidth->maximum(10); poll_bandwidth->step(1); poll_bandwidth->value(1); poll_bandwidth->callback((Fl_Callback*)cb_poll_bandwidth); poll_bandwidth->align(Fl_Align(FL_ALIGN_RIGHT)); poll_bandwidth->value(progStatus.poll_bandwidth); xcr_grp8->end(); Fl_Group* xcr_grp9 = new Fl_Group(4, 130, 474, 122, _("Additional Controls")); xcr_grp9->box(FL_ENGRAVED_FRAME); xcr_grp9->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE)); poll_volume = new Fl_Value_Input(12, 150, 30, 20, _("Volume")); poll_volume->tooltip(_("Poll every Nth interval")); poll_volume->maximum(10); poll_volume->step(1); poll_volume->callback((Fl_Callback*)cb_poll_volume); poll_volume->align(Fl_Align(FL_ALIGN_RIGHT)); poll_volume->value(progStatus.poll_volume); poll_micgain = new Fl_Value_Input(131, 150, 30, 20, _("Mic gain")); poll_micgain->tooltip(_("Poll every Nth interval")); poll_micgain->maximum(10); poll_micgain->step(1); poll_micgain->callback((Fl_Callback*)cb_poll_micgain); poll_micgain->align(Fl_Align(FL_ALIGN_RIGHT)); poll_micgain->value(progStatus.poll_micgain); poll_rfgain = new Fl_Value_Input(251, 150, 30, 20, _("RF gain")); poll_rfgain->tooltip(_("Poll every Nth interval")); poll_rfgain->maximum(10); poll_rfgain->step(1); poll_rfgain->callback((Fl_Callback*)cb_poll_rfgain); poll_rfgain->align(Fl_Align(FL_ALIGN_RIGHT)); poll_rfgain->value(progStatus.poll_rfgain); poll_power_control = new Fl_Value_Input(371, 150, 30, 20, _("Power")); poll_power_control->tooltip(_("Poll every Nth interval")); poll_power_control->maximum(10); poll_power_control->step(1); poll_power_control->callback((Fl_Callback*)cb_poll_power_control); poll_power_control->align(Fl_Align(FL_ALIGN_RIGHT)); poll_power_control->value(progStatus.poll_power_control); poll_ifshift = new Fl_Value_Input(12, 175, 30, 20, _("IF shift")); poll_ifshift->tooltip(_("Poll every Nth interval")); poll_ifshift->maximum(10); poll_ifshift->step(1); poll_ifshift->callback((Fl_Callback*)cb_poll_ifshift); poll_ifshift->align(Fl_Align(FL_ALIGN_RIGHT)); poll_ifshift->value(progStatus.poll_ifshift); poll_notch = new Fl_Value_Input(131, 175, 30, 20, _("Man\' Notch")); poll_notch->tooltip(_("Poll every Nth interval")); poll_notch->maximum(10); poll_notch->step(1); poll_notch->callback((Fl_Callback*)cb_poll_notch); poll_notch->align(Fl_Align(FL_ALIGN_RIGHT)); poll_notch->value(progStatus.poll_notch); poll_auto_notch = new Fl_Value_Input(251, 175, 30, 20, _("Auto notch")); poll_auto_notch->tooltip(_("Poll every Nth interval")); poll_auto_notch->maximum(10); poll_auto_notch->step(1); poll_auto_notch->callback((Fl_Callback*)cb_poll_auto_notch); poll_auto_notch->align(Fl_Align(FL_ALIGN_RIGHT)); poll_auto_notch->value(progStatus.poll_auto_notch); poll_pre_att = new Fl_Value_Input(12, 200, 30, 20, _("Pre/Att")); poll_pre_att->tooltip(_("Poll every Nth interval")); poll_pre_att->maximum(10); poll_pre_att->step(1); poll_pre_att->callback((Fl_Callback*)cb_poll_pre_att); poll_pre_att->align(Fl_Align(FL_ALIGN_RIGHT)); poll_pre_att->value(progStatus.poll_pre_att); poll_squelch = new Fl_Value_Input(131, 200, 30, 20, _("Squelch")); poll_squelch->tooltip(_("Poll every Nth interval")); poll_squelch->maximum(10); poll_squelch->step(1); poll_squelch->callback((Fl_Callback*)cb_poll_squelch); poll_squelch->align(Fl_Align(FL_ALIGN_RIGHT)); poll_squelch->value(progStatus.poll_squelch); poll_split = new Fl_Value_Input(251, 200, 30, 20, _("Split")); poll_split->tooltip(_("Poll every Nth interval")); poll_split->maximum(10); poll_split->step(1); poll_split->callback((Fl_Callback*)cb_poll_split); poll_split->align(Fl_Align(FL_ALIGN_RIGHT)); poll_split->value(progStatus.poll_split); poll_noise = new Fl_Value_Input(13, 225, 30, 20, _("Noise")); poll_noise->tooltip(_("Poll every Nth interval")); poll_noise->maximum(10); poll_noise->step(1); poll_noise->callback((Fl_Callback*)cb_poll_noise); poll_noise->align(Fl_Align(FL_ALIGN_RIGHT)); poll_noise->value(progStatus.poll_noise); poll_nr = new Fl_Value_Input(132, 225, 30, 20, _("Noise red\'")); poll_nr->tooltip(_("Poll every Nth interval")); poll_nr->maximum(10); poll_nr->step(1); poll_nr->callback((Fl_Callback*)cb_poll_nr); poll_nr->align(Fl_Align(FL_ALIGN_RIGHT)); poll_nr->value(progStatus.poll_noise); btnClearAddControls = new Fl_Button(330, 200, 70, 20, _("Clear all")); btnClearAddControls->callback((Fl_Callback*)cb_btnClearAddControls); poll_all = new Fl_Value_Input(408, 225, 30, 20); poll_all->tooltip(_("Poll every Nth interval")); poll_all->maximum(10); poll_all->step(1); poll_all->value(4); poll_all->callback((Fl_Callback*)cb_poll_all); poll_all->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); poll_all->value(progStatus.poll_all); btnSetAllAdd = new Fl_Button(331, 225, 70, 20, _("Set all to")); btnSetAllAdd->callback((Fl_Callback*)cb_btnSetAllAdd); xcr_grp9->end(); tabPolling->end(); tabSndCmd = new Fl_Group(2, 30, 475, 222, _("Cmds")); tabSndCmd->hide(); txt_command = new Fl_Input2(29, 53, 434, 23, _("Enter text as ASCII string\nOr sequence of hex values, x80 etc separated by spaces")); txt_command->box(FL_DOWN_BOX); txt_command->color(FL_BACKGROUND2_COLOR); txt_command->selection_color(FL_SELECTION_COLOR); txt_command->labeltype(FL_NORMAL_LABEL); txt_command->labelfont(0); txt_command->labelsize(14); txt_command->labelcolor(FL_FOREGROUND_COLOR); txt_command->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT)); txt_command->when(FL_WHEN_RELEASE); btn_send_command = new Fl_Button(392, 156, 71, 19, _("SEND")); btn_send_command->callback((Fl_Callback*)cb_btn_send_command); txt_response = new Fl_Output(29, 115, 434, 23, _("Response to the SEND button")); txt_response->align(Fl_Align(FL_ALIGN_BOTTOM_LEFT)); box_xcvr_connect = new Fl_Box(29, 180, 18, 18, _("Connected to transceiver")); box_xcvr_connect->tooltip(_("Lit when connected")); box_xcvr_connect->box(FL_DIAMOND_DOWN_BOX); box_xcvr_connect->color(FL_LIGHT1); box_xcvr_connect->align(Fl_Align(FL_ALIGN_RIGHT)); box_fldigi_connect = new Fl_Box(29, 204, 18, 18, _("Connected to fldigi")); box_fldigi_connect->tooltip(_("Lit when connected")); box_fldigi_connect->box(FL_DIAMOND_DOWN_BOX); box_fldigi_connect->color(FL_LIGHT1); box_fldigi_connect->align(Fl_Align(FL_ALIGN_RIGHT)); tabSndCmd->end(); tabsConfig->end(); btnCancelCommConfig = new Fl_Button(358, 2, 50, 25, _("Close")); btnCancelCommConfig->callback((Fl_Callback*)cb_btnCancelCommConfig); btnOkXcvrDialog = new Fl_Return_Button(420, 2, 55, 25, _("Init")); btnOkXcvrDialog->callback((Fl_Callback*)cb_btnOkXcvrDialog); w->end(); return w; } flrig-1.3.24/src/UI/power_meter_setup.cxx0000644000175000017500000000737612562731646015256 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- Fl_Button *sel_25=(Fl_Button *)0; Fl_Button *sel_100=(Fl_Button *)0; Fl_Button *sel_auto=(Fl_Button *)0; Fl_Button *sel_50=(Fl_Button *)0; Fl_Button *sel_200=(Fl_Button *)0; Fl_Output *pwr_scale_description=(Fl_Output *)0; static void cb_sel_25(Fl_Button*, void*) { progStatus.pwr_scale = 0; pwr_scale_description->value(mtr_scales[progStatus.pwr_scale]); set_power_controlImage(0); } static void cb_sel_100(Fl_Button*, void*) { progStatus.pwr_scale = 2; pwr_scale_description->value(mtr_scales[progStatus.pwr_scale]); set_power_controlImage(0); } static void cb_sel_auto(Fl_Button*, void*) { progStatus.pwr_scale = 4; pwr_scale_description->value(mtr_scales[progStatus.pwr_scale]); if (selrig->has_power_control) set_power_controlImage(sldrPOWER->value()); else set_power_controlImage(sldrFwdPwr->peak()); } static void cb_sel_50(Fl_Button*, void*) { progStatus.pwr_scale = 1; pwr_scale_description->value(mtr_scales[progStatus.pwr_scale]); set_power_controlImage(0); } static void cb_sel_200(Fl_Button*, void*) { progStatus.pwr_scale = 3; pwr_scale_description->value(mtr_scales[progStatus.pwr_scale]); set_power_controlImage(0); } Fl_Double_Window* power_meter_scale_select() { Fl_Double_Window* w = new Fl_Double_Window(455, 145, _("Select Power Meter Scale")); sel_25 = new Fl_Button(8, 7, 218, 40, _("25 watt")); sel_25->tooltip(_("Press to select")); sel_25->color((Fl_Color)215); sel_25->image(image_P25); sel_25->labelsize(12); sel_25->callback((Fl_Callback*)cb_sel_25); sel_25->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sel_100 = new Fl_Button(8, 53, 218, 40, _("100 watt")); sel_100->tooltip(_("Press to select")); sel_100->color((Fl_Color)215); sel_100->image(image_P100); sel_100->labelsize(12); sel_100->callback((Fl_Callback*)cb_sel_100); sel_100->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sel_auto = new Fl_Button(8, 100, 218, 40, _("Auto scaled")); sel_auto->tooltip(_("Press to select")); sel_auto->color((Fl_Color)215); sel_auto->labelsize(12); sel_auto->callback((Fl_Callback*)cb_sel_auto); sel_auto->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sel_50 = new Fl_Button(234, 7, 218, 40, _("50 watt")); sel_50->tooltip(_("Press to select")); sel_50->color((Fl_Color)215); sel_50->image(image_P50); sel_50->labelsize(12); sel_50->callback((Fl_Callback*)cb_sel_50); sel_50->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sel_200 = new Fl_Button(234, 53, 218, 40, _("200 watt")); sel_200->tooltip(_("Press to select")); sel_200->color((Fl_Color)215); sel_200->image(image_P200); sel_200->labelsize(12); sel_200->callback((Fl_Callback*)cb_sel_200); sel_200->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); pwr_scale_description = new Fl_Output(234, 115, 218, 25, _("Meter face selected:")); pwr_scale_description->align(Fl_Align(FL_ALIGN_TOP_LEFT)); pwr_scale_description->value(mtr_scales[progStatus.pwr_scale]); w->end(); return w; } flrig-1.3.24/src/UI/meters_setup.cxx0000644000175000017500000001211712562731646014212 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- Fl_Wheel_Value_Slider *sldr_smeter_avg=(Fl_Wheel_Value_Slider *)0; Fl_Wheel_Value_Slider *sldr_smeter_peak=(Fl_Wheel_Value_Slider *)0; Fl_Wheel_Value_Slider *sldr_pout_avg=(Fl_Wheel_Value_Slider *)0; Fl_Wheel_Value_Slider *sldr_pout_peak=(Fl_Wheel_Value_Slider *)0; static void cb_sldr_smeter_avg(Fl_Wheel_Value_Slider* o, void*) { progStatus.rx_avg=o->value(); sldrRcvSignal->avg(o->value()); } static void cb_sldr_smeter_peak(Fl_Wheel_Value_Slider* o, void*) { progStatus.rx_peak=o->value(); sldrRcvSignal->aging(o->value()); } static void cb_sldr_pout_avg(Fl_Wheel_Value_Slider* o, void*) { progStatus.pwr_avg=o->value(); sldrFwdPwr->avg(o->value()); } static void cb_sldr_pout_peak(Fl_Wheel_Value_Slider* o, void*) { progStatus.pwr_peak=o->value(); sldrFwdPwr->aging(o->value()); } Fl_Double_Window* MetersDialog() { Fl_Double_Window* w = new Fl_Double_Window(410, 192, _("Meter Filters")); sldr_smeter_avg = new Fl_Wheel_Value_Slider(17, 31, 375, 18, _("S meter averaging")); sldr_smeter_avg->tooltip(_("Meter averaged over # samples")); sldr_smeter_avg->type(5); sldr_smeter_avg->box(FL_THIN_DOWN_BOX); sldr_smeter_avg->color(FL_LIGHT3); sldr_smeter_avg->selection_color((Fl_Color)4); sldr_smeter_avg->labeltype(FL_NORMAL_LABEL); sldr_smeter_avg->labelfont(0); sldr_smeter_avg->labelsize(14); sldr_smeter_avg->labelcolor(FL_FOREGROUND_COLOR); sldr_smeter_avg->minimum(1); sldr_smeter_avg->maximum(10); sldr_smeter_avg->step(1); sldr_smeter_avg->value(5); sldr_smeter_avg->textsize(12); sldr_smeter_avg->callback((Fl_Callback*)cb_sldr_smeter_avg); sldr_smeter_avg->align(Fl_Align(FL_ALIGN_TOP_LEFT)); sldr_smeter_avg->when(FL_WHEN_CHANGED); sldr_smeter_avg->reverse(true); sldr_smeter_avg->value(progStatus.rx_avg); sldr_smeter_peak = new Fl_Wheel_Value_Slider(17, 70, 375, 18, _("S meter peak ")); sldr_smeter_peak->tooltip(_("Max peak reading over last # averaged samples")); sldr_smeter_peak->type(5); sldr_smeter_peak->box(FL_THIN_DOWN_BOX); sldr_smeter_peak->color(FL_LIGHT3); sldr_smeter_peak->selection_color((Fl_Color)4); sldr_smeter_peak->labeltype(FL_NORMAL_LABEL); sldr_smeter_peak->labelfont(0); sldr_smeter_peak->labelsize(14); sldr_smeter_peak->labelcolor(FL_FOREGROUND_COLOR); sldr_smeter_peak->minimum(1); sldr_smeter_peak->maximum(10); sldr_smeter_peak->step(1); sldr_smeter_peak->value(5); sldr_smeter_peak->textsize(12); sldr_smeter_peak->callback((Fl_Callback*)cb_sldr_smeter_peak); sldr_smeter_peak->align(Fl_Align(FL_ALIGN_TOP_LEFT)); sldr_smeter_peak->when(FL_WHEN_CHANGED); sldr_smeter_peak->reverse(true); sldr_smeter_peak->value(progStatus.rx_peak); sldr_pout_avg = new Fl_Wheel_Value_Slider(17, 109, 375, 18, _("Pwr out averaging")); sldr_pout_avg->tooltip(_("Meter averaged over # samples")); sldr_pout_avg->type(5); sldr_pout_avg->box(FL_THIN_DOWN_BOX); sldr_pout_avg->color(FL_LIGHT3); sldr_pout_avg->selection_color((Fl_Color)4); sldr_pout_avg->labeltype(FL_NORMAL_LABEL); sldr_pout_avg->labelfont(0); sldr_pout_avg->labelsize(14); sldr_pout_avg->labelcolor(FL_FOREGROUND_COLOR); sldr_pout_avg->minimum(1); sldr_pout_avg->maximum(10); sldr_pout_avg->step(1); sldr_pout_avg->value(5); sldr_pout_avg->textsize(12); sldr_pout_avg->callback((Fl_Callback*)cb_sldr_pout_avg); sldr_pout_avg->align(Fl_Align(FL_ALIGN_TOP_LEFT)); sldr_pout_avg->when(FL_WHEN_CHANGED); sldr_pout_avg->reverse(true); sldr_pout_avg->value(progStatus.pwr_avg); sldr_pout_peak = new Fl_Wheel_Value_Slider(17, 149, 375, 18, _("Pwr out peak")); sldr_pout_peak->tooltip(_("Max peak reading over last # averaged samples")); sldr_pout_peak->type(5); sldr_pout_peak->box(FL_THIN_DOWN_BOX); sldr_pout_peak->color(FL_LIGHT3); sldr_pout_peak->selection_color((Fl_Color)4); sldr_pout_peak->labeltype(FL_NORMAL_LABEL); sldr_pout_peak->labelfont(0); sldr_pout_peak->labelsize(14); sldr_pout_peak->labelcolor(FL_FOREGROUND_COLOR); sldr_pout_peak->minimum(1); sldr_pout_peak->maximum(10); sldr_pout_peak->step(1); sldr_pout_peak->value(5); sldr_pout_peak->textsize(12); sldr_pout_peak->callback((Fl_Callback*)cb_sldr_pout_peak); sldr_pout_peak->align(Fl_Align(FL_ALIGN_TOP_LEFT)); sldr_pout_peak->when(FL_WHEN_CHANGED); sldr_pout_peak->reverse(true); sldr_pout_peak->value(progStatus.pwr_peak); w->end(); return w; } flrig-1.3.24/src/UI/ui_wide.cxx0000644000175000017500000015351512562731646013130 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- //unsigned char menu_wide_menu_i18n_done = 0; Fl_Group *gwide = (Fl_Group *)0; Fl_Menu_Item menu_wide_menu[] = { {_("&File"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("E&xit"), 0, (Fl_Callback*)cb_mnuExit, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("&Config"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Setup"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Transceiver"), 0, (Fl_Callback*)cb_mnuConfigXcvr, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("XmlRpc"), 0, (Fl_Callback*)cb_mnuXMLRPC, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("tcpip"), 0, (Fl_Callback*)cb_mnuTCPIP, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("PTT"), 0, (Fl_Callback*)cb_mnuPTT, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("AUX"), 0, (Fl_Callback*)cb_mnuAUX, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Polling"), 0, (Fl_Callback*)cb_Polling, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("Start/Stop"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Restore Freq/Mode"), 0, (Fl_Callback*)cb_mnuRestoreData, 0, 6, FL_NORMAL_LABEL, 0, 14, 0}, {_("Keep Freq/Mode"), 0, (Fl_Callback*)cb_mnuKeepData, 0, 134, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("UI"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Meter filtering"), 0, (Fl_Callback*)cb_mnu_meter_filtering, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("Tooltips"), 0, (Fl_Callback*)cb_mnuTooltips, 0, 130, FL_NORMAL_LABEL, 0, 14, 0}, {_("User Interface"), 0, (Fl_Callback*)cb_mnuColorConfig, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}, {_("&Memory"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Save"), 0, (Fl_Callback*)cb_save_me, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Manage"), 0, (Fl_Callback*)cb_Memory, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("&Help"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("On Line Help"), 0, (Fl_Callback*)cb_mnuOnLineHelp, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("&About"), 0, (Fl_Callback*)cb_mnuAbout, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("Send command"), 0, (Fl_Callback*)cb_Send, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("&Events"), 0, (Fl_Callback*)cb_Events, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0} }; Fl_Group *wide_main_group(int X, int Y, int W, int H) { Fl_Group *g = new Fl_Group(X, Y, W, H); g->box(FL_FLAT_BOX); int xpos = X + 2; int ypos = Y + 2; txt_encA = new Fl_Output( H - 90, Y+1, 90, 20, ""); txt_encA->box(FL_THIN_DOWN_BOX); txt_encA->align(20); txt_encA->hide(); Fl_Group* wd_grp1 = new Fl_Group(xpos, ypos, W - 4, 60); { grpMeters = new Fl_Group(xpos, ypos, 208, 60); { // Meters grpMeters->box(FL_DOWN_BOX); grpMeters->color((Fl_Color)246); scaleSmeter = new Fl_Box(xpos+1, ypos+1, 206, 20); scaleSmeter->box(FL_FLAT_BOX); scaleSmeter->color((Fl_Color)246); scaleSmeter->image(image_S60); btnALC_SWR = new Fl_Button(xpos+1, ypos+1, 206, 20); btnALC_SWR->tooltip(_("Press SWR / ALC")); btnALC_SWR->box(FL_FLAT_BOX); btnALC_SWR->down_box(FL_FLAT_BOX); btnALC_SWR->color((Fl_Color)246); btnALC_SWR->image(image_SWR); btnALC_SWR->callback((Fl_Callback*)cb_btnALC_SWR); btnALC_SWR->hide(); sldrRcvSignal = new Fl_SigBar(xpos+2, ypos+22, 200, 6); sldrRcvSignal->box(FL_FLAT_BOX); sldrRcvSignal->color(FL_BACKGROUND_COLOR); sldrRcvSignal->selection_color(FL_BACKGROUND_COLOR); sldrRcvSignal->labeltype(FL_NORMAL_LABEL); sldrRcvSignal->labelfont(0); sldrRcvSignal->labelsize(14); sldrRcvSignal->labelcolor(FL_FOREGROUND_COLOR); sldrRcvSignal->align(Fl_Align(FL_ALIGN_CENTER)); sldrRcvSignal->when(FL_WHEN_RELEASE); sldrRcvSignal->hide(); sldrRcvSignal->minimum(0); sldrRcvSignal->maximum(100); sldrALC = new Fl_SigBar(xpos+3, ypos+22, 200, 6); sldrALC->box(FL_FLAT_BOX); sldrALC->color(FL_BACKGROUND_COLOR); sldrALC->selection_color(FL_BACKGROUND_COLOR); sldrALC->labeltype(FL_NORMAL_LABEL); sldrALC->labelfont(0); sldrALC->labelsize(14); sldrALC->labelcolor(FL_FOREGROUND_COLOR); sldrALC->align(Fl_Align(FL_ALIGN_CENTER)); sldrALC->when(FL_WHEN_RELEASE); sldrALC->hide(); sldrALC->minimum(0); sldrALC->maximum(100); sldrSWR = new Fl_SigBar(xpos+2, ypos+22, 200, 6); sldrSWR->box(FL_FLAT_BOX); sldrSWR->color(FL_BACKGROUND_COLOR); sldrSWR->selection_color(FL_BACKGROUND_COLOR); sldrSWR->labeltype(FL_NORMAL_LABEL); sldrSWR->labelfont(0); sldrSWR->labelsize(14); sldrSWR->labelcolor(FL_FOREGROUND_COLOR); sldrSWR->align(Fl_Align(FL_ALIGN_CENTER)); sldrSWR->when(FL_WHEN_RELEASE); sldrSWR->hide(); sldrSWR->minimum(0); sldrSWR->maximum(100); sldrFwdPwr = new Fl_SigBar(xpos+2, ypos+29, 200, 6); sldrFwdPwr->box(FL_FLAT_BOX); sldrFwdPwr->color(FL_BACKGROUND_COLOR); sldrFwdPwr->selection_color(FL_BACKGROUND_COLOR); sldrFwdPwr->labeltype(FL_NORMAL_LABEL); sldrFwdPwr->labelfont(0); sldrFwdPwr->labelsize(14); sldrFwdPwr->labelcolor(FL_FOREGROUND_COLOR); sldrFwdPwr->align(Fl_Align(FL_ALIGN_CENTER)); sldrFwdPwr->when(FL_WHEN_RELEASE); sldrFwdPwr->hide(); sldrFwdPwr->minimum(0); sldrFwdPwr->maximum(100); scalePower = new Fl_Button(xpos+1, ypos+36, 206, 20); scalePower->tooltip(_("right-click to select power scale")); scalePower->box(FL_FLAT_BOX); scalePower->down_box(FL_FLAT_BOX); scalePower->color((Fl_Color)246); scalePower->image(image_P100); scalePower->callback((Fl_Callback*)cb_scalePower); meter_fill_box = new Fl_Box(xpos+207, ypos, 0, 60); meter_fill_box->box(FL_FLAT_BOX); meter_fill_box->color((Fl_Color)246); } grpMeters->end(); { // FreqDispA FreqDispA = new cFreqControl( grpMeters->x() + grpMeters->w() + 1, ypos, 290, 60, _("9")); FreqDispA->box(FL_DOWN_BOX); FreqDispA->color(FL_BACKGROUND_COLOR); FreqDispA->selection_color(FL_BACKGROUND_COLOR); FreqDispA->labeltype(FL_NORMAL_LABEL); FreqDispA->labelfont(0); FreqDispA->labelsize(14); FreqDispA->labelcolor(FL_FOREGROUND_COLOR); FreqDispA->align(Fl_Align(FL_ALIGN_CENTER)); FreqDispA->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(FreqDispA); FreqDispA->SetONOFFCOLOR (FL_YELLOW, FL_BLACK); FreqDispA->setCallBack(movFreqA); } Fl_Group* wd_grp3 = new Fl_Group( FreqDispA->x() + FreqDispA->w() + 1, ypos, 522, 60); { FreqDispB = new cFreqControl( wd_grp3->x(), 24, 230, 38, _("9")); FreqDispB->box(FL_DOWN_BOX); FreqDispB->color(FL_BACKGROUND_COLOR); FreqDispB->selection_color(FL_BACKGROUND_COLOR); FreqDispB->labeltype(FL_NORMAL_LABEL); FreqDispB->labelfont(0); FreqDispB->labelsize(14); FreqDispB->labelcolor(FL_FOREGROUND_COLOR); FreqDispB->align(Fl_Align(FL_ALIGN_CENTER)); FreqDispB->when(FL_WHEN_CHANGED); FreqDispB->SetONOFFCOLOR (FL_YELLOW, FL_BLACK); FreqDispB->setCallBack(movFreqB); grp_row0a = new Fl_Group( FreqDispB->x(), FreqDispB->y() + FreqDispB->h() + 2, FreqDispB->w(), 20); btnA = new Fl_Light_Button( grp_row0a->x(), grp_row0a->y(), grp_row0a->y(), 20, _("vfoA")); btnA->tooltip(_("Rx-A / Tx-A")); btnA->down_box(FL_THIN_DOWN_BOX); btnA->labelsize(12); btnA->callback((Fl_Callback*)cb_btnA); btnA->value(!useB); btn_K3_swapAB = new Fl_Button( btnA->x(), btnA->y() + btnA->h() + 2, 69, 20, _("A/B")); btn_K3_swapAB->tooltip(_("Swap A/B")); btn_K3_swapAB->down_box(FL_DOWN_BOX); btn_K3_swapAB->labelsize(12); btn_K3_swapAB->callback((Fl_Callback*)cb_btn_K3_swapAB); btn_K3_swapAB->hide(); btn_KX3_swapAB = new Fl_Button( btnA->x(), btnA->y() + btnA->h() + 2, 69, 20, _("A/B")); btn_KX3_swapAB->tooltip(_("Swap A/B")); btn_KX3_swapAB->down_box(FL_DOWN_BOX); btn_KX3_swapAB->labelsize(12); btn_KX3_swapAB->callback((Fl_Callback*)cb_btn_KX3_swapAB); btn_KX3_swapAB->hide(); btnB = new Fl_Light_Button( btnA->x() + btnA->w() + 2, btnA->y(), 69, 20, _("vfoB")); btnB->tooltip(_("Rx-B / Tx-B")); btnB->down_box(FL_THIN_DOWN_BOX); btnB->labelsize(12); btnB->callback((Fl_Callback*)cb_btnB); btnB->value(useB); btnTune = new Fl_Button( btnB->x() + btnB->w() + 2, btnB->y(), 69, 20, _("Tune")); btnTune->tooltip(_("Momentary Tune")); btnTune->callback((Fl_Callback*)cb_btnTune); bx_row0_expander = new Fl_Box( btnTune->x() + btnTune->w(), btnB->y(), 4, 20); bx_row0_expander->box(FL_FLAT_BOX); btn_show_controls = new Fl_Button( bx_row0_expander->x() + bx_row0_expander->w(), btnB->y(), 20, 20, _("@-22->")); btn_show_controls->tooltip(_("Show/Hide controls")); btn_show_controls->callback((Fl_Callback*)cb_btn_show_controls); grp_row0a->resizable(bx_row0_expander); grp_row0a->end(); wd_grp3->end(); } wd_grp1->end(); } wd_grp1->resizable(FreqDispA); ypos += 62; { // grp_row1 bandwidth, mode, att, ipo, nb, an a/b split ptt grp_row1 = new Fl_Group(xpos, ypos, W - 4, 20); grp_row1->box(FL_FLAT_BOX); { // grp_row1a grp_row1a = new Fl_Group( xpos, ypos, grpMeters->w(), 20); int w1a = (grpMeters->w() - 2) / 2; opBW = new Fl_ComboBox( xpos, ypos, w1a, 20, _("Bandwidth")); opBW->tooltip(_("Select Transceiver Bandwidth")); opBW->box(FL_FLAT_BOX); opBW->color(FL_BACKGROUND2_COLOR); opBW->selection_color(FL_BACKGROUND_COLOR); opBW->labeltype(FL_NORMAL_LABEL); opBW->labelfont(0); opBW->labelsize(12); opBW->labelcolor(FL_FOREGROUND_COLOR); opBW->callback((Fl_Callback*)cb_opBW); opBW->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opBW->when(FL_WHEN_RELEASE); opBW->end(); btnDSP = new Fl_Button(xpos, ypos, 20, 20, _("L")); btnDSP->callback((Fl_Callback*)cb_btnDSP); btnDSP->hide(); opDSP_lo = new Fl_ComboBox(xpos + 20, ypos, w1a - 20, 20, _("Lo Cut")); opDSP_lo->tooltip(_("Lo Cut Freq")); opDSP_lo->box(FL_FLAT_BOX); opDSP_lo->color(FL_BACKGROUND2_COLOR); opDSP_lo->selection_color(FL_BACKGROUND_COLOR); opDSP_lo->labeltype(FL_NORMAL_LABEL); opDSP_lo->labelfont(0); opDSP_lo->labelsize(12); opDSP_lo->labelcolor(FL_FOREGROUND_COLOR); opDSP_lo->callback((Fl_Callback*)cb_opDSP_lo); opDSP_lo->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opDSP_lo->when(FL_WHEN_RELEASE); opDSP_lo->hide(); opDSP_lo->end(); opDSP_hi = new Fl_ComboBox(xpos + 20, ypos, w1a - 20, 20, _("Lo Cut")); opDSP_hi->tooltip(_("Hi Cut Freq")); opDSP_hi->box(FL_FLAT_BOX); opDSP_hi->color(FL_BACKGROUND2_COLOR); opDSP_hi->selection_color(FL_BACKGROUND_COLOR); opDSP_hi->labeltype(FL_NORMAL_LABEL); opDSP_hi->labelfont(0); opDSP_hi->labelsize(12); opDSP_hi->labelcolor(FL_FOREGROUND_COLOR); opDSP_hi->callback((Fl_Callback*)cb_opDSP_hi); opDSP_hi->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opDSP_hi->when(FL_WHEN_RELEASE); opDSP_hi->hide(); opDSP_hi->end(); opMODE = new Fl_ComboBox( opBW->x() + opBW->w() + 2, ypos, w1a, 20, _("Mode")); opMODE->tooltip(_("Select transceiver operating mode")); opMODE->box(FL_FLAT_BOX); opMODE->color(FL_BACKGROUND2_COLOR); opMODE->selection_color(FL_BACKGROUND_COLOR); opMODE->labeltype(FL_NORMAL_LABEL); opMODE->labelfont(0); opMODE->labelsize(12); opMODE->labelcolor(FL_FOREGROUND_COLOR); opMODE->callback((Fl_Callback*)cb_opMODE); opMODE->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opMODE->when(FL_WHEN_RELEASE); opMODE->end(); grp_row1a->end(); } { // grp_row1b int x1b = FreqDispA->x(); grp_row1b = new Fl_Group( x1b, ypos, FreqDispA->w(), 20); int x2b = FreqDispA->w() / 2; grp_row1b1 = new Fl_Group(x1b, ypos, FreqDispA->w(), 20); Fl_Group* grp_row1b1a = new Fl_Group(x1b, ypos, x2b, 20); Fl_Box* bx_row1b1a = new Fl_Box(x1b, ypos, 0, 20); bx_row1b1a->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); btnAttenuator = new Fl_Light_Button( bx_row1b1a->x() + bx_row1b1a->w(), ypos, 70, 20, _("Att")); btnAttenuator->tooltip(_("Attenuator On/Off")); btnAttenuator->down_box(FL_THIN_DOWN_BOX); btnAttenuator->labelsize(12); btnAttenuator->callback((Fl_Callback*)cb_btnAttenuator); btnPreamp = new Fl_Light_Button( btnAttenuator->x() + btnAttenuator->w() + 2, ypos, 70, 20, _("Pre")); btnPreamp->tooltip(_("Preamp On/Off")); btnPreamp->down_box(FL_THIN_DOWN_BOX); btnPreamp->labelsize(12); btnPreamp->callback((Fl_Callback*)cb_btnPreamp); grp_row1b1a->resizable(bx_row1b1a); grp_row1b1a->end(); Fl_Group* grp_row1b1b = new Fl_Group( grp_row1b1a->x() + x2b, ypos, FreqDispA->w() - x2b, 20); btnNOISE = new Fl_Light_Button( grp_row1b1b->x(), ypos, 70, 20, _("NB")); btnNOISE->tooltip(_("Noise Blanker On/Off")); btnNOISE->down_box(FL_THIN_DOWN_BOX); btnNOISE->labelsize(12); btnNOISE->callback((Fl_Callback*)cb_btnNOISE); btnAutoNotch = new Fl_Light_Button( btnNOISE->x() + btnNOISE->w() + 2, ypos, grp_row1b1b->w() - btnNOISE->w() - 4, 20, _("AN")); btnAutoNotch->tooltip(_("Auto Notch On/Off")); btnAutoNotch->down_box(FL_THIN_DOWN_BOX); btnAutoNotch->labelsize(12); btnAutoNotch->callback((Fl_Callback*)cb_btnAutoNotch); Fl_Box* bx_row1b1b = new Fl_Box( btnAutoNotch->x() + btnAutoNotch->w(), ypos, 2, 20); grp_row1b1b->end(); grp_row1b1b->resizable(bx_row1b1b); grp_row1b1->end(); grp_row1b->end(); } { // grp_row1c Fl_Group *grp_row1c = new Fl_Group( grp_row0a->x(), ypos, grp_row0a->w(), 20); btnAswapB = new Fl_Button( btnA->x(), ypos, btnA->w(), 20, _("A / B")); btnAswapB->tooltip(_("Swap A B\nRight-click; Copy A to B")); btnAswapB->down_box(FL_DOWN_BOX); btnAswapB->labelsize(12); btnAswapB->callback((Fl_Callback*)cb_btnAswapB); btnSplit = new Fl_Light_Button( btnB->x(), ypos, btnB->w(), 20, _("Split")); btnSplit->tooltip(_("Rx-A / Tx-B")); btnSplit->down_box(FL_THIN_DOWN_BOX); btnSplit->labelsize(12); btnSplit->callback((Fl_Callback*)cb_btnSplit); btnSplit->value(progStatus.split); btnPTT = new Fl_Light_Button( btnTune->x(), ypos, btnTune->w(), 20, _("PTT")); btnPTT->tooltip(_("Xmt On/Off")); btnPTT->down_box(FL_THIN_DOWN_BOX); btnPTT->labelsize(12); btnPTT->callback((Fl_Callback*)cb_btnPTT); bx_row1_expander2 = new Fl_Box( btnPTT->x() + btnPTT->w(), ypos, 1, 20); grp_row1c->end(); grp_row1c->resizable(bx_row1_expander2); } grp_row1->end(); grp_row1->resizable(grp_row1b); } { // grp_row2 sliders grp_row2 = new Fl_Group(0, 107, 734, 43); grp_row2a = new Fl_Group(0, 107, 183, 42); { // sql, mic sldrSQUELCH = new Fl_Wheel_Value_Slider(54, 108, 128, 18, _("SQL")); sldrSQUELCH->tooltip(_("Adjust Squelch")); sldrSQUELCH->type(5); sldrSQUELCH->box(FL_THIN_DOWN_BOX); sldrSQUELCH->color(FL_BACKGROUND_COLOR); sldrSQUELCH->selection_color(FL_BACKGROUND_COLOR); sldrSQUELCH->labeltype(FL_NORMAL_LABEL); sldrSQUELCH->labelfont(0); sldrSQUELCH->labelsize(14); sldrSQUELCH->labelcolor(FL_FOREGROUND_COLOR); sldrSQUELCH->maximum(100); sldrSQUELCH->step(1); sldrSQUELCH->value(15); sldrSQUELCH->textsize(12); sldrSQUELCH->callback((Fl_Callback*)cb_sldrSQUELCH); sldrSQUELCH->align(Fl_Align(FL_ALIGN_LEFT)); sldrSQUELCH->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(sldrSQUELCH); sldrSQUELCH->reverse(true); sldrMICGAIN = new Fl_Wheel_Value_Slider(54, 128, 128, 18, _("Mic")); sldrMICGAIN->tooltip(_("Adjust Mic Gain")); sldrMICGAIN->type(5); sldrMICGAIN->box(FL_THIN_DOWN_BOX); sldrMICGAIN->color(FL_BACKGROUND_COLOR); sldrMICGAIN->selection_color(FL_BACKGROUND_COLOR); sldrMICGAIN->labeltype(FL_NORMAL_LABEL); sldrMICGAIN->labelfont(0); sldrMICGAIN->labelsize(14); sldrMICGAIN->labelcolor(FL_FOREGROUND_COLOR); sldrMICGAIN->maximum(100); sldrMICGAIN->step(1); sldrMICGAIN->textsize(12); sldrMICGAIN->callback((Fl_Callback*)cb_sldrMICGAIN); sldrMICGAIN->align(Fl_Align(FL_ALIGN_LEFT)); sldrMICGAIN->when(FL_WHEN_CHANGED); sldrMICGAIN->reverse(true); grp_row2a->end(); bx_sep2a = new Fl_Box(184, 108, 2, 42); } grp_row2b = new Fl_Group(186, 107, 180, 42); { // IFshift, NR btnIFsh = new Fl_Light_Button(186, 108, 50, 18, _("IFsh")); btnIFsh->tooltip(_("IF Shift On/Off")); btnIFsh->down_box(FL_THIN_DOWN_BOX); btnIFsh->labelsize(12); btnIFsh->callback((Fl_Callback*)cb_btnIFsh); sldrIFSHIFT = new Fl_Wheel_Value_Slider(237, 108, 128, 18); sldrIFSHIFT->tooltip(_("Adjust IF Shift")); sldrIFSHIFT->type(5); sldrIFSHIFT->box(FL_THIN_DOWN_BOX); sldrIFSHIFT->color(FL_BACKGROUND_COLOR); sldrIFSHIFT->selection_color(FL_BACKGROUND_COLOR); sldrIFSHIFT->labeltype(FL_NORMAL_LABEL); sldrIFSHIFT->labelfont(0); sldrIFSHIFT->labelsize(12); sldrIFSHIFT->labelcolor(FL_FOREGROUND_COLOR); sldrIFSHIFT->minimum(-1000); sldrIFSHIFT->maximum(1000); sldrIFSHIFT->step(10); sldrIFSHIFT->textsize(12); sldrIFSHIFT->callback((Fl_Callback*)cb_sldrIFSHIFT); sldrIFSHIFT->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrIFSHIFT->when(FL_WHEN_CHANGED); sldrIFSHIFT->reverse(true); btnNR = new Fl_Light_Button(186, 128, 50, 18, _("NR")); btnNR->tooltip(_("Noise Reduction On/Off")); btnNR->down_box(FL_THIN_DOWN_BOX); btnNR->labelsize(12); btnNR->callback((Fl_Callback*)cb_btnNR); sldrNR = new Fl_Wheel_Value_Slider(237, 128, 128, 18); sldrNR->tooltip(_("Adjust noise reduction")); sldrNR->type(5); sldrNR->box(FL_THIN_DOWN_BOX); sldrNR->color(FL_BACKGROUND_COLOR); sldrNR->selection_color(FL_BACKGROUND_COLOR); sldrNR->labeltype(FL_NORMAL_LABEL); sldrNR->labelfont(0); sldrNR->labelsize(12); sldrNR->labelcolor(FL_FOREGROUND_COLOR); sldrNR->maximum(100); sldrNR->step(2); sldrNR->textsize(12); sldrNR->callback((Fl_Callback*)cb_sldrNR); sldrNR->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrNR->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(sldrNR); sldrNR->reverse(true); grp_row2b->end(); bx_sep2b = new Fl_Box(367, 107, 2, 42); } grp_row2c = new Fl_Group(370, 107, 180, 42); { // Notch, RF gain btnNotch = new Fl_Light_Button(370, 108, 50, 18, _("Nch")); btnNotch->tooltip(_("Notch - Manual (off) Auto (on)")); btnNotch->down_box(FL_THIN_DOWN_BOX); btnNotch->labelsize(12); btnNotch->callback((Fl_Callback*)cb_btnNotch); sldrNOTCH = new Fl_Wheel_Value_Slider(421, 108, 128, 18); sldrNOTCH->tooltip(_("Adjust Notch Frequency")); sldrNOTCH->type(5); sldrNOTCH->box(FL_THIN_DOWN_BOX); sldrNOTCH->color(FL_BACKGROUND_COLOR); sldrNOTCH->selection_color(FL_BACKGROUND_COLOR); sldrNOTCH->labeltype(FL_NORMAL_LABEL); sldrNOTCH->labelfont(0); sldrNOTCH->labelsize(14); sldrNOTCH->labelcolor(FL_FOREGROUND_COLOR); sldrNOTCH->minimum(-1000); sldrNOTCH->maximum(1000); sldrNOTCH->step(10); sldrNOTCH->textsize(12); sldrNOTCH->callback((Fl_Callback*)cb_sldrNOTCH); sldrNOTCH->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrNOTCH->when(FL_WHEN_CHANGED); sldrNOTCH->reverse(true); sldrRFGAIN = new Fl_Wheel_Value_Slider(421, 128, 128, 18, _("RF")); sldrRFGAIN->tooltip(_("Adjust RF gain")); sldrRFGAIN->type(5); sldrRFGAIN->box(FL_THIN_DOWN_BOX); sldrRFGAIN->color(FL_BACKGROUND_COLOR); sldrRFGAIN->selection_color(FL_BACKGROUND_COLOR); sldrRFGAIN->labeltype(FL_NORMAL_LABEL); sldrRFGAIN->labelfont(0); sldrRFGAIN->labelsize(14); sldrRFGAIN->labelcolor(FL_FOREGROUND_COLOR); sldrRFGAIN->maximum(100); sldrRFGAIN->step(1); sldrRFGAIN->value(15); sldrRFGAIN->textsize(12); sldrRFGAIN->callback((Fl_Callback*)cb_sldrRFGAIN); sldrRFGAIN->align(Fl_Align(FL_ALIGN_LEFT)); sldrRFGAIN->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(sldrRFGAIN); sldrRFGAIN->reverse(true); grp_row2c->end(); bx_sep2c = new Fl_Box(551, 107, 2, 42); } grp_row2d = new Fl_Group(552, 107, 182, 42); { // Power, Volume sldrPOWER = new Fl_Wheel_Value_Slider(604, 108, 128, 18, _("PWR")); sldrPOWER->tooltip(_("Adjust power level")); sldrPOWER->type(5); sldrPOWER->box(FL_THIN_DOWN_BOX); sldrPOWER->color(FL_BACKGROUND_COLOR); sldrPOWER->selection_color(FL_BACKGROUND_COLOR); sldrPOWER->labeltype(FL_NORMAL_LABEL); sldrPOWER->labelfont(0); sldrPOWER->labelsize(14); sldrPOWER->labelcolor(FL_FOREGROUND_COLOR); sldrPOWER->maximum(100); sldrPOWER->step(1); sldrPOWER->value(15); sldrPOWER->textsize(12); sldrPOWER->callback((Fl_Callback*)cb_sldrPOWER); sldrPOWER->align(Fl_Align(FL_ALIGN_LEFT)); sldrPOWER->when(FL_WHEN_CHANGED); sldrPOWER->reverse(true); btnVol = new Fl_Light_Button(552, 128, 50, 18, _("Vol")); btnVol->tooltip(_("Speaker on/off")); btnVol->down_box(FL_THIN_DOWN_BOX); btnVol->value(1); btnVol->labelsize(12); btnVol->callback((Fl_Callback*)cb_btnVol); #ifdef __APPLE__ sldrVOLUME = new Fl_Wheel_Value_Slider(604, 128, 110, 18); sldrVOLUME->tooltip(_("Adjust Audio Volume")); sldrVOLUME->type(5); sldrVOLUME->box(FL_THIN_DOWN_BOX); sldrVOLUME->color(FL_BACKGROUND_COLOR); sldrVOLUME->selection_color(FL_BACKGROUND_COLOR); sldrVOLUME->labeltype(FL_NORMAL_LABEL); sldrVOLUME->labelfont(0); sldrVOLUME->labelsize(12); sldrVOLUME->labelcolor(FL_FOREGROUND_COLOR); sldrVOLUME->maximum(100); sldrVOLUME->step(1); sldrVOLUME->textsize(12); sldrVOLUME->callback((Fl_Callback*)cb_sldrVOLUME); sldrVOLUME->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrVOLUME->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(sldrVOLUME); sldrVOLUME->reverse(true); // box to keep right side of slider control from lying under the OS X // dialog resize window decoration Fl_Box *volbox = new Fl_Box(714, 128, 18, 18); volbox->box(FL_FLAT_BOX); #else sldrVOLUME = new Fl_Wheel_Value_Slider(604, 128, 128, 18); sldrVOLUME->tooltip(_("Adjust Audio Volume")); sldrVOLUME->type(5); sldrVOLUME->box(FL_THIN_DOWN_BOX); sldrVOLUME->color(FL_BACKGROUND_COLOR); sldrVOLUME->selection_color(FL_BACKGROUND_COLOR); sldrVOLUME->labeltype(FL_NORMAL_LABEL); sldrVOLUME->labelfont(0); sldrVOLUME->labelsize(12); sldrVOLUME->labelcolor(FL_FOREGROUND_COLOR); sldrVOLUME->maximum(100); sldrVOLUME->step(1); sldrVOLUME->textsize(12); sldrVOLUME->callback((Fl_Callback*)cb_sldrVOLUME); sldrVOLUME->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrVOLUME->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(sldrVOLUME); sldrVOLUME->reverse(true); #endif grp_row2d->end(); } grp_row2->end(); } int ytabs = sldrVOLUME->y() + sldrVOLUME->h() + 2; xpos = 0; int tabs_h = Y + H - 2 - ypos; int tab_v = 24; int tabs2_h = tabs_h - tab_v; ypos = ytabs; grpTABS = new Fl_Group(xpos, ypos, W, tabs_h); { grpTABS->box(FL_FLAT_BOX); tabsGeneric = new Fl_Tabs(xpos, ypos, W, tabs_h); ypos += tab_v; { tabsGeneric->selection_color(FL_LIGHT1); genericBands = new Fl_Group(xpos, ypos, W, tabs2_h, _("Bands")); { btnBandSelect_1 = new Fl_Button( xpos + 4, ypos + 10, 50, 22, _("1.8")); btnBandSelect_1->tooltip(_("160m Band")); btnBandSelect_1->color((Fl_Color)246); btnBandSelect_1->callback((Fl_Callback*)cb_btnBandSelect_1); btnBandSelect_2 = new Fl_Button( btnBandSelect_1->x() + btnBandSelect_1->w() + 4, ypos + 10, 50, 22, _("3.5")); btnBandSelect_2->tooltip(_("80m band")); btnBandSelect_2->color((Fl_Color)246); btnBandSelect_2->callback((Fl_Callback*)cb_btnBandSelect_2); btnBandSelect_3 = new Fl_Button( btnBandSelect_2->x() + btnBandSelect_2->w() + 4, ypos+10, 50, 22, _("7")); btnBandSelect_3->tooltip(_("40m band")); btnBandSelect_3->color((Fl_Color)246); btnBandSelect_3->callback((Fl_Callback*)cb_btnBandSelect_3); btnBandSelect_3->align(Fl_Align(FL_ALIGN_CLIP)); btnBandSelect_4 = new Fl_Button( btnBandSelect_3->x() + btnBandSelect_3->w() + 4, ypos+10, 50, 22, _("10")); btnBandSelect_4->tooltip(_("30m band")); btnBandSelect_4->color((Fl_Color)246); btnBandSelect_4->callback((Fl_Callback*)cb_btnBandSelect_4); btnBandSelect_5 = new Fl_Button( btnBandSelect_4->x() + btnBandSelect_4->w() + 4, ypos+10, 50, 22, _("14")); btnBandSelect_5->tooltip(_("20m band")); btnBandSelect_5->color((Fl_Color)246); btnBandSelect_5->callback((Fl_Callback*)cb_btnBandSelect_5); btnBandSelect_6 = new Fl_Button( btnBandSelect_5->x() + btnBandSelect_5->w() + 4, ypos+10, 50, 22, _("18")); btnBandSelect_6->tooltip(_("17m band")); btnBandSelect_6->color((Fl_Color)246); btnBandSelect_6->callback((Fl_Callback*)cb_btnBandSelect_6); btnBandSelect_7 = new Fl_Button( btnBandSelect_6->x() + btnBandSelect_6->w() + 4, ypos+10, 50, 22, _("21")); btnBandSelect_7->tooltip(_("15m band")); btnBandSelect_7->color((Fl_Color)246); btnBandSelect_7->callback((Fl_Callback*)cb_btnBandSelect_7); btnBandSelect_8 = new Fl_Button( btnBandSelect_7->x() + btnBandSelect_7->w() + 4, ypos+10, 50, 22, _("24")); btnBandSelect_8->tooltip(_("12m band")); btnBandSelect_8->color((Fl_Color)246); btnBandSelect_8->callback((Fl_Callback*)cb_btnBandSelect_8); btnBandSelect_9 = new Fl_Button( btnBandSelect_8->x() + btnBandSelect_8->w() + 4, ypos+10, 50, 22, _("28")); btnBandSelect_9->tooltip(_("10m band")); btnBandSelect_9->color((Fl_Color)246); btnBandSelect_9->callback((Fl_Callback*)cb_btnBandSelect_9); btnBandSelect_10 = new Fl_Button( btnBandSelect_9->x() + btnBandSelect_9->w() + 4, ypos+10, 50, 22, _("50")); btnBandSelect_10->tooltip(_("6m band")); btnBandSelect_10->color((Fl_Color)246); btnBandSelect_10->callback((Fl_Callback*)cb_btnBandSelect_10); btnBandSelect_11 = new Fl_Button( btnBandSelect_10->x() + btnBandSelect_10->w() + 4, ypos+10, 50, 22, _("GEN")); btnBandSelect_11->tooltip(_("General RX")); btnBandSelect_11->color((Fl_Color)246); btnBandSelect_11->callback((Fl_Callback*)cb_btnBandSelect_11); opSelect60 = new Fl_ComboBox( btnBandSelect_11->x() + btnBandSelect_11->w() + 4, ypos+10, 80, 22, _("combo")); opSelect60->tooltip(_("vfo / 60 meter channel")); opSelect60->box(FL_NO_BOX); opSelect60->color((Fl_Color)246); opSelect60->selection_color(FL_BACKGROUND_COLOR); opSelect60->labeltype(FL_NORMAL_LABEL); opSelect60->labelfont(0); opSelect60->labelsize(12); opSelect60->labelcolor(FL_FOREGROUND_COLOR); opSelect60->callback((Fl_Callback*)cb_opSelect60); opSelect60->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opSelect60->when(FL_WHEN_RELEASE); opSelect60->end(); } genericBands->end(); tabsGeneric->resizable(genericBands); genericCW = new Fl_Group(xpos, ypos, W, tabs2_h, _("CW")); { genericCW->color(FL_LIGHT1); genericCW->selection_color(FL_LIGHT1); genericCW->hide(); btnSpot = new Fl_Light_Button(13, 187, 54, 20, _("Spot")); btnSpot->tooltip(_("Spot tone on/off")); btnSpot->callback((Fl_Callback*)cb_btnSpot); btnSpot->value(progStatus.cw_spot); spnr_cw_spot_tone = new Hspinner(164, 187, 70, 20, _("Spot tone")); spnr_cw_spot_tone->tooltip(_("Spot volume")); spnr_cw_spot_tone->type(FL_INT_INPUT); spnr_cw_spot_tone->minimum(300); spnr_cw_spot_tone->maximum(1050); spnr_cw_spot_tone->step(50); spnr_cw_spot_tone->value(1050); spnr_cw_spot_tone->callback((Fl_Callback*)cb_spnr_cw_spot_tone); spnr_cw_spot_tone->align(Fl_Align(FL_ALIGN_LEFT)); spnr_cw_spot_tone->value(progStatus.cw_spot); spnr_cw_weight = new Hspinner(299, 187, 70, 20, _("Weight")); spnr_cw_weight->type(FL_INT_INPUT); spnr_cw_weight->minimum(2.5); spnr_cw_weight->maximum(4.5); spnr_cw_weight->value(3); spnr_cw_weight->callback((Fl_Callback*)cb_spnr_cw_weight); spnr_cw_weight->align(Fl_Align(FL_ALIGN_LEFT)); spnr_cw_weight->value(progStatus.cw_weight); spnr_cw_wpm = new Hspinner(435, 187, 70, 20, _("wpm")); spnr_cw_wpm->type(FL_INT_INPUT); spnr_cw_wpm->minimum(5); spnr_cw_wpm->maximum(80); spnr_cw_wpm->step(1); spnr_cw_wpm->callback((Fl_Callback*)cb_spnr_cw_wpm); spnr_cw_wpm->align(Fl_Align(FL_ALIGN_LEFT)); spnr_cw_wpm->value(progStatus.cw_wpm); btn_enable_keyer = new Fl_Check_Button(649, 190, 60, 15, _("Keyer")); btn_enable_keyer->tooltip(_("Enable internal keyer")); btn_enable_keyer->down_box(FL_DOWN_BOX); btn_enable_keyer->callback((Fl_Callback*)cb_btn_enable_keyer); btn_enable_keyer->value(progStatus.enable_keyer); } genericCW->end(); genericQSK = new Fl_Group(xpos, ypos, W, tabs2_h, _("QSK")); genericQSK->color(FL_LIGHT1); genericQSK->selection_color(FL_LIGHT1); genericQSK->hide(); btnBreakIn = new Fl_Light_Button(13, 187, 54, 20, _("QSK")); btnBreakIn->tooltip(_("Full break in on/off")); btnBreakIn->callback((Fl_Callback*)cb_btnBreakIn); btnBreakIn->value(progStatus.break_in); spnr_cw_qsk = new Hspinner(170, 187, 70, 20, _("Bk-in Dly")); spnr_cw_qsk->tooltip(_("msec")); spnr_cw_qsk->type(FL_INT_INPUT); spnr_cw_qsk->minimum(0); spnr_cw_qsk->maximum(100); spnr_cw_qsk->step(1); spnr_cw_qsk->value(20); spnr_cw_qsk->callback((Fl_Callback*)cb_spnr_cw_qsk); spnr_cw_qsk->align(Fl_Align(FL_ALIGN_LEFT)); spnr_cw_qsk->value(progStatus.cw_qsk); spnr_cw_delay = new Hspinner(330, 187, 100, 20, _("QSK delay")); spnr_cw_delay->tooltip(_("QSK delay (msec)")); spnr_cw_delay->type(0); spnr_cw_delay->minimum(30); spnr_cw_delay->maximum(3000); spnr_cw_delay->step(10); spnr_cw_delay->callback((Fl_Callback*)cb_spnr_cw_delay); spnr_cw_delay->value(progStatus.cw_delay); spnr_cw_delay->align(Fl_Align(FL_ALIGN_LEFT)); genericQSK->end(); genericVOX = new Fl_Group(xpos, ypos, W, tabs2_h, _("Vox")); { genericVOX->hide(); spnr_vox_gain = new Hspinner(129, 187, 70, 20, _("gain")); spnr_vox_gain->type(FL_INT_INPUT); spnr_vox_gain->minimum(0); spnr_vox_gain->maximum(100); spnr_vox_gain->step(1); spnr_vox_gain->callback((Fl_Callback*)cb_spnr_vox_gain); spnr_vox_gain->align(Fl_Align(FL_ALIGN_LEFT)); spnr_vox_gain->value(progStatus.vox_gain); spnr_anti_vox = new Hspinner(262, 187, 70, 20, _("anti")); spnr_anti_vox->type(FL_INT_INPUT); spnr_anti_vox->minimum(0); spnr_anti_vox->maximum(100); spnr_anti_vox->step(1); spnr_anti_vox->callback((Fl_Callback*)cb_spnr_anti_vox); spnr_anti_vox->align(Fl_Align(FL_ALIGN_LEFT)); spnr_anti_vox->value(progStatus.vox_anti); spnr_vox_hang = new Hspinner(396, 187, 100, 20, _("hang")); spnr_vox_hang->type(FL_INT_INPUT); spnr_vox_hang->minimum(0); spnr_vox_hang->maximum(100); spnr_vox_hang->step(1); spnr_vox_hang->callback((Fl_Callback*)cb_spnr_vox_hang); spnr_vox_hang->align(Fl_Align(FL_ALIGN_LEFT)); spnr_vox_hang->value(progStatus.vox_hang); btn_vox = new Fl_Light_Button(525, 187, 70, 20, _("VOX")); btn_vox->callback((Fl_Callback*)cb_btn_vox); btn_vox->value(progStatus.vox_onoff); btn_vox_on_dataport = new Fl_Check_Button(610, 189, 70, 15, _("Data port")); btn_vox_on_dataport->tooltip(_("Data port signal triggers VOX")); btn_vox_on_dataport->down_box(FL_DOWN_BOX); btn_vox_on_dataport->callback((Fl_Callback*)cb_btn_vox_on_dataport); btn_vox_on_dataport->value(progStatus.vox_on_dataport); } genericVOX->end(); genericSpeech = new Fl_Group(xpos, ypos, W, tabs2_h, _("Spch")); { genericSpeech->hide(); btnCompON = new Fl_Light_Button(230, 187, 70, 20, _("On")); btnCompON->callback((Fl_Callback*)cb_btnCompON); btnCompON->value(progStatus.compON); spnr_compression = new Hspinner(138, 187, 70, 20, _("Comp")); spnr_compression->type(FL_INT_INPUT); spnr_compression->minimum(0); spnr_compression->maximum(100); spnr_compression->step(1); spnr_compression->callback((Fl_Callback*)cb_spnr_compression); spnr_compression->align(Fl_Align(FL_ALIGN_LEFT)); spnr_compression->value(progStatus.compression); } genericSpeech->end(); genericRx = new Fl_Group(xpos, ypos, W, tabs2_h, _("RX")); { genericRx->hide(); cbo_nb_level = new Fl_ComboBox(90, 187, 80, 20, _("NB level")); cbo_nb_level->tooltip(_("Select Transceiver")); cbo_nb_level->box(FL_DOWN_BOX); cbo_nb_level->color(FL_BACKGROUND_COLOR); cbo_nb_level->selection_color(FL_BACKGROUND_COLOR); cbo_nb_level->labeltype(FL_NORMAL_LABEL); cbo_nb_level->labelfont(0); cbo_nb_level->labelsize(14); cbo_nb_level->labelcolor(FL_FOREGROUND_COLOR); cbo_nb_level->callback((Fl_Callback*)cb_cbo_nb_level); cbo_nb_level->align(Fl_Align(FL_ALIGN_LEFT)); cbo_nb_level->when(FL_WHEN_RELEASE); cbo_nb_level->index(progStatus.nb_level); cbo_nb_level->end(); cbo_agc_level = new Fl_ComboBox(244, 187, 80, 20, _("AGC")); cbo_agc_level->tooltip(_("Select Transceiver")); cbo_agc_level->box(FL_DOWN_BOX); cbo_agc_level->color(FL_BACKGROUND_COLOR); cbo_agc_level->selection_color(FL_BACKGROUND_COLOR); cbo_agc_level->labeltype(FL_NORMAL_LABEL); cbo_agc_level->labelfont(0); cbo_agc_level->labelsize(14); cbo_agc_level->labelcolor(FL_FOREGROUND_COLOR); cbo_agc_level->callback((Fl_Callback*)cb_cbo_agc_level); cbo_agc_level->align(Fl_Align(FL_ALIGN_LEFT)); cbo_agc_level->when(FL_WHEN_RELEASE); cbo_agc_level->end(); spnr_bpf_center = new Hspinner(474, 187, 96, 20, _("BPF Center Freq")); spnr_bpf_center->tooltip(_("Bandpass Filter Center Freq")); spnr_bpf_center->type(FL_INT_INPUT); spnr_bpf_center->minimum(600); spnr_bpf_center->maximum(2500); spnr_bpf_center->step(10); spnr_bpf_center->value(1500); spnr_bpf_center->callback((Fl_Callback*)cb_spnr_bpf_center); spnr_bpf_center->align(Fl_Align(36)); spnr_bpf_center->value(progStatus.bpf_center); btn_use_bpf_center = new Fl_Check_Button(627, 189, 50, 15, _("On")); btn_use_bpf_center->tooltip(_("Use Filter Center Freq Adj")); btn_use_bpf_center->down_box(FL_DOWN_BOX); btn_use_bpf_center->value(1); btn_use_bpf_center->callback((Fl_Callback*)cb_btn_use_bpf_center); btn_use_bpf_center->value(progStatus.use_bpf_center); } genericRx->end(); genericMisc = new Fl_Group(xpos, ypos, W, tabs2_h, _("Misc")); { genericMisc->hide(); spnr_vfo_adj = new Hspinner(60, 187, 96, 20, _("Vfo Adj")); spnr_vfo_adj->type(FL_INT_INPUT); spnr_vfo_adj->callback((Fl_Callback*)cb_spnr_vfo_adj); spnr_vfo_adj->align(Fl_Align(36)); spnr_vfo_adj->value(progStatus.vfo_adj); spnr_line_out = new Hspinner(225, 187, 70, 20, _("line out")); spnr_line_out->type(FL_INT_INPUT); spnr_line_out->minimum(0); spnr_line_out->maximum(100); spnr_line_out->step(1); spnr_line_out->value(20); spnr_line_out->callback((Fl_Callback*)cb_spnr_line_out); spnr_line_out->align(Fl_Align(FL_ALIGN_LEFT)); spnr_line_out->value(progStatus.line_out); btnSpecial = new Fl_Light_Button(300, 187, 74, 20, _("Special")); btnSpecial->callback((Fl_Callback*)cb_btnSpecial); btn_ext_tuner = new Fl_Check_Button(380, 189, 80, 15, _("Ext tuner")); btn_ext_tuner->tooltip(_("use external auto tuner")); btn_ext_tuner->down_box(FL_DOWN_BOX); btn_ext_tuner->callback((Fl_Callback*)cb_btn_ext_tuner); btn_ext_tuner->value(progStatus.external_tuner); btn_xcvr_auto_on = new Fl_Check_Button(470, 189, 95, 15, _("Rig autOn")); btn_xcvr_auto_on->tooltip(_("Auto Turn Rig On with Flrig startup")); btn_xcvr_auto_on->down_box(FL_DOWN_BOX); btn_xcvr_auto_on->callback((Fl_Callback*)cb_btn_xcvr_auto_on); btn_xcvr_auto_on->value(progStatus.xcvr_auto_on); btn_xcvr_auto_off = new Fl_Check_Button(607, 189, 95, 15, _("Rig autOff")); btn_xcvr_auto_off->tooltip(_("Auto Turn Rig Off with Flrig exit")); btn_xcvr_auto_off->down_box(FL_DOWN_BOX); btn_xcvr_auto_off->callback((Fl_Callback*)cb_btn_xcvr_auto_off); btn_xcvr_auto_off->value(progStatus.xcvr_auto_off); } genericMisc->end(); genericRXB = new Fl_Group(xpos, ypos, W, tabs2_h, _("RIT/XIT/BFO")); { genericRXB->hide(); cntRIT = new Hspinner(218, 187, 60, 20, _("Rit")); cntRIT->tooltip(_("RIT")); cntRIT->type(FL_INT_INPUT); cntRIT->labelsize(12); cntRIT->minimum(-1000); cntRIT->maximum(1000); cntRIT->step(10); cntRIT->callback((Fl_Callback*)cb_cntRIT); cntRIT->align(Fl_Align(FL_ALIGN_RIGHT)); cntXIT = new Hspinner(366, 187, 60, 20, _("Xit")); cntXIT->tooltip(_("XIT")); cntXIT->type(FL_INT_INPUT); cntXIT->labelsize(12); cntXIT->minimum(-1000); cntXIT->maximum(1000); cntXIT->step(10); cntXIT->callback((Fl_Callback*)cb_cntXIT); cntXIT->align(Fl_Align(FL_ALIGN_RIGHT)); cntBFO = new Hspinner(514, 187, 54, 20, _("Bfo")); cntBFO->tooltip(_("BFO")); cntBFO->type(FL_INT_INPUT); cntBFO->labelsize(12); cntBFO->minimum(0); cntBFO->maximum(1000); cntBFO->step(10); cntBFO->value(600); cntBFO->callback((Fl_Callback*)cb_cntBFO); cntBFO->align(Fl_Align(FL_ALIGN_RIGHT)); } genericRXB->end(); genericAux = new Fl_Group(xpos, ypos, W, tabs2_h, _("Aux")); { genericAux->hide(); boxControl = new Fl_Box(57, 187, 130, 20, _("Auxilliary Controls:")); boxControl->box(FL_FLAT_BOX); boxControl->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); btnAuxRTS = new Fl_Light_Button(272, 187, 60, 20, _("RTS")); btnAuxRTS->tooltip(_("RTS control pin")); btnAuxRTS->down_box(FL_THIN_DOWN_BOX); btnAuxRTS->labelsize(12); btnAuxRTS->callback((Fl_Callback*)cb_btnAuxRTS); btnAuxRTS->value(progStatus.aux_rts); btnAuxDTR = new Fl_Light_Button(200, 187, 60, 20, _("DTR")); btnAuxDTR->tooltip(_("DTR control pin")); btnAuxDTR->down_box(FL_THIN_DOWN_BOX); btnAuxDTR->labelsize(12); btnAuxDTR->callback((Fl_Callback*)cb_btnAuxDTR); btnAuxDTR->value(progStatus.aux_dtr); btnDataPort = new Fl_Light_Button(408, 187, 60, 20, _("Data")); btnDataPort->tooltip(_("Input on Data Port")); btnDataPort->down_box(FL_THIN_DOWN_BOX); btnDataPort->labelsize(12); btnDataPort->callback((Fl_Callback*)cb_btnDataPort); btnDataPort->value(progStatus.data_port); } genericAux->end(); } tabsGeneric->end(); tabsGeneric->hide(); ypos = ytabs; tabs550 = new Fl_Tabs(xpos, ypos, W, tabs_h); ypos += 24; { tabs550->selection_color(FL_LIGHT1); tt550_CW = new Fl_Group(xpos, ypos, W, tabs2_h, _("CW")); { tt550_CW->color(FL_LIGHT1); tt550_CW->selection_color(FL_LIGHT1); spnr_tt550_cw_wpm = new Hspinner(55, 187, 67, 20, _("wpm"), 15); spnr_tt550_cw_wpm->type(FL_INT_INPUT); spnr_tt550_cw_wpm->minimum(5); spnr_tt550_cw_wpm->maximum(80); spnr_tt550_cw_wpm->step(1); spnr_tt550_cw_wpm->value(20); spnr_tt550_cw_wpm->callback((Fl_Callback*)cb_spnr_tt550_cw_wpm); spnr_tt550_cw_wpm->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_cw_wpm->value(progStatus.tt550_cw_wpm); spnr_tt550_cw_weight = new Hspinner(187, 187, 67, 20, _("Weight"), 15); spnr_tt550_cw_weight->type(FL_INT_INPUT); spnr_tt550_cw_weight->minimum(0.75); spnr_tt550_cw_weight->maximum(1.5); spnr_tt550_cw_weight->step(0.05); spnr_tt550_cw_weight->value(20); spnr_tt550_cw_weight->callback((Fl_Callback*)cb_spnr_tt550_cw_weight); spnr_tt550_cw_weight->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_cw_weight->value(progStatus.tt550_cw_weight); spnr_tt550_cw_qsk = new Hspinner(311, 187, 67, 20, _("Delay"), 15); spnr_tt550_cw_qsk->tooltip(_("QSK delay (msec)")); spnr_tt550_cw_qsk->type(FL_INT_INPUT); spnr_tt550_cw_qsk->minimum(0); spnr_tt550_cw_qsk->maximum(100); spnr_tt550_cw_qsk->step(1); spnr_tt550_cw_qsk->value(20); spnr_tt550_cw_qsk->callback((Fl_Callback*)cb_spnr_tt550_cw_qsk); spnr_tt550_cw_qsk->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_cw_qsk->value(progStatus.tt550_cw_qsk); spnr_tt550_cw_vol = new Hspinner(447, 187, 67, 20, _("S-T vol"), 15); spnr_tt550_cw_vol->tooltip(_("Side tone volume")); spnr_tt550_cw_vol->type(FL_INT_INPUT); spnr_tt550_cw_vol->minimum(5); spnr_tt550_cw_vol->maximum(80); spnr_tt550_cw_vol->step(1); spnr_tt550_cw_vol->value(20); spnr_tt550_cw_vol->callback((Fl_Callback*)cb_spnr_tt550_cw_vol); spnr_tt550_cw_vol->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_cw_vol->value(progStatus.tt550_cw_vol); spnr_tt550_cw_spot = new Hspinner(590, 187, 67, 20, _("Spot Vol"), 15); spnr_tt550_cw_spot->tooltip(_("Spot volume")); spnr_tt550_cw_spot->type(FL_INT_INPUT); spnr_tt550_cw_spot->minimum(0); spnr_tt550_cw_spot->maximum(100); spnr_tt550_cw_spot->step(1); spnr_tt550_cw_spot->value(20); spnr_tt550_cw_spot->callback((Fl_Callback*)cb_spnr_tt550_cw_spot); spnr_tt550_cw_spot->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_cw_spot->value(progStatus.tt550_cw_spot); btn_tt550_enable_keyer = new Fl_Check_Button(662, 189, 63, 16, _("Keyer")); btn_tt550_enable_keyer->tooltip(_("Enable keyer")); btn_tt550_enable_keyer->down_box(FL_DOWN_BOX); btn_tt550_enable_keyer->callback((Fl_Callback*)cb_btn_tt550_enable_keyer); btn_tt550_enable_keyer->value(progStatus.tt550_enable_keyer); } tt550_CW->end(); tabs550->resizable(tt550_CW); tt550_VOX = new Fl_Group(xpos, ypos, W, tabs2_h, _("Vox")); { tt550_VOX->hide(); spnr_tt550_vox_gain = new Hspinner(101, 187, 79, 20, _("gain"), 15); spnr_tt550_vox_gain->type(FL_INT_INPUT); spnr_tt550_vox_gain->minimum(0); spnr_tt550_vox_gain->maximum(100); spnr_tt550_vox_gain->step(1); spnr_tt550_vox_gain->callback((Fl_Callback*)cb_spnr_tt550_vox_gain); spnr_tt550_vox_gain->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_vox_gain->value(progStatus.tt550_vox_gain); spnr_tt550_anti_vox = new Hspinner(299, 187, 78, 20, _("anti"), 15); spnr_tt550_anti_vox->type(FL_INT_INPUT); spnr_tt550_anti_vox->minimum(0); spnr_tt550_anti_vox->maximum(100); spnr_tt550_anti_vox->step(1); spnr_tt550_anti_vox->callback((Fl_Callback*)cb_spnr_tt550_anti_vox); spnr_tt550_anti_vox->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_anti_vox->value(progStatus.tt550_vox_anti); spnr_tt550_vox_hang = new Hspinner(497, 187, 78, 20, _("hang"), 15); spnr_tt550_vox_hang->type(FL_INT_INPUT); spnr_tt550_vox_hang->minimum(0); spnr_tt550_vox_hang->maximum(100); spnr_tt550_vox_hang->step(1); spnr_tt550_vox_hang->callback((Fl_Callback*)cb_spnr_tt550_vox_hang); spnr_tt550_vox_hang->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_vox_hang->value(progStatus.tt550_vox_hang); btn_tt550_vox = new Fl_Light_Button(633, 187, 78, 20, _("VOX")); btn_tt550_vox->callback((Fl_Callback*)cb_btn_tt550_vox); btn_tt550_vox->value(progStatus.tt550_vox_onoff); } tt550_VOX->end(); tt550_Speech = new Fl_Group(xpos, ypos, W, tabs2_h, _("Spch")); { tt550_Speech->hide(); btn_tt550_CompON = new Fl_Light_Button(559, 187, 78, 20, _("On")); btn_tt550_CompON->callback((Fl_Callback*)cb_btn_tt550_CompON); btn_tt550_CompON->value(progStatus.tt550_compON); spnr_tt550_compression = new Hspinner(422, 187, 78, 20, _("Comp")); spnr_tt550_compression->type(FL_INT_INPUT); spnr_tt550_compression->minimum(0); spnr_tt550_compression->maximum(100); spnr_tt550_compression->step(1); spnr_tt550_compression->callback((Fl_Callback*)cb_spnr_tt550_compression); spnr_tt550_compression->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_compression->value(progStatus.tt550_compression); spnr_tt550_mon_vol = new Hspinner(247, 187, 78, 20, _("Mon vol")); spnr_tt550_mon_vol->tooltip(_("Side tone volume")); spnr_tt550_mon_vol->type(FL_INT_INPUT); spnr_tt550_mon_vol->minimum(0); spnr_tt550_mon_vol->maximum(100); spnr_tt550_mon_vol->step(1); spnr_tt550_mon_vol->value(25); spnr_tt550_mon_vol->callback((Fl_Callback*)cb_spnr_tt550_mon_vol); spnr_tt550_mon_vol->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_mon_vol->value(progStatus.tt550_mon_vol); } tt550_Speech->end(); tt550_Audio = new Fl_Group(xpos, ypos, W, tabs2_h, _("Audio")); { tt550_Audio->hide(); spnr_tt550_line_out = new Hspinner(296, 187, 77, 20, _("line out"), 15); spnr_tt550_line_out->type(FL_INT_INPUT); spnr_tt550_line_out->minimum(0); spnr_tt550_line_out->maximum(100); spnr_tt550_line_out->step(1); spnr_tt550_line_out->value(20); spnr_tt550_line_out->callback((Fl_Callback*)cb_spnr_tt550_line_out); spnr_tt550_line_out->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_line_out->value(progStatus.tt550_line_out); btnAccInp = new Fl_Check_Button(455, 187, 92, 16, _("Acc Inp.")); btnAccInp->tooltip(_("Enable to use accessory audio input")); btnAccInp->down_box(FL_DOWN_BOX); btnAccInp->callback((Fl_Callback*)cb_btnAccInp); btnAccInp->value(progStatus.tt550_use_line_in); } tt550_Audio->end(); tt550_Rx = new Fl_Group(xpos, ypos, W, tabs2_h, _("RX")); { tt550_Rx->hide(); cbo_tt550_nb_level = new Fl_ComboBox(179, 187, 89, 20, _("NB level")); cbo_tt550_nb_level->tooltip(_("Select Noise Blanker level")); cbo_tt550_nb_level->box(FL_DOWN_BOX); cbo_tt550_nb_level->color(FL_WHITE); cbo_tt550_nb_level->selection_color(FL_BACKGROUND_COLOR); cbo_tt550_nb_level->labeltype(FL_NORMAL_LABEL); cbo_tt550_nb_level->labelfont(0); cbo_tt550_nb_level->labelsize(14); cbo_tt550_nb_level->labelcolor(FL_FOREGROUND_COLOR); cbo_tt550_nb_level->callback((Fl_Callback*)cb_cbo_tt550_nb_level); cbo_tt550_nb_level->align(Fl_Align(FL_ALIGN_LEFT)); cbo_tt550_nb_level->when(FL_WHEN_RELEASE); cbo_tt550_nb_level->index(progStatus.tt550_nb_level); cbo_tt550_nb_level->end(); cbo_tt550_agc_level = new Fl_ComboBox(340, 187, 90, 20, _("AGC")); cbo_tt550_agc_level->tooltip(_("Select AGC")); cbo_tt550_agc_level->box(FL_DOWN_BOX); cbo_tt550_agc_level->color(FL_WHITE); cbo_tt550_agc_level->selection_color(FL_BACKGROUND_COLOR); cbo_tt550_agc_level->labeltype(FL_NORMAL_LABEL); cbo_tt550_agc_level->labelfont(0); cbo_tt550_agc_level->labelsize(14); cbo_tt550_agc_level->labelcolor(FL_FOREGROUND_COLOR); cbo_tt550_agc_level->callback((Fl_Callback*)cb_cbo_tt550_agc_level); cbo_tt550_agc_level->align(Fl_Align(FL_ALIGN_LEFT)); cbo_tt550_agc_level->when(FL_WHEN_RELEASE); cbo_tt550_agc_level->index(progStatus.tt550_agc_level); cbo_tt550_agc_level->end(); spnr_tt550_vfo_adj = new Hspinner(556, 187, 134, 20, _("Vfo Adj(ppm)")); spnr_tt550_vfo_adj->callback((Fl_Callback*)cb_spnr_tt550_vfo_adj); spnr_tt550_vfo_adj->align(FL_ALIGN_LEFT); spnr_tt550_vfo_adj->minimum(-100); spnr_tt550_vfo_adj->maximum(100); spnr_tt550_vfo_adj->type(FL_FLOAT_INPUT); spnr_tt550_vfo_adj->step(0.1); spnr_tt550_vfo_adj->value(progStatus.vfo_adj); } tt550_Rx->end(); tt550_Tx = new Fl_Group(xpos, ypos, W, tabs2_h, _("TX")); { tt550_Tx->hide(); btn_tt550_enable_xmtr = new Fl_Check_Button(111, 187, 78, 16, _("Tx ON")); btn_tt550_enable_xmtr->down_box(FL_DOWN_BOX); btn_tt550_enable_xmtr->value(1); btn_tt550_enable_xmtr->callback((Fl_Callback*)cb_btn_tt550_enable_xmtr); btn_tt550_enable_xmtr->value(progStatus.tt550_enable_xmtr); btn_tt550_enable_tloop = new Fl_Check_Button(197, 187, 78, 16, _("Tloop")); btn_tt550_enable_tloop->down_box(FL_DOWN_BOX); btn_tt550_enable_tloop->callback((Fl_Callback*)cb_btn_tt550_enable_tloop); btn_tt550_enable_tloop->value(progStatus.tt550_enable_tloop); btn_tt550_tuner_bypass = new Fl_Check_Button(283, 187, 78, 16, _("Tuner")); btn_tt550_tuner_bypass->tooltip(_("Check to bypass tuner")); btn_tt550_tuner_bypass->down_box(FL_DOWN_BOX); btn_tt550_tuner_bypass->callback((Fl_Callback*)cb_btn_tt550_tuner_bypass); op_tt550_XmtBW = new Fl_ComboBox(462, 187, 112, 20, _("Xmt BW")); op_tt550_XmtBW->tooltip(_("Select Transceiver Bandwidth")); op_tt550_XmtBW->box(FL_DOWN_BOX); op_tt550_XmtBW->color(FL_WHITE); op_tt550_XmtBW->selection_color(FL_BACKGROUND_COLOR); op_tt550_XmtBW->labeltype(FL_NORMAL_LABEL); op_tt550_XmtBW->labelfont(0); op_tt550_XmtBW->labelsize(12); op_tt550_XmtBW->labelcolor(FL_FOREGROUND_COLOR); op_tt550_XmtBW->callback((Fl_Callback*)cb_op_tt550_XmtBW); op_tt550_XmtBW->align(Fl_Align(FL_ALIGN_LEFT)); op_tt550_XmtBW->when(FL_WHEN_RELEASE); op_tt550_XmtBW->index(progStatus.tt550_xmt_bw); op_tt550_XmtBW->end(); btn_tt550_use_xmt_bw = new Fl_Check_Button(613, 187, 23, 16, _("Enable")); btn_tt550_use_xmt_bw->tooltip(_("Use Xmt BW setting")); btn_tt550_use_xmt_bw->down_box(FL_DOWN_BOX); btn_tt550_use_xmt_bw->callback((Fl_Callback*)cb_btn_tt550_use_xmt_bw); btn_tt550_use_xmt_bw->align(Fl_Align(FL_ALIGN_RIGHT)); btn_tt550_use_xmt_bw->value(progStatus.tt550_use_xmt_bw); } tt550_Tx->end(); tt550_302A = new Fl_Group(xpos, ypos, W, tabs2_h, _("302-A")); { tt550_302A->hide(); spnr_tt550_keypad_time_out = new Hspinner(106, 187, 134, 20, _("Time out")); spnr_tt550_keypad_time_out->tooltip(_("Clear M302 keypad after ## secs")); spnr_tt550_keypad_time_out->minimum(0.5); spnr_tt550_keypad_time_out->maximum(10); spnr_tt550_keypad_time_out->value(2); spnr_tt550_keypad_time_out->callback((Fl_Callback*)cb_spnr_tt550_keypad_time_out); spnr_tt550_keypad_time_out->align(Fl_Align(36)); spnr_tt550_keypad_time_out->value(progStatus.tt550_keypad_timeout/1000.0); spnr_tt550_keypad_time_out->step(0.1); spnr_tt550_encoder_sensitivity = new Hspinner(354, 187, 89, 20, _("Sensitivity")); spnr_tt550_encoder_sensitivity->tooltip(_("1 - most sensitive")); spnr_tt550_encoder_sensitivity->type(FL_INT_INPUT); spnr_tt550_encoder_sensitivity->minimum(1); spnr_tt550_encoder_sensitivity->maximum(25); spnr_tt550_encoder_sensitivity->step(1); spnr_tt550_encoder_sensitivity->value(10); spnr_tt550_encoder_sensitivity->callback((Fl_Callback*)cb_spnr_tt550_encoder_sensitivity); spnr_tt550_encoder_sensitivity->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_encoder_sensitivity->value(progStatus.tt550_encoder_sensitivity); sel_tt550_encoder_step = new Fl_Choice(575, 187, 80, 20, _("Step size")); sel_tt550_encoder_step->down_box(FL_BORDER_BOX); sel_tt550_encoder_step->callback((Fl_Callback*)cb_sel_tt550_encoder_step); sel_tt550_encoder_step->add("1|10|100|1 K|10 K"); sel_tt550_encoder_step->value(progStatus.tt550_encoder_step); } tt550_302A->end(); tt550_302B = new Fl_Group(xpos, ypos, W, tabs2_h, _("302-B")); { tt550_302B->hide(); sel_tt550_F1_func = new Fl_Choice(168, 187, 111, 20, _("F1")); sel_tt550_F1_func->tooltip(_("Assign Func Key")); sel_tt550_F1_func->down_box(FL_BORDER_BOX); sel_tt550_F1_func->callback((Fl_Callback*)cb_sel_tt550_F1_func); sel_tt550_F1_func->add("None|Clear|CW++|CW--|Band++|Band--|Step++|Step--"); sel_tt550_F1_func->value(progStatus.tt550_F1_func); sel_tt550_F2_func = new Fl_Choice(319, 187, 111, 20, _("F2")); sel_tt550_F2_func->tooltip(_("Assign Func Key")); sel_tt550_F2_func->down_box(FL_BORDER_BOX); sel_tt550_F2_func->callback((Fl_Callback*)cb_sel_tt550_F2_func); sel_tt550_F2_func->add("None|Clear|CW++|CW--|Band++|Band--|Step++|Step--"); sel_tt550_F2_func->value(progStatus.tt550_F2_func); sel_tt550_F3_func = new Fl_Choice(465, 187, 111, 20, _("F3")); sel_tt550_F3_func->tooltip(_("Assign Func Key")); sel_tt550_F3_func->down_box(FL_BORDER_BOX); sel_tt550_F3_func->callback((Fl_Callback*)cb_sel_tt550_F3_func); sel_tt550_F3_func->add("None|Clear|CW++|CW--|Band++|Band--|Step++|Step--"); sel_tt550_F3_func->value(progStatus.tt550_F3_func); } tt550_302B->end(); } tabs550->end(); tabs550->hide(); grpTABS->end(); grpTABS->hide(); } g->end(); g->resizable(grpTABS); return g; } Fl_Double_Window* Wide_rig_window() { int mainW = WIDE_MAINW; int mainH = WIDE_MAINH; int menuH = 22; Fl_Double_Window* w = new Fl_Double_Window(mainW, mainH, _("Flrig")); w->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE)); Fl_Group* grp_menu = new Fl_Group(0, 0, mainW, menuH); wide_menu = new Fl_Menu_Bar(0, 0, mainW - 64, menuH); wide_menu->textsize(12); progStatus.tooltips ? (&menu_wide_menu[6])->set() : (&menu_wide_menu[6])->clear(); wide_menu->menu(menu_wide_menu); Fl_Group *mnu_box = new Fl_Group(mainW - 64, 0, 64, menuH); mnu_box->box(FL_UP_BOX); tcpip_box = new Fl_Group(mainW - 62, 2, 60, 18); tcpip_box->box(FL_FLAT_BOX); tcpip_menu_box = new Fl_Box(mainW - 62, 3, 16, 16); tcpip_menu_box->box(FL_DIAMOND_BOX); tcpip_menu_box->color(FL_GREEN); Fl_Box *tcpip_menu_label = new Fl_Box(mainW - 62 + 18, 3, 64 - 22, 16, _("tcpip")); tcpip_menu_label->box(FL_FLAT_BOX); tcpip_menu_label->align(FL_ALIGN_CENTER); tcpip_menu_label->tooltip(_("lit when connected to remote tcpip")); tcpip_box->end(); tcpip_box->hide(); mnu_box->end(); grp_menu->resizable(wide_menu); grp_menu->end(); mnuRestoreData = (menu_wide_menu+12); mnuKeepData = (menu_wide_menu+13); mnuTooltips = (menu_wide_menu+17); btnInitializing = new Fl_Button(0,menuH,10,10); btnInitializing->hide(); main_group = wide_main_group(0, menuH, mainW, mainH - menuH); main_group->show(); w->resizable(main_group); w->size(mainW, mainH - 70); w->size_range(mainW, mainH - 70, 0, mainH - 70); w->end(); return w; } flrig-1.3.24/src/UI/ui_touch.cxx0000644000175000017500000015430212562731646013315 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- void cbMAIN(Fl_Widget *, void *); void cbSLIDERS(Fl_Widget *, void *); void cbBUTTONS(Fl_Widget *, void *); void cbOTHER(Fl_Widget *, void *); Fl_Menu_Item touch_menu[] = { {_("&File"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("E&xit"), 0, (Fl_Callback*)cb_mnuExit, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("&Config"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Setup"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Transceiver"), 0, (Fl_Callback*)cb_mnuConfigXcvr, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("XmlRpc"), 0, (Fl_Callback*)cb_mnuXMLRPC, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("tcpip"), 0, (Fl_Callback*)cb_mnuTCPIP, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("PTT"), 0, (Fl_Callback*)cb_mnuPTT, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("AUX"), 0, (Fl_Callback*)cb_mnuAUX, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Polling"), 0, (Fl_Callback*)cb_Polling, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("Start/Stop"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Restore Freq/Mode"), 0, (Fl_Callback*)cb_mnuRestoreData, 0, 6, FL_NORMAL_LABEL, 0, 14, 0}, {_("Keep Freq/Mode"), 0, (Fl_Callback*)cb_mnuKeepData, 0, 134, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("UI"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Meter filtering"), 0, (Fl_Callback*)cb_mnu_meter_filtering, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("Tooltips"), 0, (Fl_Callback*)cb_mnuTooltips, 0, 130, FL_NORMAL_LABEL, 0, 14, 0}, {_("User Interface"), 0, (Fl_Callback*)cb_mnuColorConfig, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}, {_("&Memory"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Save"), 0, (Fl_Callback*)cb_save_me, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Manage"), 0, (Fl_Callback*)cb_Memory, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("&Help"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("On Line Help"), 0, (Fl_Callback*)cb_mnuOnLineHelp, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("&About"), 0, (Fl_Callback*)cb_mnuAbout, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("Send command"), 0, (Fl_Callback*)cb_Send, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("&Events"), 0, (Fl_Callback*)cb_Events, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_(" "), 0, 0, 0, FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0}, {_("MAIN "), 0, (Fl_Callback*)cbMAIN, 0, FL_MENU_RADIO | FL_MENU_VALUE, FL_NORMAL_LABEL, 0, 14, 0}, {_("SLIDERS "), 0, (Fl_Callback*)cbSLIDERS, 0, FL_MENU_RADIO, FL_NORMAL_LABEL, 0, 14, 0}, {_("BUTTONS "), 0, (Fl_Callback*)cbBUTTONS, 0, FL_MENU_RADIO, FL_NORMAL_LABEL, 0, 14, 0}, {_("OTHER "), 0, (Fl_Callback*)cbOTHER, 0, FL_MENU_RADIO | FL_MENU_DIVIDER, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0} }; Fl_Group *grpMAIN = (Fl_Group *)0; Fl_Group *grpSLIDERS = (Fl_Group *)0; Fl_Group *grpBUTTONS = (Fl_Group *)0; Fl_Group *grpOTHER = (Fl_Group *)0; void cbMAIN(Fl_Widget *, void *) { grpMAIN->show(); grpSLIDERS->hide(); grpBUTTONS->hide(); grpOTHER->hide(); } void cbSLIDERS(Fl_Widget *, void *) { grpMAIN->hide(); grpSLIDERS->show(); grpBUTTONS->hide(); grpOTHER->hide(); } void cbBUTTONS(Fl_Widget *, void *) { grpMAIN->hide(); grpSLIDERS->hide(); grpBUTTONS->show(); grpOTHER->hide(); } void cbOTHER(Fl_Widget *, void *) { grpMAIN->hide(); grpSLIDERS->hide(); grpBUTTONS->hide(); grpOTHER->show(); } void cb_touch_Vol(Fl_Widget *w, void *d) { cb_btnVol(btnVol, 0); if (btnVol->active()) Fl::focus(sldrVOLUME); } Fl_Group *touch_main_group(int X, int Y, int W, int H) { int ypos = Y + 2; int xpos = X + 2; Fl_Group *tmg = new Fl_Group(X,Y,W,H); grpMAIN = new Fl_Group(xpos, ypos, W-4, H-ypos-2, ""); ypos += 4; // meters group grpMeters = new Fl_Group(xpos, ypos, 208, 60); grpMeters->box(FL_FLAT_BOX); grpMeters->color((Fl_Color)246); scaleSmeter = new Fl_Box(xpos, ypos, 206, 20); scaleSmeter->box(FL_FLAT_BOX); scaleSmeter->color((Fl_Color)246); scaleSmeter->image(image_S60); btnALC_SWR = new Fl_Button(xpos, ypos, 206, 20); btnALC_SWR->tooltip(_("Press SWR / ALC")); btnALC_SWR->box(FL_FLAT_BOX); btnALC_SWR->down_box(FL_FLAT_BOX); btnALC_SWR->color((Fl_Color)246); btnALC_SWR->image(image_SWR); btnALC_SWR->callback((Fl_Callback*)cb_btnALC_SWR); btnALC_SWR->hide(); sldrRcvSignal = new Fl_SigBar(xpos, ypos+22, 200, 6); sldrRcvSignal->box(FL_FLAT_BOX); sldrRcvSignal->color(FL_BACKGROUND_COLOR); sldrRcvSignal->selection_color(FL_BACKGROUND_COLOR); sldrRcvSignal->labeltype(FL_NORMAL_LABEL); sldrRcvSignal->labelfont(0); sldrRcvSignal->labelsize(14); sldrRcvSignal->labelcolor(FL_FOREGROUND_COLOR); sldrRcvSignal->align(Fl_Align(FL_ALIGN_CENTER)); sldrRcvSignal->when(FL_WHEN_RELEASE); sldrRcvSignal->hide(); sldrRcvSignal->minimum(0); sldrRcvSignal->maximum(100); sldrALC = new Fl_SigBar(xpos+2, ypos+22, 200, 6); sldrALC->box(FL_FLAT_BOX); sldrALC->color(FL_BACKGROUND_COLOR); sldrALC->selection_color(FL_BACKGROUND_COLOR); sldrALC->labeltype(FL_NORMAL_LABEL); sldrALC->labelfont(0); sldrALC->labelsize(14); sldrALC->labelcolor(FL_FOREGROUND_COLOR); sldrALC->align(Fl_Align(FL_ALIGN_CENTER)); sldrALC->when(FL_WHEN_RELEASE); sldrALC->hide(); sldrALC->minimum(0); sldrALC->maximum(100); sldrSWR = new Fl_SigBar(xpos+2, ypos+22, 200, 6); sldrSWR->box(FL_FLAT_BOX); sldrSWR->color(FL_BACKGROUND_COLOR); sldrSWR->selection_color(FL_BACKGROUND_COLOR); sldrSWR->labeltype(FL_NORMAL_LABEL); sldrSWR->labelfont(0); sldrSWR->labelsize(14); sldrSWR->labelcolor(FL_FOREGROUND_COLOR); sldrSWR->align(Fl_Align(FL_ALIGN_CENTER)); sldrSWR->when(FL_WHEN_RELEASE); sldrSWR->hide(); sldrSWR->minimum(0); sldrSWR->maximum(100); sldrFwdPwr = new Fl_SigBar(xpos+2, ypos+29, 200, 6); sldrFwdPwr->box(FL_FLAT_BOX); sldrFwdPwr->color(FL_BACKGROUND_COLOR); sldrFwdPwr->selection_color(FL_BACKGROUND_COLOR); sldrFwdPwr->labeltype(FL_NORMAL_LABEL); sldrFwdPwr->labelfont(0); sldrFwdPwr->labelsize(14); sldrFwdPwr->labelcolor(FL_FOREGROUND_COLOR); sldrFwdPwr->align(Fl_Align(FL_ALIGN_CENTER)); sldrFwdPwr->when(FL_WHEN_RELEASE); sldrFwdPwr->hide(); sldrFwdPwr->minimum(0); sldrFwdPwr->maximum(100); scalePower = new Fl_Button(xpos, ypos+36, 206, 20); scalePower->tooltip(_("right-click to select power scale")); scalePower->box(FL_FLAT_BOX); scalePower->down_box(FL_FLAT_BOX); scalePower->color((Fl_Color)246); scalePower->image(image_P100); scalePower->callback((Fl_Callback*)cb_scalePower); meter_fill_box = new Fl_Box(xpos+210, ypos+4, 0, 57); meter_fill_box->box(FL_FLAT_BOX); meter_fill_box->color((Fl_Color)246); Fl_Group::current()->resizable(meter_fill_box); grpMeters->end(); // end of meters group // bw / mode selector group ypos += 62; Fl_Group *grpcombos = new Fl_Group(xpos, ypos, 208, 35); opBW = new Fl_ComboBox(xpos, ypos, 115, 35, ""); opBW->tooltip(_("Select Transceiver Bandwidth")); opBW->box(FL_FLAT_BOX); opBW->color(FL_BACKGROUND2_COLOR); opBW->selection_color(FL_BACKGROUND_COLOR); opBW->labeltype(FL_NORMAL_LABEL); opBW->labelfont(0); opBW->labelsize(12); opBW->textfont(0); opBW->textsize(14); opBW->labelcolor(FL_FOREGROUND_COLOR); opBW->callback((Fl_Callback*)cb_opBW); opBW->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opBW->when(FL_WHEN_RELEASE); opBW->end(); opMODE = new Fl_ComboBox(xpos + opBW->w() + 2, ypos, 208 - opBW->w() - 2, 35, ""); opMODE->tooltip(_("Select transceiver operating mode")); opMODE->box(FL_FLAT_BOX); opMODE->color(FL_BACKGROUND2_COLOR); opMODE->selection_color(FL_BACKGROUND_COLOR); opMODE->labeltype(FL_NORMAL_LABEL); opMODE->labelfont(0); opMODE->labelsize(12); opMODE->labelcolor(FL_FOREGROUND_COLOR); opMODE->textfont(0); opMODE->textsize(14); opMODE->callback((Fl_Callback*)cb_opMODE); opMODE->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opMODE->when(FL_WHEN_RELEASE); opMODE->end(); btnDSP = new Fl_Button(xpos, ypos, 30, 35, _("L")); btnDSP->callback((Fl_Callback*)cb_btnDSP); btnDSP->labelsize(14); btnDSP->hide(); opDSP_lo = new Fl_ComboBox(xpos+30, ypos, opBW->w() - 30, 35, ""); opDSP_lo->tooltip(_("Lo Cut Freq")); opDSP_lo->box(FL_FLAT_BOX); opDSP_lo->color(FL_BACKGROUND2_COLOR); opDSP_lo->selection_color(FL_BACKGROUND_COLOR); opDSP_lo->labeltype(FL_NORMAL_LABEL); opDSP_lo->labelfont(0); opDSP_lo->labelsize(12); opDSP_lo->textfont(0); opDSP_lo->textsize(14);; opDSP_lo->labelcolor(FL_FOREGROUND_COLOR); opDSP_lo->callback((Fl_Callback*)cb_opDSP_lo); opDSP_lo->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opDSP_lo->when(FL_WHEN_RELEASE); opDSP_lo->hide(); opDSP_lo->end(); opDSP_hi = new Fl_ComboBox(xpos+30, ypos, opBW->w() - 30, 35, ""); opDSP_hi->tooltip(_("Hi Cut Freq")); opDSP_hi->box(FL_FLAT_BOX); opDSP_hi->color(FL_BACKGROUND2_COLOR); opDSP_hi->selection_color(FL_BACKGROUND_COLOR); opDSP_hi->labeltype(FL_NORMAL_LABEL); opDSP_hi->labelfont(0); opDSP_hi->labelsize(12); opDSP_hi->textfont(0); opDSP_hi->textsize(14);; opDSP_hi->labelcolor(FL_FOREGROUND_COLOR); opDSP_hi->callback((Fl_Callback*)cb_opDSP_hi); opDSP_hi->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opDSP_hi->when(FL_WHEN_RELEASE); opDSP_hi->hide(); opDSP_hi->end(); grpcombos->end(); // end of bw / mode selector group xpos += grpMeters->w() + 2; ypos = Y + 2; FreqDispA = new cFreqControl(xpos, ypos, 480, 100, _("9")); FreqDispA->box(FL_DOWN_BOX); FreqDispA->color(FL_BACKGROUND_COLOR); FreqDispA->selection_color(FL_BACKGROUND_COLOR); FreqDispA->labeltype(FL_NORMAL_LABEL); FreqDispA->labelfont(0); FreqDispA->labelsize(14); FreqDispA->labelcolor(FL_FOREGROUND_COLOR); FreqDispA->align(Fl_Align(FL_ALIGN_CENTER)); FreqDispA->when(FL_WHEN_CHANGED); FreqDispA->SetONOFFCOLOR (FL_YELLOW, FL_BLACK); FreqDispA->setCallBack(movFreqA); // FreqDispB hides behind FreqDispA FreqDispB = new cFreqControl(xpos, ypos, 480, 100, _("9")); FreqDispB->box(FL_DOWN_BOX); FreqDispB->color(FL_BACKGROUND_COLOR); FreqDispB->selection_color(FL_BACKGROUND_COLOR); FreqDispB->labeltype(FL_NORMAL_LABEL); FreqDispB->labelfont(0); FreqDispB->labelsize(14); FreqDispB->labelcolor(FL_FOREGROUND_COLOR); FreqDispB->align(Fl_Align(FL_ALIGN_CENTER)); FreqDispB->when(FL_WHEN_CHANGED); FreqDispB->SetONOFFCOLOR (FL_YELLOW, FL_BLACK); FreqDispB->setCallBack(movFreqB); FreqDispB->hide(); xpos += FreqDispA->w() + 2; btnA = new Fl_Light_Button(xpos, ypos, 49, 49, _("A")); btnA->tooltip(_("vfo A")); btnA->down_box(FL_THIN_DOWN_BOX); btnA->labelsize(16);; btnA->callback((Fl_Callback*)cb_btnA); btnA->value(!useB); btnB = new Fl_Light_Button(xpos, ypos+51, 49, 49, _("B")); btnB->tooltip(_("vfo B")); btnB->down_box(FL_THIN_DOWN_BOX); btnB->labelsize(16); btnB->callback((Fl_Callback*)cb_btnB); btnB->value(useB); xpos = W - 2 - 75; btnPTT = new Fl_Light_Button(xpos, ypos, 75, 100, _("PTT")); btnPTT->tooltip(_("Xmt On/Off")); btnPTT->down_box(FL_THIN_DOWN_BOX); btnPTT->labelsize(18);; btnPTT->callback((Fl_Callback*)cb_btnPTT); xpos = btnA->x() + btnA->w() + 2; int ws = btnPTT->x() - 8 - xpos; Fl_Group *sliders1 = new Fl_Group(xpos, ypos, ws, H - 30); Fl_Group *g1a = new Fl_Group(xpos, ypos, 50, H-30); btnVol = new Fl_Light_Button(xpos, ypos + 51, 49, 49, _("Vol")); btnVol->tooltip(_("Speaker on/off")); btnVol->down_box(FL_THIN_DOWN_BOX); btnVol->value(1); btnVol->labelsize(15);; btnVol->callback((Fl_Callback*)cb_touch_Vol); g1a->end(); Fl_Group *g1b = new Fl_Group(xpos + 50, ypos, ws - 50, H - 30); // int swidth = btnPTT->x() - 2 - xpos; sldrPOWER = new Fl_Wheel_Value_Slider(xpos+50, ypos, ws-50, 49, _("PWR")); sldrPOWER->tooltip(_("Adjust power level")); sldrPOWER->type(5); sldrPOWER->box(FL_THIN_DOWN_BOX); sldrPOWER->color(FL_BACKGROUND_COLOR); sldrPOWER->selection_color(FL_BACKGROUND_COLOR); sldrPOWER->labeltype(FL_NORMAL_LABEL); sldrPOWER->labelfont(0); sldrPOWER->labelsize(14); sldrPOWER->labelcolor(FL_FOREGROUND_COLOR); sldrPOWER->maximum(100); sldrPOWER->step(1); sldrPOWER->value(15); sldrPOWER->textsize(14); sldrPOWER->callback((Fl_Callback*)cb_sldrPOWER); sldrPOWER->align(Fl_Align(FL_ALIGN_LEFT)); sldrPOWER->when(FL_WHEN_CHANGED); sldrPOWER->reverse(true); sldrVOLUME = new Fl_Wheel_Value_Slider(xpos + 50, ypos + 51, ws - 50, 49); sldrVOLUME->tooltip(_("Adjust Audio Volume")); sldrVOLUME->type(5); sldrVOLUME->box(FL_THIN_DOWN_BOX); sldrVOLUME->color(FL_BACKGROUND_COLOR); sldrVOLUME->selection_color(FL_BACKGROUND_COLOR); sldrVOLUME->labeltype(FL_NORMAL_LABEL); sldrVOLUME->labelfont(0); sldrVOLUME->labelsize(12); sldrVOLUME->labelcolor(FL_FOREGROUND_COLOR); sldrVOLUME->maximum(100); sldrVOLUME->step(1); sldrVOLUME->textsize(14); sldrVOLUME->callback((Fl_Callback*)cb_sldrVOLUME); sldrVOLUME->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrVOLUME->when(FL_WHEN_CHANGED); Fl_Group::current()->resizable(sldrVOLUME); sldrVOLUME->reverse(true); g1b->end(); sliders1->resizable(g1b); sliders1->end(); grpMAIN->resizable(sliders1); grpMAIN->end(); xpos = X + 4; ypos = Y + 4; grpSLIDERS = new Fl_Group(xpos, ypos, W, H-ypos, ""); int wg = (W - 16) / 3; int cw = 60; int rh = 48; int ch = 100; int spw = wg - cw; Fl_Group *col1 = new Fl_Group(xpos, ypos, wg, ch); Fl_Group *col1a = new Fl_Group(xpos, ypos, cw, ch, ""); col1a->end(); Fl_Group *col1b = new Fl_Group(xpos + cw, ypos, spw, ch, ""); sldrSQUELCH = new Fl_Wheel_Value_Slider(xpos + cw, ypos, spw, rh, _("SQL")); sldrSQUELCH->tooltip(_("Adjust Squelch")); sldrSQUELCH->type(5); sldrSQUELCH->box(FL_THIN_DOWN_BOX); sldrSQUELCH->color(FL_BACKGROUND_COLOR); sldrSQUELCH->selection_color(FL_BACKGROUND_COLOR); sldrSQUELCH->labeltype(FL_NORMAL_LABEL); sldrSQUELCH->labelfont(0); sldrSQUELCH->labelsize(14); sldrSQUELCH->labelcolor(FL_FOREGROUND_COLOR); sldrSQUELCH->maximum(100); sldrSQUELCH->step(1); sldrSQUELCH->value(15); sldrSQUELCH->textsize(14); sldrSQUELCH->callback((Fl_Callback*)cb_sldrSQUELCH); sldrSQUELCH->align(Fl_Align(FL_ALIGN_LEFT)); sldrSQUELCH->when(FL_WHEN_CHANGED); sldrSQUELCH->reverse(true); sldrMICGAIN = new Fl_Wheel_Value_Slider(xpos + cw, ypos + ch/2, spw, rh, _("Mic")); sldrMICGAIN->tooltip(_("Adjust Mic Gain")); sldrMICGAIN->type(5); sldrMICGAIN->box(FL_THIN_DOWN_BOX); sldrMICGAIN->color(FL_BACKGROUND_COLOR); sldrMICGAIN->selection_color(FL_BACKGROUND_COLOR); sldrMICGAIN->labeltype(FL_NORMAL_LABEL); sldrMICGAIN->labelfont(0); sldrMICGAIN->labelsize(14); sldrMICGAIN->labelcolor(FL_FOREGROUND_COLOR); sldrMICGAIN->maximum(100); sldrMICGAIN->step(1); sldrMICGAIN->textsize(14); sldrMICGAIN->callback((Fl_Callback*)cb_sldrMICGAIN); sldrMICGAIN->align(Fl_Align(FL_ALIGN_LEFT)); sldrMICGAIN->when(FL_WHEN_CHANGED); sldrMICGAIN->reverse(true); col1b->end(); col1->resizable(col1b); col1->end(); xpos += wg; Fl_Group *sep1 = new Fl_Group(xpos, ypos, 4, ch); sep1->box(FL_FLAT_BOX); sep1->end(); xpos += 4; Fl_Group *col2 = new Fl_Group(xpos, ypos, wg, ch); Fl_Group *col2a = new Fl_Group (xpos, ypos, cw, ch); btnIFsh = new Fl_Light_Button(xpos, ypos, cw, rh, _("IFsh")); btnIFsh->tooltip(_("IF Shift On/Off")); btnIFsh->down_box(FL_THIN_DOWN_BOX); btnIFsh->labelsize(16); btnIFsh->callback((Fl_Callback*)cb_btnIFsh); btnNR = new Fl_Light_Button(xpos, ypos+ch/2, cw, rh, _("NR")); btnNR->tooltip(_("Noise Reduction On/Off")); btnNR->down_box(FL_THIN_DOWN_BOX); btnNR->labelsize(16); btnNR->callback((Fl_Callback*)cb_btnNR); col2a->end(); Fl_Group *col2b = new Fl_Group (xpos+cw, ypos, spw, ch); sldrIFSHIFT = new Fl_Wheel_Value_Slider(xpos+cw, ypos, spw, rh); sldrIFSHIFT->tooltip(_("Adjust IF Shift")); sldrIFSHIFT->type(5); sldrIFSHIFT->box(FL_THIN_DOWN_BOX); sldrIFSHIFT->color(FL_BACKGROUND_COLOR); sldrIFSHIFT->selection_color(FL_BACKGROUND_COLOR); sldrIFSHIFT->labeltype(FL_NORMAL_LABEL); sldrIFSHIFT->labelfont(0); sldrIFSHIFT->labelsize(14); sldrIFSHIFT->labelcolor(FL_FOREGROUND_COLOR); sldrIFSHIFT->minimum(-1000); sldrIFSHIFT->maximum(1000); sldrIFSHIFT->step(10); sldrIFSHIFT->textsize(14); sldrIFSHIFT->callback((Fl_Callback*)cb_sldrIFSHIFT); sldrIFSHIFT->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrIFSHIFT->when(FL_WHEN_CHANGED); sldrIFSHIFT->reverse(true); sldrNR = new Fl_Wheel_Value_Slider(xpos+cw, ypos+ch/2, spw, rh); sldrNR->tooltip(_("Adjust noise reduction")); sldrNR->type(5); sldrNR->box(FL_THIN_DOWN_BOX); sldrNR->color(FL_BACKGROUND_COLOR); sldrNR->selection_color(FL_BACKGROUND_COLOR); sldrNR->labeltype(FL_NORMAL_LABEL); sldrNR->labelfont(0); sldrNR->labelsize(12); sldrNR->labelcolor(FL_FOREGROUND_COLOR); sldrNR->maximum(100); sldrNR->step(2); sldrNR->textsize(14); sldrNR->callback((Fl_Callback*)cb_sldrNR); sldrNR->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrNR->when(FL_WHEN_CHANGED); sldrNR->reverse(true); col2b->end(); col2->resizable(col2b); col2->end(); xpos += wg; Fl_Group *sep2 = new Fl_Group(xpos, ypos, 4, ch); sep2->box(FL_FLAT_BOX); sep2->end(); xpos += 4; Fl_Group *col3 = new Fl_Group(xpos, ypos, wg, ch, ""); Fl_Group *col3a = new Fl_Group(xpos, ypos, cw, ch, ""); btnNotch = new Fl_Light_Button(xpos, ypos, cw, rh, _("Nch")); btnNotch->tooltip(_("Notch - Manual (off) Auto (on)")); btnNotch->down_box(FL_THIN_DOWN_BOX); btnNotch->labelsize(16); btnNotch->callback((Fl_Callback*)cb_btnNotch); col3a->end(); Fl_Group *col3b = new Fl_Group(xpos+cw, ypos, spw, ch,""); sldrNOTCH = new Fl_Wheel_Value_Slider(xpos+cw, ypos, spw, rh); sldrNOTCH->tooltip(_("Adjust Notch Frequency")); sldrNOTCH->type(5); sldrNOTCH->box(FL_THIN_DOWN_BOX); sldrNOTCH->color(FL_BACKGROUND_COLOR); sldrNOTCH->selection_color(FL_BACKGROUND_COLOR); sldrNOTCH->labeltype(FL_NORMAL_LABEL); sldrNOTCH->labelfont(0); sldrNOTCH->labelsize(16); sldrNOTCH->labelcolor(FL_FOREGROUND_COLOR); sldrNOTCH->minimum(-1000); sldrNOTCH->maximum(1000); sldrNOTCH->step(10); sldrNOTCH->textsize(14); sldrNOTCH->callback((Fl_Callback*)cb_sldrNOTCH); sldrNOTCH->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrNOTCH->when(FL_WHEN_CHANGED); sldrNOTCH->reverse(true); sldrRFGAIN = new Fl_Wheel_Value_Slider(xpos+cw, ypos + ch/2, spw, rh, _("RF")); sldrRFGAIN->tooltip(_("Adjust RF gain")); sldrRFGAIN->type(5); sldrRFGAIN->box(FL_THIN_DOWN_BOX); sldrRFGAIN->color(FL_BACKGROUND_COLOR); sldrRFGAIN->selection_color(FL_BACKGROUND_COLOR); sldrRFGAIN->labeltype(FL_NORMAL_LABEL); sldrRFGAIN->labelfont(0); sldrRFGAIN->labelsize(14); sldrRFGAIN->labelcolor(FL_FOREGROUND_COLOR); sldrRFGAIN->maximum(100); sldrRFGAIN->step(1); sldrRFGAIN->value(100); sldrRFGAIN->textsize(14); sldrRFGAIN->callback((Fl_Callback*)cb_sldrRFGAIN); sldrRFGAIN->align(Fl_Align(FL_ALIGN_LEFT)); sldrRFGAIN->when(FL_WHEN_CHANGED); sldrRFGAIN->reverse(true); col3b->end(); col3->resizable(col3b); col3->end(); grpSLIDERS->end(); xpos = X + 2; ypos = Y + 2; grpBUTTONS = new Fl_Group(xpos, ypos, W-4, H-ypos-2, ""); ypos += 4; int bw = (W-18)/8; int bh = 50; ypos += 15; xpos = 2; btnAttenuator = new Fl_Light_Button(xpos, ypos, bw, bh, _("Att")); btnAttenuator->tooltip(_("Attenuator On/Off")); btnAttenuator->down_box(FL_THIN_DOWN_BOX); btnAttenuator->labelsize(16); btnAttenuator->callback((Fl_Callback*)cb_btnAttenuator); xpos += btnAttenuator->w() + 2; btnPreamp = new Fl_Light_Button(xpos, ypos, bw, bh, _("Pre")); btnPreamp->tooltip(_("Preamp On/Off")); btnPreamp->down_box(FL_THIN_DOWN_BOX); btnPreamp->labelsize(16); btnPreamp->callback((Fl_Callback*)cb_btnPreamp); xpos += btnPreamp->w() + 2; btnNOISE = new Fl_Light_Button(xpos, ypos, bw, bh, _("NB")); btnNOISE->tooltip(_("Noise Blanker On/Off")); btnNOISE->down_box(FL_THIN_DOWN_BOX); btnNOISE->labelsize(16); btnNOISE->callback((Fl_Callback*)cb_btnNOISE); xpos += btnNOISE->w() + 2; btnAutoNotch = new Fl_Light_Button(xpos, ypos, bw, bh, _("AN")); btnAutoNotch->tooltip(_("Auto Notch On/Off")); btnAutoNotch->down_box(FL_THIN_DOWN_BOX); btnAutoNotch->labelsize(16); btnAutoNotch->callback((Fl_Callback*)cb_btnAutoNotch); xpos += btnAutoNotch->w() + 2; btnAswapB = new Fl_Button(xpos, ypos, bw, bh, _("A/B")); btnAswapB->tooltip(_("Swap A B\nRight-click; Copy A to B")); btnAswapB->down_box(FL_DOWN_BOX); btnAswapB->labelsize(16); btnAswapB->callback((Fl_Callback*)cb_btnAswapB); xpos += btnAswapB->w() + 2; btn_K3_swapAB = new Fl_Button(xpos, ypos, bw, bh, _("A/B")); btn_K3_swapAB->tooltip(_("Swap A/B")); btn_K3_swapAB->down_box(FL_DOWN_BOX); btn_K3_swapAB->labelsize(16); btn_K3_swapAB->callback((Fl_Callback*)cb_btn_K3_swapAB); btn_K3_swapAB->hide(); btn_KX3_swapAB = new Fl_Button(xpos, ypos, bw, bh, _("A/B")); btn_KX3_swapAB->tooltip(_("Swap A/B")); btn_KX3_swapAB->down_box(FL_DOWN_BOX); btn_KX3_swapAB->labelsize(16); btn_KX3_swapAB->callback((Fl_Callback*)cb_btn_KX3_swapAB); btn_KX3_swapAB->hide(); xpos += btn_K3_swapAB->w() + 2; btnSplit = new Fl_Light_Button(xpos, ypos, bw, bh, _("Split")); btnSplit->tooltip(_("Rx-A / Tx-B")); btnSplit->down_box(FL_THIN_DOWN_BOX); btnSplit->labelsize(16); btnSplit->callback((Fl_Callback*)cb_btnSplit); btnSplit->value(progStatus.split); xpos += btnSplit->w() + 2; btnTune = new Fl_Button(xpos, ypos, bw, bh, _("Tune")); btnTune->tooltip(_("Momentary Tune")); btnTune->labelsize(16); btnTune->callback((Fl_Callback*)cb_btnTune); grpBUTTONS->end(); xpos = X; ypos = Y;// + 2; int tabh = 26; int tabb = 70; int by = ypos + 40; bh = 28; grpOTHER = new Fl_Group(xpos, ypos, W, H-ypos, ""); ypos += 2; tabsGeneric = new Fl_Tabs(xpos, ypos, W, H-ypos); tabsGeneric->selection_color(FL_LIGHT1); genericBands = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Bands")); btnBandSelect_1 = new Fl_Button(xpos+4, by, 50, bh, _("1.8")); btnBandSelect_1->tooltip(_("160m Band")); btnBandSelect_1->color((Fl_Color)246); btnBandSelect_1->callback((Fl_Callback*)cb_btnBandSelect_1); btnBandSelect_2 = new Fl_Button(xpos+62, by, 50, bh, _("3.5")); btnBandSelect_2->tooltip(_("80m band")); btnBandSelect_2->color((Fl_Color)246); btnBandSelect_2->callback((Fl_Callback*)cb_btnBandSelect_2); btnBandSelect_3 = new Fl_Button(xpos+120, by, 50, bh, _("7")); btnBandSelect_3->tooltip(_("40m band")); btnBandSelect_3->color((Fl_Color)246); btnBandSelect_3->callback((Fl_Callback*)cb_btnBandSelect_3); btnBandSelect_3->align(Fl_Align(FL_ALIGN_CLIP)); btnBandSelect_4 = new Fl_Button(xpos+178, by, 50, bh, _("10")); btnBandSelect_4->tooltip(_("30m band")); btnBandSelect_4->color((Fl_Color)246); btnBandSelect_4->callback((Fl_Callback*)cb_btnBandSelect_4); btnBandSelect_5 = new Fl_Button(xpos+237, by, 50, bh, _("14")); btnBandSelect_5->tooltip(_("20m band")); btnBandSelect_5->color((Fl_Color)246); btnBandSelect_5->callback((Fl_Callback*)cb_btnBandSelect_5); btnBandSelect_6 = new Fl_Button(xpos+295, by, 50, bh, _("18")); btnBandSelect_6->tooltip(_("17m band")); btnBandSelect_6->color((Fl_Color)246); btnBandSelect_6->callback((Fl_Callback*)cb_btnBandSelect_6); btnBandSelect_7 = new Fl_Button(xpos+353, by, 50, bh, _("21")); btnBandSelect_7->tooltip(_("15m band")); btnBandSelect_7->color((Fl_Color)246); btnBandSelect_7->callback((Fl_Callback*)cb_btnBandSelect_7); btnBandSelect_8 = new Fl_Button(xpos+412, by, 50, bh, _("24")); btnBandSelect_8->tooltip(_("12m band")); btnBandSelect_8->color((Fl_Color)246); btnBandSelect_8->callback((Fl_Callback*)cb_btnBandSelect_8); btnBandSelect_9 = new Fl_Button(xpos+470, by, 50, bh, _("28")); btnBandSelect_9->tooltip(_("10m band")); btnBandSelect_9->color((Fl_Color)246); btnBandSelect_9->callback((Fl_Callback*)cb_btnBandSelect_9); btnBandSelect_10 = new Fl_Button(xpos+528, by, 50, bh, _("50")); btnBandSelect_10->tooltip(_("6m band")); btnBandSelect_10->color((Fl_Color)246); btnBandSelect_10->callback((Fl_Callback*)cb_btnBandSelect_10); btnBandSelect_11 = new Fl_Button(xpos+587, by, 50, bh, _("GEN")); btnBandSelect_11->tooltip(_("General RX")); btnBandSelect_11->color((Fl_Color)246); btnBandSelect_11->callback((Fl_Callback*)cb_btnBandSelect_11); opSelect60 = new Fl_ComboBox(xpos+653, by, 100, bh, _("combo")); opSelect60->tooltip(_("vfo / 60 meter channel")); opSelect60->box(FL_NO_BOX); opSelect60->color((Fl_Color)246); opSelect60->selection_color(FL_BACKGROUND_COLOR); opSelect60->labeltype(FL_NORMAL_LABEL); opSelect60->labelfont(0); opSelect60->labelsize(12); opSelect60->labelcolor(FL_FOREGROUND_COLOR); opSelect60->callback((Fl_Callback*)cb_opSelect60); opSelect60->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opSelect60->when(FL_WHEN_RELEASE); opSelect60->end(); genericBands->end(); genericCW = new Fl_Group(xpos, ypos+tabh, W, tabb, _("CW")); genericCW->color(FL_LIGHT1); genericCW->selection_color(FL_LIGHT1); genericCW->hide(); btnSpot = new Fl_Light_Button( xpos+13, by, 54, bh, _("Spot")); btnSpot->tooltip(_("Spot tone on/off")); btnSpot->callback((Fl_Callback*)cb_btnSpot); btnSpot->value(progStatus.cw_spot); spnr_cw_spot_tone = new Hspinner( btnSpot->x() + btnSpot->w() + 75, by, 5*bh, bh, _("Spot tone")); spnr_cw_spot_tone->tooltip(_("Spot tone freq")); spnr_cw_spot_tone->type(FL_INT_INPUT); spnr_cw_spot_tone->minimum(300); spnr_cw_spot_tone->maximum(1050); spnr_cw_spot_tone->step(50); spnr_cw_spot_tone->value(1050); spnr_cw_spot_tone->callback((Fl_Callback*)cb_spnr_cw_spot_tone); spnr_cw_spot_tone->value(progStatus.cw_spot); spnr_cw_spot_tone->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); spnr_cw_weight = new Hspinner( spnr_cw_spot_tone->x() + spnr_cw_spot_tone->w() + 75, by, 5*bh, bh, _("Weight")); spnr_cw_weight->type(FL_INT_INPUT); spnr_cw_weight->minimum(2.5); spnr_cw_weight->maximum(4.5); spnr_cw_weight->value(3); spnr_cw_weight->callback((Fl_Callback*)cb_spnr_cw_weight); spnr_cw_weight->value(progStatus.cw_weight); spnr_cw_weight->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); spnr_cw_wpm = new Hspinner( spnr_cw_weight->x() + spnr_cw_weight->w() + 75, by, 5*bh, bh, _("wpm")); spnr_cw_wpm->type(FL_INT_INPUT); spnr_cw_wpm->minimum(5); spnr_cw_wpm->maximum(80); spnr_cw_wpm->step(1); spnr_cw_wpm->callback((Fl_Callback*)cb_spnr_cw_wpm); spnr_cw_wpm->value(progStatus.cw_wpm); spnr_cw_wpm->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); btn_enable_keyer = new Fl_Check_Button( spnr_cw_wpm->x() + spnr_cw_wpm->w() + 10, by, 5*bh, bh, _("Keyer")); btn_enable_keyer->tooltip(_("Enable internal keyer")); btn_enable_keyer->down_box(FL_DOWN_BOX); btn_enable_keyer->callback((Fl_Callback*)cb_btn_enable_keyer); btn_enable_keyer->value(progStatus.enable_keyer); genericCW->end(); genericQSK = new Fl_Group(xpos, ypos+tabh, W, tabb, _("QSK")); genericQSK->color(FL_LIGHT1); genericQSK->selection_color(FL_LIGHT1); genericQSK->hide(); btnBreakIn = new Fl_Light_Button(xpos + 13, by, 54, bh, _("QSK")); btnBreakIn->tooltip(_("Full break in on/off")); btnBreakIn->callback((Fl_Callback*)cb_btnBreakIn); btnBreakIn->value(progStatus.break_in); spnr_cw_qsk = new Hspinner( btnBreakIn->x() + btnBreakIn->w() + 75, by, 5*bh, bh, _("Bk-in Dly")); spnr_cw_qsk->tooltip(_("msec")); spnr_cw_qsk->type(FL_INT_INPUT); spnr_cw_qsk->minimum(0); spnr_cw_qsk->maximum(100); spnr_cw_qsk->step(1); spnr_cw_qsk->value(20); spnr_cw_qsk->callback((Fl_Callback*)cb_spnr_cw_qsk); spnr_cw_qsk->value(progStatus.cw_qsk); spnr_cw_qsk->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); spnr_cw_delay = new Hspinner( spnr_cw_qsk->x() + spnr_cw_qsk->w() + 75, by, 120, bh, _("QSK delay")); spnr_cw_delay->tooltip(_("msec")); spnr_cw_delay->type(0); spnr_cw_delay->minimum(30); spnr_cw_delay->maximum(3000); spnr_cw_delay->step(10); spnr_cw_delay->callback((Fl_Callback*)cb_spnr_cw_delay); spnr_cw_delay->value(progStatus.cw_delay); spnr_cw_delay->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); genericQSK->end(); genericVOX = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Vox")); genericVOX->hide(); spnr_vox_gain = new Hspinner(xpos+60, by, 5*bh, bh, _("gain")); spnr_vox_gain->type(FL_INT_INPUT); spnr_vox_gain->minimum(0); spnr_vox_gain->maximum(100); spnr_vox_gain->step(1); spnr_vox_gain->callback((Fl_Callback*)cb_spnr_vox_gain); spnr_vox_gain->value(progStatus.vox_gain); spnr_vox_gain->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); spnr_anti_vox = new Hspinner( spnr_vox_gain->x() + spnr_vox_gain->w() + 60, by, 5*bh, bh, _("anti")); spnr_anti_vox->type(FL_INT_INPUT); spnr_anti_vox->minimum(0); spnr_anti_vox->maximum(100); spnr_anti_vox->step(1); spnr_anti_vox->callback((Fl_Callback*)cb_spnr_anti_vox); spnr_anti_vox->value(progStatus.vox_anti); spnr_anti_vox->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); spnr_vox_hang = new Hspinner( spnr_anti_vox->x() + spnr_anti_vox->w() + 60, by, 5*bh, bh, _("hang")); spnr_vox_hang->type(FL_INT_INPUT); spnr_vox_hang->minimum(0); spnr_vox_hang->maximum(100); spnr_vox_hang->step(1); spnr_vox_hang->callback((Fl_Callback*)cb_spnr_vox_hang); spnr_vox_hang->value(progStatus.vox_hang); spnr_vox_hang->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); btn_vox = new Fl_Light_Button( spnr_vox_hang->x() + spnr_vox_hang->w() + 8, by, 70, bh, _("VOX")); btn_vox->callback((Fl_Callback*)cb_btn_vox); btn_vox->value(progStatus.vox_onoff); btn_vox_on_dataport = new Fl_Check_Button( btn_vox->x() + btn_vox->w() + 8, by, 70, bh, _("Data port")); btn_vox_on_dataport->tooltip(_("Data port signal triggers VOX")); btn_vox_on_dataport->down_box(FL_DOWN_BOX); btn_vox_on_dataport->callback((Fl_Callback*)cb_btn_vox_on_dataport); btn_vox_on_dataport->value(progStatus.vox_on_dataport); genericVOX->end(); genericSpeech = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Spch")); genericSpeech->hide(); btnCompON = new Fl_Light_Button(xpos+230, by, 70, bh, _("On")); btnCompON->callback((Fl_Callback*)cb_btnCompON); btnCompON->value(progStatus.compON); spnr_compression = new Hspinner(xpos+138, by, 5*bh, bh, _("Compression")); spnr_compression->type(FL_INT_INPUT); spnr_compression->minimum(0); spnr_compression->maximum(100); spnr_compression->step(1); spnr_compression->callback((Fl_Callback*)cb_spnr_compression); spnr_compression->value(progStatus.compression); spnr_compression->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); genericSpeech->end(); genericRx = new Fl_Group(xpos, ypos+tabh, W, tabb, _("RX")); genericRx->hide(); cbo_nb_level = new Fl_ComboBox(xpos+90, by, 80, bh, _("NB level")); cbo_nb_level->tooltip(_("Select Transceiver")); cbo_nb_level->box(FL_DOWN_BOX); cbo_nb_level->color(FL_BACKGROUND_COLOR); cbo_nb_level->selection_color(FL_BACKGROUND_COLOR); cbo_nb_level->labeltype(FL_NORMAL_LABEL); cbo_nb_level->labelfont(0); cbo_nb_level->labelsize(14); cbo_nb_level->labelcolor(FL_FOREGROUND_COLOR); cbo_nb_level->callback((Fl_Callback*)cb_cbo_nb_level); cbo_nb_level->align(Fl_Align(FL_ALIGN_LEFT)); cbo_nb_level->when(FL_WHEN_RELEASE); cbo_nb_level->index(progStatus.nb_level); cbo_nb_level->end(); cbo_agc_level = new Fl_ComboBox(xpos+244, by, 80, bh, _("AGC")); cbo_agc_level->tooltip(_("Select Transceiver")); cbo_agc_level->box(FL_DOWN_BOX); cbo_agc_level->color(FL_BACKGROUND_COLOR); cbo_agc_level->selection_color(FL_BACKGROUND_COLOR); cbo_agc_level->labeltype(FL_NORMAL_LABEL); cbo_agc_level->labelfont(0); cbo_agc_level->labelsize(14); cbo_agc_level->labelcolor(FL_FOREGROUND_COLOR); cbo_agc_level->callback((Fl_Callback*)cb_cbo_agc_level); cbo_agc_level->align(Fl_Align(FL_ALIGN_LEFT)); cbo_agc_level->when(FL_WHEN_RELEASE); cbo_agc_level->end(); spnr_bpf_center = new Hspinner(xpos+474, by, 5*bh, bh, _("BPF Center Freq")); spnr_bpf_center->tooltip(_("Bandpass Filter Center Freq")); spnr_bpf_center->type(FL_INT_INPUT); spnr_bpf_center->minimum(600); spnr_bpf_center->maximum(2500); spnr_bpf_center->step(10); spnr_bpf_center->value(1500); spnr_bpf_center->callback((Fl_Callback*)cb_spnr_bpf_center); spnr_bpf_center->value(progStatus.bpf_center); spnr_bpf_center->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); btn_use_bpf_center = new Fl_Check_Button( spnr_bpf_center->x() + spnr_bpf_center->w() + 8, by, 50, bh, _("On")); btn_use_bpf_center->tooltip(_("Use Filter Center Freq Adj")); btn_use_bpf_center->down_box(FL_DOWN_BOX); btn_use_bpf_center->value(1); btn_use_bpf_center->callback((Fl_Callback*)cb_btn_use_bpf_center); btn_use_bpf_center->value(progStatus.use_bpf_center); genericRx->end(); genericMisc = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Misc")); genericMisc->hide(); spnr_vfo_adj = new Hspinner(xpos+100, by, 5*bh, bh, _("Vfo Adj")); spnr_vfo_adj->type(FL_INT_INPUT); spnr_vfo_adj->callback((Fl_Callback*)cb_spnr_vfo_adj); spnr_vfo_adj->value(progStatus.vfo_adj); spnr_vfo_adj->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); spnr_line_out = new Hspinner( spnr_vfo_adj->x() + spnr_vfo_adj->w() + 8, by, 5*bh, bh, _("line out")); spnr_line_out->type(FL_INT_INPUT); spnr_line_out->minimum(0); spnr_line_out->maximum(100); spnr_line_out->step(1); spnr_line_out->value(20); spnr_line_out->callback((Fl_Callback*)cb_spnr_line_out); spnr_line_out->value(progStatus.line_out); spnr_line_out->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); btnSpecial = new Fl_Light_Button( spnr_line_out->x() + spnr_line_out->w() + 8, by, 74, bh, _("Special")); btnSpecial->callback((Fl_Callback*)cb_btnSpecial); btn_ext_tuner = new Fl_Check_Button( btnSpecial->x() + btnSpecial->w() + 8, by, 95, bh, _("Ext tuner")); btn_ext_tuner->tooltip(_("use external auto tuner")); btn_ext_tuner->down_box(FL_DOWN_BOX); btn_ext_tuner->callback((Fl_Callback*)cb_btn_ext_tuner); btn_ext_tuner->value(progStatus.external_tuner); btn_xcvr_auto_on = new Fl_Check_Button( btn_ext_tuner->x() + btn_ext_tuner->w() + 8, by, 95, bh, _("Rig autOn")); btn_xcvr_auto_on->tooltip(_("Auto Turn Rig On with Flrig startup")); btn_xcvr_auto_on->down_box(FL_DOWN_BOX); btn_xcvr_auto_on->callback((Fl_Callback*)cb_btn_xcvr_auto_on); btn_xcvr_auto_on->value(progStatus.xcvr_auto_on); btn_xcvr_auto_off = new Fl_Check_Button( btn_xcvr_auto_on->x() + btn_xcvr_auto_on->w() + 15, by, 95, bh, _("Rig autOff")); btn_xcvr_auto_off->tooltip(_("Auto Turn Rig Off with Flrig exit")); btn_xcvr_auto_off->down_box(FL_DOWN_BOX); btn_xcvr_auto_off->callback((Fl_Callback*)cb_btn_xcvr_auto_off); btn_xcvr_auto_off->value(progStatus.xcvr_auto_off); genericMisc->end(); genericRXB = new Fl_Group(xpos, ypos+tabh, W, tabb, _("RIT/XIT/BFO")); genericRXB->hide(); cntRIT = new Hspinner(xpos+10, by, 5*bh, bh, _("Rit")); cntRIT->tooltip(_("RIT")); cntRIT->type(FL_INT_INPUT); cntRIT->labelsize(12); cntRIT->minimum(-1000); cntRIT->maximum(1000); cntRIT->step(10); cntRIT->callback((Fl_Callback*)cb_cntRIT); cntRIT->align(Fl_Align(FL_ALIGN_RIGHT)); cntXIT = new Hspinner( cntRIT->x() + cntRIT->w() + 8, by, 5*bh, bh, _("Xit")); cntXIT->tooltip(_("XIT")); cntXIT->type(FL_INT_INPUT); cntXIT->labelsize(12); cntXIT->minimum(-1000); cntXIT->maximum(1000); cntXIT->step(10); cntXIT->callback((Fl_Callback*)cb_cntXIT); cntXIT->align(Fl_Align(FL_ALIGN_RIGHT)); cntBFO = new Hspinner( cntXIT->x() + cntXIT->w() + 8, by, 5*bh, bh, _("Bfo")); cntBFO->tooltip(_("BFO")); cntBFO->type(FL_INT_INPUT); cntBFO->labelsize(12); cntBFO->minimum(0); cntBFO->maximum(1000); cntBFO->step(10); cntBFO->value(600); cntBFO->callback((Fl_Callback*)cb_cntBFO); cntBFO->align(Fl_Align(FL_ALIGN_RIGHT)); genericRXB->end(); genericAux = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Aux")); genericAux->hide(); boxControl = new Fl_Box(xpos+57, by, 130, bh, _("Auxilliary Controls:")); boxControl->box(FL_FLAT_BOX); boxControl->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); btnAuxRTS = new Fl_Light_Button(xpos+272, by, 60, bh, _("RTS")); btnAuxRTS->tooltip(_("RTS control pin")); btnAuxRTS->down_box(FL_THIN_DOWN_BOX); btnAuxRTS->labelsize(12); btnAuxRTS->callback((Fl_Callback*)cb_btnAuxRTS); btnAuxRTS->value(progStatus.aux_rts); btnAuxDTR = new Fl_Light_Button(xpos+200, by, 60, bh, _("DTR")); btnAuxDTR->tooltip(_("DTR control pin")); btnAuxDTR->down_box(FL_THIN_DOWN_BOX); btnAuxDTR->labelsize(12); btnAuxDTR->callback((Fl_Callback*)cb_btnAuxDTR); btnAuxDTR->value(progStatus.aux_dtr); btnDataPort = new Fl_Light_Button(xpos+408, by, 60, bh, _("Data")); btnDataPort->tooltip(_("Input on Data Port")); btnDataPort->down_box(FL_THIN_DOWN_BOX); btnDataPort->labelsize(12); btnDataPort->callback((Fl_Callback*)cb_btnDataPort); btnDataPort->value(progStatus.data_port); genericAux->end(); tabsGeneric->end(); xpos = X; ypos = Y; tabs550 = new Fl_Tabs(xpos, ypos, W, H-ypos); tabs550->selection_color(FL_LIGHT1); tabs550->hide(); tt550_CW = new Fl_Group(xpos, ypos+tabh, W, tabb, _("CW")); tt550_CW->color(FL_LIGHT1); tt550_CW->selection_color(FL_LIGHT1); spnr_tt550_cw_wpm = new Hspinner(xpos+60, by, 5*bh, bh, _("wpm")); spnr_tt550_cw_wpm->type(FL_INT_INPUT); spnr_tt550_cw_wpm->minimum(5); spnr_tt550_cw_wpm->maximum(80); spnr_tt550_cw_wpm->step(1); spnr_tt550_cw_wpm->value(20); spnr_tt550_cw_wpm->callback((Fl_Callback*)cb_spnr_tt550_cw_wpm); spnr_tt550_cw_wpm->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_cw_wpm->value(progStatus.tt550_cw_wpm); spnr_tt550_cw_weight = new Hspinner( xpos + 60, by + bh + 2, 5*bh, bh, _("Weight")); spnr_tt550_cw_weight->type(FL_INT_INPUT); spnr_tt550_cw_weight->minimum(0.75); spnr_tt550_cw_weight->maximum(1.5); spnr_tt550_cw_weight->step(0.05); spnr_tt550_cw_weight->value(20); spnr_tt550_cw_weight->callback((Fl_Callback*)cb_spnr_tt550_cw_weight); spnr_tt550_cw_weight->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_cw_weight->value(progStatus.tt550_cw_weight); spnr_tt550_cw_qsk = new Hspinner( spnr_tt550_cw_weight->x() + spnr_tt550_cw_weight->w() + 60, by, 5*bh, bh, _("Delay")); spnr_tt550_cw_qsk->tooltip(_("QSK delay (msec)")); spnr_tt550_cw_qsk->type(FL_INT_INPUT); spnr_tt550_cw_qsk->minimum(0); spnr_tt550_cw_qsk->maximum(100); spnr_tt550_cw_qsk->step(1); spnr_tt550_cw_qsk->value(20); spnr_tt550_cw_qsk->callback((Fl_Callback*)cb_spnr_tt550_cw_qsk); spnr_tt550_cw_qsk->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_cw_qsk->value(progStatus.tt550_cw_qsk); spnr_tt550_cw_vol = new Hspinner( spnr_tt550_cw_qsk->x() + spnr_tt550_cw_qsk->w() + 60, by, 5*bh, bh, _("S-T vol")); spnr_tt550_cw_vol->tooltip(_("Side tone volume")); spnr_tt550_cw_vol->type(FL_INT_INPUT); spnr_tt550_cw_vol->minimum(5); spnr_tt550_cw_vol->maximum(80); spnr_tt550_cw_vol->step(1); spnr_tt550_cw_vol->value(20); spnr_tt550_cw_vol->callback((Fl_Callback*)cb_spnr_tt550_cw_vol); spnr_tt550_cw_vol->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_cw_vol->value(progStatus.tt550_cw_vol); spnr_tt550_cw_spot = new Hspinner( spnr_tt550_cw_vol->x() + spnr_tt550_cw_vol->w() + 70, by, 5*bh, bh, _("Spot Vol")); spnr_tt550_cw_spot->tooltip(_("Spot volume")); spnr_tt550_cw_spot->type(FL_INT_INPUT); spnr_tt550_cw_spot->minimum(0); spnr_tt550_cw_spot->maximum(100); spnr_tt550_cw_spot->step(1); spnr_tt550_cw_spot->value(20); spnr_tt550_cw_spot->callback((Fl_Callback*)cb_spnr_tt550_cw_spot); spnr_tt550_cw_spot->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_cw_spot->value(progStatus.tt550_cw_spot); btn_tt550_enable_keyer = new Fl_Check_Button( spnr_tt550_cw_spot->x() + spnr_tt550_cw_spot->w() + 60, by, 63, bh, _("Keyer")); btn_tt550_enable_keyer->tooltip(_("Enable keyer")); btn_tt550_enable_keyer->down_box(FL_DOWN_BOX); btn_tt550_enable_keyer->callback((Fl_Callback*)cb_btn_tt550_enable_keyer); btn_tt550_enable_keyer->value(progStatus.tt550_enable_keyer); tt550_CW->end(); tt550_VOX = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Vox")); tt550_VOX->hide(); spnr_tt550_vox_gain = new Hspinner(xpos+60, by, 79, bh, _("gain")); spnr_tt550_vox_gain->type(FL_INT_INPUT); spnr_tt550_vox_gain->minimum(0); spnr_tt550_vox_gain->maximum(100); spnr_tt550_vox_gain->step(1); spnr_tt550_vox_gain->callback((Fl_Callback*)cb_spnr_tt550_vox_gain); spnr_tt550_vox_gain->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_vox_gain->value(progStatus.tt550_vox_gain); spnr_tt550_anti_vox = new Hspinner( spnr_tt550_vox_gain->x() + spnr_tt550_vox_gain->w() + 60, by, 5*bh, bh, _("anti")); spnr_tt550_anti_vox->type(FL_INT_INPUT); spnr_tt550_anti_vox->minimum(0); spnr_tt550_anti_vox->maximum(100); spnr_tt550_anti_vox->step(1); spnr_tt550_anti_vox->callback((Fl_Callback*)cb_spnr_tt550_anti_vox); spnr_tt550_anti_vox->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_anti_vox->value(progStatus.tt550_vox_anti); spnr_tt550_vox_hang = new Hspinner( spnr_tt550_anti_vox->x() + spnr_tt550_anti_vox->w() + 60, by, 5*bh, bh, _("hang")); spnr_tt550_vox_hang->type(FL_INT_INPUT); spnr_tt550_vox_hang->minimum(0); spnr_tt550_vox_hang->maximum(100); spnr_tt550_vox_hang->step(1); spnr_tt550_vox_hang->callback((Fl_Callback*)cb_spnr_tt550_vox_hang); spnr_tt550_vox_hang->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_vox_hang->value(progStatus.tt550_vox_hang); btn_tt550_vox = new Fl_Light_Button( spnr_tt550_vox_hang->x() + spnr_tt550_vox_hang->w() + 60, by, 78, bh, _("VOX")); btn_tt550_vox->callback((Fl_Callback*)cb_btn_tt550_vox); btn_tt550_vox->value(progStatus.tt550_vox_onoff); tt550_VOX->end(); tt550_Speech = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Spch")); tt550_Speech->hide(); btn_tt550_CompON = new Fl_Light_Button(xpos+60, by, 78, bh, _("On")); btn_tt550_CompON->callback((Fl_Callback*)cb_btn_tt550_CompON); btn_tt550_CompON->value(progStatus.tt550_compON); spnr_tt550_compression = new Hspinner( btn_tt550_CompON->x() + btn_tt550_CompON->w() + 60, by, 5*bh, bh, _("Comp")); spnr_tt550_compression->type(FL_INT_INPUT); spnr_tt550_compression->minimum(0); spnr_tt550_compression->maximum(100); spnr_tt550_compression->step(1); spnr_tt550_compression->callback((Fl_Callback*)cb_spnr_tt550_compression); spnr_tt550_compression->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_compression->value(progStatus.tt550_compression); spnr_tt550_mon_vol = new Hspinner( spnr_tt550_compression->x() + spnr_tt550_compression->w() + 60, by, 5*bh, bh, _("Mon vol")); spnr_tt550_mon_vol->tooltip(_("Side tone volume")); spnr_tt550_mon_vol->type(FL_INT_INPUT); spnr_tt550_mon_vol->minimum(0); spnr_tt550_mon_vol->maximum(100); spnr_tt550_mon_vol->step(1); spnr_tt550_mon_vol->value(25); spnr_tt550_mon_vol->callback((Fl_Callback*)cb_spnr_tt550_mon_vol); spnr_tt550_mon_vol->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_mon_vol->value(progStatus.tt550_mon_vol); tt550_Speech->end(); tt550_Audio = new Fl_Group(xpos, ypos+tabh, W, tabb, _("Audio")); tt550_Audio->hide(); spnr_tt550_line_out = new Hspinner(xpos+60, by, 5*bh, bh, _("line out")); spnr_tt550_line_out->type(FL_INT_INPUT); spnr_tt550_line_out->minimum(0); spnr_tt550_line_out->maximum(100); spnr_tt550_line_out->step(1); spnr_tt550_line_out->value(20); spnr_tt550_line_out->callback((Fl_Callback*)cb_spnr_tt550_line_out); spnr_tt550_line_out->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_line_out->value(progStatus.tt550_line_out); btnAccInp = new Fl_Check_Button( spnr_tt550_line_out->x() + spnr_tt550_line_out->w() + 8, by, 92, bh, _("Acc Inp.")); btnAccInp->tooltip(_("Enable to use accessory audio input")); btnAccInp->down_box(FL_DOWN_BOX); btnAccInp->callback((Fl_Callback*)cb_btnAccInp); btnAccInp->value(progStatus.tt550_use_line_in); tt550_Audio->end(); tt550_Rx = new Fl_Group(xpos, ypos+tabh, W, tabb, _("RX")); tt550_Rx->hide(); cbo_tt550_nb_level = new Fl_ComboBox(xpos+80, by, 89, bh, _("NB level")); cbo_tt550_nb_level->tooltip(_("Select Noise Blanker level")); cbo_tt550_nb_level->box(FL_DOWN_BOX); cbo_tt550_nb_level->color(FL_BACKGROUND_COLOR); cbo_tt550_nb_level->selection_color(FL_BACKGROUND_COLOR); cbo_tt550_nb_level->labeltype(FL_NORMAL_LABEL); cbo_tt550_nb_level->labelfont(0); cbo_tt550_nb_level->labelsize(14); cbo_tt550_nb_level->labelcolor(FL_FOREGROUND_COLOR); cbo_tt550_nb_level->callback((Fl_Callback*)cb_cbo_tt550_nb_level); cbo_tt550_nb_level->align(Fl_Align(FL_ALIGN_LEFT)); cbo_tt550_nb_level->when(FL_WHEN_RELEASE); cbo_tt550_nb_level->index(progStatus.tt550_nb_level); cbo_tt550_nb_level->end(); cbo_tt550_agc_level = new Fl_ComboBox( cbo_tt550_nb_level->x() + cbo_tt550_nb_level->w() + 60, by, 90, bh, _("AGC")); cbo_tt550_agc_level->tooltip(_("Select AGC")); cbo_tt550_agc_level->box(FL_DOWN_BOX); cbo_tt550_agc_level->color(FL_BACKGROUND_COLOR); cbo_tt550_agc_level->selection_color(FL_BACKGROUND_COLOR); cbo_tt550_agc_level->labeltype(FL_NORMAL_LABEL); cbo_tt550_agc_level->labelfont(0); cbo_tt550_agc_level->labelsize(14); cbo_tt550_agc_level->labelcolor(FL_FOREGROUND_COLOR); cbo_tt550_agc_level->callback((Fl_Callback*)cb_cbo_tt550_agc_level); cbo_tt550_agc_level->align(Fl_Align(FL_ALIGN_LEFT)); cbo_tt550_agc_level->when(FL_WHEN_RELEASE); cbo_tt550_agc_level->index(progStatus.tt550_agc_level); cbo_tt550_agc_level->end(); spnr_tt550_vfo_adj = new Hspinner( cbo_tt550_agc_level->x() + cbo_tt550_agc_level->w() + 120, by, 5*bh, bh, _("Vfo Adj(ppm)")); spnr_tt550_vfo_adj->callback((Fl_Callback*)cb_spnr_tt550_vfo_adj); spnr_tt550_vfo_adj->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_vfo_adj->minimum(-100); spnr_tt550_vfo_adj->maximum(100); spnr_tt550_vfo_adj->type(FL_FLOAT_INPUT); spnr_tt550_vfo_adj->step(0.1); spnr_tt550_vfo_adj->value(progStatus.vfo_adj); tt550_Rx->end(); tt550_Tx = new Fl_Group(xpos, ypos+tabh, W, tabb, _("TX")); tt550_Tx->hide(); btn_tt550_enable_xmtr = new Fl_Check_Button(xpos+111, by, 78, bh, _("Tx ON")); btn_tt550_enable_xmtr->down_box(FL_DOWN_BOX); btn_tt550_enable_xmtr->value(1); btn_tt550_enable_xmtr->callback((Fl_Callback*)cb_btn_tt550_enable_xmtr); btn_tt550_enable_xmtr->value(progStatus.tt550_enable_xmtr); btn_tt550_enable_tloop = new Fl_Check_Button(xpos+197, by, 78, bh, _("Tloop")); btn_tt550_enable_tloop->down_box(FL_DOWN_BOX); btn_tt550_enable_tloop->callback((Fl_Callback*)cb_btn_tt550_enable_tloop); btn_tt550_enable_tloop->value(progStatus.tt550_enable_tloop); btn_tt550_tuner_bypass = new Fl_Check_Button(xpos+283, by, 78, bh, _("Tuner")); btn_tt550_tuner_bypass->tooltip(_("Check to bypass tuner")); btn_tt550_tuner_bypass->down_box(FL_DOWN_BOX); btn_tt550_tuner_bypass->callback((Fl_Callback*)cb_btn_tt550_tuner_bypass); op_tt550_XmtBW = new Fl_ComboBox(xpos+462, by, 112, bh, _("Xmt BW")); op_tt550_XmtBW->tooltip(_("Select Transceiver Bandwidth")); op_tt550_XmtBW->box(FL_DOWN_BOX); op_tt550_XmtBW->color(FL_WHITE); op_tt550_XmtBW->selection_color(FL_BACKGROUND_COLOR); op_tt550_XmtBW->labeltype(FL_NORMAL_LABEL); op_tt550_XmtBW->labelfont(0); op_tt550_XmtBW->labelsize(12); op_tt550_XmtBW->labelcolor(FL_FOREGROUND_COLOR); op_tt550_XmtBW->callback((Fl_Callback*)cb_op_tt550_XmtBW); op_tt550_XmtBW->align(Fl_Align(FL_ALIGN_LEFT)); op_tt550_XmtBW->when(FL_WHEN_RELEASE); op_tt550_XmtBW->index(progStatus.tt550_xmt_bw); op_tt550_XmtBW->end(); btn_tt550_use_xmt_bw = new Fl_Check_Button(xpos+613, by, 23, bh, _("Enable")); btn_tt550_use_xmt_bw->tooltip(_("Use Xmt BW setting")); btn_tt550_use_xmt_bw->down_box(FL_DOWN_BOX); btn_tt550_use_xmt_bw->callback((Fl_Callback*)cb_btn_tt550_use_xmt_bw); btn_tt550_use_xmt_bw->align(Fl_Align(FL_ALIGN_RIGHT)); btn_tt550_use_xmt_bw->value(progStatus.tt550_use_xmt_bw); tt550_Tx->end(); tt550_302A = new Fl_Group(xpos, ypos+tabh, W, tabb, _("302-A")); tt550_302A->hide(); spnr_tt550_keypad_time_out = new Hspinner(xpos+100, by, 5*bh, bh, _("Time out")); spnr_tt550_keypad_time_out->tooltip(_("Clear M302 keypad after ## secs")); spnr_tt550_keypad_time_out->minimum(0.5); spnr_tt550_keypad_time_out->maximum(10); spnr_tt550_keypad_time_out->value(2); spnr_tt550_keypad_time_out->callback((Fl_Callback*)cb_spnr_tt550_keypad_time_out); spnr_tt550_keypad_time_out->align(Fl_Align(36)); spnr_tt550_keypad_time_out->value(progStatus.tt550_keypad_timeout/1000.0); spnr_tt550_keypad_time_out->step(0.1); spnr_tt550_encoder_sensitivity = new Hspinner( spnr_tt550_keypad_time_out->x() + spnr_tt550_keypad_time_out->w() + 100, by, 5*bh, bh, _("Sensitivity")); spnr_tt550_encoder_sensitivity->tooltip(_("1 - most sensitive")); spnr_tt550_encoder_sensitivity->type(FL_INT_INPUT); spnr_tt550_encoder_sensitivity->minimum(1); spnr_tt550_encoder_sensitivity->maximum(25); spnr_tt550_encoder_sensitivity->step(1); spnr_tt550_encoder_sensitivity->value(10); spnr_tt550_encoder_sensitivity->callback((Fl_Callback*)cb_spnr_tt550_encoder_sensitivity); spnr_tt550_encoder_sensitivity->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_encoder_sensitivity->value(progStatus.tt550_encoder_sensitivity); sel_tt550_encoder_step = new Fl_Choice( spnr_tt550_encoder_sensitivity->x() + spnr_tt550_encoder_sensitivity->w() + 100, by, 80, bh, _("Step size")); sel_tt550_encoder_step->down_box(FL_BORDER_BOX); sel_tt550_encoder_step->callback((Fl_Callback*)cb_sel_tt550_encoder_step); sel_tt550_encoder_step->add("1|10|100|1 K|10 K"); sel_tt550_encoder_step->value(progStatus.tt550_encoder_step); tt550_302A->end(); tt550_302B = new Fl_Group(xpos, ypos+tabh, W, tabb, _("302-B")); tt550_302B->hide(); sel_tt550_F1_func = new Fl_Choice(xpos+168, by, 111, bh, _("F1")); sel_tt550_F1_func->tooltip(_("Assign Func Key")); sel_tt550_F1_func->down_box(FL_BORDER_BOX); sel_tt550_F1_func->callback((Fl_Callback*)cb_sel_tt550_F1_func); sel_tt550_F1_func->add("None|Clear|CW++|CW--|Band++|Band--|Step++|Step--"); sel_tt550_F1_func->value(progStatus.tt550_F1_func); sel_tt550_F2_func = new Fl_Choice(xpos+319, by, 111, bh, _("F2")); sel_tt550_F2_func->tooltip(_("Assign Func Key")); sel_tt550_F2_func->down_box(FL_BORDER_BOX); sel_tt550_F2_func->callback((Fl_Callback*)cb_sel_tt550_F2_func); sel_tt550_F2_func->add("None|Clear|CW++|CW--|Band++|Band--|Step++|Step--"); sel_tt550_F2_func->value(progStatus.tt550_F2_func); sel_tt550_F3_func = new Fl_Choice(xpos+465, by, 111, bh, _("F3")); sel_tt550_F3_func->tooltip(_("Assign Func Key")); sel_tt550_F3_func->down_box(FL_BORDER_BOX); sel_tt550_F3_func->callback((Fl_Callback*)cb_sel_tt550_F3_func); sel_tt550_F3_func->add("None|Clear|CW++|CW--|Band++|Band--|Step++|Step--"); sel_tt550_F3_func->value(progStatus.tt550_F3_func); tt550_302B->end(); tabs550->end(); grpOTHER->end(); grpMAIN->show(); grpSLIDERS->hide(); grpBUTTONS->hide(); grpOTHER->hide(); tmg->end(); return tmg; } Fl_Double_Window* touch_rig_window() { int mainW = TOUCH_MAINW; int mainH = TOUCH_MAINH; Fl_Double_Window* w = new Fl_Double_Window(mainW, mainH, _("Flrig")); w->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE)); Fl_Group* grp_menu = new Fl_Group(0,0,mainW,30); Fl_Menu_Bar *touch_menubar = new Fl_Menu_Bar(0, 0, mainW-64, 28); touch_menubar->textsize(18); progStatus.tooltips ? (&touch_menu[6])->set() : (&touch_menu[6])->clear(); touch_menubar->menu(touch_menu); Fl_Group *mnu_box = new Fl_Group(mainW-64, 0, 64, 28); mnu_box->box(FL_UP_BOX); tcpip_box = new Fl_Group(mainW-62, 0, 60, 28); tcpip_box->box(FL_FLAT_BOX); tcpip_menu_box = new Fl_Box(mainW - 62, 0, 18, 28); tcpip_menu_box->box(FL_DIAMOND_BOX); tcpip_menu_box->color(FL_GREEN); Fl_Box *tcpip_menu_label = new Fl_Box(mainW - 62 + 20, 0, 64 - 22, 28, _("tcpip")); tcpip_menu_label->box(FL_FLAT_BOX); tcpip_menu_label->align(FL_ALIGN_CENTER); tcpip_menu_label->tooltip(_("lit when connected to remote tcpip")); tcpip_box->end(); tcpip_box->hide(); mnu_box->end(); grp_menu->resizable(touch_menubar); grp_menu->end(); mnuRestoreData = (touch_menu+12); mnuKeepData = (touch_menu+13); mnuTooltips = (touch_menu+17); btnInitializing = new Fl_Button(0, 28, mainW, mainH - 28, "Initializing"); btnInitializing->hide(); txt_encA = new Fl_Output( 0, 28, 90, 20, ""); txt_encA->box(FL_THIN_DOWN_BOX); txt_encA->align(20); txt_encA->hide(); main_group = touch_main_group(0, 28, mainW, mainH); main_group->show(); w->resizable(main_group); w->size_range(mainW, mainH, 0, mainH); w->end(); return w; } flrig-1.3.24/src/UI/ui_small.cxx0000644000175000017500000014027112562731646013303 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- Fl_Group *gsmall = (Fl_Group *)0; Fl_Menu_Item menu_small_menu[] = { {_("&File"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("E&xit"), 0, (Fl_Callback*)cb_mnuExit, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("&Config"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Setup"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Transceiver"), 0, (Fl_Callback*)cb_mnuConfigXcvr, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("XmlRpc"), 0, (Fl_Callback*)cb_mnuXMLRPC, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("tcpip"), 0, (Fl_Callback*)cb_mnuTCPIP, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("PTT"), 0, (Fl_Callback*)cb_mnuPTT, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("AUX"), 0, (Fl_Callback*)cb_mnuAUX, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Polling"), 0, (Fl_Callback*)cb_Polling, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("Start/Stop"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Restore Freq/Mode"), 0, (Fl_Callback*)cb_mnuRestoreData, 0, 6, FL_NORMAL_LABEL, 0, 14, 0}, {_("Keep Freq/Mode"), 0, (Fl_Callback*)cb_mnuKeepData, 0, 134, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("UI"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Meter filtering"), 0, (Fl_Callback*)cb_mnu_meter_filtering, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("Small sliders"), 0, (Fl_Callback*)cb_mnuSchema, 0, 130, FL_NORMAL_LABEL, 0, 14, 0}, {_("Tooltips"), 0, (Fl_Callback*)cb_mnuTooltips, 0, 130, FL_NORMAL_LABEL, 0, 14, 0}, {_("User Interface"), 0, (Fl_Callback*)cb_mnuColorConfig, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0}, {_("&Memory"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("Save"), 0, (Fl_Callback*)cb_save_me, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("Manage"), 0, (Fl_Callback*)cb_Memory, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {_("&Help"), 0, 0, 0, 64, FL_NORMAL_LABEL, 0, 14, 0}, {_("On Line Help"), 0, (Fl_Callback*)cb_mnuOnLineHelp, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {_("&About"), 0, (Fl_Callback*)cb_mnuAbout, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("Send command"), 0, (Fl_Callback*)cb_Send, 0, 128, FL_NORMAL_LABEL, 0, 14, 0}, {_("&Events"), 0, (Fl_Callback*)cb_Events, 0, 0, FL_NORMAL_LABEL, 0, 14, 0}, {0,0,0,0,0,0,0,0,0}, {0,0,0,0,0,0,0,0,0} }; Fl_Group *small_main_group(int X, int Y, int W, int H) { Fl_Group *g = new Fl_Group(X,Y,W,H); g->box(FL_FLAT_BOX); FreqDispA = new cFreqControl(1, 24, 210, 35, _("10")); FreqDispA->box(FL_DOWN_BOX); FreqDispA->color(FL_BACKGROUND_COLOR); FreqDispA->selection_color(FL_BACKGROUND_COLOR); FreqDispA->labeltype(FL_NORMAL_LABEL); FreqDispA->labelfont(0); FreqDispA->labelsize(14); FreqDispA->labelcolor(FL_FOREGROUND_COLOR); FreqDispA->align(Fl_Align(FL_ALIGN_CENTER)); FreqDispA->when(FL_WHEN_CHANGED); FreqDispA->SetONOFFCOLOR (FL_YELLOW, FL_BLACK); FreqDispA->setCallBack(movFreqA); FreqDispB = new cFreqControl(213, 24, 210, 35, _("10")); FreqDispB->box(FL_DOWN_BOX); FreqDispB->color(FL_BACKGROUND_COLOR); FreqDispB->selection_color(FL_BACKGROUND_COLOR); FreqDispB->labeltype(FL_NORMAL_LABEL); FreqDispB->labelfont(0); FreqDispB->labelsize(14); FreqDispB->labelcolor(FL_FOREGROUND_COLOR); FreqDispB->align(Fl_Align(FL_ALIGN_CENTER)); FreqDispB->when(FL_WHEN_CHANGED); FreqDispB->SetONOFFCOLOR (FL_YELLOW, FL_BLACK); FreqDispB->setCallBack(movFreqB); btnVol = new Fl_Light_Button(2, 125, 50, 18, _("Vol")); btnVol->tooltip(_("Speaker on/off")); btnVol->down_box(FL_THIN_DOWN_BOX); btnVol->value(1); btnVol->labelsize(12); btnVol->callback((Fl_Callback*)cb_btnVol); sldrVOLUME = new Fl_Wheel_Value_Slider(54, 125, 156, 18); sldrVOLUME->tooltip(_("Adjust Audio Volume")); sldrVOLUME->type(5); sldrVOLUME->box(FL_THIN_DOWN_BOX); sldrVOLUME->color(FL_BACKGROUND_COLOR); sldrVOLUME->selection_color(FL_BACKGROUND_COLOR); sldrVOLUME->labeltype(FL_NORMAL_LABEL); sldrVOLUME->labelfont(0); sldrVOLUME->labelsize(12); sldrVOLUME->labelcolor(FL_FOREGROUND_COLOR); sldrVOLUME->maximum(100); sldrVOLUME->step(1); sldrVOLUME->textsize(12); sldrVOLUME->callback((Fl_Callback*)cb_sldrVOLUME); sldrVOLUME->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrVOLUME->when(FL_WHEN_CHANGED); sldrVOLUME->reverse(true); sldrRFGAIN = new Fl_Wheel_Value_Slider(54, 145, 156, 18, _("RF")); sldrRFGAIN->tooltip(_("Adjust RF gain")); sldrRFGAIN->type(5); sldrRFGAIN->box(FL_THIN_DOWN_BOX); sldrRFGAIN->color(FL_BACKGROUND_COLOR); sldrRFGAIN->selection_color(FL_BACKGROUND_COLOR); sldrRFGAIN->labeltype(FL_NORMAL_LABEL); sldrRFGAIN->labelfont(0); sldrRFGAIN->labelsize(14); sldrRFGAIN->labelcolor(FL_FOREGROUND_COLOR); sldrRFGAIN->maximum(100); sldrRFGAIN->step(1); sldrRFGAIN->value(15); sldrRFGAIN->textsize(12); sldrRFGAIN->callback((Fl_Callback*)cb_sldrRFGAIN); sldrRFGAIN->align(Fl_Align(FL_ALIGN_LEFT)); sldrRFGAIN->when(FL_WHEN_CHANGED); sldrRFGAIN->reverse(true); sldrSQUELCH = new Fl_Wheel_Value_Slider(54, 165, 156, 18, _("SQL")); sldrSQUELCH->tooltip(_("Adjust Squelch")); sldrSQUELCH->type(5); sldrSQUELCH->box(FL_THIN_DOWN_BOX); sldrSQUELCH->color(FL_BACKGROUND_COLOR); sldrSQUELCH->selection_color(FL_BACKGROUND_COLOR); sldrSQUELCH->labeltype(FL_NORMAL_LABEL); sldrSQUELCH->labelfont(0); sldrSQUELCH->labelsize(14); sldrSQUELCH->labelcolor(FL_FOREGROUND_COLOR); sldrSQUELCH->maximum(100); sldrSQUELCH->step(1); sldrSQUELCH->value(15); sldrSQUELCH->textsize(12); sldrSQUELCH->callback((Fl_Callback*)cb_sldrSQUELCH); sldrSQUELCH->align(Fl_Align(FL_ALIGN_LEFT)); sldrSQUELCH->when(FL_WHEN_CHANGED); sldrSQUELCH->reverse(true); btnIFsh = new Fl_Light_Button(214, 125, 50, 18, _("IFsh")); btnIFsh->tooltip(_("IF Shift On/Off")); btnIFsh->down_box(FL_THIN_DOWN_BOX); btnIFsh->labelsize(12); btnIFsh->callback((Fl_Callback*)cb_btnIFsh); sldrIFSHIFT = new Fl_Wheel_Value_Slider(266, 125, 156, 18); sldrIFSHIFT->tooltip(_("Adjust IF Shift")); sldrIFSHIFT->type(5); sldrIFSHIFT->box(FL_THIN_DOWN_BOX); sldrIFSHIFT->color(FL_BACKGROUND_COLOR); sldrIFSHIFT->selection_color(FL_BACKGROUND_COLOR); sldrIFSHIFT->labeltype(FL_NORMAL_LABEL); sldrIFSHIFT->labelfont(0); sldrIFSHIFT->labelsize(12); sldrIFSHIFT->labelcolor(FL_FOREGROUND_COLOR); sldrIFSHIFT->minimum(-1000); sldrIFSHIFT->maximum(1000); sldrIFSHIFT->step(10); sldrIFSHIFT->textsize(12); sldrIFSHIFT->callback((Fl_Callback*)cb_sldrIFSHIFT); sldrIFSHIFT->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrIFSHIFT->when(FL_WHEN_CHANGED); sldrIFSHIFT->reverse(true); btnNotch = new Fl_Light_Button(214, 145, 50, 18, _("Nch")); btnNotch->tooltip(_("Notch - Manual (off) Auto (on)")); btnNotch->down_box(FL_THIN_DOWN_BOX); btnNotch->labelsize(12); btnNotch->callback((Fl_Callback*)cb_btnNotch); sldrNOTCH = new Fl_Wheel_Value_Slider(266, 145, 156, 18); sldrNOTCH->tooltip(_("Adjust Notch Frequency")); sldrNOTCH->type(5); sldrNOTCH->box(FL_THIN_DOWN_BOX); sldrNOTCH->color(FL_BACKGROUND_COLOR); sldrNOTCH->selection_color(FL_BACKGROUND_COLOR); sldrNOTCH->labeltype(FL_NORMAL_LABEL); sldrNOTCH->labelfont(0); sldrNOTCH->labelsize(14); sldrNOTCH->labelcolor(FL_FOREGROUND_COLOR); sldrNOTCH->minimum(-1000); sldrNOTCH->maximum(1000); sldrNOTCH->step(10); sldrNOTCH->textsize(12); sldrNOTCH->callback((Fl_Callback*)cb_sldrNOTCH); sldrNOTCH->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrNOTCH->when(FL_WHEN_CHANGED); sldrNOTCH->reverse(true); btnNR = new Fl_Light_Button(214, 165, 50, 18, _("NR")); btnNR->tooltip(_("Noise Reduction On/Off")); btnNR->down_box(FL_THIN_DOWN_BOX); btnNR->labelsize(12); btnNR->callback((Fl_Callback*)cb_btnNR); sldrNR = new Fl_Wheel_Value_Slider(266, 165, 156, 18); sldrNR->tooltip(_("Adjust noise reduction")); sldrNR->type(5); sldrNR->box(FL_THIN_DOWN_BOX); sldrNR->color(FL_BACKGROUND_COLOR); sldrNR->selection_color(FL_BACKGROUND_COLOR); sldrNR->labeltype(FL_NORMAL_LABEL); sldrNR->labelfont(0); sldrNR->labelsize(12); sldrNR->labelcolor(FL_FOREGROUND_COLOR); sldrNR->maximum(100); sldrNR->step(2); sldrNR->textsize(12); sldrNR->callback((Fl_Callback*)cb_sldrNR); sldrNR->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); sldrNR->when(FL_WHEN_CHANGED); sldrNR->reverse(true); btnDataPort = new Fl_Light_Button(2, 246, 50, 18, _("Data")); btnDataPort->tooltip(_("Input on Data Port")); btnDataPort->down_box(FL_THIN_DOWN_BOX); btnDataPort->labelsize(12); btnDataPort->callback((Fl_Callback*)cb_btnDataPort); btnDataPort->hide(); btnDataPort->value(progStatus.data_port); sldrMICGAIN = new Fl_Wheel_Value_Slider(54, 185, 156, 18, _("MIC")); sldrMICGAIN->tooltip(_("Adjust Mic Gain")); sldrMICGAIN->type(5); sldrMICGAIN->box(FL_THIN_DOWN_BOX); sldrMICGAIN->color(FL_BACKGROUND_COLOR); sldrMICGAIN->selection_color(FL_BACKGROUND_COLOR); sldrMICGAIN->labeltype(FL_NORMAL_LABEL); sldrMICGAIN->labelfont(0); sldrMICGAIN->labelsize(14); sldrMICGAIN->labelcolor(FL_FOREGROUND_COLOR); sldrMICGAIN->maximum(100); sldrMICGAIN->step(1); sldrMICGAIN->textsize(12); sldrMICGAIN->callback((Fl_Callback*)cb_sldrMICGAIN); sldrMICGAIN->align(Fl_Align(FL_ALIGN_LEFT)); sldrMICGAIN->when(FL_WHEN_CHANGED); sldrMICGAIN->reverse(true); sldrPOWER = new Fl_Wheel_Value_Slider(266, 185, 156, 18, _("PWR")); sldrPOWER->tooltip(_("Adjust power level")); sldrPOWER->type(5); sldrPOWER->box(FL_THIN_DOWN_BOX); sldrPOWER->color(FL_BACKGROUND_COLOR); sldrPOWER->selection_color(FL_BACKGROUND_COLOR); sldrPOWER->labeltype(FL_NORMAL_LABEL); sldrPOWER->labelfont(0); sldrPOWER->labelsize(14); sldrPOWER->labelcolor(FL_FOREGROUND_COLOR); sldrPOWER->maximum(100); sldrPOWER->step(1); sldrPOWER->value(15); sldrPOWER->textsize(12); sldrPOWER->callback((Fl_Callback*)cb_sldrPOWER); sldrPOWER->align(Fl_Align(FL_ALIGN_LEFT)); sldrPOWER->when(FL_WHEN_CHANGED); sldrPOWER->reverse(true); btnA = new Fl_Light_Button(212, 62, 52, 20, _("vfoA")); btnA->tooltip(_("Rx-A / Tx-A")); btnA->down_box(FL_THIN_DOWN_BOX); btnA->labelsize(12); btnA->callback((Fl_Callback*)cb_btnA); btnA->value(!useB); btnB = new Fl_Light_Button(265, 62, 52, 20, _("vfoB")); btnB->tooltip(_("Rx-B / Tx-B")); btnB->down_box(FL_THIN_DOWN_BOX); btnB->labelsize(12); btnB->callback((Fl_Callback*)cb_btnB); btnB->value(useB); btn_K3_swapAB = new Fl_Button(265, 62, 52, 20, _("A/B")); btn_K3_swapAB->tooltip(_("Swap A/B")); btn_K3_swapAB->down_box(FL_DOWN_BOX); btn_K3_swapAB->labelsize(12); btn_K3_swapAB->callback((Fl_Callback*)cb_btn_K3_swapAB); btn_K3_swapAB->hide(); btn_KX3_swapAB = new Fl_Button(265, 62, 52, 20, _("A/B")); btn_KX3_swapAB->tooltip(_("Swap A/B")); btn_KX3_swapAB->down_box(FL_DOWN_BOX); btn_KX3_swapAB->labelsize(12); btn_KX3_swapAB->callback((Fl_Callback*)cb_btn_KX3_swapAB); btn_KX3_swapAB->hide(); btnAswapB = new Fl_Button(318, 62, 52, 20, _("A<->B")); btnAswapB->tooltip(_("Left click:Swap A/B\nRight click:Copy A to B")); btnAswapB->down_box(FL_DOWN_BOX); btnAswapB->labelsize(12); btnAswapB->callback((Fl_Callback*)cb_btnAswapB); btnSplit = new Fl_Light_Button(371, 62, 52, 20, _("Split")); btnSplit->tooltip(_("Rx-A / Tx-B")); btnSplit->down_box(FL_THIN_DOWN_BOX); btnSplit->labelsize(12); btnSplit->callback((Fl_Callback*)cb_btnSplit); btnSplit->value(progStatus.split); opBW = new Fl_ComboBox(212, 84, 105, 18, _("Bandwidth")); opBW->tooltip(_("Select Transceiver Bandwidth")); opBW->box(FL_NO_BOX); opBW->color(FL_BACKGROUND2_COLOR); opBW->selection_color(FL_BACKGROUND_COLOR); opBW->labeltype(FL_NORMAL_LABEL); opBW->labelfont(0); opBW->labelsize(12); opBW->labelcolor(FL_FOREGROUND_COLOR); opBW->callback((Fl_Callback*)cb_opBW); opBW->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opBW->when(FL_WHEN_RELEASE); opBW->end(); btnDSP = new Fl_Button(212, 84, 18, 18, _("L")); btnDSP->callback((Fl_Callback*)cb_btnDSP); btnDSP->hide(); opDSP_lo = new Fl_ComboBox(231, 84, 86, 18, _("Lo Cut")); opDSP_lo->tooltip(_("Lo Cut Freq")); opDSP_lo->box(FL_FLAT_BOX); opDSP_lo->color(FL_BACKGROUND2_COLOR); opDSP_lo->selection_color(FL_BACKGROUND_COLOR); opDSP_lo->labeltype(FL_NORMAL_LABEL); opDSP_lo->labelfont(0); opDSP_lo->labelsize(12); opDSP_lo->labelcolor(FL_FOREGROUND_COLOR); opDSP_lo->callback((Fl_Callback*)cb_opDSP_lo); opDSP_lo->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opDSP_lo->when(FL_WHEN_RELEASE); opDSP_lo->hide(); opDSP_lo->end(); opDSP_hi = new Fl_ComboBox(231, 84, 86, 18, _("Hi Cut")); opDSP_hi->tooltip(_("Hi Cut Freq")); opDSP_hi->box(FL_FLAT_BOX); opDSP_hi->color(FL_BACKGROUND2_COLOR); opDSP_hi->selection_color(FL_BACKGROUND_COLOR); opDSP_hi->labeltype(FL_NORMAL_LABEL); opDSP_hi->labelfont(0); opDSP_hi->labelsize(12); opDSP_hi->labelcolor(FL_FOREGROUND_COLOR); opDSP_hi->callback((Fl_Callback*)cb_opDSP_hi); opDSP_hi->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opDSP_hi->when(FL_WHEN_RELEASE); opDSP_hi->hide(); opDSP_hi->end(); opMODE = new Fl_ComboBox(318, 84, 105, 18, _("Mode")); opMODE->tooltip(_("Select transceiver operating mode")); opMODE->box(FL_NO_BOX); opMODE->color(FL_BACKGROUND2_COLOR); opMODE->selection_color(FL_BACKGROUND_COLOR); opMODE->labeltype(FL_NORMAL_LABEL); opMODE->labelfont(0); opMODE->labelsize(12); opMODE->labelcolor(FL_FOREGROUND_COLOR); opMODE->callback((Fl_Callback*)cb_opMODE); opMODE->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opMODE->when(FL_WHEN_RELEASE); opMODE->end(); btn_show_controls = new Fl_Button(3, 206, 18, 18, _("@-22->")); btn_show_controls->tooltip(_("Show/Hide controls")); btn_show_controls->callback((Fl_Callback*)cb_btn_show_controls); btnAttenuator = new Fl_Light_Button(26, 206, 60, 18, _("Att")); btnAttenuator->tooltip(_("Attenuator On/Off")); btnAttenuator->down_box(FL_THIN_DOWN_BOX); btnAttenuator->labelsize(12); btnAttenuator->callback((Fl_Callback*)cb_btnAttenuator); btnPreamp = new Fl_Light_Button(93, 206, 60, 18, _("Pre")); btnPreamp->tooltip(_("Preamp On/Off")); btnPreamp->down_box(FL_THIN_DOWN_BOX); btnPreamp->labelsize(12); btnPreamp->callback((Fl_Callback*)cb_btnPreamp); btnNOISE = new Fl_Light_Button(160, 206, 60, 18, _("NB")); btnNOISE->tooltip(_("Noise Blanker On/Off")); btnNOISE->down_box(FL_THIN_DOWN_BOX); btnNOISE->labelsize(12); btnNOISE->callback((Fl_Callback*)cb_btnNOISE); btnAutoNotch = new Fl_Light_Button(227, 206, 60, 18, _("AN")); btnAutoNotch->tooltip(_("Auto Notch On/Off")); btnAutoNotch->down_box(FL_THIN_DOWN_BOX); btnAutoNotch->labelsize(12); btnAutoNotch->callback((Fl_Callback*)cb_btnAutoNotch); btnTune = new Fl_Button(294, 206, 60, 18, _("Tune")); btnTune->tooltip(_("Momentary Tune")); btnTune->callback((Fl_Callback*)cb_btnTune); btnPTT = new Fl_Light_Button(362, 206, 60, 18, _("PTT")); btnPTT->tooltip(_("Xmt On/Off")); btnPTT->down_box(FL_THIN_DOWN_BOX); btnPTT->labelsize(12); btnPTT->callback((Fl_Callback*)cb_btnPTT); Fl_Group* sm_grp1 = new Fl_Group(1, 62, 210, 60); sm_grp1->box(FL_DOWN_BOX); grpMeters = new Fl_Group(3, 63, 206, 57); grpMeters->box(FL_FLAT_BOX); scaleSmeter = new Fl_Box(3, 63, 206, 20); scaleSmeter->box(FL_FLAT_BOX); scaleSmeter->image(image_S60); btnALC_SWR = new Fl_Button(3, 63, 206, 20); btnALC_SWR->tooltip(_("Press SWR / ALC")); btnALC_SWR->box(FL_FLAT_BOX); btnALC_SWR->down_box(FL_FLAT_BOX); btnALC_SWR->image(image_SWR); btnALC_SWR->callback((Fl_Callback*)cb_btnALC_SWR); btnALC_SWR->hide(); sldrRcvSignal = new Fl_SigBar(5, 85, 200, 6); sldrRcvSignal->box(FL_FLAT_BOX); sldrRcvSignal->color(FL_BACKGROUND_COLOR); sldrRcvSignal->selection_color(FL_BACKGROUND_COLOR); sldrRcvSignal->labeltype(FL_NORMAL_LABEL); sldrRcvSignal->labelfont(0); sldrRcvSignal->labelsize(14); sldrRcvSignal->labelcolor(FL_FOREGROUND_COLOR); sldrRcvSignal->align(Fl_Align(FL_ALIGN_CENTER)); sldrRcvSignal->when(FL_WHEN_RELEASE); sldrRcvSignal->hide(); sldrRcvSignal->minimum(0); sldrRcvSignal->maximum(100); sldrALC = new Fl_SigBar(5, 85, 200, 6); sldrALC->box(FL_FLAT_BOX); sldrALC->color(FL_BACKGROUND_COLOR); sldrALC->selection_color(FL_BACKGROUND_COLOR); sldrALC->labeltype(FL_NORMAL_LABEL); sldrALC->labelfont(0); sldrALC->labelsize(14); sldrALC->labelcolor(FL_FOREGROUND_COLOR); sldrALC->align(Fl_Align(FL_ALIGN_CENTER)); sldrALC->when(FL_WHEN_RELEASE); sldrALC->hide(); sldrALC->minimum(0); sldrALC->maximum(100); sldrSWR = new Fl_SigBar(5, 85, 200, 6); sldrSWR->box(FL_FLAT_BOX); sldrSWR->color(FL_BACKGROUND_COLOR); sldrSWR->selection_color(FL_BACKGROUND_COLOR); sldrSWR->labeltype(FL_NORMAL_LABEL); sldrSWR->labelfont(0); sldrSWR->labelsize(14); sldrSWR->labelcolor(FL_FOREGROUND_COLOR); sldrSWR->align(Fl_Align(FL_ALIGN_CENTER)); sldrSWR->when(FL_WHEN_RELEASE); sldrSWR->hide(); sldrSWR->minimum(0); sldrSWR->maximum(100); sldrFwdPwr = new Fl_SigBar(5, 92, 200, 6); sldrFwdPwr->box(FL_FLAT_BOX); sldrFwdPwr->color(FL_BACKGROUND_COLOR); sldrFwdPwr->selection_color(FL_BACKGROUND_COLOR); sldrFwdPwr->labeltype(FL_NORMAL_LABEL); sldrFwdPwr->labelfont(0); sldrFwdPwr->labelsize(14); sldrFwdPwr->labelcolor(FL_FOREGROUND_COLOR); sldrFwdPwr->align(Fl_Align(FL_ALIGN_CENTER)); sldrFwdPwr->when(FL_WHEN_RELEASE); sldrFwdPwr->hide(); sldrFwdPwr->minimum(0); sldrFwdPwr->maximum(100); scalePower = new Fl_Button(3, 99, 206, 20); scalePower->tooltip(_("right-click to select power scale")); scalePower->box(FL_FLAT_BOX); scalePower->down_box(FL_FLAT_BOX); scalePower->image(image_P100); scalePower->callback((Fl_Callback*)cb_scalePower); meter_fill_box = new Fl_Box(207, 63, 0, 57); meter_fill_box->box(FL_FLAT_BOX); meter_fill_box->color((Fl_Color)246); grpMeters->end(); sm_grp1->end(); boxControl = new Fl_Box(3, 231, 130, 17, _("Auxilliary Controls:")); boxControl->box(FL_FLAT_BOX); boxControl->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); btnAuxRTS = new Fl_Light_Button(218, 230, 60, 18, _("RTS")); btnAuxRTS->tooltip(_("RTS control pin")); btnAuxRTS->down_box(FL_THIN_DOWN_BOX); btnAuxRTS->labelsize(12); btnAuxRTS->callback((Fl_Callback*)cb_btnAuxRTS); btnAuxRTS->value(progStatus.aux_rts); btnAuxDTR = new Fl_Light_Button(146, 230, 60, 18, _("DTR")); btnAuxDTR->tooltip(_("DTR control pin")); btnAuxDTR->down_box(FL_THIN_DOWN_BOX); btnAuxDTR->labelsize(12); btnAuxDTR->callback((Fl_Callback*)cb_btnAuxDTR); btnAuxDTR->value(progStatus.aux_dtr); cntRIT = new Hspinner(213, 104, 54, 18, _("R")); cntRIT->tooltip(_("RIT")); cntRIT->type(FL_INT_INPUT); cntRIT->labelsize(12); cntRIT->minimum(-1000); cntRIT->maximum(1000); cntRIT->step(10); cntRIT->callback((Fl_Callback*)cb_cntRIT); cntRIT->align(Fl_Align(FL_ALIGN_RIGHT)); cntXIT = new Hspinner(283, 104, 54, 18, _("X")); cntXIT->tooltip(_("XIT")); cntXIT->type(FL_INT_INPUT); cntXIT->labelsize(12); cntXIT->minimum(-1000); cntXIT->maximum(1000); cntXIT->step(10); cntXIT->callback((Fl_Callback*)cb_cntXIT); cntXIT->align(Fl_Align(FL_ALIGN_RIGHT)); cntBFO = new Hspinner(355, 104, 54, 18, _("B")); cntBFO->tooltip(_("BFO")); cntBFO->type(FL_INT_INPUT); cntBFO->labelsize(12); cntBFO->minimum(0); cntBFO->maximum(1000); cntBFO->step(10); cntBFO->value(600); cntBFO->callback((Fl_Callback*)cb_cntBFO); cntBFO->align(Fl_Align(FL_ALIGN_RIGHT)); tabs550 = new Fl_Tabs(0, 252, 425, 70); tabs550->selection_color(FL_LIGHT1); tabs550->hide(); tt550_CW = new Fl_Group(0, 272, 425, 50, _("CW")); tt550_CW->color(FL_LIGHT1); tt550_CW->selection_color(FL_LIGHT1); spnr_tt550_cw_wpm = new Hspinner( 2, 280, 70, 22, _("wpm")); spnr_tt550_cw_wpm->type(FL_INT_INPUT); spnr_tt550_cw_wpm->minimum(1); spnr_tt550_cw_wpm->maximum(80); spnr_tt550_cw_wpm->step(1); spnr_tt550_cw_wpm->value(24); spnr_tt550_cw_wpm->callback((Fl_Callback*)cb_spnr_tt550_cw_wpm); spnr_tt550_cw_wpm->value(progStatus.tt550_cw_wpm); spnr_tt550_cw_wpm->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_cw_weight = new Hspinner( spnr_tt550_cw_wpm->x() + spnr_tt550_cw_wpm->w() + 2, 280, 70, 22, _("Weight")); spnr_tt550_cw_weight->type(1); spnr_tt550_cw_weight->minimum(0.75); spnr_tt550_cw_weight->maximum(1.5); spnr_tt550_cw_weight->step(0.05); spnr_tt550_cw_weight->value(1); spnr_tt550_cw_weight->callback((Fl_Callback*)cb_spnr_tt550_cw_weight); spnr_tt550_cw_weight->value(progStatus.tt550_cw_weight); spnr_tt550_cw_weight->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_cw_qsk = new Hspinner( spnr_tt550_cw_weight->x() + spnr_tt550_cw_weight->w() + 2, 280, 70, 22, _("Delay")); spnr_tt550_cw_qsk->tooltip(_("QSK delay (msec)")); spnr_tt550_cw_qsk->type(1); spnr_tt550_cw_qsk->minimum(0); spnr_tt550_cw_qsk->maximum(100); spnr_tt550_cw_qsk->step(1); spnr_tt550_cw_qsk->value(20); spnr_tt550_cw_qsk->callback((Fl_Callback*)cb_spnr_tt550_cw_qsk); spnr_tt550_cw_qsk->value(progStatus.tt550_cw_qsk); spnr_tt550_cw_qsk->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_cw_vol = new Hspinner( spnr_tt550_cw_qsk->x() + spnr_tt550_cw_qsk->w() + 2, 280, 70, 22, _("S-T vol")); spnr_tt550_cw_vol->tooltip(_("Side tone volume")); spnr_tt550_cw_vol->type(1); spnr_tt550_cw_vol->minimum(5); spnr_tt550_cw_vol->maximum(80); spnr_tt550_cw_vol->step(1); spnr_tt550_cw_vol->value(24); spnr_tt550_cw_vol->callback((Fl_Callback*)cb_spnr_tt550_cw_vol); spnr_tt550_cw_vol->value(progStatus.tt550_cw_vol); spnr_tt550_cw_vol->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_cw_spot = new Hspinner( spnr_tt550_cw_vol->x() + spnr_tt550_cw_vol->w() + 2, 280, 70, 22, _("Spot Vol")); spnr_tt550_cw_spot->tooltip(_("Spot volume")); spnr_tt550_cw_spot->type(1); spnr_tt550_cw_spot->minimum(0); spnr_tt550_cw_spot->maximum(100); spnr_tt550_cw_spot->step(1); spnr_tt550_cw_spot->value(20); spnr_tt550_cw_spot->callback((Fl_Callback*)cb_spnr_tt550_cw_spot); spnr_tt550_cw_spot->value(progStatus.tt550_cw_spot); spnr_tt550_cw_spot->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); btn_tt550_enable_keyer = new Fl_Check_Button( spnr_tt550_cw_spot->x() + spnr_tt550_cw_spot->w() + 2, 280, 50, 22, _("Keyer")); btn_tt550_enable_keyer->tooltip(_("Enable keyer")); btn_tt550_enable_keyer->down_box(FL_DOWN_BOX); btn_tt550_enable_keyer->callback((Fl_Callback*)cb_btn_tt550_enable_keyer); btn_tt550_enable_keyer->value(progStatus.tt550_enable_keyer); tt550_CW->end(); tt550_VOX = new Fl_Group(0, 272, 420, 50, _("Vox")); tt550_VOX->hide(); spnr_tt550_vox_gain = new Hspinner( 2, 280, 70, 22, _("gain")); spnr_tt550_vox_gain->type(1); spnr_tt550_vox_gain->minimum(0); spnr_tt550_vox_gain->maximum(100); spnr_tt550_vox_gain->step(1); spnr_tt550_vox_gain->callback((Fl_Callback*)cb_spnr_tt550_vox_gain); spnr_tt550_vox_gain->value(progStatus.tt550_vox_gain); spnr_tt550_vox_gain->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_anti_vox = new Hspinner( spnr_tt550_vox_gain->x() + spnr_tt550_vox_gain->w() + 4, 280, 70, 22, _("anti")); spnr_tt550_anti_vox->type(1); spnr_tt550_anti_vox->minimum(0); spnr_tt550_anti_vox->maximum(100); spnr_tt550_anti_vox->step(1); spnr_tt550_anti_vox->callback((Fl_Callback*)cb_spnr_tt550_anti_vox); spnr_tt550_anti_vox->value(progStatus.tt550_vox_anti); spnr_tt550_anti_vox->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_vox_hang = new Hspinner( spnr_tt550_anti_vox->x() + spnr_tt550_anti_vox->w() + 4, 280, 70, 22, _("hang")); spnr_tt550_vox_hang->type(1); spnr_tt550_vox_hang->minimum(0); spnr_tt550_vox_hang->maximum(100); spnr_tt550_vox_hang->step(1); spnr_tt550_vox_hang->callback((Fl_Callback*)cb_spnr_tt550_vox_hang); spnr_tt550_vox_hang->value(progStatus.tt550_vox_hang); spnr_tt550_vox_hang->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); btn_tt550_vox = new Fl_Light_Button( spnr_tt550_vox_hang->x() + spnr_tt550_vox_hang->w() + 4, 280, 50, 22, _("VOX")); btn_tt550_vox->callback((Fl_Callback*)cb_btn_tt550_vox); btn_tt550_vox->value(progStatus.tt550_vox_onoff); tt550_VOX->end(); tt550_Speech = new Fl_Group(0, 272, 420, 50, _("Spch")); tt550_Speech->hide(); btn_tt550_CompON = new Fl_Light_Button( 4, 280, 60, 22, _("On")); btn_tt550_CompON->callback((Fl_Callback*)cb_btn_tt550_CompON); btn_tt550_CompON->value(progStatus.tt550_compON); spnr_tt550_compression = new Hspinner( btn_tt550_CompON->x() + btn_tt550_CompON->w() + 4, 280, 70, 22, _("Comp")); spnr_tt550_compression->type(1); spnr_tt550_compression->minimum(0); spnr_tt550_compression->maximum(100); spnr_tt550_compression->step(1); spnr_tt550_compression->callback((Fl_Callback*)cb_spnr_tt550_compression); spnr_tt550_compression->value(progStatus.tt550_compression); spnr_tt550_compression->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_mon_vol = new Hspinner( spnr_tt550_compression->x() + spnr_tt550_compression->w() + 4, 280, 70, 22, _("Mon vol")); spnr_tt550_mon_vol->tooltip(_("Side tone volume")); spnr_tt550_mon_vol->type(1); spnr_tt550_mon_vol->minimum(0); spnr_tt550_mon_vol->maximum(100); spnr_tt550_mon_vol->step(1); spnr_tt550_mon_vol->value(25); spnr_tt550_mon_vol->callback((Fl_Callback*)cb_spnr_tt550_mon_vol); spnr_tt550_mon_vol->value(progStatus.tt550_mon_vol); spnr_tt550_mon_vol->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); tt550_Speech->end(); tt550_Audio = new Fl_Group(0, 272, 420, 50, _("Audio")); tt550_Audio->hide(); spnr_tt550_line_out = new Hspinner( 4, 280, 70, 22, _("line out")); spnr_tt550_line_out->type(1); spnr_tt550_line_out->minimum(0); spnr_tt550_line_out->maximum(100); spnr_tt550_line_out->step(1); spnr_tt550_line_out->value(20); spnr_tt550_line_out->callback((Fl_Callback*)cb_spnr_tt550_line_out); spnr_tt550_line_out->align(Fl_Align(FL_ALIGN_LEFT)); spnr_tt550_line_out->value(progStatus.tt550_line_out); spnr_tt550_line_out->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); btnAccInp = new Fl_Check_Button( spnr_tt550_line_out->x() + spnr_tt550_line_out->w() + 4, 280, 80, 22, _("Acc Inp")); btnAccInp->tooltip(_("Enable to use accessory audio input")); btnAccInp->down_box(FL_DOWN_BOX); btnAccInp->callback((Fl_Callback*)cb_btnAccInp); btnAccInp->value(progStatus.tt550_use_line_in); tt550_Audio->end(); tt550_Rx = new Fl_Group(2, 272, 420, 50, _("RX")); tt550_Rx->hide(); cbo_tt550_nb_level = new Fl_ComboBox( 4, 280, 80, 22, _("NB level")); cbo_tt550_nb_level->tooltip(_("Select Noise Blanker level")); cbo_tt550_nb_level->box(FL_DOWN_BOX); cbo_tt550_nb_level->color(FL_WHITE); cbo_tt550_nb_level->selection_color(FL_BACKGROUND_COLOR); cbo_tt550_nb_level->labeltype(FL_NORMAL_LABEL); cbo_tt550_nb_level->labelfont(0); cbo_tt550_nb_level->labelsize(14); cbo_tt550_nb_level->labelcolor(FL_FOREGROUND_COLOR); cbo_tt550_nb_level->callback((Fl_Callback*)cb_cbo_tt550_nb_level); cbo_tt550_nb_level->align(Fl_Align(FL_ALIGN_BOTTOM)); cbo_tt550_nb_level->when(FL_WHEN_RELEASE); cbo_tt550_nb_level->index(progStatus.tt550_nb_level); cbo_tt550_nb_level->end(); cbo_tt550_nb_level->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); cbo_tt550_agc_level = new Fl_ComboBox( cbo_tt550_nb_level->x() + cbo_tt550_nb_level->w() + 5, 280, 80, 22, _("AGC")); cbo_tt550_agc_level->tooltip(_("Select AGC")); cbo_tt550_agc_level->box(FL_DOWN_BOX); cbo_tt550_agc_level->color(FL_WHITE); cbo_tt550_agc_level->selection_color(FL_BACKGROUND_COLOR); cbo_tt550_agc_level->labeltype(FL_NORMAL_LABEL); cbo_tt550_agc_level->labelfont(0); cbo_tt550_agc_level->labelsize(14); cbo_tt550_agc_level->labelcolor(FL_FOREGROUND_COLOR); cbo_tt550_agc_level->callback((Fl_Callback*)cb_cbo_tt550_agc_level); cbo_tt550_agc_level->align(Fl_Align(FL_ALIGN_BOTTOM)); cbo_tt550_agc_level->when(FL_WHEN_RELEASE); cbo_tt550_agc_level->index(progStatus.tt550_agc_level); cbo_tt550_agc_level->end(); cbo_tt550_agc_level->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_vfo_adj = new Hspinner( cbo_tt550_agc_level->x() + cbo_tt550_agc_level->w() + 5, 280, 90, 22, _("Vfo Adj(ppm)"), 16); spnr_tt550_vfo_adj->callback((Fl_Callback*)cb_spnr_tt550_vfo_adj); spnr_tt550_vfo_adj->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_vfo_adj->minimum(-100); spnr_tt550_vfo_adj->maximum(100); spnr_tt550_vfo_adj->type(FL_FLOAT_INPUT); spnr_tt550_vfo_adj->step(0.1); spnr_tt550_vfo_adj->value(progStatus.vfo_adj); tt550_Rx->end(); tt550_Tx = new Fl_Group(2, 272, 420, 50, _("TX")); tt550_Tx->hide(); btn_tt550_enable_xmtr = new Fl_Check_Button(10, 280, 70, 22, _("Tx ON")); btn_tt550_enable_xmtr->down_box(FL_DOWN_BOX); btn_tt550_enable_xmtr->value(1); btn_tt550_enable_xmtr->callback((Fl_Callback*)cb_btn_tt550_enable_xmtr); btn_tt550_enable_xmtr->value(progStatus.tt550_enable_xmtr); btn_tt550_enable_tloop = new Fl_Check_Button(87, 280, 70, 22, _("Tloop")); btn_tt550_enable_tloop->down_box(FL_DOWN_BOX); btn_tt550_enable_tloop->callback((Fl_Callback*)cb_btn_tt550_enable_tloop); btn_tt550_enable_tloop->value(progStatus.tt550_enable_tloop); btn_tt550_tuner_bypass = new Fl_Check_Button(164, 280, 70, 22, _("Tuner")); btn_tt550_tuner_bypass->tooltip(_("Check to bypass tuner")); btn_tt550_tuner_bypass->down_box(FL_DOWN_BOX); btn_tt550_tuner_bypass->callback((Fl_Callback*)cb_btn_tt550_tuner_bypass); op_tt550_XmtBW = new Fl_ComboBox(241, 280, 100, 22, _("Xmt BW")); op_tt550_XmtBW->tooltip(_("Select Transceiver Bandwidth")); op_tt550_XmtBW->box(FL_DOWN_BOX); op_tt550_XmtBW->color(FL_WHITE); op_tt550_XmtBW->selection_color(FL_BACKGROUND_COLOR); op_tt550_XmtBW->labeltype(FL_NORMAL_LABEL); op_tt550_XmtBW->labelfont(0); op_tt550_XmtBW->labelsize(12); op_tt550_XmtBW->labelcolor(FL_FOREGROUND_COLOR); op_tt550_XmtBW->callback((Fl_Callback*)cb_op_tt550_XmtBW); op_tt550_XmtBW->align(Fl_Align(FL_ALIGN_BOTTOM)); op_tt550_XmtBW->when(FL_WHEN_RELEASE); op_tt550_XmtBW->index(progStatus.tt550_xmt_bw); op_tt550_XmtBW->end(); btn_tt550_use_xmt_bw = new Fl_Check_Button(345, 280, 21, 22, _("Enable")); btn_tt550_use_xmt_bw->tooltip(_("Use Xmt BW setting")); btn_tt550_use_xmt_bw->down_box(FL_DOWN_BOX); btn_tt550_use_xmt_bw->callback((Fl_Callback*)cb_btn_tt550_use_xmt_bw); btn_tt550_use_xmt_bw->align(Fl_Align(FL_ALIGN_RIGHT)); btn_tt550_use_xmt_bw->value(progStatus.tt550_use_xmt_bw); tt550_Tx->end(); tt550_302A = new Fl_Group(2, 272, 420, 50, _("302-A")); tt550_302A->hide(); spnr_tt550_keypad_time_out = new Hspinner(30, 280, 120, 22, _("Time out"), 16); spnr_tt550_keypad_time_out->tooltip(_("Clear M302 keypad after ## secs")); spnr_tt550_keypad_time_out->minimum(0.5); spnr_tt550_keypad_time_out->maximum(10); spnr_tt550_keypad_time_out->value(2); spnr_tt550_keypad_time_out->color(FL_WHITE); spnr_tt550_keypad_time_out->callback((Fl_Callback*)cb_spnr_tt550_keypad_time_out); spnr_tt550_keypad_time_out->align(Fl_Align(34)); spnr_tt550_keypad_time_out->value(progStatus.tt550_keypad_timeout/1000.0); spnr_tt550_keypad_time_out->step(0.1); spnr_tt550_keypad_time_out->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_tt550_encoder_sensitivity = new Hspinner( spnr_tt550_keypad_time_out->x() + spnr_tt550_keypad_time_out->w() + 10, 280, 80, 22, _("Sensitivity"), 16); spnr_tt550_encoder_sensitivity->tooltip(_("1 - most sensitive")); spnr_tt550_encoder_sensitivity->type(1); spnr_tt550_encoder_sensitivity->minimum(1); spnr_tt550_encoder_sensitivity->maximum(25); spnr_tt550_encoder_sensitivity->step(1); spnr_tt550_encoder_sensitivity->value(10); spnr_tt550_encoder_sensitivity->color(FL_WHITE); spnr_tt550_encoder_sensitivity->callback((Fl_Callback*)cb_spnr_tt550_encoder_sensitivity); spnr_tt550_encoder_sensitivity->value(progStatus.tt550_encoder_sensitivity); spnr_tt550_encoder_sensitivity->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); sel_tt550_encoder_step = new Fl_Choice(312, 277, 72, 21, _("Step size")); sel_tt550_encoder_step->down_box(FL_BORDER_BOX); sel_tt550_encoder_step->callback((Fl_Callback*)cb_sel_tt550_encoder_step); sel_tt550_encoder_step->align(Fl_Align(FL_ALIGN_BOTTOM)); sel_tt550_encoder_step->add("1|10|100|1 K|10 K"); sel_tt550_encoder_step->value(progStatus.tt550_encoder_step); sel_tt550_encoder_step->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); tt550_302A->end(); tt550_302B = new Fl_Group(2, 272, 420, 50, _("302-B")); tt550_302B->hide(); sel_tt550_F1_func = new Fl_Choice(34, 280, 99, 22, _("F1")); sel_tt550_F1_func->tooltip(_("Assign Func Key")); sel_tt550_F1_func->down_box(FL_BORDER_BOX); sel_tt550_F1_func->callback((Fl_Callback*)cb_sel_tt550_F1_func); sel_tt550_F1_func->add("None|Clear|CW++|CW--|Band++|Band--|Step++|Step--"); sel_tt550_F1_func->value(progStatus.tt550_F1_func); sel_tt550_F2_func = new Fl_Choice(169, 280, 99, 22, _("F2")); sel_tt550_F2_func->tooltip(_("Assign Func Key")); sel_tt550_F2_func->down_box(FL_BORDER_BOX); sel_tt550_F2_func->callback((Fl_Callback*)cb_sel_tt550_F2_func); sel_tt550_F2_func->add("None|Clear|CW++|CW--|Band++|Band--|Step++|Step--"); sel_tt550_F2_func->value(progStatus.tt550_F2_func); sel_tt550_F3_func = new Fl_Choice(300, 280, 99, 22, _("F3")); sel_tt550_F3_func->tooltip(_("Assign Func Key")); sel_tt550_F3_func->down_box(FL_BORDER_BOX); sel_tt550_F3_func->callback((Fl_Callback*)cb_sel_tt550_F3_func); sel_tt550_F3_func->add("None|Clear|CW++|CW--|Band++|Band--|Step++|Step--"); sel_tt550_F3_func->value(progStatus.tt550_F3_func); tt550_302B->end(); tabs550->end(); tabsGeneric = new Fl_Tabs(0, 252, 425, 70); tabsGeneric->selection_color(FL_LIGHT1); genericBands = new Fl_Group(0, 271, 425, 49, _("Bands")); btnBandSelect_1 = new Fl_Button(4, 278, 60, 18, _("1.8")); btnBandSelect_1->tooltip(_("160m Band")); btnBandSelect_1->color((Fl_Color)246); btnBandSelect_1->callback((Fl_Callback*)cb_btnBandSelect_1); btnBandSelect_2 = new Fl_Button(74, 278, 60, 18, _("3.5")); btnBandSelect_2->tooltip(_("80m band")); btnBandSelect_2->color((Fl_Color)246); btnBandSelect_2->callback((Fl_Callback*)cb_btnBandSelect_2); btnBandSelect_3 = new Fl_Button(145, 278, 60, 18, _("7")); btnBandSelect_3->tooltip(_("40m band")); btnBandSelect_3->color((Fl_Color)246); btnBandSelect_3->callback((Fl_Callback*)cb_btnBandSelect_3); btnBandSelect_3->align(Fl_Align(FL_ALIGN_CLIP)); btnBandSelect_4 = new Fl_Button(216, 278, 60, 18, _("10")); btnBandSelect_4->tooltip(_("30m band")); btnBandSelect_4->color((Fl_Color)246); btnBandSelect_4->callback((Fl_Callback*)cb_btnBandSelect_4); btnBandSelect_5 = new Fl_Button(287, 278, 60, 18, _("14")); btnBandSelect_5->tooltip(_("20m band")); btnBandSelect_5->color((Fl_Color)246); btnBandSelect_5->callback((Fl_Callback*)cb_btnBandSelect_5); btnBandSelect_6 = new Fl_Button(358, 278, 60, 18, _("18")); btnBandSelect_6->tooltip(_("17m band")); btnBandSelect_6->color((Fl_Color)246); btnBandSelect_6->callback((Fl_Callback*)cb_btnBandSelect_6); btnBandSelect_7 = new Fl_Button(4, 299, 60, 18, _("21")); btnBandSelect_7->tooltip(_("15m band")); btnBandSelect_7->color((Fl_Color)246); btnBandSelect_7->callback((Fl_Callback*)cb_btnBandSelect_7); btnBandSelect_8 = new Fl_Button(74, 299, 60, 18, _("24")); btnBandSelect_8->tooltip(_("12m band")); btnBandSelect_8->color((Fl_Color)246); btnBandSelect_8->callback((Fl_Callback*)cb_btnBandSelect_8); btnBandSelect_9 = new Fl_Button(145, 299, 60, 18, _("28")); btnBandSelect_9->tooltip(_("10m band")); btnBandSelect_9->color((Fl_Color)246); btnBandSelect_9->callback((Fl_Callback*)cb_btnBandSelect_9); btnBandSelect_10 = new Fl_Button(216, 299, 60, 18, _("50")); btnBandSelect_10->tooltip(_("6m band")); btnBandSelect_10->color((Fl_Color)246); btnBandSelect_10->callback((Fl_Callback*)cb_btnBandSelect_10); btnBandSelect_11 = new Fl_Button(287, 299, 60, 18, _("GEN")); btnBandSelect_11->tooltip(_("General RX")); btnBandSelect_11->color((Fl_Color)246); btnBandSelect_11->callback((Fl_Callback*)cb_btnBandSelect_11); opSelect60 = new Fl_ComboBox(358, 299, 60, 18, _("combo")); opSelect60->tooltip(_("vfo / 60 meter channel")); opSelect60->box(FL_NO_BOX); opSelect60->color((Fl_Color)246); opSelect60->selection_color(FL_BACKGROUND_COLOR); opSelect60->labeltype(FL_NORMAL_LABEL); opSelect60->labelfont(0); opSelect60->labelsize(12); opSelect60->labelcolor(FL_FOREGROUND_COLOR); opSelect60->callback((Fl_Callback*)cb_opSelect60); opSelect60->align(Fl_Align(FL_ALIGN_CENTER|FL_ALIGN_INSIDE)); opSelect60->when(FL_WHEN_RELEASE); opSelect60->end(); genericBands->end(); genericCW = new Fl_Group(0, 271, 425, 49, _("CW")); genericCW->color(FL_LIGHT1); genericCW->selection_color(FL_LIGHT1); genericCW->hide(); spnr_cw_wpm = new Hspinner( 4, 280, 85, 22, _("wpm"), 16); spnr_cw_wpm->type(1); spnr_cw_wpm->minimum(5); spnr_cw_wpm->maximum(80); spnr_cw_wpm->step(1); spnr_cw_wpm->callback((Fl_Callback*)cb_spnr_cw_wpm); spnr_cw_wpm->value(progStatus.cw_wpm); spnr_cw_wpm->labelsize(12); spnr_cw_wpm->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_cw_weight = new Hspinner( spnr_cw_wpm->x() + spnr_cw_wpm->w() + 4, 280, 85, 22, _("Weight"), 16); spnr_cw_weight->type(1); spnr_cw_weight->minimum(2.5); spnr_cw_weight->maximum(4.5); spnr_cw_weight->step(0.1); spnr_cw_weight->value(3); spnr_cw_weight->callback((Fl_Callback*)cb_spnr_cw_weight); spnr_cw_weight->value(progStatus.cw_weight); spnr_cw_weight->labelsize(12); spnr_cw_weight->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_cw_spot_tone= new Hspinner( spnr_cw_weight->w() + spnr_cw_weight->x() + 4, 280, 85, 22, _("Spot tone"), 16); spnr_cw_spot_tone->tooltip(_("Spot volume")); spnr_cw_spot_tone->type(1); spnr_cw_spot_tone->minimum(300); spnr_cw_spot_tone->maximum(1050); spnr_cw_spot_tone->step(5); spnr_cw_spot_tone->value(700); spnr_cw_spot_tone->callback((Fl_Callback*)cb_spnr_cw_spot_tone); spnr_cw_spot_tone->value(progStatus.cw_spot); spnr_cw_spot_tone->labelsize(12); spnr_cw_spot_tone->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); btnSpot = new Fl_Light_Button( spnr_cw_spot_tone->x() + spnr_cw_spot_tone->w() + 4, 275, 60, 22, _("Spot")); btnSpot->tooltip(_("Spot tone on/off")); btnSpot->callback((Fl_Callback*)cb_btnSpot); btnSpot->value(progStatus.cw_spot); btn_enable_keyer = new Fl_Check_Button( btnSpot->x(), 300, 60, 15, _("Keyer")); btn_enable_keyer->tooltip(_("Enable internal keyer")); btn_enable_keyer->down_box(FL_DOWN_BOX); btn_enable_keyer->callback((Fl_Callback*)cb_btn_enable_keyer); btn_enable_keyer->value(progStatus.enable_keyer); genericCW->end(); genericQSK = new Fl_Group(0, 271, 425, 49, _("QSK")); genericQSK->color(FL_LIGHT1); genericQSK->selection_color(FL_LIGHT1); genericQSK->hide(); btnBreakIn = new Fl_Light_Button( 5, 280, 54, 22, _("QSK")); btnBreakIn->tooltip(_("Full break in on/off")); btnBreakIn->callback((Fl_Callback*)cb_btnBreakIn); btnBreakIn->value(progStatus.break_in); spnr_cw_qsk = new Hspinner( btnBreakIn->x() + btnBreakIn->w() + 4, 280, 85, 22, _("Bk-in Dly"), 16); spnr_cw_qsk->tooltip(_("msec")); spnr_cw_qsk->type(1); spnr_cw_qsk->minimum(0); spnr_cw_qsk->maximum(100); spnr_cw_qsk->step(1); spnr_cw_qsk->value(20); spnr_cw_qsk->callback((Fl_Callback*)cb_spnr_cw_qsk); spnr_cw_qsk->value(progStatus.cw_qsk); spnr_cw_qsk->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); spnr_cw_delay = new Hspinner( spnr_cw_qsk->x() + spnr_cw_qsk->w() + 4, 280, 120, 22, _("QSK delay"), 16); spnr_cw_delay->tooltip(_("msec")); spnr_cw_delay->type(0); spnr_cw_delay->minimum(30); spnr_cw_delay->maximum(3000); spnr_cw_delay->step(10); spnr_cw_delay->callback((Fl_Callback*)cb_spnr_cw_delay); spnr_cw_delay->value(progStatus.cw_delay); spnr_cw_delay->align(FL_ALIGN_BOTTOM | FL_ALIGN_CENTER); genericQSK->end(); genericVOX = new Fl_Group(0, 271, 425, 49, _("Vox")); genericVOX->hide(); spnr_vox_gain = new Hspinner( 4, 280, 80, 22, _("gain"), 16); spnr_vox_gain->type(1); spnr_vox_gain->minimum(0); spnr_vox_gain->maximum(100); spnr_vox_gain->step(1); spnr_vox_gain->callback((Fl_Callback*)cb_spnr_vox_gain); spnr_vox_gain->value(progStatus.vox_gain); spnr_vox_gain->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); spnr_anti_vox = new Hspinner( spnr_vox_gain->x() + spnr_vox_gain->w() + 10, 280, 80, 22, _("anti"), 16); spnr_anti_vox->type(1); spnr_anti_vox->minimum(0); spnr_anti_vox->maximum(100); spnr_anti_vox->step(1); spnr_anti_vox->callback((Fl_Callback*)cb_spnr_anti_vox); spnr_anti_vox->value(progStatus.vox_anti); spnr_anti_vox->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); spnr_vox_hang = new Hspinner( spnr_anti_vox->x() + spnr_anti_vox->w() + 10, 280, 80, 22, _("hang"), 16); spnr_vox_hang->type(1); spnr_vox_hang->minimum(0); spnr_vox_hang->maximum(100); spnr_vox_hang->step(1); spnr_vox_hang->callback((Fl_Callback*)cb_spnr_vox_hang); spnr_vox_hang->value(progStatus.vox_hang); spnr_vox_hang->align(FL_ALIGN_CENTER | FL_ALIGN_BOTTOM); btn_vox = new Fl_Light_Button( spnr_vox_hang->x() + spnr_vox_hang->w() + 10, 280, 50, 22, _("VOX")); btn_vox->callback((Fl_Callback*)cb_btn_vox); btn_vox->value(progStatus.vox_onoff); btn_vox_on_dataport = new Fl_Check_Button( btn_vox->x() + btn_vox->w() + 10, 283, 50, 15, _("Data port")); btn_vox_on_dataport->tooltip(_("Data port signal triggers VOX")); btn_vox_on_dataport->down_box(FL_DOWN_BOX); btn_vox_on_dataport->callback((Fl_Callback*)cb_btn_vox_on_dataport); btn_vox_on_dataport->value(progStatus.vox_on_dataport); genericVOX->end(); genericSpeech = new Fl_Group(0, 271, 425, 49, _("Spch")); genericSpeech->hide(); btnCompON = new Fl_Light_Button(215, 281, 70, 22, _("On")); btnCompON->callback((Fl_Callback*)cb_btnCompON); btnCompON->value(progStatus.compON); spnr_compression = new Hspinner(138, 281, 70, 22, _("Comp")); spnr_compression->type(1); spnr_compression->minimum(0); spnr_compression->maximum(100); spnr_compression->step(1); spnr_compression->callback((Fl_Callback*)cb_spnr_compression); spnr_compression->value(progStatus.compression); genericSpeech->end(); genericRx = new Fl_Group(0, 271, 425, 49, _("RX")); genericRx->hide(); cbo_nb_level = new Fl_ComboBox(12, 281, 80, 22, _("NB level")); cbo_nb_level->tooltip(_("Select Transceiver")); cbo_nb_level->box(FL_DOWN_BOX); cbo_nb_level->color(FL_BACKGROUND_COLOR); cbo_nb_level->selection_color(FL_BACKGROUND_COLOR); cbo_nb_level->labeltype(FL_NORMAL_LABEL); cbo_nb_level->labelfont(0); cbo_nb_level->labelsize(14); cbo_nb_level->labelcolor(FL_FOREGROUND_COLOR); cbo_nb_level->callback((Fl_Callback*)cb_cbo_nb_level); cbo_nb_level->align(Fl_Align(FL_ALIGN_BOTTOM)); cbo_nb_level->when(FL_WHEN_RELEASE); cbo_nb_level->index(progStatus.nb_level); cbo_nb_level->end(); cbo_agc_level = new Fl_ComboBox(123, 281, 80, 22, _("AGC")); cbo_agc_level->tooltip(_("Select Transceiver")); cbo_agc_level->box(FL_DOWN_BOX); cbo_agc_level->color(FL_BACKGROUND_COLOR); cbo_agc_level->selection_color(FL_BACKGROUND_COLOR); cbo_agc_level->labeltype(FL_NORMAL_LABEL); cbo_agc_level->labelfont(0); cbo_agc_level->labelsize(14); cbo_agc_level->labelcolor(FL_FOREGROUND_COLOR); cbo_agc_level->callback((Fl_Callback*)cb_cbo_agc_level); cbo_agc_level->align(Fl_Align(FL_ALIGN_BOTTOM)); cbo_agc_level->when(FL_WHEN_RELEASE); cbo_agc_level->end(); spnr_bpf_center = new Hspinner(234, 281, 96, 22, _("BPF Center Freq")); spnr_bpf_center->tooltip(_("Bandpass Filter Center Freq")); spnr_bpf_center->type(1); spnr_bpf_center->minimum(600); spnr_bpf_center->maximum(2500); spnr_bpf_center->step(10); spnr_bpf_center->value(1500); spnr_bpf_center->callback((Fl_Callback*)cb_spnr_bpf_center); spnr_bpf_center->align(Fl_Align(34)); spnr_bpf_center->value(progStatus.bpf_center); btn_use_bpf_center = new Fl_Check_Button(361, 284, 50, 15, _("On")); btn_use_bpf_center->tooltip(_("Use Filter Center Freq Adj")); btn_use_bpf_center->down_box(FL_DOWN_BOX); btn_use_bpf_center->value(1); btn_use_bpf_center->callback((Fl_Callback*)cb_btn_use_bpf_center); btn_use_bpf_center->value(progStatus.use_bpf_center); genericRx->end(); genericMisc = new Fl_Group(0, 271, 425, 49, _("Misc")); genericMisc->hide(); spnr_vfo_adj = new Hspinner(24, 279, 96, 22, _("Vfo Adj")); spnr_vfo_adj->type(1); spnr_vfo_adj->callback((Fl_Callback*)cb_spnr_vfo_adj); spnr_vfo_adj->align(Fl_Align(34)); spnr_vfo_adj->step(1); spnr_vfo_adj->value(progStatus.vfo_adj); spnr_line_out = new Hspinner(146, 279, 70, 22, _("line out")); spnr_line_out->type(1); spnr_line_out->minimum(0); spnr_line_out->maximum(100); spnr_line_out->step(1); spnr_line_out->value(20); spnr_line_out->callback((Fl_Callback*)cb_spnr_line_out); spnr_line_out->value(progStatus.line_out); btnSpecial = new Fl_Light_Button(242, 279, 74, 20, _("Special")); btnSpecial->callback((Fl_Callback*)cb_btnSpecial); btn_ext_tuner = new Fl_Check_Button(242, 300, 74, 15, _("Ext tuner")); btn_ext_tuner->tooltip(_("use external auto tuner")); btn_ext_tuner->down_box(FL_DOWN_BOX); btn_ext_tuner->callback((Fl_Callback*)cb_btn_ext_tuner); btn_ext_tuner->value(progStatus.external_tuner); btn_xcvr_auto_on = new Fl_Check_Button(325, 280, 95, 15, _("Rig autOn")); btn_xcvr_auto_on->tooltip(_("Auto Turn Rig On with Flrig startup")); btn_xcvr_auto_on->down_box(FL_DOWN_BOX); btn_xcvr_auto_on->callback((Fl_Callback*)cb_btn_xcvr_auto_on); btn_xcvr_auto_on->value(progStatus.xcvr_auto_on); btn_xcvr_auto_off = new Fl_Check_Button(325, 300, 95, 15, _("Rig autOff")); btn_xcvr_auto_off->tooltip(_("Auto Turn Rig Off with Flrig exit")); btn_xcvr_auto_off->down_box(FL_DOWN_BOX); btn_xcvr_auto_off->callback((Fl_Callback*)cb_btn_xcvr_auto_off); btn_xcvr_auto_off->value(progStatus.xcvr_auto_off); genericMisc->end(); tabsGeneric->end(); g->end(); return g; } Fl_Double_Window* Small_rig_window() { Fl_Double_Window* w = new Fl_Double_Window(425, 360, _("Flrig")); w->align(Fl_Align(FL_ALIGN_CLIP|FL_ALIGN_INSIDE)); Fl_Group* grp_small_menu = new Fl_Group(0,0,424,22); small_menu = new Fl_Menu_Bar(0, 0, 424 - 64, 22); small_menu->textsize(12); progStatus.tooltips ? (&menu_small_menu[6])->set() : (&menu_small_menu[6])->clear(); progStatus.schema ? (&menu_small_menu[7])->set() : (&menu_small_menu[7])->clear(); small_menu->menu(menu_small_menu); Fl_Group *mnu_box = new Fl_Group(424-64, 0, 64, 22); mnu_box->box(FL_UP_BOX); tcpip_box = new Fl_Group(424-62, 2, 60, 18); tcpip_box->box(FL_FLAT_BOX); tcpip_menu_box = new Fl_Box(424 - 62, 3, 16, 16); tcpip_menu_box->box(FL_DIAMOND_BOX); tcpip_menu_box->color(FL_GREEN); Fl_Box *tcpip_menu_label = new Fl_Box(424 - 62 + 18, 3, 64 - 22, 16, _("tcpip")); tcpip_menu_label->box(FL_FLAT_BOX); tcpip_menu_label->align(FL_ALIGN_CENTER); tcpip_menu_label->tooltip(_("lit when connected to remote tcpip")); tcpip_box->end(); tcpip_box->hide(); mnu_box->end(); grp_small_menu->resizable(small_menu); grp_small_menu->end(); mnuRestoreData = (menu_small_menu+12); mnuKeepData = (menu_small_menu+13); mnuTooltips = (menu_small_menu+18); mnuSchema = (menu_small_menu+17); txt_encA = new Fl_Output( 425 - 90, 1, 90, 20, ""); txt_encA->box(FL_THIN_DOWN_BOX); txt_encA->align(20); txt_encA->hide(); btnInitializing = new Fl_Button(0,0,360, 320, "Initializing"); btnInitializing->hide(); main_group = small_main_group(0, 22, 425, 360 - 22); main_group->show(); w->end(); return w; } flrig-1.3.24/src/UI/ui_bitmaps.cxx0000644000175000017500000002042512562731646013630 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include static unsigned char idata_S60[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,195,1,0,0,28, 14,0,0,14,7,0,0,28,14,0,0,0,113,0,0,28,7,0,0,0,64,36,2,0,0,34,17,0,0,145,8,0,0, 34,17,0,0,128,137,0,0,162,8,0,0,0,64,0,2,0,0,2,1,0,0,129,8,0,0,32,17,0,0,128, 137,0,32,130,8,0,0,0,64,0,2,0,0,2,1,0,0,129,8,0,64,32,17,0,0,66,137,0,32,130,8, 0,0,0,128,131,1,0,0,28,15,0,0,14,15,0,64,16,17,0,0,66,137,0,248,158,8,0,0,0,0, 4,2,0,0,32,17,0,0,16,8,0,240,9,17,0,128,47,137,0,32,162,8,0,0,0,0,4,2,0,0,32, 17,0,0,16,8,0,64,4,17,0,0,226,139,0,32,162,8,0,0,0,64,36,2,0,0,34,17,0,0,145,8, 0,64,2,17,0,0,2,137,0,0,162,8,0,0,0,128,195,1,0,0,28,14,0,0,14,7,0,0,62,14,0, 0,0,113,0,0,28,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,0,0,0, 16,0,0,0,128,0,0,0,64,0,0,0,128,0,0,0,0,4,0,0,0,4,4,0,0,0,16,0,0,0,128,0,0,0, 64,0,0,0,128,0,0,0,0,4,0,0,0,4,4,32,0,2,16,0,1,8,128,0,2,8,64,0,64,0,128,0,0,1, 0,4,0,8,0,4,4,32,0,2,16,0,1,8,128,0,2,8,64,0,64,0,128,0,0,1,0,4,0,8,0,4,4,32, 0,2,16,0,1,8,128,0,2,8,64,0,64,0,128,0,0,1,0,4,0,8,0,4,4,32,0,2,16,0,1,8,128, 0,2,8,64,0,64,0,128,0,0,1,0,4,0,8,0,4,252,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,7}; static Fl_Bitmap image_S60(idata_S60, 205, 18); static unsigned char idata_SWR[] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,128,240,1,0,14,0,0, 0,0,0,14,0,0,0,0,0,0,0,0,0,0,0,0,0,112,0,192,16,0,0,17,0,0,0,0,0,17,0,0,0,0,0, 0,0,0,0,0,0,0,0,136,0,128,16,0,0,16,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,8, 0,128,240,0,0,16,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0,112,162,130,0,1,0,8,0, 0,0,0,0,12,0,0,0,0,0,0,0,0,0,0,0,0,0,128,162,133,0,1,0,4,0,0,0,0,0,16,0,0,0,0, 0,0,0,0,0,0,0,0,0,128,170,128,0,1,0,2,0,0,0,0,0,16,0,0,0,0,0,0,0,0,0,0,0,0,0, 136,170,128,16,1,0,1,0,0,0,0,0,17,0,0,0,0,0,0,0,0,0,0,0,0,0,112,148,128,228,0,0, 31,0,0,0,0,0,14,0,0,0,0,0,0,0,0,0,0,192,123,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,32,132,0,4,0,0,4,0,0,4,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,32,132,0, 4,0,0,4,0,0,4,0,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,192,123,0,4,0,0,4,0,0,4,0,0,0,0, 0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,36,73,146,36,73,146,4,65,16,4,65,16,4,0,0,0,0,0, 0,0,0,0,0,0,0,0,36,73,146,36,73,146,4,65,16,4,65,16,68,68,68,68,68,68,68,68, 68,68,68,68,68,4,36,73,146,36,73,146,4,65,16,4,65,16,68,68,68,68,68,68,68,68, 68,68,68,68,68,4,252,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,255,255,255,7}; static Fl_Bitmap image_SWR(idata_SWR, 205, 18); static unsigned char idata_P25[] = {252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,7,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68, 68,68,68,68,68,68,68,68,68,4,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68, 68,68,68,68,68,68,68,68,68,4,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,0, 64,0,0,4,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,4,0,0,0,0,4, 0,0,0,0,4,0,0,0,0,4,0,0,0,0,4,0,0,0,0,4,4,0,0,0,0,4,0,0,0,0,4,0,0,0,0,4,0,0,0, 0,4,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 31,0,0,0,128,113,0,0,0,0,249,0,0,0,192,113,0,0,0,0,0,240,0,0,0,0,1,0,0,0,192, 137,0,0,0,192,9,0,0,0,32,138,0,0,0,0,0,16,1,0,0,0,1,0,0,0,0,137,0,0,0,0,9,0,0,0, 0,138,0,0,0,0,0,16,1,0,0,0,15,0,0,0,0,137,0,0,0,0,121,0,0,0,0,138,0,0,0,0,0, 16,1,0,0,0,16,0,0,0,0,137,0,0,0,0,129,0,0,0,0,137,0,0,0,0,0,240,12,0,0,0,16,0, 0,0,0,137,0,0,0,0,129,0,0,0,128,136,0,0,0,0,0,16,18,0,0,0,16,0,0,0,0,137,0,0, 0,0,129,0,0,0,64,136,0,0,0,0,0,16,18,0,0,0,17,0,0,0,0,137,0,0,0,0,137,0,0,0, 32,136,0,0,0,0,0,16,12,0,0,0,14,0,0,0,0,113,0,0,0,0,113,0,0,0,224,115,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; static Fl_Bitmap image_P25(idata_P25, 205, 18); static unsigned char idata_P50[] = {252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,7,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68, 68,68,68,68,68,68,68,68,68,4,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68,68, 68,68,68,68,68,68,68,68,68,4,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,0, 64,0,0,4,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,4,0,64,0,0,4, 0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,4,0,0,0,0,4,0,0,0,0,4,0,0,0,0,4,0, 0,0,0,4,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,113,0,0,0,192,113,0,0,0,192,113,0,0,0,0,113,0,0,0,0,0,240,0,0,0,192,137,0,0, 0,32,138,0,0,0,32,138,0,0,0,128,137,0,0,0,0,0,16,1,0,0,0,137,0,0,0,0,138,0,0, 0,0,138,0,0,0,64,137,0,0,0,0,0,16,1,0,0,0,137,0,0,0,0,138,0,0,0,0,138,0,0,0, 64,137,0,0,0,0,0,16,1,0,0,0,137,0,0,0,0,137,0,0,0,128,137,0,0,0,32,137,0,0,0,0, 0,240,12,0,0,0,137,0,0,0,128,136,0,0,0,0,138,0,0,0,224,139,0,0,0,0,0,16,18,0, 0,0,137,0,0,0,64,136,0,0,0,0,138,0,0,0,0,137,0,0,0,0,0,16,18,0,0,0,137,0,0,0, 32,136,0,0,0,32,138,0,0,0,0,137,0,0,0,0,0,16,12,0,0,0,113,0,0,0,224,115,0,0,0, 192,113,0,0,0,0,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0}; static Fl_Bitmap image_P50(idata_P50, 205, 18); static unsigned char idata_P100[] = {252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,7,84,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85, 85,85,85,85,85,85,85,85,85,5,84,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85, 85,85,85,85,85,85,85,85,85,5,4,16,64,0,1,4,16,64,0,1,4,16,64,0,1,4,16,64,0,1,4, 16,64,0,1,4,4,16,64,0,1,4,16,64,0,1,4,16,64,0,1,4,16,64,0,1,4,16,64,0,1,4,4,0, 64,0,0,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,0,64,0,0,4,4,0,64,0,0,4,0,64,0,0,4,0, 64,0,0,4,0,64,0,0,4,0,64,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,192,113,0,0,0,0,113,0,0,0,192,113,0,0,0,192,113,0,0,0,0,0,240,0,0, 0,32,138,0,0,0,128,137,0,0,0,32,138,0,0,0,32,138,0,0,0,0,0,16,1,0,0,0,138,0,0, 0,128,137,0,0,0,32,136,0,0,0,32,138,0,0,0,0,0,16,1,0,0,0,138,0,0,0,64,137,0,0, 0,32,136,0,0,0,32,138,0,0,0,0,0,16,1,0,0,0,137,0,0,0,64,137,0,0,0,224,139,0,0, 0,192,137,0,0,0,0,0,240,12,0,0,128,136,0,0,0,32,137,0,0,0,32,138,0,0,0,32,138, 0,0,0,0,0,16,18,0,0,64,136,0,0,0,224,139,0,0,0,32,138,0,0,0,32,138,0,0,0,0,0, 16,18,0,0,32,136,0,0,0,0,137,0,0,0,32,138,0,0,0,32,138,0,0,0,0,0,16,12,0,0,224, 115,0,0,0,0,113,0,0,0,192,113,0,0,0,192,113,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0,0,0,0,0,0,0,0,0}; static Fl_Bitmap image_P100(idata_P100, 205, 18); static unsigned char idata_P200[] = {252,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, 255,255,255,255,255,255,255,7,84,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85, 85,85,85,85,85,85,85,85,85,5,84,85,85,85,85,85,85,85,85,85,85,85,85,85,85,85, 85,85,85,85,85,85,85,85,85,5,4,16,64,0,1,4,16,64,0,1,4,16,64,0,1,4,16,64,0,1,4, 16,64,0,1,4,4,16,64,0,1,4,16,64,0,1,4,16,64,0,1,4,16,64,0,1,4,16,64,0,1,4,4,0, 0,0,0,4,0,0,0,0,4,0,64,0,0,4,0,0,0,0,4,0,0,0,0,4,4,0,0,0,0,4,0,0,0,0,4,0,64,0, 0,4,0,0,0,0,4,0,0,0,0,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,113,0,0,0,192,113,0,0,0,32,142,3,0,0,32,142,3,0,0,0,0,240,0,0,0,128, 137,0,0,0,32,138,0,0,0,56,81,4,0,0,56,81,4,0,0,0,0,16,1,0,0,128,137,0,0,0,32, 138,0,0,0,32,80,4,0,0,32,65,4,0,0,0,0,16,1,0,0,64,137,0,0,0,32,138,0,0,0,32,80, 4,0,0,32,65,4,0,0,0,0,16,1,0,0,64,137,0,0,0,192,137,0,0,0,32,72,4,0,0,32,79,4, 0,0,0,0,240,12,0,0,32,137,0,0,0,32,138,0,0,0,32,68,4,0,0,32,81,4,0,0,0,0,16, 18,0,0,224,139,0,0,0,32,138,0,0,0,32,66,4,0,0,32,81,4,0,0,0,0,16,18,0,0,0,137, 0,0,0,32,138,0,0,0,32,65,4,0,0,32,81,4,0,0,0,0,16,12,0,0,0,113,0,0,0,192,113, 0,0,0,32,159,3,0,0,32,142,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 0,0,0,0,0}; static Fl_Bitmap image_P200(idata_P200, 205, 18); flrig-1.3.24/src/UI/rigpanel.cxx0000644000175000017500000005313012562731646013274 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "gettext.h" #include "rigpanel.h" #include "images.h" #include "rig.h" #include "status.h" #include "support.h" #include "K3_ui.h" #include "KX3_ui.h" #include "socket_io.h" #include "hspinner.h" #include "ui.h" // controls for touch screen interface Hspinner *spnrPOWER = (Hspinner *)0; Hspinner *spnrVOLUME = (Hspinner *)0; Hspinner *spnrRFGAIN = (Hspinner *)0; Hspinner *spnrSQUELCH = (Hspinner *)0; Hspinner *spnrNR = (Hspinner *)0; Hspinner *spnrIFSHIFT = (Hspinner *)0; Hspinner *spnrNOTCH = (Hspinner *)0; Hspinner *spnrMICGAIN = (Hspinner *)0; static const int freq_sel_widths[]={110, 70, 70, 0}; static Fl_Double_Window *meter_scale_dialog = (Fl_Double_Window *)0; static Fl_Double_Window *meter_filters = (Fl_Double_Window *)0; Fl_Menu_Bar *small_menu=(Fl_Menu_Bar *)0; Fl_Menu_Bar *wide_menu=(Fl_Menu_Bar *)0; Fl_Menu_Item *mnuExit = (Fl_Menu_Item *)0; Fl_Menu_Item *mnuConfig = (Fl_Menu_Item *)0; Fl_Menu_Item *mnuRestoreData = (Fl_Menu_Item *)0; Fl_Menu_Item *mnuKeepData = (Fl_Menu_Item *)0; Fl_Menu_Item *mnuTooltips = (Fl_Menu_Item *)0; Fl_Menu_Item *mnuSchema = (Fl_Menu_Item *)0; Fl_Menu_Item *mnuColorConfig = (Fl_Menu_Item *)0; Fl_Menu_Item *mnu_meter_filtering = (Fl_Menu_Item *)0; Fl_Menu_Item *mnuConfigXcvr = (Fl_Menu_Item *)0; Fl_Menu_Item *save_me = (Fl_Menu_Item *)0; Fl_Menu_Item *mnuHelp = (Fl_Menu_Item *)0; Fl_Menu_Item *mnuOnLineHelp = (Fl_Menu_Item *)0; Fl_Menu_Item *mnuAbout = (Fl_Menu_Item *)0; Fl_Box *tcpip_menu_box = (Fl_Box *)0; Fl_Group *tcpip_box = (Fl_Group *)0; Fl_Output *txt_encA=(Fl_Output *)0; Fl_Group *grpMeters=(Fl_Group *)0; Fl_Box *scaleSmeter=(Fl_Box *)0; Fl_Light_Button *btnPreamp=(Fl_Light_Button *)0; Fl_Light_Button *btnNOISE=(Fl_Light_Button *)0; Fl_Light_Button *btnAutoNotch=(Fl_Light_Button *)0; Fl_Group *grp_row1b2=(Fl_Group *)0; Fl_Button *btnAswapB=(Fl_Button *)0; Fl_Button *btn_K3_swapAB=(Fl_Button *)0; Fl_Button *btn_KX3_swapAB=(Fl_Button *)0; Fl_Light_Button *btnB=(Fl_Light_Button *)0; Fl_Light_Button *btnSplit=(Fl_Light_Button *)0; Fl_Light_Button *btnPTT=(Fl_Light_Button *)0; Fl_Box *bx_row1_expander2=(Fl_Box *)0; Fl_Group *grp_row2=(Fl_Group *)0; Fl_Group *grp_row2a=(Fl_Group *)0; Fl_Wheel_Value_Slider *sldrSQUELCH=(Fl_Wheel_Value_Slider *)0; Fl_Wheel_Value_Slider *sldrMICGAIN=(Fl_Wheel_Value_Slider *)0; Fl_Box *bx_sep2a=(Fl_Box *)0; Fl_Group *grp_row2b=(Fl_Group *)0; Fl_Light_Button *btnIFsh=(Fl_Light_Button *)0; Fl_Wheel_Value_Slider *sldrIFSHIFT=(Fl_Wheel_Value_Slider *)0; Fl_Light_Button *btnNR=(Fl_Light_Button *)0; Fl_Wheel_Value_Slider *sldrNR=(Fl_Wheel_Value_Slider *)0; Fl_Box *bx_sep2b=(Fl_Box *)0; Fl_Group *grp_row2c=(Fl_Group *)0; Fl_Light_Button *btnNotch=(Fl_Light_Button *)0; Fl_Wheel_Value_Slider *sldrNOTCH=(Fl_Wheel_Value_Slider *)0; Fl_Wheel_Value_Slider *sldrRFGAIN=(Fl_Wheel_Value_Slider *)0; Fl_Box *bx_sep2c=(Fl_Box *)0; Fl_Group *grp_row2d=(Fl_Group *)0; Fl_Wheel_Value_Slider *sldrPOWER=(Fl_Wheel_Value_Slider *)0; Fl_Light_Button *btnVol=(Fl_Light_Button *)0; Fl_Wheel_Value_Slider *sldrVOLUME=(Fl_Wheel_Value_Slider *)0; Fl_Group *grpTABS=(Fl_Group *)0; Fl_Tabs *tabsGeneric=(Fl_Tabs *)0; Fl_Group *genericBands=(Fl_Group *)0; Fl_Button *btnBandSelect_1=(Fl_Button *)0; Fl_Button *btnBandSelect_2=(Fl_Button *)0; Fl_Button *btnBandSelect_3=(Fl_Button *)0; Fl_Button *btnBandSelect_4=(Fl_Button *)0; Fl_Button *btnBandSelect_5=(Fl_Button *)0; Fl_Button *btnBandSelect_6=(Fl_Button *)0; Fl_Button *btnBandSelect_7=(Fl_Button *)0; Fl_Button *btnBandSelect_8=(Fl_Button *)0; Fl_Button *btnBandSelect_9=(Fl_Button *)0; Fl_Button *btnBandSelect_10=(Fl_Button *)0; Fl_Button *btnBandSelect_11=(Fl_Button *)0; Fl_ComboBox *opSelect60=(Fl_ComboBox *)0; Fl_Group *genericCW=(Fl_Group *)0; Fl_Light_Button *btnSpot=(Fl_Light_Button *)0; Hspinner *spnr_cw_spot_tone=(Hspinner *)0; Hspinner *spnr_cw_qsk=(Hspinner *)0; Hspinner *spnr_cw_weight=(Hspinner *)0; Hspinner *spnr_cw_wpm=(Hspinner *)0; Fl_Check_Button *btn_enable_keyer=(Fl_Check_Button *)0; Fl_Group *genericQSK=(Fl_Group *)0; Fl_Light_Button *btnBreakIn=(Fl_Light_Button *)0; Hspinner *spnr_cw_delay=(Hspinner *)0; Hspinner *cnt_cw_qsk=(Hspinner *)0; Fl_Group *genericVOX=(Fl_Group *)0; Hspinner *spnr_vox_gain=(Hspinner *)0; Hspinner *spnr_anti_vox=(Hspinner *)0; Hspinner *spnr_vox_hang=(Hspinner *)0; Fl_Light_Button *btn_vox=(Fl_Light_Button *)0; Fl_Check_Button *btn_vox_on_dataport=(Fl_Check_Button *)0; Fl_Group *genericSpeech=(Fl_Group *)0; Fl_Light_Button *btnCompON=(Fl_Light_Button *)0; Hspinner *spnr_compression=(Hspinner *)0; Fl_Group *genericRx=(Fl_Group *)0; Fl_ComboBox *cbo_nb_level=(Fl_ComboBox *)0; Fl_ComboBox *cbo_agc_level=(Fl_ComboBox *)0; Hspinner *spnr_bpf_center=(Hspinner *)0; Fl_Button *btnALC_SWR=(Fl_Button *)0; Fl_SigBar *sldrRcvSignal=(Fl_SigBar *)0; Fl_SigBar *sldrALC=(Fl_SigBar *)0; Fl_SigBar *sldrSWR=(Fl_SigBar *)0; Fl_SigBar *sldrFwdPwr=(Fl_SigBar *)0; Fl_Button *scalePower=(Fl_Button *)0; Fl_Box *meter_fill_box=(Fl_Box *)0; cFreqControl *FreqDispA=(cFreqControl *)0; cFreqControl *FreqDispB=(cFreqControl *)0; Fl_Group *grp_row0a=(Fl_Group *)0; Fl_Light_Button *btnA=(Fl_Light_Button *)0; Fl_Button *btnTune=(Fl_Button *)0; Fl_Box *bx_row0_expander=(Fl_Box *)0; Fl_Button *btn_show_controls=(Fl_Button *)0; Fl_Group *grp_row1=(Fl_Group *)0; Fl_Group *grp_row1a=(Fl_Group *)0; Fl_ComboBox *opBW=(Fl_ComboBox *)0; Fl_ComboBox *opDSP_lo=(Fl_ComboBox *)0; Fl_Button *btnDSP=(Fl_Button *)0; Fl_ComboBox *opDSP_hi=(Fl_ComboBox *)0; Fl_ComboBox *opMODE=(Fl_ComboBox *)0; Fl_Group *grp_row1b=(Fl_Group *)0; Fl_Group *grp_row1b1=(Fl_Group *)0; Fl_Light_Button *btnAttenuator=(Fl_Light_Button *)0; Fl_Check_Button *btn_use_bpf_center=(Fl_Check_Button *)0; Fl_Group *genericMisc=(Fl_Group *)0; Hspinner *spnr_vfo_adj=(Hspinner *)0; Hspinner *spnr_line_out=(Hspinner *)0; Fl_Light_Button *btnSpecial=(Fl_Light_Button *)0; Fl_Check_Button *btn_ext_tuner=(Fl_Check_Button *)0; Fl_Check_Button *btn_xcvr_auto_on=(Fl_Check_Button *)0; Fl_Check_Button *btn_xcvr_auto_off=(Fl_Check_Button *)0; Fl_Group *genericRXB=(Fl_Group *)0; Hspinner *cntRIT=(Hspinner *)0; Hspinner *cntXIT=(Hspinner *)0; Hspinner *cntBFO=(Hspinner *)0; Fl_Group *genericAux=(Fl_Group *)0; Fl_Box *boxControl=(Fl_Box *)0; Fl_Light_Button *btnAuxRTS=(Fl_Light_Button *)0; Fl_Light_Button *btnAuxDTR=(Fl_Light_Button *)0; Fl_Light_Button *btnDataPort=(Fl_Light_Button *)0; Fl_Tabs *tabs550=(Fl_Tabs *)0; Fl_Group *tt550_CW=(Fl_Group *)0; Hspinner *spnr_tt550_cw_wpm=(Hspinner *)0; Hspinner *spnr_tt550_cw_weight=(Hspinner *)0; Hspinner *spnr_tt550_cw_qsk=(Hspinner *)0; Hspinner *spnr_tt550_cw_vol=(Hspinner *)0; Hspinner *spnr_tt550_cw_spot=(Hspinner *)0; Fl_Check_Button *btn_tt550_enable_keyer=(Fl_Check_Button *)0; Fl_Group *tt550_VOX=(Fl_Group *)0; Hspinner *spnr_tt550_vox_gain=(Hspinner *)0; Hspinner *spnr_tt550_anti_vox=(Hspinner *)0; Hspinner *spnr_tt550_vox_hang=(Hspinner *)0; Fl_Light_Button *btn_tt550_vox=(Fl_Light_Button *)0; Fl_Group *tt550_Speech=(Fl_Group *)0; Fl_Light_Button *btn_tt550_CompON=(Fl_Light_Button *)0; Hspinner *spnr_tt550_compression=(Hspinner *)0; Hspinner *spnr_tt550_mon_vol=(Hspinner *)0; Fl_Group *tt550_Audio=(Fl_Group *)0; Hspinner *spnr_tt550_line_out=(Hspinner *)0; Fl_Check_Button *btnAccInp=(Fl_Check_Button *)0; Fl_Group *tt550_Rx=(Fl_Group *)0; Fl_ComboBox *cbo_tt550_nb_level=(Fl_ComboBox *)0; Fl_ComboBox *cbo_tt550_agc_level=(Fl_ComboBox *)0; Hspinner *spnr_tt550_vfo_adj=(Hspinner *)0; Fl_Group *tt550_Tx=(Fl_Group *)0; Fl_Check_Button *btn_tt550_enable_xmtr=(Fl_Check_Button *)0; Fl_Check_Button *btn_tt550_enable_tloop=(Fl_Check_Button *)0; Fl_Check_Button *btn_tt550_tuner_bypass=(Fl_Check_Button *)0; Fl_ComboBox *op_tt550_XmtBW=(Fl_ComboBox *)0; Fl_Check_Button *btn_tt550_use_xmt_bw=(Fl_Check_Button *)0; Fl_Group *tt550_302A=(Fl_Group *)0; Hspinner *spnr_tt550_keypad_time_out=(Hspinner *)0; Hspinner *spnr_tt550_encoder_sensitivity=(Hspinner *)0; Fl_Choice *sel_tt550_encoder_step=(Fl_Choice *)0; Fl_Group *tt550_302B=(Fl_Group *)0; Fl_Choice *sel_tt550_F1_func=(Fl_Choice *)0; Fl_Choice *sel_tt550_F2_func=(Fl_Choice *)0; Fl_Choice *sel_tt550_F3_func=(Fl_Choice *)0; Fl_Group *main_group = (Fl_Group *)0; Fl_Button *btnInitializing=(Fl_Button *)0; #include "ui_bitmaps.cxx" static const char *mtr_scales[] = { "25 watt", "50 watt", "100 watt", "200 watt", "Auto scaled"}; void select_power_meter_scales() { if (!meter_scale_dialog) meter_scale_dialog = power_meter_scale_select(); meter_scale_dialog->show(); } static void cb_mnuExit(Fl_Menu_*, void*) { cbExit(); } static void cb_mnuRestoreData(Fl_Menu_*, void*) { progStatus.restore_rig_data = !progStatus.restore_rig_data; } static void cb_mnuKeepData(Fl_Menu_*, void*) { progStatus.use_rig_data= !progStatus.use_rig_data; } static void cb_mnuTooltips(Fl_Menu_*, void*) { progStatus.tooltips = ! progStatus.tooltips; } static void cb_mnuSchema(Fl_Menu_*, void*) { progStatus.schema = !progStatus.schema; adjust_control_positions(); } static void cb_mnuColorConfig(Fl_Menu_*, void*) { setDisplayColors(); } static void cb_mnu_meter_filtering(Fl_Menu_*, void*) { if (!meter_filters) meter_filters = MetersDialog(); meter_filters->show(); } static void cb_mnuConfigXcvr(Fl_Menu_*, void*) { configXcvr(); } static void cb_Memory(Fl_Menu_*, void*) { openMemoryDialog(); } static void cb_save_me(Fl_Menu_*, void*) { addFreq(); } static void cb_Events(Fl_Menu_*, void*) { cbEventLog(); } static void cb_Polling(Fl_Menu_*, void*) { open_poll_tab(); } static void cb_Send(Fl_Menu_*, void*) { open_send_command_tab(); } static void cb_mnuTCPIP(Fl_Menu_*, void*) { open_tcpip_tab(); } static void cb_mnuXMLRPC(Fl_Menu_*, void*) { open_xmlrpc_tab(); } static void cb_mnuPTT(Fl_Menu_*, void*) { open_ptt_tab(); } static void cb_mnuAUX(Fl_Menu_*, void *) { open_aux_tab(); } static void cb_mnuOnLineHelp(Fl_Menu_*, void*) { visit_URL((void *)("http://www.w1hkj.com/flrig-help/index.html")); } static void cb_mnuAbout(Fl_Menu_*, void*) { about(); } static void cb_btnALC_SWR(Fl_Button*, void*) { cbALC_SWR(); } static void cb_scalePower(Fl_Button*, void*) { if (Fl::event_button() == FL_RIGHT_MOUSE) select_power_meter_scales(); } static bool on_A = true; static void cb_btnA(Fl_Light_Button*, void*) { if (Fl::event_button() == FL_RIGHT_MOUSE) { if (on_A) { addFreq(); btnA->value(1); btnB->value(0); } else { btnA->value(0); btnB->value(1); } } else { if (!on_A) { cb_selectA(); } else { if (FreqDispA->is_reversed_colors()) { FreqDispA->restore_colors(); Fl::focus(btnA); } else { FreqDispA->reverse_colors(); Fl::focus(FreqDispA); } } on_A = true; btnA->value(1); btnB->value(0); if (progStatus.UIsize == touch_ui) { FreqDispB->hide(); FreqDispA->show(); } } } static void cb_btn_K3_swapAB(Fl_Button*, void*) { cb_K3_swapAB(); } static void cb_btn_KX3_swapAB(Fl_Button*, void*) { cb_KX3_swapAB(); } static void cb_btnB(Fl_Light_Button*, void*) { if (Fl::event_button() == FL_RIGHT_MOUSE) { if (!on_A) { addFreq(); btnB->value(1); btnA->value(0); } else { btnB->value(0); btnA->value(1); } } else { if (on_A) { cb_selectB(); } else { if (FreqDispB->is_reversed_colors()) { FreqDispB->restore_colors(); Fl::focus(btnB); } else { FreqDispB->reverse_colors(); Fl::focus(FreqDispB); } } on_A = false; btnB->value(1); btnA->value(0); if (progStatus.UIsize == touch_ui) { FreqDispA->hide(); FreqDispB->show(); } } } static void cb_btnTune(Fl_Button*, void*) { cbTune(); } static void cb_btn_show_controls(Fl_Button*, void*) { show_controls(); } static void cb_opBW(Fl_ComboBox*, void*) { setBW(); } static void cb_btnDSP(Fl_Button*, void*) { selectDSP(); } static void cb_opDSP_lo(Fl_ComboBox*, void*) { setDSP(); } static void cb_opDSP_hi(Fl_ComboBox*, void*) { setDSP(); } static void cb_opMODE(Fl_ComboBox*, void*) { setMode(); } static void cb_btnAttenuator(Fl_Light_Button*, void*) { cbAttenuator(); } static void cb_btnPreamp(Fl_Light_Button*, void*) { cbPreamp(); } static void cb_btnNOISE(Fl_Light_Button*, void*) { cbNoise(); } static void cb_btnAutoNotch(Fl_Light_Button*, void*) { cbAN(); } static void cb_btnAswapB(Fl_Button*, void*) { cbAswapB(); } static void cb_btnSplit(Fl_Light_Button* o, void*) { cb_set_split(o->value()); } static void cb_btnPTT(Fl_Light_Button*, void*) { cbPTT(); } static void cb_sldrSQUELCH(Fl_Wheel_Value_Slider*, void*) { setSQUELCH(); } static void cb_sldrMICGAIN(Fl_Wheel_Value_Slider*, void*) { setMicGain(); } static void cb_btnIFsh(Fl_Light_Button*, void*) { cbIFsh(); } static void cb_sldrIFSHIFT(Fl_Wheel_Value_Slider*, void*) { setIFshift(); } static void cb_btnNR(Fl_Light_Button*, void*) { cbNR(); } static void cb_sldrNR(Fl_Wheel_Value_Slider*, void*) { setNR(); } static void cb_btnNotch(Fl_Light_Button*, void*) { cbbtnNotch(); } static void cb_sldrNOTCH(Fl_Wheel_Value_Slider*, void*) { setNotch(); } static void cb_sldrRFGAIN(Fl_Wheel_Value_Slider*, void*) { setRFGAIN(); } static void cb_sldrPOWER(Fl_Wheel_Value_Slider*, void*) { setPower(); } static void cb_btnVol(Fl_Light_Button*, void*) { cbMute(); } static void cb_sldrVOLUME(Fl_Wheel_Value_Slider*, void*) { setVolume(); } static void cb_btnBandSelect_1(Fl_Button*, void*) { cbBandSelect(1); } static void cb_btnBandSelect_2(Fl_Button*, void*) { cbBandSelect(2); } static void cb_btnBandSelect_3(Fl_Button*, void*) { cbBandSelect(3); } static void cb_btnBandSelect_4(Fl_Button*, void*) { cbBandSelect(4); } static void cb_btnBandSelect_5(Fl_Button*, void*) { cbBandSelect(5); } static void cb_btnBandSelect_6(Fl_Button*, void*) { cbBandSelect(6); } static void cb_btnBandSelect_7(Fl_Button*, void*) { cbBandSelect(7); } static void cb_btnBandSelect_8(Fl_Button*, void*) { cbBandSelect(8); } static void cb_btnBandSelect_9(Fl_Button*, void*) { cbBandSelect(9); } static void cb_btnBandSelect_10(Fl_Button*, void*) { cbBandSelect(10); } static void cb_btnBandSelect_11(Fl_Button*, void*) { cbBandSelect(11); } static void cb_opSelect60(Fl_ComboBox*, void*) { cbBandSelect(13); } static void cb_btnSpot(Fl_Light_Button* o, void*) { progStatus.spot_onoff=o->value(); cb_cw_spot(); } static void cb_spnr_cw_spot_tone(Hspinner* o, void*) { progStatus.cw_spot_tone=(int)o->value(); cb_cw_spot_tone(); } static void cb_spnr_cw_qsk(Hspinner* o, void*) { progStatus.cw_qsk = o->value(); cb_cw_qsk(); } static void cb_spnr_cw_weight(Hspinner* o, void*) { progStatus.cw_weight = o->value(); cb_cw_weight(); } static void cb_spnr_cw_wpm(Hspinner* o, void*) { progStatus.cw_wpm = o->value(); cb_cw_wpm(); } static void cb_spnr_cw_delay(Hspinner* o, void*) { progStatus.cw_delay = o->value(); cb_cw_delay(); } static void cb_btn_enable_keyer(Fl_Check_Button* o, void*) { progStatus.enable_keyer=o->value(); cb_enable_keyer(); } static void cb_btnBreakIn(Fl_Check_Button* o, void*) { progStatus.break_in=o->value(); cb_enable_break_in(); } static void cb_spnr_vox_gain(Hspinner* o, void*) { progStatus.vox_gain=(int)o->value(); cb_vox_gain(); } static void cb_spnr_anti_vox(Hspinner* o, void*) { progStatus.vox_anti=(int)o->value(); cb_vox_anti(); } static void cb_spnr_vox_hang(Hspinner* o, void*) { progStatus.vox_hang = (int)o->value(); cb_vox_hang(); } static void cb_btn_vox(Fl_Light_Button* o, void*) { progStatus.vox_onoff=o->value(); cb_vox_onoff(); } static void cb_btn_vox_on_dataport(Fl_Check_Button* o, void*) { progStatus.vox_on_dataport=o->value(); cb_vox_on_dataport(); } static void cb_btnCompON(Fl_Light_Button* o, void*) { progStatus.compON=o->value(); cb_compression(); } static void cb_spnr_compression(Hspinner* o, void*) { progStatus.compression=(int)o->value(); cb_compression(); } static void cb_cbo_nb_level(Fl_ComboBox* o, void*) { progStatus.nb_level = o->index(); cb_nb_level(); } static void cb_cbo_agc_level(Fl_ComboBox* o, void*) { progStatus.agc_level = o->index(); cb_agc_level(); } static void cb_spnr_bpf_center(Hspinner* o, void*) { progStatus.bpf_center=o->value(); cb_bpf_center(); } static void cb_btn_use_bpf_center(Fl_Check_Button* o, void*) { progStatus.use_bpf_center = o->value(); cb_bpf_center(); } static void cb_spnr_vfo_adj(Hspinner* o, void*) { progStatus.vfo_adj=o->value(); cb_vfo_adj(); } static void cb_spnr_line_out(Hspinner* o, void*) { progStatus.line_out = o->value(); cb_line_out(); } static void cb_btnSpecial(Fl_Light_Button*, void*) { cb_special(); } static void cb_btn_ext_tuner(Fl_Check_Button* o, void*) { progStatus.external_tuner = o->value(); } static void cb_btn_xcvr_auto_on(Fl_Check_Button* o, void*) { progStatus.xcvr_auto_on = o->value(); } static void cb_btn_xcvr_auto_off(Fl_Check_Button* o, void*) { progStatus.xcvr_auto_off = o->value(); } static void cb_cntRIT(Hspinner*, void*) { cbRIT(); } static void cb_cntXIT(Hspinner*, void*) { cbXIT(); } static void cb_cntBFO(Hspinner*, void*) { cbBFO(); } static void cb_btnAuxRTS(Fl_Light_Button* o, void*) { progStatus.aux_rts = o->value(); cbAuxPort(); } static void cb_btnAuxDTR(Fl_Light_Button* o, void*) { progStatus.aux_dtr = o->value(); cbAuxPort(); } static void cb_btnDataPort(Fl_Light_Button* o, void*) { progStatus.data_port = o->value(); if (o->value()) btnDataPort->label("Data"); else btnDataPort->label("Mic"); btnDataPort->redraw_label(); } static void cb_spnr_tt550_cw_wpm(Hspinner* o, void*) { progStatus.tt550_cw_wpm = (int)o->value(); cb_tt550_cw_wpm(); } static void cb_spnr_tt550_cw_weight(Hspinner* o, void*) { progStatus.tt550_cw_weight = o->value(); cb_tt550_cw_weight(); } static void cb_spnr_tt550_cw_qsk(Hspinner* o, void*) { progStatus.tt550_cw_qsk = (int)o->value(); cb_tt550_cw_qsk(); } static void cb_spnr_tt550_cw_vol(Hspinner* o, void*) { progStatus.tt550_cw_vol=(int)o->value(); cb_tt550_cw_vol(); } static void cb_spnr_tt550_cw_spot(Hspinner* o, void*) { progStatus.tt550_cw_spot=(int)o->value(); cb_tt550_cw_spot(); } static void cb_btn_tt550_enable_keyer(Fl_Check_Button* o, void*) { progStatus.tt550_enable_keyer=o->value(); cb_tt550_enable_keyer(); } static void cb_spnr_tt550_vox_gain(Hspinner* o, void*) { progStatus.tt550_vox_gain=(int)o->value(); cb_tt550_vox_gain(); } static void cb_spnr_tt550_anti_vox(Hspinner* o, void*) { progStatus.tt550_vox_anti=(int)o->value(); cb_tt550_vox_anti(); } static void cb_spnr_tt550_vox_hang(Hspinner* o, void*) { progStatus.tt550_vox_hang = (int)o->value(); cb_tt550_vox_hang(); } static void cb_btn_tt550_vox(Fl_Light_Button* o, void*) { progStatus.tt550_vox_onoff=o->value(); cb_tt550_vox_onoff(); } static void cb_btn_tt550_CompON(Fl_Light_Button* o, void*) { progStatus.tt550_compON=o->value(); cb_tt550_compression(); } static void cb_spnr_tt550_compression(Hspinner* o, void*) { progStatus.tt550_compression=(int)o->value(); cb_tt550_compression(); } static void cb_spnr_tt550_mon_vol(Hspinner* o, void*) { progStatus.tt550_mon_vol=(int)o->value(); cb_tt550_mon_vol(); } static void cb_spnr_tt550_line_out(Hspinner* o, void*) { progStatus.tt550_line_out = (int)o->value(); cb_tt550_line_out(); } static void cb_btnAccInp(Fl_Check_Button* o, void*) { progStatus.tt550_use_line_in=o->value(); cb_tt550_use_line_in(); } static void cb_cbo_tt550_nb_level(Fl_ComboBox* o, void*) { progStatus.tt550_nb_level = o->index(); cb_tt550_nb_level(); } static void cb_cbo_tt550_agc_level(Fl_ComboBox* o, void*) { progStatus.tt550_agc_level = o->index(); cb_tt550_agc_level(); } static void cb_spnr_tt550_vfo_adj(Hspinner* o, void*) { progStatus.vfo_adj=o->value(); cb_vfo_adj(); } static void cb_btn_tt550_enable_xmtr(Fl_Check_Button* o, void*) { progStatus.tt550_enable_xmtr=o->value(); cb_tt550_enable_xmtr(); } static void cb_btn_tt550_enable_tloop(Fl_Check_Button* o, void*) { progStatus.tt550_enable_tloop=o->value(); cb_tt550_enable_tloop(); } static void cb_btn_tt550_tuner_bypass(Fl_Check_Button* o, void*) { progStatus.tt550_tuner_bypass=o->value(); cb_tt550_tuner_bypass(); } static void cb_op_tt550_XmtBW(Fl_ComboBox* o, void*) { progStatus.tt550_xmt_bw = o->index(); cb_tt550_setXmtBW(); } static void cb_btn_tt550_use_xmt_bw(Fl_Check_Button* o, void*) { progStatus.tt550_use_xmt_bw = o->value(); cb_tt550_setXmtBW(); } static void cb_spnr_tt550_keypad_time_out(Hspinner* o, void*) { progStatus.tt550_keypad_timeout=(int)(o->value()*1000.0); } static void cb_spnr_tt550_encoder_sensitivity(Hspinner* o, void*) { progStatus.tt550_encoder_sensitivity = o->value(); } static void cb_sel_tt550_encoder_step(Fl_Choice* o, void*) { progStatus.tt550_encoder_step = o->value(); } static void cb_sel_tt550_F1_func(Fl_Choice* o, void*) { progStatus.tt550_F1_func = o->value(); } static void cb_sel_tt550_F2_func(Fl_Choice* o, void*) { progStatus.tt550_F2_func = o->value(); } static void cb_sel_tt550_F3_func(Fl_Choice* o, void*) { progStatus.tt550_F3_func = o->value(); } #include "ui_small.cxx" #include "ui_wide.cxx" #include "ui_touch.cxx" #include "ui_setup.cxx" #include "ui_memory.cxx" #include "xcvr_setup.cxx" #include "meters_setup.cxx" #include "power_meter_setup.cxx" flrig-1.3.24/src/UI/KX3_ui.cxx0000644000175000017500000000626612642041360012567 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include "support.h" #include "debug.h" #include "gettext.h" #include "rig_io.h" #include "dialogs.h" #include "rigbase.h" #include "ptt.h" #include "rigs.h" #include "KX3_ui.h" extern queue queA; extern queue queB; extern queue quePTT; void read_KX3() { guard_lock serial_lock(&mutex_serial); if (progStatus.poll_frequency) { long freq; freq = selrig->get_vfoA(); if (freq != vfoA.freq) { vfoA.freq = freq; Fl::awake(setFreqDispA, (void *)vfoA.freq); vfo = vfoA; } freq = selrig->get_vfoB(); if (freq != vfoB.freq) { vfoB.freq = freq; Fl::awake(setFreqDispB, (void *)vfoB.freq); } } if (!quePTT.empty()) return; if (progStatus.poll_mode) { int nu_mode; nu_mode = selrig->get_modeA(); if (nu_mode != vfoA.imode) { vfoA.imode = vfo.imode = nu_mode; selrig->set_bwA(vfo.iBW = selrig->adjust_bandwidth(nu_mode)); Fl::awake(setModeControl); Fl::awake(updateBandwidthControl); } nu_mode = selrig->get_modeB(); if (nu_mode != vfoB.imode) { vfoB.imode = nu_mode; } } if (!quePTT.empty()) return; if (progStatus.poll_bandwidth) { int nu_BW; nu_BW = selrig->get_bwA(); if (nu_BW != vfoA.iBW) { vfoA.iBW = vfo.iBW = nu_BW; Fl::awake(setBWControl); } nu_BW = selrig->get_bwB(); if (nu_BW != vfoB.iBW) { vfoB.iBW = nu_BW; } } } void KX3_set_split(int val) { guard_lock serial_lock(&mutex_serial); selrig->set_split(val); } extern char *print(FREQMODE data); void KX3_A2B() { guard_lock serial_lock(&mutex_serial); vfoB = vfoA; selrig->set_vfoB(vfoB.freq); selrig->set_bwB(vfoB.iBW); selrig->set_modeB(vfoB.imode); FreqDispB->value(vfoB.freq); Fl::focus(FreqDispA); } void cb_KX3_swapAB() { guard_lock serial_lock(&mutex_serial); FREQMODE temp = vfoA; vfoA = vfoB; vfoB = temp; vfo = vfoA; selrig->set_vfoB(vfoB.freq); selrig->set_bwB(vfoB.iBW); selrig->set_modeB(vfoB.imode); selrig->set_vfoA(vfoA.freq); selrig->set_bwA(vfoA.iBW); selrig->set_modeA(vfoA.imode); opBW->index(vfoA.iBW); opMODE->index(vfoA.imode); FreqDispA->value(vfoA.freq); FreqDispB->value(vfoB.freq); Fl::focus(FreqDispA); } flrig-1.3.24/src/UI/ui_memory.cxx0000644000175000017500000001024112562731646013474 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- Fl_Button *btnAddFreq=(Fl_Button *)0; Fl_Button *btnPickFreq=(Fl_Button *)0; Fl_Button *btnDelFreq=(Fl_Button *)0; Fl_Button *btnClearList=(Fl_Button *)0; Fl_Browser *FreqSelect=(Fl_Browser *)0; Fl_Input *inAlphaTag=(Fl_Input *)0; static void cb_btnAddFreq(Fl_Button*, void*) { addFreq(); } static void cb_btnPickFreq(Fl_Button*, void*) { if (FreqSelect->value()) selectFreq(); } static void cb_btnDelFreq(Fl_Button*, void*) { delFreq(); } static void cb_btnClearList(Fl_Button*, void*) { clearList(); } static void cb_Close(Fl_Button*, void*) { cbCloseMemory(); } static void cb_FreqSelect(Fl_Browser* o, void*) { select_and_close(); switch (Fl::event_button()) { case FL_LEFT_MOUSE: if (Fl::event_clicks()) { // double click if (o->value()) selectFreq(); o->parent()->hide(); } break; case FL_RIGHT_MOUSE: if (o->value()) selectFreq(); break; default: break; } } static void cb_inAlphaTag(Fl_Input*, void*) { editAlphaTag(); } Fl_Double_Window* Memory_Dialog() { Fl_Double_Window* w = new Fl_Double_Window(505, 175, _("Flrig Memory")); Fl_Group* mm_grp1 = new Fl_Group(2, 2, 60, 133); mm_grp1->box(FL_ENGRAVED_FRAME); btnAddFreq = new Fl_Button(6, 6, 51, 22, _("Add @-1>")); btnAddFreq->tooltip(_("Add to list")); btnAddFreq->down_box(FL_DOWN_BOX); btnAddFreq->labelsize(12); btnAddFreq->callback((Fl_Callback*)cb_btnAddFreq); btnAddFreq->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); btnPickFreq = new Fl_Button(6, 31, 51, 22, _("Pick @-1<")); btnPickFreq->tooltip(_("Use selected data")); btnPickFreq->down_box(FL_DOWN_BOX); btnPickFreq->labelsize(12); btnPickFreq->callback((Fl_Callback*)cb_btnPickFreq); btnPickFreq->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); btnDelFreq = new Fl_Button(6, 57, 51, 22, _("Del @-11+")); btnDelFreq->tooltip(_("Delete from list")); btnDelFreq->down_box(FL_DOWN_BOX); btnDelFreq->labelsize(12); btnDelFreq->callback((Fl_Callback*)cb_btnDelFreq); btnDelFreq->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); btnClearList = new Fl_Button(6, 83, 51, 22, _("Clr @-2square")); btnClearList->tooltip(_("Clear list")); btnClearList->down_box(FL_DOWN_BOX); btnClearList->labelsize(12); btnClearList->callback((Fl_Callback*)cb_btnClearList); btnClearList->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); Fl_Button* close = new Fl_Button(6, 109, 51, 22, _("Close")); close->tooltip(_("Close Memory dialog")); close->labelsize(12); close->callback((Fl_Callback*)cb_Close); close->align(Fl_Align(FL_ALIGN_LEFT|FL_ALIGN_INSIDE)); mm_grp1->end(); FreqSelect = new Fl_Browser(66, 2, 434, 133); FreqSelect->tooltip( _("Right click => pick freq\nDouble-click ==> pick and close\nLeft click => edit Alpha Tag")); FreqSelect->type(2); FreqSelect->labelfont(4); FreqSelect->labelsize(12); FreqSelect->textfont(4); FreqSelect->textsize(12); FreqSelect->callback((Fl_Callback*)cb_FreqSelect); FreqSelect->has_scrollbar(Fl_Browser_::VERTICAL_ALWAYS); FreqSelect->column_widths(freq_sel_widths); inAlphaTag = new Fl_Input(290, 140, 190, 25, _("Alpha Tag:")); inAlphaTag->tooltip( _("Select Tag from browser window\nLeft click => in Tag field to edit\n[Enter] => when done to update")); inAlphaTag->callback((Fl_Callback*)cb_inAlphaTag); inAlphaTag->when(FL_WHEN_ENTER_KEY_ALWAYS); w->end(); return w; } flrig-1.3.24/src/UI/ui_setup.cxx0000644000175000017500000003414512562731646013335 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- Fl_Radio_Light_Button *btn_wide_ui=(Fl_Radio_Light_Button *)0; Fl_Radio_Light_Button *btn_narrow_ui=(Fl_Radio_Light_Button *)0; Fl_Radio_Light_Button *btn_touch_ui=(Fl_Radio_Light_Button *)0; Fl_Box *lblTest=(Fl_Box *)0; Fl_Button *prefFont=(Fl_Button *)0; Fl_Button *prefForeground=(Fl_Button *)0; Fl_Button *btnBacklight=(Fl_Button *)0; Fl_Group *grpMeterColor=(Fl_Group *)0; Fl_Box *scaleSmeterColor=(Fl_Box *)0; Fl_SigBar *sldrRcvSignalColor=(Fl_SigBar *)0; Fl_SigBar *sldrSWRcolor=(Fl_SigBar *)0; Fl_Box *scaleSWRcolor=(Fl_Box *)0; Fl_SigBar *sldrPWRcolor=(Fl_SigBar *)0; Fl_Box *scalePWRcolor=(Fl_Box *)0; Fl_Button *btMeterColor=(Fl_Button *)0; Fl_Button *btnSWRColor=(Fl_Button *)0; Fl_Button *btnPwrColor=(Fl_Button *)0; Fl_Button *btnPeakColor=(Fl_Button *)0; Fl_Choice *mnuScheme=(Fl_Choice *)0; Fl_Button *pref_sys_foreground=(Fl_Button *)0; Fl_Button *pref_sys_background=(Fl_Button *)0; Fl_Button *prefsys_background2=(Fl_Button *)0; Fl_Button *prefsys_defaults=(Fl_Button *)0; Fl_Wheel_Value_Slider *sldrColors=(Fl_Wheel_Value_Slider *)0; Fl_Button *pref_slider_background=(Fl_Button *)0; Fl_Button *pref_slider_select=(Fl_Button *)0; Fl_Button *prefslider_defaults=(Fl_Button *)0; Fl_Button *btnReset=(Fl_Button *)0; Fl_Button *btnCancel=(Fl_Button *)0; Fl_Return_Button *btnOkDisplayDialog=(Fl_Return_Button *)0; Fl_Light_Button *btn_lighted=(Fl_Light_Button *)0; Fl_Button *btn_lighted_default=(Fl_Button *)0; Fl_Check_Button *chk_hrd_button = (Fl_Check_Button *)0; static void cb_btn_ui(Fl_Radio_Light_Button* o, void*) { if (o == btn_wide_ui) progStatus.UIsize = wide_ui; else if (o == btn_narrow_ui) progStatus.UIsize = small_ui; else progStatus.UIsize = touch_ui; progStatus.UIchanged = true; } static void cb_prefFont(Fl_Button*, void*) { cbPrefFont(); } static void cb_prefForeground(Fl_Button*, void*) { cbPrefForeground(); } static void cb_btnBacklight(Fl_Button*, void*) { cbBacklightColor(); } static void cb_btMeterColor(Fl_Button*, void*) { cbSMeterColor(); } static void cb_btnSWRColor(Fl_Button*, void*) { cbSWRMeterColor(); } static void cb_btnPwrColor(Fl_Button*, void*) { cbPwrMeterColor(); } static void cb_btnPeakColor(Fl_Button*, void*) { cbPeakMeterColor(); } static void cb_mnuScheme(Fl_Choice* o, void*) { progStatus.ui_scheme = o->text(); Fl::scheme(progStatus.ui_scheme.c_str()); } static void cb_pref_sys_foreground(Fl_Button*, void*) { cb_sys_foreground(); } static void cb_pref_sys_background(Fl_Button*, void*) { cb_sys_background(); } static void cb_prefsys_background2(Fl_Button*, void*) { cb_sys_background2(); } static void cb_prefsys_defaults(Fl_Button*, void*) { cb_sys_defaults(); } static void cb_pref_slider_background(Fl_Button*, void*) { cb_slider_background(); } static void cb_pref_slider_select(Fl_Button*, void*) { cb_slider_select(); } static void cb_prefslider_defaults(Fl_Button*, void*) { cb_slider_defaults(); } static void cb_btnReset(Fl_Button*, void*) { cb_reset_display_dialog(); } static void cb_btnCancel(Fl_Button*, void*) { cbCancelDisplayDialog(); } static void cb_btnOkDisplayDialog(Fl_Return_Button*, void*) { cbOkDisplayDialog(); } static void cb_btn_lighted(Fl_Light_Button*, void*) { cb_lighted_button(); } static void cb_btn_lighted_default(Fl_Button*, void*) { cb_lighted_default(); } static void cb_hrd_button(Fl_Check_Button*, void*) { cb_change_hrd_button(); } Fl_Double_Window* DisplayDialog() { Fl_Double_Window* w = new Fl_Double_Window(424, 280, _("Flrig User Interface")); Fl_Group* su_grp1 = new Fl_Group(2, 2, 420, 40, _("Main Dialog Aspect Ratio (change requires restart)")); su_grp1->box(FL_ENGRAVED_FRAME); su_grp1->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE)); btn_narrow_ui = new Fl_Radio_Light_Button( su_grp1->w()/2 - 160, 20, 100, 18, _("Narrow UI")); btn_narrow_ui->down_box(FL_DOWN_BOX); btn_narrow_ui->callback((Fl_Callback*)cb_btn_ui); btn_narrow_ui->value(progStatus.UIsize == small_ui); btn_wide_ui = new Fl_Radio_Light_Button( btn_narrow_ui->x() + 110, 20, 100, 18, _("Wide UI")); btn_wide_ui->down_box(FL_DOWN_BOX); btn_wide_ui->callback((Fl_Callback*)cb_btn_ui); btn_wide_ui->value(progStatus.UIsize == wide_ui); btn_touch_ui = new Fl_Radio_Light_Button( btn_wide_ui->x() + 110, 20, 100, 18, _("Touch UI")); btn_touch_ui->down_box(FL_DOWN_BOX); btn_touch_ui->callback((Fl_Callback*)cb_btn_ui); btn_touch_ui->value(progStatus.UIsize == touch_ui); su_grp1->end(); Fl_Group* su_grp_hrd = new Fl_Group( su_grp1->x(), su_grp1->y() + su_grp1->h(), su_grp1->w(), 30); su_grp_hrd->box(FL_ENGRAVED_FRAME); chk_hrd_button = new Fl_Check_Button( btn_narrow_ui->x(), su_grp_hrd->y() + su_grp_hrd->h()/2 - 10, 100, 20, _("Freq Control top/bottom left click")); chk_hrd_button->value(progStatus.hrd_buttons); chk_hrd_button->callback((Fl_Callback*)cb_hrd_button); chk_hrd_button->tooltip(_("Off - left/right click paradigm")); su_grp_hrd->end(); Fl_Group* su_grp2 = new Fl_Group( 2, su_grp_hrd->y() + su_grp_hrd->h(), 218, 70); su_grp2->box(FL_ENGRAVED_FRAME); Fl_Group* su_grp2a = new Fl_Group( 5, su_grp2->y() + 2, 210, 35); su_grp2a->box(FL_DOWN_BOX); lblTest = new Fl_Box( su_grp2a->x() + 2, su_grp2a->y() + 2, 206, 31, _("14070.000")); lblTest->box(FL_FLAT_BOX); lblTest->labelfont(4); lblTest->labelsize(32); su_grp2a->end(); prefFont = new Fl_Button( 10, lblTest->y() + lblTest->h() + 4, 60, 22, _("Font")); prefFont->callback((Fl_Callback*)cb_prefFont); prefForeground = new Fl_Button( 78, prefFont->y(), 60, 22, _("Color")); prefForeground->callback((Fl_Callback*)cb_prefForeground); btnBacklight = new Fl_Button( 146, prefFont->y(), 60, 22, _("Back")); btnBacklight->callback((Fl_Callback*)cb_btnBacklight); su_grp2->end(); Fl_Group* su_grp3 = new Fl_Group( 2, su_grp2->y() + su_grp2->h(), 284, 107); Fl_Group* su_grp3a = new Fl_Group( 5, su_grp3->y() + 5, 210, 100); su_grp3a->box(FL_DOWN_BOX); grpMeterColor = new Fl_Group( 7, su_grp3a->y() + 2, 206, 96); grpMeterColor->box(FL_FLAT_BOX); scaleSmeterColor = new Fl_Box( 8, grpMeterColor->y(), 205, 20); scaleSmeterColor->box(FL_FLAT_BOX); scaleSmeterColor->image(image_S60); scaleSmeterColor->color(scaleSmeter->color()); sldrRcvSignalColor = new Fl_SigBar( 10, grpMeterColor->y() + 20, 200, 6); sldrRcvSignalColor->box(FL_FLAT_BOX); sldrRcvSignalColor->color(FL_BACKGROUND_COLOR); sldrRcvSignalColor->selection_color(FL_BACKGROUND_COLOR); sldrRcvSignalColor->labeltype(FL_NORMAL_LABEL); sldrRcvSignalColor->labelfont(0); sldrRcvSignalColor->labelsize(14); sldrRcvSignalColor->labelcolor(FL_FOREGROUND_COLOR); sldrRcvSignalColor->align(Fl_Align(FL_ALIGN_CENTER)); sldrRcvSignalColor->when(FL_WHEN_RELEASE); sldrSWRcolor = new Fl_SigBar( 10, grpMeterColor->y() + 51, 200, 6); sldrSWRcolor->box(FL_FLAT_BOX); sldrSWRcolor->color(FL_BACKGROUND_COLOR); sldrSWRcolor->selection_color(FL_BACKGROUND_COLOR); sldrSWRcolor->labeltype(FL_NORMAL_LABEL); sldrSWRcolor->labelfont(0); sldrSWRcolor->labelsize(14); sldrSWRcolor->labelcolor(FL_FOREGROUND_COLOR); sldrSWRcolor->align(Fl_Align(FL_ALIGN_CENTER)); sldrSWRcolor->when(FL_WHEN_RELEASE); sldrSWRcolor->minimum(0); sldrSWRcolor->maximum(100); scaleSWRcolor = new Fl_Box( 8, grpMeterColor->y() + 31, 205, 20); scaleSWRcolor->box(FL_FLAT_BOX); scaleSWRcolor->image(image_SWR); sldrPWRcolor = new Fl_SigBar( 8, grpMeterColor->y() + 68, 200, 6); sldrPWRcolor->box(FL_FLAT_BOX); sldrPWRcolor->color(FL_BACKGROUND_COLOR); sldrPWRcolor->selection_color(FL_BACKGROUND_COLOR); sldrPWRcolor->labeltype(FL_NORMAL_LABEL); sldrPWRcolor->labelfont(0); sldrPWRcolor->labelsize(14); sldrPWRcolor->labelcolor(FL_FOREGROUND_COLOR); sldrPWRcolor->align(Fl_Align(FL_ALIGN_CENTER)); sldrPWRcolor->when(FL_WHEN_RELEASE); sldrPWRcolor->minimum(0); sldrPWRcolor->maximum(100); scalePWRcolor = new Fl_Box( 8, grpMeterColor->y() + 74, 205, 20); scalePWRcolor->box(FL_FLAT_BOX); scalePWRcolor->image(image_P100); grpMeterColor->end(); su_grp3a->end(); btMeterColor = new Fl_Button( grpMeterColor->x() + grpMeterColor->w() + 5, grpMeterColor->y(), 60, 22, _("Smeter")); btMeterColor->callback((Fl_Callback*)cb_btMeterColor); btnSWRColor = new Fl_Button( btMeterColor->x(), btMeterColor->y() + btMeterColor->h() + 4, 60, 22, _("SWR")); btnSWRColor->callback((Fl_Callback*)cb_btnSWRColor); btnPwrColor = new Fl_Button( btnSWRColor->x(), btnSWRColor->y() + btnSWRColor->h() + 4, 60, 22, _("Pwr")); btnPwrColor->callback((Fl_Callback*)cb_btnPwrColor); btnPeakColor = new Fl_Button( btnPwrColor->x(), btnPwrColor->y() + btnPwrColor->h() + 4, 60, 22, _("Peak")); btnPeakColor->callback((Fl_Callback*)cb_btnPeakColor); su_grp3->end(); Fl_Group* su_grp4 = new Fl_Group( su_grp2->x() + su_grp2->w() + 2, su_grp2->y(), 202, 70, _("System")); su_grp4->box(FL_ENGRAVED_FRAME); su_grp4->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE)); mnuScheme = new Fl_Choice( su_grp4->x() + 8, su_grp4->y() + 20, 80, 22, _("UI")); mnuScheme->tooltip(_("Change application look and feel")); mnuScheme->down_box(FL_BORDER_BOX); mnuScheme->callback((Fl_Callback*)cb_mnuScheme); mnuScheme->align(Fl_Align(FL_ALIGN_RIGHT)); mnuScheme->add("base"); mnuScheme->add("gtk+"); mnuScheme->add("plastic"); mnuScheme->value(mnuScheme->find_item(progStatus.ui_scheme.c_str())); pref_sys_foreground = new Fl_Button( mnuScheme->x(), mnuScheme->y() + mnuScheme->h() + 2, 60, 22, _("Fgnd")); pref_sys_foreground->tooltip(_("Label color")); pref_sys_foreground->callback((Fl_Callback*)cb_pref_sys_foreground); pref_sys_background = new Fl_Button( pref_sys_foreground->x() + pref_sys_foreground->w() + 2, pref_sys_foreground->y(), 60, 22, _("Bngd")); pref_sys_background->tooltip(_("Background - normal")); pref_sys_background->callback((Fl_Callback*)cb_pref_sys_background); prefsys_background2 = new Fl_Button( pref_sys_background->x() + pref_sys_background->w() + 2, pref_sys_background->y(), 60, 22, _("Bgnd2")); prefsys_background2->tooltip(_("Background - selected")); prefsys_background2->callback((Fl_Callback*)cb_prefsys_background2); prefsys_defaults = new Fl_Button( prefsys_background2->x(), mnuScheme->y(), 60, 22, _("Default")); prefsys_defaults->tooltip(_("Background - selected")); prefsys_defaults->callback((Fl_Callback*)cb_prefsys_defaults); su_grp4->end(); Fl_Group* su_grp5 = new Fl_Group( su_grp3->x() + su_grp3->w() + 2, su_grp3->y(), 134, 88); su_grp5->box(FL_ENGRAVED_FRAME); sldrColors = new Fl_Wheel_Value_Slider( su_grp5->x() + 4, su_grp5->y() + 4, 125, 20); sldrColors->tooltip(_("Adjust power level")); sldrColors->type(5); sldrColors->box(FL_THIN_DOWN_BOX); sldrColors->color(FL_BACKGROUND_COLOR); sldrColors->selection_color(FL_BACKGROUND_COLOR); sldrColors->labeltype(FL_NORMAL_LABEL); sldrColors->labelfont(0); sldrColors->labelsize(14); sldrColors->labelcolor(FL_FOREGROUND_COLOR); sldrColors->maximum(100); sldrColors->step(1); sldrColors->value(15); sldrColors->textsize(12); sldrColors->align(Fl_Align(FL_ALIGN_CENTER)); sldrColors->when(FL_WHEN_CHANGED); sldrColors->reverse(true); pref_slider_background = new Fl_Button( sldrColors->x(), sldrColors->y() + sldrColors->h() + 5, 60, 22, _("Bngd")); pref_slider_background->tooltip(_("Background - normal")); pref_slider_background->callback((Fl_Callback*)cb_pref_slider_background); pref_slider_select = new Fl_Button( pref_slider_background->x() + pref_slider_background->w() + 3, pref_slider_background->y(), 60, 22, _("Button")); pref_slider_select->tooltip(_("Background - normal")); pref_slider_select->callback((Fl_Callback*)cb_pref_slider_select); prefslider_defaults = new Fl_Button( pref_slider_background->x() + pref_slider_background->w()/2, pref_slider_select->y() + pref_slider_select->h() + 4, 60, 22, _("Default")); prefslider_defaults->tooltip(_("Background - selected")); prefslider_defaults->callback((Fl_Callback*)cb_prefslider_defaults); su_grp5->end(); btnReset = new Fl_Button( 25, su_grp3a->y() + su_grp3a->h() + 5, 60, 22, _("Reset")); btnReset->tooltip(_("Restore all flrig defaults")); btnReset->callback((Fl_Callback*)cb_btnReset); btnCancel = new Fl_Button( 113, btnReset->y(), 60, 22, _("Cancel")); btnCancel->tooltip(_("Discard current changes")); btnCancel->callback((Fl_Callback*)cb_btnCancel); btnOkDisplayDialog = new Fl_Return_Button( 201, btnReset->y(), 60, 22, _("OK")); btnOkDisplayDialog->tooltip(_("Save Current Changes")); btnOkDisplayDialog->callback((Fl_Callback*)cb_btnOkDisplayDialog); Fl_Group* su_grp6 = new Fl_Group( su_grp5->x(), su_grp5->y() + su_grp5->h(), 134, 45); su_grp6->box(FL_ENGRAVED_FRAME); btn_lighted = new Fl_Light_Button( su_grp6->x() + 5, su_grp6->y() + 10, 60, 22, _("Lt Btn")); btn_lighted->callback((Fl_Callback*)cb_btn_lighted); btn_lighted_default = new Fl_Button( btn_lighted->x() + btn_lighted->w() + 2, btn_lighted->y(), 60, 22, _("Default")); btn_lighted_default->tooltip(_("Background - selected")); btn_lighted_default->callback((Fl_Callback*)cb_btn_lighted_default); su_grp6->end(); w->end(); return w; } flrig-1.3.24/src/UI/K3_ui.cxx0000644000175000017500000000626012642041360012431 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include "support.h" #include "debug.h" #include "gettext.h" #include "rig_io.h" #include "dialogs.h" #include "rigbase.h" #include "ptt.h" #include "rigs.h" #include "K3_ui.h" extern queue queA; extern queue queB; extern queue quePTT; void read_K3() { guard_lock serial_lock(&mutex_serial); if (progStatus.poll_frequency) { long freq; freq = selrig->get_vfoA(); if (freq != vfoA.freq) { vfoA.freq = freq; Fl::awake(setFreqDispA, (void *)vfoA.freq); vfo = vfoA; } freq = selrig->get_vfoB(); if (freq != vfoB.freq) { vfoB.freq = freq; Fl::awake(setFreqDispB, (void *)vfoB.freq); } } if (!quePTT.empty()) return; if (progStatus.poll_mode) { int nu_mode; nu_mode = selrig->get_modeA(); if (nu_mode != vfoA.imode) { vfoA.imode = vfo.imode = nu_mode; selrig->set_bwA(vfo.iBW = selrig->adjust_bandwidth(nu_mode)); Fl::awake(setModeControl); Fl::awake(updateBandwidthControl); } nu_mode = selrig->get_modeB(); if (nu_mode != vfoB.imode) { vfoB.imode = nu_mode; } } if (!quePTT.empty()) return; if (progStatus.poll_bandwidth) { int nu_BW; nu_BW = selrig->get_bwA(); if (nu_BW != vfoA.iBW) { vfoA.iBW = vfo.iBW = nu_BW; Fl::awake(setBWControl); } nu_BW = selrig->get_bwB(); if (nu_BW != vfoB.iBW) { vfoB.iBW = nu_BW; } } } void K3_set_split(int val) { guard_lock serial_lock(&mutex_serial); selrig->set_split(val); } extern char *print(FREQMODE data); void K3_A2B() { guard_lock serial_lock(&mutex_serial); vfoB = vfoA; selrig->set_vfoB(vfoB.freq); selrig->set_bwB(vfoB.iBW); selrig->set_modeB(vfoB.imode); FreqDispB->value(vfoB.freq); Fl::focus(FreqDispA); } void cb_K3_swapAB() { guard_lock serial_lock(&mutex_serial); FREQMODE temp = vfoA; vfoA = vfoB; vfoB = temp; vfo = vfoA; selrig->set_vfoB(vfoB.freq); selrig->set_bwB(vfoB.iBW); selrig->set_modeB(vfoB.imode); selrig->set_vfoA(vfoA.freq); selrig->set_bwA(vfoA.iBW); selrig->set_modeA(vfoA.imode); opBW->index(vfoA.iBW); opMODE->index(vfoA.imode); FreqDispA->value(vfoA.freq); FreqDispB->value(vfoB.freq); Fl::focus(FreqDispA); } flrig-1.3.24/src/Makefile.in0000644000175000017500000100555412650265660012503 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (c) 2008 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ bin_PROGRAMS = flrig$(EXEEXT) @ENABLE_FLXMLRPC_FALSE@am__append_1 = $(XMLRPCPP_SRC) @HAVE_WINDRES_TRUE@@MINGW32_TRUE@am__append_2 = $(MINGW32_SRC) @HAVE_NSIS_TRUE@am__append_3 = $(INSTALLER_FILE) @DARWIN_TRUE@am__append_4 = $(APPBUNDLE_NOLIBS) $(APPBUNDLE) $(APPBUNDLE)*.dmg subdir = src DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/config.h.in $(top_srcdir)/build-aux/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/build.m4 \ $(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/fltk.m4 \ $(top_srcdir)/m4/funcs.m4 $(top_srcdir)/m4/macosx.m4 \ $(top_srcdir)/m4/np-compat.m4 $(top_srcdir)/m4/opt.m4 \ $(top_srcdir)/m4/pkg-config.m4 $(top_srcdir)/m4/static.m4 \ $(top_srcdir)/m4/win32.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am__flrig_SOURCES_DIST = xmlrpcpp/XmlRpcBase64.h \ xmlrpcpp/XmlRpcClient.cpp xmlrpcpp/XmlRpcClient.h \ xmlrpcpp/XmlRpcDispatch.cpp xmlrpcpp/XmlRpcDispatch.h \ xmlrpcpp/XmlRpcException.h xmlrpcpp/XmlRpc.h \ xmlrpcpp/XmlRpcMutex.cpp xmlrpcpp/XmlRpcMutex.h \ xmlrpcpp/XmlRpcServerConnection.cpp \ xmlrpcpp/XmlRpcServerConnection.h xmlrpcpp/XmlRpcServer.cpp \ xmlrpcpp/XmlRpcServer.h xmlrpcpp/XmlRpcServerMethod.cpp \ xmlrpcpp/XmlRpcServerMethod.h xmlrpcpp/XmlRpcSocket.cpp \ xmlrpcpp/XmlRpcSocket.h xmlrpcpp/XmlRpcSource.cpp \ xmlrpcpp/XmlRpcSource.h xmlrpcpp/XmlRpcUtil.cpp \ xmlrpcpp/XmlRpcUtil.h xmlrpcpp/XmlRpcValue.cpp \ xmlrpcpp/XmlRpcValue.h flrig-rc.rc include/flrigrc.h \ support/mingw.c include/compat.h include/compat-mingw.h \ graphics/pixmaps.cxx graphics/icons.cxx graphics/images.cxx \ main.cxx rigs/rigbase.cxx rigs/rigs.cxx rigs/FT100D.cxx \ rigs/FT450.cxx rigs/FT450D.cxx rigs/FT747.cxx rigs/FT767.cxx \ rigs/FT817.cxx rigs/FT847.cxx rigs/FT857D.cxx rigs/FT890.cxx \ rigs/FT900.cxx rigs/FT920.cxx rigs/FT950.cxx rigs/FT990.cxx \ rigs/FT990a.cxx rigs/FT991.cxx rigs/FT1000.cxx \ rigs/FT1000MP.cxx rigs/FT2000.cxx rigs/FTdx1200.cxx \ rigs/FTdx3000.cxx rigs/FT5000.cxx rigs/FTdx9000.cxx \ rigs/ICbase.cxx rigs/IC703.cxx rigs/IC706MKIIG.cxx \ rigs/IC718.cxx rigs/IC728.cxx rigs/IC735.cxx rigs/IC746.cxx \ rigs/IC756.cxx rigs/IC756PRO2.cxx rigs/IC756PRO3.cxx \ rigs/IC910.cxx rigs/IC7000.cxx rigs/IC7100.cxx rigs/IC7200.cxx \ rigs/IC7410.cxx rigs/IC7600.cxx rigs/IC7800.cxx \ rigs/IC9100.cxx rigs/IC7700.cxx rigs/K2.cxx rigs/K3.cxx \ rigs/KX3.cxx rigs/PCR1000.cxx rigs/RAY152.cxx rigs/TS140.cxx \ rigs/TS450S.cxx rigs/TS480HX.cxx rigs/TS480SAT.cxx \ rigs/TS570.cxx rigs/TS590S.cxx rigs/TS590SG.cxx rigs/TS990.cxx \ rigs/TS870S.cxx rigs/TS2000.cxx rigs/TT516.cxx \ rigs/DELTA-II.cxx rigs/TT538.cxx rigs/TT550.cxx rigs/TT563.cxx \ rigs/TT566.cxx rigs/TT588.cxx rigs/TT599.cxx support/debug.cxx \ support/dialogs.cxx support/ptt.cxx support/rig_io.cxx \ support/serial.cxx support/socket.cxx support/socket_io.cxx \ support/status.cxx support/support.cxx support/threads.cxx \ support/util.cxx support/xml_io.cxx UI/K3_ui.cxx UI/KX3_ui.cxx \ UI/rigpanel.cxx widgets/combo.cxx widgets/Fl_SigBar.cxx \ widgets/flinput2.cxx widgets/flslider2.cxx \ widgets/font_browser.cxx widgets/FreqControl.cxx \ widgets/hspinner.cxx widgets/ValueSlider.cxx \ server/xml_server.cxx am__dirstamp = $(am__leading_dot)dirstamp am__objects_1 = xmlrpcpp/flrig-XmlRpcClient.$(OBJEXT) \ xmlrpcpp/flrig-XmlRpcDispatch.$(OBJEXT) \ xmlrpcpp/flrig-XmlRpcMutex.$(OBJEXT) \ xmlrpcpp/flrig-XmlRpcServerConnection.$(OBJEXT) \ xmlrpcpp/flrig-XmlRpcServer.$(OBJEXT) \ xmlrpcpp/flrig-XmlRpcServerMethod.$(OBJEXT) \ xmlrpcpp/flrig-XmlRpcSocket.$(OBJEXT) \ xmlrpcpp/flrig-XmlRpcSource.$(OBJEXT) \ xmlrpcpp/flrig-XmlRpcUtil.$(OBJEXT) \ xmlrpcpp/flrig-XmlRpcValue.$(OBJEXT) @ENABLE_FLXMLRPC_FALSE@am__objects_2 = $(am__objects_1) am__objects_3 = flrig-rc.$(OBJEXT) support/flrig-mingw.$(OBJEXT) @HAVE_WINDRES_TRUE@@MINGW32_TRUE@am__objects_4 = $(am__objects_3) am_flrig_OBJECTS = $(am__objects_2) $(am__objects_4) \ graphics/flrig-pixmaps.$(OBJEXT) \ graphics/flrig-icons.$(OBJEXT) graphics/flrig-images.$(OBJEXT) \ flrig-main.$(OBJEXT) rigs/flrig-rigbase.$(OBJEXT) \ rigs/flrig-rigs.$(OBJEXT) rigs/flrig-FT100D.$(OBJEXT) \ rigs/flrig-FT450.$(OBJEXT) rigs/flrig-FT450D.$(OBJEXT) \ rigs/flrig-FT747.$(OBJEXT) rigs/flrig-FT767.$(OBJEXT) \ rigs/flrig-FT817.$(OBJEXT) rigs/flrig-FT847.$(OBJEXT) \ rigs/flrig-FT857D.$(OBJEXT) rigs/flrig-FT890.$(OBJEXT) \ rigs/flrig-FT900.$(OBJEXT) rigs/flrig-FT920.$(OBJEXT) \ rigs/flrig-FT950.$(OBJEXT) rigs/flrig-FT990.$(OBJEXT) \ rigs/flrig-FT990a.$(OBJEXT) rigs/flrig-FT991.$(OBJEXT) \ rigs/flrig-FT1000.$(OBJEXT) rigs/flrig-FT1000MP.$(OBJEXT) \ rigs/flrig-FT2000.$(OBJEXT) rigs/flrig-FTdx1200.$(OBJEXT) \ rigs/flrig-FTdx3000.$(OBJEXT) rigs/flrig-FT5000.$(OBJEXT) \ rigs/flrig-FTdx9000.$(OBJEXT) rigs/flrig-ICbase.$(OBJEXT) \ rigs/flrig-IC703.$(OBJEXT) rigs/flrig-IC706MKIIG.$(OBJEXT) \ rigs/flrig-IC718.$(OBJEXT) rigs/flrig-IC728.$(OBJEXT) \ rigs/flrig-IC735.$(OBJEXT) rigs/flrig-IC746.$(OBJEXT) \ rigs/flrig-IC756.$(OBJEXT) rigs/flrig-IC756PRO2.$(OBJEXT) \ rigs/flrig-IC756PRO3.$(OBJEXT) rigs/flrig-IC910.$(OBJEXT) \ rigs/flrig-IC7000.$(OBJEXT) rigs/flrig-IC7100.$(OBJEXT) \ rigs/flrig-IC7200.$(OBJEXT) rigs/flrig-IC7410.$(OBJEXT) \ rigs/flrig-IC7600.$(OBJEXT) rigs/flrig-IC7800.$(OBJEXT) \ rigs/flrig-IC9100.$(OBJEXT) rigs/flrig-IC7700.$(OBJEXT) \ rigs/flrig-K2.$(OBJEXT) rigs/flrig-K3.$(OBJEXT) \ rigs/flrig-KX3.$(OBJEXT) rigs/flrig-PCR1000.$(OBJEXT) \ rigs/flrig-RAY152.$(OBJEXT) rigs/flrig-TS140.$(OBJEXT) \ rigs/flrig-TS450S.$(OBJEXT) rigs/flrig-TS480HX.$(OBJEXT) \ rigs/flrig-TS480SAT.$(OBJEXT) rigs/flrig-TS570.$(OBJEXT) \ rigs/flrig-TS590S.$(OBJEXT) rigs/flrig-TS590SG.$(OBJEXT) \ rigs/flrig-TS990.$(OBJEXT) rigs/flrig-TS870S.$(OBJEXT) \ rigs/flrig-TS2000.$(OBJEXT) rigs/flrig-TT516.$(OBJEXT) \ rigs/flrig-DELTA-II.$(OBJEXT) rigs/flrig-TT538.$(OBJEXT) \ rigs/flrig-TT550.$(OBJEXT) rigs/flrig-TT563.$(OBJEXT) \ rigs/flrig-TT566.$(OBJEXT) rigs/flrig-TT588.$(OBJEXT) \ rigs/flrig-TT599.$(OBJEXT) support/flrig-debug.$(OBJEXT) \ support/flrig-dialogs.$(OBJEXT) support/flrig-ptt.$(OBJEXT) \ support/flrig-rig_io.$(OBJEXT) support/flrig-serial.$(OBJEXT) \ support/flrig-socket.$(OBJEXT) \ support/flrig-socket_io.$(OBJEXT) \ support/flrig-status.$(OBJEXT) support/flrig-support.$(OBJEXT) \ support/flrig-threads.$(OBJEXT) support/flrig-util.$(OBJEXT) \ support/flrig-xml_io.$(OBJEXT) UI/flrig-K3_ui.$(OBJEXT) \ UI/flrig-KX3_ui.$(OBJEXT) UI/flrig-rigpanel.$(OBJEXT) \ widgets/flrig-combo.$(OBJEXT) \ widgets/flrig-Fl_SigBar.$(OBJEXT) \ widgets/flrig-flinput2.$(OBJEXT) \ widgets/flrig-flslider2.$(OBJEXT) \ widgets/flrig-font_browser.$(OBJEXT) \ widgets/flrig-FreqControl.$(OBJEXT) \ widgets/flrig-hspinner.$(OBJEXT) \ widgets/flrig-ValueSlider.$(OBJEXT) \ server/flrig-xml_server.$(OBJEXT) am__objects_5 = nodist_flrig_OBJECTS = $(am__objects_5) flrig_OBJECTS = $(am_flrig_OBJECTS) $(nodist_flrig_OBJECTS) flrig_DEPENDENCIES = flrig_LINK = $(CXXLD) $(flrig_CXXFLAGS) $(CXXFLAGS) $(flrig_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp am__depfiles_maybe = depfiles am__mv = mv -f AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(flrig_SOURCES) $(EXTRA_flrig_SOURCES) \ $(nodist_flrig_SOURCES) DIST_SOURCES = $(am__flrig_SOURCES_DIST) $(EXTRA_flrig_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AC_CONFIG_ARGS = @AC_CONFIG_ARGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BFD_CFLAGS = @BFD_CFLAGS@ BFD_LIBS = @BFD_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FLRIG_BUILD_CPPFLAGS = @FLRIG_BUILD_CPPFLAGS@ FLRIG_BUILD_CXXFLAGS = @FLRIG_BUILD_CXXFLAGS@ FLRIG_BUILD_LDADD = @FLRIG_BUILD_LDADD@ FLRIG_BUILD_LDFLAGS = @FLRIG_BUILD_LDFLAGS@ FLRIG_VERSION = @FLRIG_VERSION@ ######################################################################## FLRIG_VERSION_MAJOR = @FLRIG_VERSION_MAJOR@ FLRIG_VERSION_MINOR = @FLRIG_VERSION_MINOR@ FLRIG_VERSION_PATCH = @FLRIG_VERSION_PATCH@ FLTK_CFLAGS = @FLTK_CFLAGS@ FLTK_CONFIG = @FLTK_CONFIG@ FLTK_LIBS = @FLTK_LIBS@ FLUID = @FLUID@ FLXMLRPC_CFLAGS = @FLXMLRPC_CFLAGS@ FLXMLRPC_LIBS = @FLXMLRPC_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAC_UNIVERSAL_CFLAGS = @MAC_UNIVERSAL_CFLAGS@ MAC_UNIVERSAL_LDFLAGS = @MAC_UNIVERSAL_LDFLAGS@ MAKEINFO = @MAKEINFO@ MAKENSIS = @MAKENSIS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OPT_CFLAGS = @OPT_CFLAGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTW32_CFLAGS = @PTW32_CFLAGS@ PTW32_LIBS = @PTW32_LIBS@ RDYNAMIC = @RDYNAMIC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ MINGW32_SRC = \ flrig-rc.rc \ include/flrigrc.h \ support/mingw.c \ include/compat.h \ include/compat-mingw.h # Build the xmlrpcpp source if libflxmlrpc is not found XMLRPCPP_SRC = \ xmlrpcpp/XmlRpcBase64.h \ xmlrpcpp/XmlRpcClient.cpp \ xmlrpcpp/XmlRpcClient.h \ xmlrpcpp/XmlRpcDispatch.cpp \ xmlrpcpp/XmlRpcDispatch.h \ xmlrpcpp/XmlRpcException.h \ xmlrpcpp/XmlRpc.h \ xmlrpcpp/XmlRpcMutex.cpp \ xmlrpcpp/XmlRpcMutex.h \ xmlrpcpp/XmlRpcServerConnection.cpp \ xmlrpcpp/XmlRpcServerConnection.h \ xmlrpcpp/XmlRpcServer.cpp \ xmlrpcpp/XmlRpcServer.h \ xmlrpcpp/XmlRpcServerMethod.cpp \ xmlrpcpp/XmlRpcServerMethod.h \ xmlrpcpp/XmlRpcSocket.cpp \ xmlrpcpp/XmlRpcSocket.h \ xmlrpcpp/XmlRpcSource.cpp \ xmlrpcpp/XmlRpcSource.h \ xmlrpcpp/XmlRpcUtil.cpp \ xmlrpcpp/XmlRpcUtil.h \ xmlrpcpp/XmlRpcValue.cpp \ xmlrpcpp/XmlRpcValue.h # We distribute these but do not always compile them EXTRA_flrig_SOURCES = $(FLRIG_WIN32_RES_SRC) $(MINGW32_SRC) $(XMLRPCPP_SRC) # Sources that we build. It is OK to have headers here. flrig_SOURCES = $(am__append_1) $(am__append_2) graphics/pixmaps.cxx \ graphics/icons.cxx graphics/images.cxx main.cxx \ rigs/rigbase.cxx rigs/rigs.cxx rigs/FT100D.cxx rigs/FT450.cxx \ rigs/FT450D.cxx rigs/FT747.cxx rigs/FT767.cxx rigs/FT817.cxx \ rigs/FT847.cxx rigs/FT857D.cxx rigs/FT890.cxx rigs/FT900.cxx \ rigs/FT920.cxx rigs/FT950.cxx rigs/FT990.cxx rigs/FT990a.cxx \ rigs/FT991.cxx rigs/FT1000.cxx rigs/FT1000MP.cxx \ rigs/FT2000.cxx rigs/FTdx1200.cxx rigs/FTdx3000.cxx \ rigs/FT5000.cxx rigs/FTdx9000.cxx rigs/ICbase.cxx \ rigs/IC703.cxx rigs/IC706MKIIG.cxx rigs/IC718.cxx \ rigs/IC728.cxx rigs/IC735.cxx rigs/IC746.cxx rigs/IC756.cxx \ rigs/IC756PRO2.cxx rigs/IC756PRO3.cxx rigs/IC910.cxx \ rigs/IC7000.cxx rigs/IC7100.cxx rigs/IC7200.cxx \ rigs/IC7410.cxx rigs/IC7600.cxx rigs/IC7800.cxx \ rigs/IC9100.cxx rigs/IC7700.cxx rigs/K2.cxx rigs/K3.cxx \ rigs/KX3.cxx rigs/PCR1000.cxx rigs/RAY152.cxx rigs/TS140.cxx \ rigs/TS450S.cxx rigs/TS480HX.cxx rigs/TS480SAT.cxx \ rigs/TS570.cxx rigs/TS590S.cxx rigs/TS590SG.cxx rigs/TS990.cxx \ rigs/TS870S.cxx rigs/TS2000.cxx rigs/TT516.cxx \ rigs/DELTA-II.cxx rigs/TT538.cxx rigs/TT550.cxx rigs/TT563.cxx \ rigs/TT566.cxx rigs/TT588.cxx rigs/TT599.cxx support/debug.cxx \ support/dialogs.cxx support/ptt.cxx support/rig_io.cxx \ support/serial.cxx support/socket.cxx support/socket_io.cxx \ support/status.cxx support/support.cxx support/threads.cxx \ support/util.cxx support/xml_io.cxx UI/K3_ui.cxx UI/KX3_ui.cxx \ UI/rigpanel.cxx widgets/combo.cxx widgets/Fl_SigBar.cxx \ widgets/flinput2.cxx widgets/flslider2.cxx \ widgets/font_browser.cxx widgets/FreqControl.cxx \ widgets/hspinner.cxx widgets/ValueSlider.cxx \ server/xml_server.cxx @ENABLE_FLXMLRPC_FALSE@flrig_CPPFLAGS = @FLRIG_BUILD_CPPFLAGS@ @ENABLE_FLXMLRPC_TRUE@flrig_CPPFLAGS = @FLRIG_BUILD_CPPFLAGS@ @FLXMLRPC_CFLAGS@ @ENABLE_FLXMLRPC_FALSE@flrig_CXXFLAGS = @FLRIG_BUILD_CXXFLAGS@ @ENABLE_FLXMLRPC_TRUE@flrig_CXXFLAGS = @FLRIG_BUILD_CXXFLAGS@ @FLXMLRPC_CFLAGS@ @ENABLE_FLXMLRPC_FALSE@flrig_CFLAGS = $(flrig_CXXFLAGS) @ENABLE_FLXMLRPC_TRUE@flrig_CFLAGS = $(flrig_CXXFLAGS) @ENABLE_FLXMLRPC_FALSE@flrig_LDFLAGS = @FLRIG_BUILD_LDFLAGS@ @ENABLE_FLXMLRPC_TRUE@flrig_LDFLAGS = @FLRIG_BUILD_LDFLAGS@ @FLXMLRPC_LIBS@ @ENABLE_FLXMLRPC_FALSE@flrig_LDADD = @FLRIG_BUILD_LDADD@ @ENABLE_FLXMLRPC_TRUE@flrig_LDADD = @FLRIG_BUILD_LDADD@ # Sources that are generated, BUILT_SOURCES = # not distributed, nodist_flrig_SOURCES = $(BUILT_SOURCES) # and deleted by the clean targets CLEANFILES = $(BUILT_SOURCES) $(am__append_3) CLEAN_LOCAL = $(am__append_4) INSTALLER_FILE = flrig-$(FLRIG_VERSION)_setup.exe APPBUNDLE = flrig-$(FLRIG_VERSION) APPBUNDLE_NOLIBS = $(APPBUNDLE)-nolibs # Additional source files that are distributed # Additional non-source files that are distributed # Additional source files that support non-Linux cross compilation EXTRA_DIST = config.h flrig_icon.cxx UI/ui_bitmaps.cxx UI/ui_wide.cxx \ UI/ui_small.cxx UI/ui_touch.cxx UI/ui_setup.cxx \ UI/ui_memory.cxx UI/xcvr_setup.cxx UI/meters_setup.cxx \ UI/power_meter_setup.cxx include/combo.h include/debug.h \ include/dialogs.h include/fileselect.h include/font_browser.h \ include/flrigrc.h include/flinput2.h include/icons.h \ include/pixmaps.h include/flslider2.h include/Fl_SigBar.h \ include/FreqControl.h include/hspinner.h include/FT100D.h \ include/FT450.h include/FT450D.h include/FT747.h \ include/FT767.h include/FT817.h include/FT847.h \ include/FT857D.h include/FT920.h include/FT890.h \ include/FT900.h include/FT950.h include/FT990.h \ include/FT990a.h include/FT991.h include/FT1000.h \ include/FT1000MP.h include/FT2000.h include/FTdx1200.h \ include/FTdx3000.h include/FT5000.h include/FTdx9000.h \ include/generic.h include/gettext.h include/ICbase.h \ include/IC703.h include/IC706MKIIG.h include/IC718.h \ include/IC728.h include/IC735.h include/IC746.h \ include/IC756.h include/IC756PRO2.h include/IC756PRO3.h \ include/IC910.h include/IC7000.h include/IC7100.h \ include/IC7410.h include/IC7200.h include/IC7600.h \ include/IC7700.h include/IC7800.h include/IC9100.h \ include/images.h include/K2.h include/K3.h include/K3_ui.h \ include/KX3.h include/KX3_ui.h include/PCR1000.h \ include/RAY152.h include/mingw.h include/ptt.h include/rig.h \ include/rigs.h include/rigbase.h include/rig_io.h \ include/rigpanel.h include/serial.h include/xml_io.h \ include/socket.h include/socket_io.h include/status.h \ include/support.h include/threads.h include/TS140.h \ include/TS450S.h include/TS480HX.h include/TS480SAT.h \ include/TS570.h include/TS590S.h include/TS590SG.h \ include/TS870S.h include/TS990.h include/TS2000.h \ include/TT516.h include/DELTA-II.h include/TT538.h \ include/TT550.h include/TT563.h include/TT566.h \ include/TT588.h include/TT599.h include/ui.h include/util.h \ include/ValueSlider.h include/xml_server.h images/alc.xbm \ images/P25.xbm images/P50.xbm images/P100.xbm images/P200.xbm \ images/P200log.xbm images/S60.xbm images/SWR.xbm \ $(srcdir)/../data/flrig.desktop $(srcdir)/../data/flrig.xpm \ $(srcdir)/../data/win32/fl_app.nsi \ $(srcdir)/../data/win32/flrig.ico \ $(srcdir)/../scripts/mknsisinst.sh \ $(srcdir)/../scripts/buildmxe.sh \ $(srcdir)/../scripts/builddist.sh \ $(srcdir)/../data/mac/Info.plist.in \ $(srcdir)/../data/mac/flrig.icns \ $(srcdir)/../scripts/mkappbundle.sh $(FLRIG_WIN32_SRC) \ $(FLRIG_FL_SRC) all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-am .SUFFIXES: .SUFFIXES: .c .cpp .cxx .o .obj .rc $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status src/config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) installcheck-binPROGRAMS: $(bin_PROGRAMS) bad=0; pid=$$$$; list="$(bin_PROGRAMS)"; for p in $$list; do \ case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \ *" $$p "* | *" $(srcdir)/$$p "*) continue;; \ esac; \ f=`echo "$$p" | \ sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ for opt in --help --version; do \ if "$(DESTDIR)$(bindir)/$$f" $$opt >c$${pid}_.out \ 2>c$${pid}_.err &2; bad=1; fi; \ done; \ done; rm -f c$${pid}_.???; exit $$bad xmlrpcpp/$(am__dirstamp): @$(MKDIR_P) xmlrpcpp @: > xmlrpcpp/$(am__dirstamp) xmlrpcpp/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) xmlrpcpp/$(DEPDIR) @: > xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flrig-XmlRpcClient.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flrig-XmlRpcDispatch.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flrig-XmlRpcMutex.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flrig-XmlRpcServerConnection.$(OBJEXT): \ xmlrpcpp/$(am__dirstamp) xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flrig-XmlRpcServer.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flrig-XmlRpcServerMethod.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flrig-XmlRpcSocket.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flrig-XmlRpcSource.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flrig-XmlRpcUtil.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) xmlrpcpp/flrig-XmlRpcValue.$(OBJEXT): xmlrpcpp/$(am__dirstamp) \ xmlrpcpp/$(DEPDIR)/$(am__dirstamp) support/$(am__dirstamp): @$(MKDIR_P) support @: > support/$(am__dirstamp) support/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) support/$(DEPDIR) @: > support/$(DEPDIR)/$(am__dirstamp) support/flrig-mingw.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) graphics/$(am__dirstamp): @$(MKDIR_P) graphics @: > graphics/$(am__dirstamp) graphics/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) graphics/$(DEPDIR) @: > graphics/$(DEPDIR)/$(am__dirstamp) graphics/flrig-pixmaps.$(OBJEXT): graphics/$(am__dirstamp) \ graphics/$(DEPDIR)/$(am__dirstamp) graphics/flrig-icons.$(OBJEXT): graphics/$(am__dirstamp) \ graphics/$(DEPDIR)/$(am__dirstamp) graphics/flrig-images.$(OBJEXT): graphics/$(am__dirstamp) \ graphics/$(DEPDIR)/$(am__dirstamp) rigs/$(am__dirstamp): @$(MKDIR_P) rigs @: > rigs/$(am__dirstamp) rigs/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) rigs/$(DEPDIR) @: > rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-rigbase.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-rigs.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT100D.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT450.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT450D.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT747.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT767.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT817.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT847.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT857D.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT890.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT900.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT920.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT950.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT990.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT990a.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT991.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT1000.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT1000MP.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT2000.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FTdx1200.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FTdx3000.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FT5000.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-FTdx9000.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-ICbase.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC703.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC706MKIIG.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC718.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC728.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC735.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC746.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC756.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC756PRO2.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC756PRO3.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC910.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC7000.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC7100.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC7200.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC7410.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC7600.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC7800.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC9100.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-IC7700.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-K2.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-K3.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-KX3.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-PCR1000.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-RAY152.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TS140.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TS450S.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TS480HX.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TS480SAT.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TS570.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TS590S.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TS590SG.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TS990.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TS870S.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TS2000.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TT516.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-DELTA-II.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TT538.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TT550.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TT563.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TT566.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TT588.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) rigs/flrig-TT599.$(OBJEXT): rigs/$(am__dirstamp) \ rigs/$(DEPDIR)/$(am__dirstamp) support/flrig-debug.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-dialogs.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-ptt.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-rig_io.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-serial.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-socket.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-socket_io.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-status.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-support.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-threads.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-util.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) support/flrig-xml_io.$(OBJEXT): support/$(am__dirstamp) \ support/$(DEPDIR)/$(am__dirstamp) UI/$(am__dirstamp): @$(MKDIR_P) UI @: > UI/$(am__dirstamp) UI/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) UI/$(DEPDIR) @: > UI/$(DEPDIR)/$(am__dirstamp) UI/flrig-K3_ui.$(OBJEXT): UI/$(am__dirstamp) \ UI/$(DEPDIR)/$(am__dirstamp) UI/flrig-KX3_ui.$(OBJEXT): UI/$(am__dirstamp) \ UI/$(DEPDIR)/$(am__dirstamp) UI/flrig-rigpanel.$(OBJEXT): UI/$(am__dirstamp) \ UI/$(DEPDIR)/$(am__dirstamp) widgets/$(am__dirstamp): @$(MKDIR_P) widgets @: > widgets/$(am__dirstamp) widgets/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) widgets/$(DEPDIR) @: > widgets/$(DEPDIR)/$(am__dirstamp) widgets/flrig-combo.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flrig-Fl_SigBar.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flrig-flinput2.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flrig-flslider2.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flrig-font_browser.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flrig-FreqControl.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flrig-hspinner.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) widgets/flrig-ValueSlider.$(OBJEXT): widgets/$(am__dirstamp) \ widgets/$(DEPDIR)/$(am__dirstamp) server/$(am__dirstamp): @$(MKDIR_P) server @: > server/$(am__dirstamp) server/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) server/$(DEPDIR) @: > server/$(DEPDIR)/$(am__dirstamp) server/flrig-xml_server.$(OBJEXT): server/$(am__dirstamp) \ server/$(DEPDIR)/$(am__dirstamp) flrig$(EXEEXT): $(flrig_OBJECTS) $(flrig_DEPENDENCIES) $(EXTRA_flrig_DEPENDENCIES) @rm -f flrig$(EXEEXT) $(AM_V_CXXLD)$(flrig_LINK) $(flrig_OBJECTS) $(flrig_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f UI/*.$(OBJEXT) -rm -f graphics/*.$(OBJEXT) -rm -f rigs/*.$(OBJEXT) -rm -f server/*.$(OBJEXT) -rm -f support/*.$(OBJEXT) -rm -f widgets/*.$(OBJEXT) -rm -f xmlrpcpp/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/flrig-main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@UI/$(DEPDIR)/flrig-K3_ui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@UI/$(DEPDIR)/flrig-KX3_ui.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@UI/$(DEPDIR)/flrig-rigpanel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@graphics/$(DEPDIR)/flrig-icons.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@graphics/$(DEPDIR)/flrig-images.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@graphics/$(DEPDIR)/flrig-pixmaps.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-DELTA-II.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT1000.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT1000MP.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT100D.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT2000.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT450.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT450D.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT5000.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT747.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT767.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT817.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT847.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT857D.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT890.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT900.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT920.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT950.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT990.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT990a.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FT991.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FTdx1200.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FTdx3000.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-FTdx9000.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC7000.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC703.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC706MKIIG.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC7100.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC718.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC7200.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC728.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC735.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC7410.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC746.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC756.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC756PRO2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC756PRO3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC7600.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC7700.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC7800.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC910.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-IC9100.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-ICbase.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-K2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-K3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-KX3.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-PCR1000.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-RAY152.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TS140.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TS2000.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TS450S.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TS480HX.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TS480SAT.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TS570.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TS590S.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TS590SG.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TS870S.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TS990.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TT516.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TT538.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TT550.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TT563.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TT566.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TT588.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-TT599.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-rigbase.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@rigs/$(DEPDIR)/flrig-rigs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@server/$(DEPDIR)/flrig-xml_server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-dialogs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-mingw.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-ptt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-rig_io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-serial.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-socket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-socket_io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-status.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-support.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-threads.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-util.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@support/$(DEPDIR)/flrig-xml_io.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flrig-Fl_SigBar.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flrig-FreqControl.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flrig-ValueSlider.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flrig-combo.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flrig-flinput2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flrig-flslider2.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flrig-font_browser.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@widgets/$(DEPDIR)/flrig-hspinner.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flrig-XmlRpcClient.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flrig-XmlRpcDispatch.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flrig-XmlRpcMutex.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerConnection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerMethod.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSocket.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSource.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flrig-XmlRpcUtil.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@xmlrpcpp/$(DEPDIR)/flrig-XmlRpcValue.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` support/flrig-mingw.o: support/mingw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CFLAGS) $(CFLAGS) -MT support/flrig-mingw.o -MD -MP -MF support/$(DEPDIR)/flrig-mingw.Tpo -c -o support/flrig-mingw.o `test -f 'support/mingw.c' || echo '$(srcdir)/'`support/mingw.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-mingw.Tpo support/$(DEPDIR)/flrig-mingw.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='support/mingw.c' object='support/flrig-mingw.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CFLAGS) $(CFLAGS) -c -o support/flrig-mingw.o `test -f 'support/mingw.c' || echo '$(srcdir)/'`support/mingw.c support/flrig-mingw.obj: support/mingw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CFLAGS) $(CFLAGS) -MT support/flrig-mingw.obj -MD -MP -MF support/$(DEPDIR)/flrig-mingw.Tpo -c -o support/flrig-mingw.obj `if test -f 'support/mingw.c'; then $(CYGPATH_W) 'support/mingw.c'; else $(CYGPATH_W) '$(srcdir)/support/mingw.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-mingw.Tpo support/$(DEPDIR)/flrig-mingw.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='support/mingw.c' object='support/flrig-mingw.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CFLAGS) $(CFLAGS) -c -o support/flrig-mingw.obj `if test -f 'support/mingw.c'; then $(CYGPATH_W) 'support/mingw.c'; else $(CYGPATH_W) '$(srcdir)/support/mingw.c'; fi` .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` xmlrpcpp/flrig-XmlRpcClient.o: xmlrpcpp/XmlRpcClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcClient.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcClient.Tpo -c -o xmlrpcpp/flrig-XmlRpcClient.o `test -f 'xmlrpcpp/XmlRpcClient.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcClient.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcClient.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcClient.cpp' object='xmlrpcpp/flrig-XmlRpcClient.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcClient.o `test -f 'xmlrpcpp/XmlRpcClient.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcClient.cpp xmlrpcpp/flrig-XmlRpcClient.obj: xmlrpcpp/XmlRpcClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcClient.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcClient.Tpo -c -o xmlrpcpp/flrig-XmlRpcClient.obj `if test -f 'xmlrpcpp/XmlRpcClient.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcClient.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcClient.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcClient.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcClient.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcClient.cpp' object='xmlrpcpp/flrig-XmlRpcClient.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcClient.obj `if test -f 'xmlrpcpp/XmlRpcClient.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcClient.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcClient.cpp'; fi` xmlrpcpp/flrig-XmlRpcDispatch.o: xmlrpcpp/XmlRpcDispatch.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcDispatch.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcDispatch.Tpo -c -o xmlrpcpp/flrig-XmlRpcDispatch.o `test -f 'xmlrpcpp/XmlRpcDispatch.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcDispatch.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcDispatch.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcDispatch.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcDispatch.cpp' object='xmlrpcpp/flrig-XmlRpcDispatch.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcDispatch.o `test -f 'xmlrpcpp/XmlRpcDispatch.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcDispatch.cpp xmlrpcpp/flrig-XmlRpcDispatch.obj: xmlrpcpp/XmlRpcDispatch.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcDispatch.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcDispatch.Tpo -c -o xmlrpcpp/flrig-XmlRpcDispatch.obj `if test -f 'xmlrpcpp/XmlRpcDispatch.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcDispatch.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcDispatch.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcDispatch.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcDispatch.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcDispatch.cpp' object='xmlrpcpp/flrig-XmlRpcDispatch.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcDispatch.obj `if test -f 'xmlrpcpp/XmlRpcDispatch.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcDispatch.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcDispatch.cpp'; fi` xmlrpcpp/flrig-XmlRpcMutex.o: xmlrpcpp/XmlRpcMutex.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcMutex.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcMutex.Tpo -c -o xmlrpcpp/flrig-XmlRpcMutex.o `test -f 'xmlrpcpp/XmlRpcMutex.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcMutex.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcMutex.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcMutex.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcMutex.cpp' object='xmlrpcpp/flrig-XmlRpcMutex.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcMutex.o `test -f 'xmlrpcpp/XmlRpcMutex.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcMutex.cpp xmlrpcpp/flrig-XmlRpcMutex.obj: xmlrpcpp/XmlRpcMutex.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcMutex.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcMutex.Tpo -c -o xmlrpcpp/flrig-XmlRpcMutex.obj `if test -f 'xmlrpcpp/XmlRpcMutex.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcMutex.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcMutex.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcMutex.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcMutex.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcMutex.cpp' object='xmlrpcpp/flrig-XmlRpcMutex.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcMutex.obj `if test -f 'xmlrpcpp/XmlRpcMutex.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcMutex.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcMutex.cpp'; fi` xmlrpcpp/flrig-XmlRpcServerConnection.o: xmlrpcpp/XmlRpcServerConnection.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcServerConnection.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerConnection.Tpo -c -o xmlrpcpp/flrig-XmlRpcServerConnection.o `test -f 'xmlrpcpp/XmlRpcServerConnection.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerConnection.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerConnection.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerConnection.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServerConnection.cpp' object='xmlrpcpp/flrig-XmlRpcServerConnection.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcServerConnection.o `test -f 'xmlrpcpp/XmlRpcServerConnection.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerConnection.cpp xmlrpcpp/flrig-XmlRpcServerConnection.obj: xmlrpcpp/XmlRpcServerConnection.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcServerConnection.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerConnection.Tpo -c -o xmlrpcpp/flrig-XmlRpcServerConnection.obj `if test -f 'xmlrpcpp/XmlRpcServerConnection.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerConnection.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerConnection.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerConnection.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerConnection.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServerConnection.cpp' object='xmlrpcpp/flrig-XmlRpcServerConnection.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcServerConnection.obj `if test -f 'xmlrpcpp/XmlRpcServerConnection.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerConnection.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerConnection.cpp'; fi` xmlrpcpp/flrig-XmlRpcServer.o: xmlrpcpp/XmlRpcServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcServer.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServer.Tpo -c -o xmlrpcpp/flrig-XmlRpcServer.o `test -f 'xmlrpcpp/XmlRpcServer.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServer.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServer.cpp' object='xmlrpcpp/flrig-XmlRpcServer.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcServer.o `test -f 'xmlrpcpp/XmlRpcServer.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServer.cpp xmlrpcpp/flrig-XmlRpcServer.obj: xmlrpcpp/XmlRpcServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcServer.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServer.Tpo -c -o xmlrpcpp/flrig-XmlRpcServer.obj `if test -f 'xmlrpcpp/XmlRpcServer.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServer.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServer.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServer.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServer.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServer.cpp' object='xmlrpcpp/flrig-XmlRpcServer.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcServer.obj `if test -f 'xmlrpcpp/XmlRpcServer.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServer.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServer.cpp'; fi` xmlrpcpp/flrig-XmlRpcServerMethod.o: xmlrpcpp/XmlRpcServerMethod.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcServerMethod.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerMethod.Tpo -c -o xmlrpcpp/flrig-XmlRpcServerMethod.o `test -f 'xmlrpcpp/XmlRpcServerMethod.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerMethod.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerMethod.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerMethod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServerMethod.cpp' object='xmlrpcpp/flrig-XmlRpcServerMethod.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcServerMethod.o `test -f 'xmlrpcpp/XmlRpcServerMethod.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcServerMethod.cpp xmlrpcpp/flrig-XmlRpcServerMethod.obj: xmlrpcpp/XmlRpcServerMethod.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcServerMethod.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerMethod.Tpo -c -o xmlrpcpp/flrig-XmlRpcServerMethod.obj `if test -f 'xmlrpcpp/XmlRpcServerMethod.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerMethod.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerMethod.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerMethod.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcServerMethod.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcServerMethod.cpp' object='xmlrpcpp/flrig-XmlRpcServerMethod.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcServerMethod.obj `if test -f 'xmlrpcpp/XmlRpcServerMethod.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcServerMethod.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcServerMethod.cpp'; fi` xmlrpcpp/flrig-XmlRpcSocket.o: xmlrpcpp/XmlRpcSocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcSocket.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSocket.Tpo -c -o xmlrpcpp/flrig-XmlRpcSocket.o `test -f 'xmlrpcpp/XmlRpcSocket.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSocket.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSocket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcSocket.cpp' object='xmlrpcpp/flrig-XmlRpcSocket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcSocket.o `test -f 'xmlrpcpp/XmlRpcSocket.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSocket.cpp xmlrpcpp/flrig-XmlRpcSocket.obj: xmlrpcpp/XmlRpcSocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcSocket.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSocket.Tpo -c -o xmlrpcpp/flrig-XmlRpcSocket.obj `if test -f 'xmlrpcpp/XmlRpcSocket.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSocket.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSocket.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSocket.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSocket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcSocket.cpp' object='xmlrpcpp/flrig-XmlRpcSocket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcSocket.obj `if test -f 'xmlrpcpp/XmlRpcSocket.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSocket.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSocket.cpp'; fi` xmlrpcpp/flrig-XmlRpcSource.o: xmlrpcpp/XmlRpcSource.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcSource.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSource.Tpo -c -o xmlrpcpp/flrig-XmlRpcSource.o `test -f 'xmlrpcpp/XmlRpcSource.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSource.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSource.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSource.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcSource.cpp' object='xmlrpcpp/flrig-XmlRpcSource.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcSource.o `test -f 'xmlrpcpp/XmlRpcSource.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcSource.cpp xmlrpcpp/flrig-XmlRpcSource.obj: xmlrpcpp/XmlRpcSource.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcSource.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSource.Tpo -c -o xmlrpcpp/flrig-XmlRpcSource.obj `if test -f 'xmlrpcpp/XmlRpcSource.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSource.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSource.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSource.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcSource.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcSource.cpp' object='xmlrpcpp/flrig-XmlRpcSource.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcSource.obj `if test -f 'xmlrpcpp/XmlRpcSource.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcSource.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcSource.cpp'; fi` xmlrpcpp/flrig-XmlRpcUtil.o: xmlrpcpp/XmlRpcUtil.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcUtil.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcUtil.Tpo -c -o xmlrpcpp/flrig-XmlRpcUtil.o `test -f 'xmlrpcpp/XmlRpcUtil.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcUtil.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcUtil.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcUtil.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcUtil.cpp' object='xmlrpcpp/flrig-XmlRpcUtil.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcUtil.o `test -f 'xmlrpcpp/XmlRpcUtil.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcUtil.cpp xmlrpcpp/flrig-XmlRpcUtil.obj: xmlrpcpp/XmlRpcUtil.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcUtil.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcUtil.Tpo -c -o xmlrpcpp/flrig-XmlRpcUtil.obj `if test -f 'xmlrpcpp/XmlRpcUtil.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcUtil.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcUtil.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcUtil.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcUtil.cpp' object='xmlrpcpp/flrig-XmlRpcUtil.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcUtil.obj `if test -f 'xmlrpcpp/XmlRpcUtil.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcUtil.cpp'; fi` xmlrpcpp/flrig-XmlRpcValue.o: xmlrpcpp/XmlRpcValue.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcValue.o -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcValue.Tpo -c -o xmlrpcpp/flrig-XmlRpcValue.o `test -f 'xmlrpcpp/XmlRpcValue.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcValue.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcValue.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcValue.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcValue.cpp' object='xmlrpcpp/flrig-XmlRpcValue.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcValue.o `test -f 'xmlrpcpp/XmlRpcValue.cpp' || echo '$(srcdir)/'`xmlrpcpp/XmlRpcValue.cpp xmlrpcpp/flrig-XmlRpcValue.obj: xmlrpcpp/XmlRpcValue.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT xmlrpcpp/flrig-XmlRpcValue.obj -MD -MP -MF xmlrpcpp/$(DEPDIR)/flrig-XmlRpcValue.Tpo -c -o xmlrpcpp/flrig-XmlRpcValue.obj `if test -f 'xmlrpcpp/XmlRpcValue.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcValue.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcValue.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) xmlrpcpp/$(DEPDIR)/flrig-XmlRpcValue.Tpo xmlrpcpp/$(DEPDIR)/flrig-XmlRpcValue.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='xmlrpcpp/XmlRpcValue.cpp' object='xmlrpcpp/flrig-XmlRpcValue.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o xmlrpcpp/flrig-XmlRpcValue.obj `if test -f 'xmlrpcpp/XmlRpcValue.cpp'; then $(CYGPATH_W) 'xmlrpcpp/XmlRpcValue.cpp'; else $(CYGPATH_W) '$(srcdir)/xmlrpcpp/XmlRpcValue.cpp'; fi` graphics/flrig-pixmaps.o: graphics/pixmaps.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT graphics/flrig-pixmaps.o -MD -MP -MF graphics/$(DEPDIR)/flrig-pixmaps.Tpo -c -o graphics/flrig-pixmaps.o `test -f 'graphics/pixmaps.cxx' || echo '$(srcdir)/'`graphics/pixmaps.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) graphics/$(DEPDIR)/flrig-pixmaps.Tpo graphics/$(DEPDIR)/flrig-pixmaps.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='graphics/pixmaps.cxx' object='graphics/flrig-pixmaps.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o graphics/flrig-pixmaps.o `test -f 'graphics/pixmaps.cxx' || echo '$(srcdir)/'`graphics/pixmaps.cxx graphics/flrig-pixmaps.obj: graphics/pixmaps.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT graphics/flrig-pixmaps.obj -MD -MP -MF graphics/$(DEPDIR)/flrig-pixmaps.Tpo -c -o graphics/flrig-pixmaps.obj `if test -f 'graphics/pixmaps.cxx'; then $(CYGPATH_W) 'graphics/pixmaps.cxx'; else $(CYGPATH_W) '$(srcdir)/graphics/pixmaps.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) graphics/$(DEPDIR)/flrig-pixmaps.Tpo graphics/$(DEPDIR)/flrig-pixmaps.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='graphics/pixmaps.cxx' object='graphics/flrig-pixmaps.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o graphics/flrig-pixmaps.obj `if test -f 'graphics/pixmaps.cxx'; then $(CYGPATH_W) 'graphics/pixmaps.cxx'; else $(CYGPATH_W) '$(srcdir)/graphics/pixmaps.cxx'; fi` graphics/flrig-icons.o: graphics/icons.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT graphics/flrig-icons.o -MD -MP -MF graphics/$(DEPDIR)/flrig-icons.Tpo -c -o graphics/flrig-icons.o `test -f 'graphics/icons.cxx' || echo '$(srcdir)/'`graphics/icons.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) graphics/$(DEPDIR)/flrig-icons.Tpo graphics/$(DEPDIR)/flrig-icons.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='graphics/icons.cxx' object='graphics/flrig-icons.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o graphics/flrig-icons.o `test -f 'graphics/icons.cxx' || echo '$(srcdir)/'`graphics/icons.cxx graphics/flrig-icons.obj: graphics/icons.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT graphics/flrig-icons.obj -MD -MP -MF graphics/$(DEPDIR)/flrig-icons.Tpo -c -o graphics/flrig-icons.obj `if test -f 'graphics/icons.cxx'; then $(CYGPATH_W) 'graphics/icons.cxx'; else $(CYGPATH_W) '$(srcdir)/graphics/icons.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) graphics/$(DEPDIR)/flrig-icons.Tpo graphics/$(DEPDIR)/flrig-icons.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='graphics/icons.cxx' object='graphics/flrig-icons.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o graphics/flrig-icons.obj `if test -f 'graphics/icons.cxx'; then $(CYGPATH_W) 'graphics/icons.cxx'; else $(CYGPATH_W) '$(srcdir)/graphics/icons.cxx'; fi` graphics/flrig-images.o: graphics/images.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT graphics/flrig-images.o -MD -MP -MF graphics/$(DEPDIR)/flrig-images.Tpo -c -o graphics/flrig-images.o `test -f 'graphics/images.cxx' || echo '$(srcdir)/'`graphics/images.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) graphics/$(DEPDIR)/flrig-images.Tpo graphics/$(DEPDIR)/flrig-images.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='graphics/images.cxx' object='graphics/flrig-images.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o graphics/flrig-images.o `test -f 'graphics/images.cxx' || echo '$(srcdir)/'`graphics/images.cxx graphics/flrig-images.obj: graphics/images.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT graphics/flrig-images.obj -MD -MP -MF graphics/$(DEPDIR)/flrig-images.Tpo -c -o graphics/flrig-images.obj `if test -f 'graphics/images.cxx'; then $(CYGPATH_W) 'graphics/images.cxx'; else $(CYGPATH_W) '$(srcdir)/graphics/images.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) graphics/$(DEPDIR)/flrig-images.Tpo graphics/$(DEPDIR)/flrig-images.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='graphics/images.cxx' object='graphics/flrig-images.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o graphics/flrig-images.obj `if test -f 'graphics/images.cxx'; then $(CYGPATH_W) 'graphics/images.cxx'; else $(CYGPATH_W) '$(srcdir)/graphics/images.cxx'; fi` flrig-main.o: main.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT flrig-main.o -MD -MP -MF $(DEPDIR)/flrig-main.Tpo -c -o flrig-main.o `test -f 'main.cxx' || echo '$(srcdir)/'`main.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flrig-main.Tpo $(DEPDIR)/flrig-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cxx' object='flrig-main.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o flrig-main.o `test -f 'main.cxx' || echo '$(srcdir)/'`main.cxx flrig-main.obj: main.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT flrig-main.obj -MD -MP -MF $(DEPDIR)/flrig-main.Tpo -c -o flrig-main.obj `if test -f 'main.cxx'; then $(CYGPATH_W) 'main.cxx'; else $(CYGPATH_W) '$(srcdir)/main.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/flrig-main.Tpo $(DEPDIR)/flrig-main.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='main.cxx' object='flrig-main.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o flrig-main.obj `if test -f 'main.cxx'; then $(CYGPATH_W) 'main.cxx'; else $(CYGPATH_W) '$(srcdir)/main.cxx'; fi` rigs/flrig-rigbase.o: rigs/rigbase.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-rigbase.o -MD -MP -MF rigs/$(DEPDIR)/flrig-rigbase.Tpo -c -o rigs/flrig-rigbase.o `test -f 'rigs/rigbase.cxx' || echo '$(srcdir)/'`rigs/rigbase.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-rigbase.Tpo rigs/$(DEPDIR)/flrig-rigbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/rigbase.cxx' object='rigs/flrig-rigbase.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-rigbase.o `test -f 'rigs/rigbase.cxx' || echo '$(srcdir)/'`rigs/rigbase.cxx rigs/flrig-rigbase.obj: rigs/rigbase.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-rigbase.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-rigbase.Tpo -c -o rigs/flrig-rigbase.obj `if test -f 'rigs/rigbase.cxx'; then $(CYGPATH_W) 'rigs/rigbase.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/rigbase.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-rigbase.Tpo rigs/$(DEPDIR)/flrig-rigbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/rigbase.cxx' object='rigs/flrig-rigbase.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-rigbase.obj `if test -f 'rigs/rigbase.cxx'; then $(CYGPATH_W) 'rigs/rigbase.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/rigbase.cxx'; fi` rigs/flrig-rigs.o: rigs/rigs.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-rigs.o -MD -MP -MF rigs/$(DEPDIR)/flrig-rigs.Tpo -c -o rigs/flrig-rigs.o `test -f 'rigs/rigs.cxx' || echo '$(srcdir)/'`rigs/rigs.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-rigs.Tpo rigs/$(DEPDIR)/flrig-rigs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/rigs.cxx' object='rigs/flrig-rigs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-rigs.o `test -f 'rigs/rigs.cxx' || echo '$(srcdir)/'`rigs/rigs.cxx rigs/flrig-rigs.obj: rigs/rigs.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-rigs.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-rigs.Tpo -c -o rigs/flrig-rigs.obj `if test -f 'rigs/rigs.cxx'; then $(CYGPATH_W) 'rigs/rigs.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/rigs.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-rigs.Tpo rigs/$(DEPDIR)/flrig-rigs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/rigs.cxx' object='rigs/flrig-rigs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-rigs.obj `if test -f 'rigs/rigs.cxx'; then $(CYGPATH_W) 'rigs/rigs.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/rigs.cxx'; fi` rigs/flrig-FT100D.o: rigs/FT100D.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT100D.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT100D.Tpo -c -o rigs/flrig-FT100D.o `test -f 'rigs/FT100D.cxx' || echo '$(srcdir)/'`rigs/FT100D.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT100D.Tpo rigs/$(DEPDIR)/flrig-FT100D.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT100D.cxx' object='rigs/flrig-FT100D.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT100D.o `test -f 'rigs/FT100D.cxx' || echo '$(srcdir)/'`rigs/FT100D.cxx rigs/flrig-FT100D.obj: rigs/FT100D.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT100D.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT100D.Tpo -c -o rigs/flrig-FT100D.obj `if test -f 'rigs/FT100D.cxx'; then $(CYGPATH_W) 'rigs/FT100D.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT100D.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT100D.Tpo rigs/$(DEPDIR)/flrig-FT100D.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT100D.cxx' object='rigs/flrig-FT100D.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT100D.obj `if test -f 'rigs/FT100D.cxx'; then $(CYGPATH_W) 'rigs/FT100D.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT100D.cxx'; fi` rigs/flrig-FT450.o: rigs/FT450.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT450.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT450.Tpo -c -o rigs/flrig-FT450.o `test -f 'rigs/FT450.cxx' || echo '$(srcdir)/'`rigs/FT450.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT450.Tpo rigs/$(DEPDIR)/flrig-FT450.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT450.cxx' object='rigs/flrig-FT450.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT450.o `test -f 'rigs/FT450.cxx' || echo '$(srcdir)/'`rigs/FT450.cxx rigs/flrig-FT450.obj: rigs/FT450.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT450.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT450.Tpo -c -o rigs/flrig-FT450.obj `if test -f 'rigs/FT450.cxx'; then $(CYGPATH_W) 'rigs/FT450.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT450.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT450.Tpo rigs/$(DEPDIR)/flrig-FT450.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT450.cxx' object='rigs/flrig-FT450.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT450.obj `if test -f 'rigs/FT450.cxx'; then $(CYGPATH_W) 'rigs/FT450.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT450.cxx'; fi` rigs/flrig-FT450D.o: rigs/FT450D.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT450D.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT450D.Tpo -c -o rigs/flrig-FT450D.o `test -f 'rigs/FT450D.cxx' || echo '$(srcdir)/'`rigs/FT450D.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT450D.Tpo rigs/$(DEPDIR)/flrig-FT450D.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT450D.cxx' object='rigs/flrig-FT450D.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT450D.o `test -f 'rigs/FT450D.cxx' || echo '$(srcdir)/'`rigs/FT450D.cxx rigs/flrig-FT450D.obj: rigs/FT450D.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT450D.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT450D.Tpo -c -o rigs/flrig-FT450D.obj `if test -f 'rigs/FT450D.cxx'; then $(CYGPATH_W) 'rigs/FT450D.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT450D.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT450D.Tpo rigs/$(DEPDIR)/flrig-FT450D.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT450D.cxx' object='rigs/flrig-FT450D.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT450D.obj `if test -f 'rigs/FT450D.cxx'; then $(CYGPATH_W) 'rigs/FT450D.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT450D.cxx'; fi` rigs/flrig-FT747.o: rigs/FT747.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT747.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT747.Tpo -c -o rigs/flrig-FT747.o `test -f 'rigs/FT747.cxx' || echo '$(srcdir)/'`rigs/FT747.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT747.Tpo rigs/$(DEPDIR)/flrig-FT747.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT747.cxx' object='rigs/flrig-FT747.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT747.o `test -f 'rigs/FT747.cxx' || echo '$(srcdir)/'`rigs/FT747.cxx rigs/flrig-FT747.obj: rigs/FT747.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT747.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT747.Tpo -c -o rigs/flrig-FT747.obj `if test -f 'rigs/FT747.cxx'; then $(CYGPATH_W) 'rigs/FT747.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT747.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT747.Tpo rigs/$(DEPDIR)/flrig-FT747.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT747.cxx' object='rigs/flrig-FT747.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT747.obj `if test -f 'rigs/FT747.cxx'; then $(CYGPATH_W) 'rigs/FT747.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT747.cxx'; fi` rigs/flrig-FT767.o: rigs/FT767.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT767.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT767.Tpo -c -o rigs/flrig-FT767.o `test -f 'rigs/FT767.cxx' || echo '$(srcdir)/'`rigs/FT767.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT767.Tpo rigs/$(DEPDIR)/flrig-FT767.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT767.cxx' object='rigs/flrig-FT767.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT767.o `test -f 'rigs/FT767.cxx' || echo '$(srcdir)/'`rigs/FT767.cxx rigs/flrig-FT767.obj: rigs/FT767.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT767.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT767.Tpo -c -o rigs/flrig-FT767.obj `if test -f 'rigs/FT767.cxx'; then $(CYGPATH_W) 'rigs/FT767.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT767.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT767.Tpo rigs/$(DEPDIR)/flrig-FT767.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT767.cxx' object='rigs/flrig-FT767.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT767.obj `if test -f 'rigs/FT767.cxx'; then $(CYGPATH_W) 'rigs/FT767.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT767.cxx'; fi` rigs/flrig-FT817.o: rigs/FT817.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT817.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT817.Tpo -c -o rigs/flrig-FT817.o `test -f 'rigs/FT817.cxx' || echo '$(srcdir)/'`rigs/FT817.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT817.Tpo rigs/$(DEPDIR)/flrig-FT817.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT817.cxx' object='rigs/flrig-FT817.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT817.o `test -f 'rigs/FT817.cxx' || echo '$(srcdir)/'`rigs/FT817.cxx rigs/flrig-FT817.obj: rigs/FT817.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT817.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT817.Tpo -c -o rigs/flrig-FT817.obj `if test -f 'rigs/FT817.cxx'; then $(CYGPATH_W) 'rigs/FT817.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT817.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT817.Tpo rigs/$(DEPDIR)/flrig-FT817.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT817.cxx' object='rigs/flrig-FT817.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT817.obj `if test -f 'rigs/FT817.cxx'; then $(CYGPATH_W) 'rigs/FT817.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT817.cxx'; fi` rigs/flrig-FT847.o: rigs/FT847.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT847.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT847.Tpo -c -o rigs/flrig-FT847.o `test -f 'rigs/FT847.cxx' || echo '$(srcdir)/'`rigs/FT847.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT847.Tpo rigs/$(DEPDIR)/flrig-FT847.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT847.cxx' object='rigs/flrig-FT847.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT847.o `test -f 'rigs/FT847.cxx' || echo '$(srcdir)/'`rigs/FT847.cxx rigs/flrig-FT847.obj: rigs/FT847.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT847.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT847.Tpo -c -o rigs/flrig-FT847.obj `if test -f 'rigs/FT847.cxx'; then $(CYGPATH_W) 'rigs/FT847.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT847.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT847.Tpo rigs/$(DEPDIR)/flrig-FT847.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT847.cxx' object='rigs/flrig-FT847.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT847.obj `if test -f 'rigs/FT847.cxx'; then $(CYGPATH_W) 'rigs/FT847.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT847.cxx'; fi` rigs/flrig-FT857D.o: rigs/FT857D.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT857D.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT857D.Tpo -c -o rigs/flrig-FT857D.o `test -f 'rigs/FT857D.cxx' || echo '$(srcdir)/'`rigs/FT857D.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT857D.Tpo rigs/$(DEPDIR)/flrig-FT857D.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT857D.cxx' object='rigs/flrig-FT857D.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT857D.o `test -f 'rigs/FT857D.cxx' || echo '$(srcdir)/'`rigs/FT857D.cxx rigs/flrig-FT857D.obj: rigs/FT857D.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT857D.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT857D.Tpo -c -o rigs/flrig-FT857D.obj `if test -f 'rigs/FT857D.cxx'; then $(CYGPATH_W) 'rigs/FT857D.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT857D.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT857D.Tpo rigs/$(DEPDIR)/flrig-FT857D.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT857D.cxx' object='rigs/flrig-FT857D.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT857D.obj `if test -f 'rigs/FT857D.cxx'; then $(CYGPATH_W) 'rigs/FT857D.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT857D.cxx'; fi` rigs/flrig-FT890.o: rigs/FT890.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT890.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT890.Tpo -c -o rigs/flrig-FT890.o `test -f 'rigs/FT890.cxx' || echo '$(srcdir)/'`rigs/FT890.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT890.Tpo rigs/$(DEPDIR)/flrig-FT890.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT890.cxx' object='rigs/flrig-FT890.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT890.o `test -f 'rigs/FT890.cxx' || echo '$(srcdir)/'`rigs/FT890.cxx rigs/flrig-FT890.obj: rigs/FT890.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT890.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT890.Tpo -c -o rigs/flrig-FT890.obj `if test -f 'rigs/FT890.cxx'; then $(CYGPATH_W) 'rigs/FT890.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT890.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT890.Tpo rigs/$(DEPDIR)/flrig-FT890.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT890.cxx' object='rigs/flrig-FT890.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT890.obj `if test -f 'rigs/FT890.cxx'; then $(CYGPATH_W) 'rigs/FT890.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT890.cxx'; fi` rigs/flrig-FT900.o: rigs/FT900.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT900.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT900.Tpo -c -o rigs/flrig-FT900.o `test -f 'rigs/FT900.cxx' || echo '$(srcdir)/'`rigs/FT900.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT900.Tpo rigs/$(DEPDIR)/flrig-FT900.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT900.cxx' object='rigs/flrig-FT900.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT900.o `test -f 'rigs/FT900.cxx' || echo '$(srcdir)/'`rigs/FT900.cxx rigs/flrig-FT900.obj: rigs/FT900.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT900.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT900.Tpo -c -o rigs/flrig-FT900.obj `if test -f 'rigs/FT900.cxx'; then $(CYGPATH_W) 'rigs/FT900.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT900.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT900.Tpo rigs/$(DEPDIR)/flrig-FT900.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT900.cxx' object='rigs/flrig-FT900.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT900.obj `if test -f 'rigs/FT900.cxx'; then $(CYGPATH_W) 'rigs/FT900.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT900.cxx'; fi` rigs/flrig-FT920.o: rigs/FT920.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT920.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT920.Tpo -c -o rigs/flrig-FT920.o `test -f 'rigs/FT920.cxx' || echo '$(srcdir)/'`rigs/FT920.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT920.Tpo rigs/$(DEPDIR)/flrig-FT920.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT920.cxx' object='rigs/flrig-FT920.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT920.o `test -f 'rigs/FT920.cxx' || echo '$(srcdir)/'`rigs/FT920.cxx rigs/flrig-FT920.obj: rigs/FT920.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT920.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT920.Tpo -c -o rigs/flrig-FT920.obj `if test -f 'rigs/FT920.cxx'; then $(CYGPATH_W) 'rigs/FT920.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT920.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT920.Tpo rigs/$(DEPDIR)/flrig-FT920.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT920.cxx' object='rigs/flrig-FT920.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT920.obj `if test -f 'rigs/FT920.cxx'; then $(CYGPATH_W) 'rigs/FT920.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT920.cxx'; fi` rigs/flrig-FT950.o: rigs/FT950.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT950.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT950.Tpo -c -o rigs/flrig-FT950.o `test -f 'rigs/FT950.cxx' || echo '$(srcdir)/'`rigs/FT950.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT950.Tpo rigs/$(DEPDIR)/flrig-FT950.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT950.cxx' object='rigs/flrig-FT950.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT950.o `test -f 'rigs/FT950.cxx' || echo '$(srcdir)/'`rigs/FT950.cxx rigs/flrig-FT950.obj: rigs/FT950.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT950.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT950.Tpo -c -o rigs/flrig-FT950.obj `if test -f 'rigs/FT950.cxx'; then $(CYGPATH_W) 'rigs/FT950.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT950.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT950.Tpo rigs/$(DEPDIR)/flrig-FT950.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT950.cxx' object='rigs/flrig-FT950.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT950.obj `if test -f 'rigs/FT950.cxx'; then $(CYGPATH_W) 'rigs/FT950.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT950.cxx'; fi` rigs/flrig-FT990.o: rigs/FT990.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT990.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT990.Tpo -c -o rigs/flrig-FT990.o `test -f 'rigs/FT990.cxx' || echo '$(srcdir)/'`rigs/FT990.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT990.Tpo rigs/$(DEPDIR)/flrig-FT990.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT990.cxx' object='rigs/flrig-FT990.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT990.o `test -f 'rigs/FT990.cxx' || echo '$(srcdir)/'`rigs/FT990.cxx rigs/flrig-FT990.obj: rigs/FT990.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT990.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT990.Tpo -c -o rigs/flrig-FT990.obj `if test -f 'rigs/FT990.cxx'; then $(CYGPATH_W) 'rigs/FT990.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT990.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT990.Tpo rigs/$(DEPDIR)/flrig-FT990.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT990.cxx' object='rigs/flrig-FT990.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT990.obj `if test -f 'rigs/FT990.cxx'; then $(CYGPATH_W) 'rigs/FT990.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT990.cxx'; fi` rigs/flrig-FT990a.o: rigs/FT990a.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT990a.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT990a.Tpo -c -o rigs/flrig-FT990a.o `test -f 'rigs/FT990a.cxx' || echo '$(srcdir)/'`rigs/FT990a.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT990a.Tpo rigs/$(DEPDIR)/flrig-FT990a.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT990a.cxx' object='rigs/flrig-FT990a.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT990a.o `test -f 'rigs/FT990a.cxx' || echo '$(srcdir)/'`rigs/FT990a.cxx rigs/flrig-FT990a.obj: rigs/FT990a.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT990a.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT990a.Tpo -c -o rigs/flrig-FT990a.obj `if test -f 'rigs/FT990a.cxx'; then $(CYGPATH_W) 'rigs/FT990a.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT990a.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT990a.Tpo rigs/$(DEPDIR)/flrig-FT990a.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT990a.cxx' object='rigs/flrig-FT990a.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT990a.obj `if test -f 'rigs/FT990a.cxx'; then $(CYGPATH_W) 'rigs/FT990a.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT990a.cxx'; fi` rigs/flrig-FT991.o: rigs/FT991.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT991.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT991.Tpo -c -o rigs/flrig-FT991.o `test -f 'rigs/FT991.cxx' || echo '$(srcdir)/'`rigs/FT991.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT991.Tpo rigs/$(DEPDIR)/flrig-FT991.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT991.cxx' object='rigs/flrig-FT991.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT991.o `test -f 'rigs/FT991.cxx' || echo '$(srcdir)/'`rigs/FT991.cxx rigs/flrig-FT991.obj: rigs/FT991.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT991.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT991.Tpo -c -o rigs/flrig-FT991.obj `if test -f 'rigs/FT991.cxx'; then $(CYGPATH_W) 'rigs/FT991.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT991.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT991.Tpo rigs/$(DEPDIR)/flrig-FT991.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT991.cxx' object='rigs/flrig-FT991.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT991.obj `if test -f 'rigs/FT991.cxx'; then $(CYGPATH_W) 'rigs/FT991.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT991.cxx'; fi` rigs/flrig-FT1000.o: rigs/FT1000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT1000.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT1000.Tpo -c -o rigs/flrig-FT1000.o `test -f 'rigs/FT1000.cxx' || echo '$(srcdir)/'`rigs/FT1000.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT1000.Tpo rigs/$(DEPDIR)/flrig-FT1000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT1000.cxx' object='rigs/flrig-FT1000.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT1000.o `test -f 'rigs/FT1000.cxx' || echo '$(srcdir)/'`rigs/FT1000.cxx rigs/flrig-FT1000.obj: rigs/FT1000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT1000.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT1000.Tpo -c -o rigs/flrig-FT1000.obj `if test -f 'rigs/FT1000.cxx'; then $(CYGPATH_W) 'rigs/FT1000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT1000.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT1000.Tpo rigs/$(DEPDIR)/flrig-FT1000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT1000.cxx' object='rigs/flrig-FT1000.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT1000.obj `if test -f 'rigs/FT1000.cxx'; then $(CYGPATH_W) 'rigs/FT1000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT1000.cxx'; fi` rigs/flrig-FT1000MP.o: rigs/FT1000MP.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT1000MP.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT1000MP.Tpo -c -o rigs/flrig-FT1000MP.o `test -f 'rigs/FT1000MP.cxx' || echo '$(srcdir)/'`rigs/FT1000MP.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT1000MP.Tpo rigs/$(DEPDIR)/flrig-FT1000MP.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT1000MP.cxx' object='rigs/flrig-FT1000MP.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT1000MP.o `test -f 'rigs/FT1000MP.cxx' || echo '$(srcdir)/'`rigs/FT1000MP.cxx rigs/flrig-FT1000MP.obj: rigs/FT1000MP.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT1000MP.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT1000MP.Tpo -c -o rigs/flrig-FT1000MP.obj `if test -f 'rigs/FT1000MP.cxx'; then $(CYGPATH_W) 'rigs/FT1000MP.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT1000MP.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT1000MP.Tpo rigs/$(DEPDIR)/flrig-FT1000MP.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT1000MP.cxx' object='rigs/flrig-FT1000MP.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT1000MP.obj `if test -f 'rigs/FT1000MP.cxx'; then $(CYGPATH_W) 'rigs/FT1000MP.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT1000MP.cxx'; fi` rigs/flrig-FT2000.o: rigs/FT2000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT2000.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT2000.Tpo -c -o rigs/flrig-FT2000.o `test -f 'rigs/FT2000.cxx' || echo '$(srcdir)/'`rigs/FT2000.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT2000.Tpo rigs/$(DEPDIR)/flrig-FT2000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT2000.cxx' object='rigs/flrig-FT2000.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT2000.o `test -f 'rigs/FT2000.cxx' || echo '$(srcdir)/'`rigs/FT2000.cxx rigs/flrig-FT2000.obj: rigs/FT2000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT2000.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT2000.Tpo -c -o rigs/flrig-FT2000.obj `if test -f 'rigs/FT2000.cxx'; then $(CYGPATH_W) 'rigs/FT2000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT2000.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT2000.Tpo rigs/$(DEPDIR)/flrig-FT2000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT2000.cxx' object='rigs/flrig-FT2000.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT2000.obj `if test -f 'rigs/FT2000.cxx'; then $(CYGPATH_W) 'rigs/FT2000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT2000.cxx'; fi` rigs/flrig-FTdx1200.o: rigs/FTdx1200.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FTdx1200.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FTdx1200.Tpo -c -o rigs/flrig-FTdx1200.o `test -f 'rigs/FTdx1200.cxx' || echo '$(srcdir)/'`rigs/FTdx1200.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FTdx1200.Tpo rigs/$(DEPDIR)/flrig-FTdx1200.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FTdx1200.cxx' object='rigs/flrig-FTdx1200.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FTdx1200.o `test -f 'rigs/FTdx1200.cxx' || echo '$(srcdir)/'`rigs/FTdx1200.cxx rigs/flrig-FTdx1200.obj: rigs/FTdx1200.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FTdx1200.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FTdx1200.Tpo -c -o rigs/flrig-FTdx1200.obj `if test -f 'rigs/FTdx1200.cxx'; then $(CYGPATH_W) 'rigs/FTdx1200.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FTdx1200.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FTdx1200.Tpo rigs/$(DEPDIR)/flrig-FTdx1200.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FTdx1200.cxx' object='rigs/flrig-FTdx1200.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FTdx1200.obj `if test -f 'rigs/FTdx1200.cxx'; then $(CYGPATH_W) 'rigs/FTdx1200.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FTdx1200.cxx'; fi` rigs/flrig-FTdx3000.o: rigs/FTdx3000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FTdx3000.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FTdx3000.Tpo -c -o rigs/flrig-FTdx3000.o `test -f 'rigs/FTdx3000.cxx' || echo '$(srcdir)/'`rigs/FTdx3000.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FTdx3000.Tpo rigs/$(DEPDIR)/flrig-FTdx3000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FTdx3000.cxx' object='rigs/flrig-FTdx3000.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FTdx3000.o `test -f 'rigs/FTdx3000.cxx' || echo '$(srcdir)/'`rigs/FTdx3000.cxx rigs/flrig-FTdx3000.obj: rigs/FTdx3000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FTdx3000.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FTdx3000.Tpo -c -o rigs/flrig-FTdx3000.obj `if test -f 'rigs/FTdx3000.cxx'; then $(CYGPATH_W) 'rigs/FTdx3000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FTdx3000.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FTdx3000.Tpo rigs/$(DEPDIR)/flrig-FTdx3000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FTdx3000.cxx' object='rigs/flrig-FTdx3000.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FTdx3000.obj `if test -f 'rigs/FTdx3000.cxx'; then $(CYGPATH_W) 'rigs/FTdx3000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FTdx3000.cxx'; fi` rigs/flrig-FT5000.o: rigs/FT5000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT5000.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FT5000.Tpo -c -o rigs/flrig-FT5000.o `test -f 'rigs/FT5000.cxx' || echo '$(srcdir)/'`rigs/FT5000.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT5000.Tpo rigs/$(DEPDIR)/flrig-FT5000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT5000.cxx' object='rigs/flrig-FT5000.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT5000.o `test -f 'rigs/FT5000.cxx' || echo '$(srcdir)/'`rigs/FT5000.cxx rigs/flrig-FT5000.obj: rigs/FT5000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FT5000.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FT5000.Tpo -c -o rigs/flrig-FT5000.obj `if test -f 'rigs/FT5000.cxx'; then $(CYGPATH_W) 'rigs/FT5000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT5000.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FT5000.Tpo rigs/$(DEPDIR)/flrig-FT5000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FT5000.cxx' object='rigs/flrig-FT5000.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FT5000.obj `if test -f 'rigs/FT5000.cxx'; then $(CYGPATH_W) 'rigs/FT5000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FT5000.cxx'; fi` rigs/flrig-FTdx9000.o: rigs/FTdx9000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FTdx9000.o -MD -MP -MF rigs/$(DEPDIR)/flrig-FTdx9000.Tpo -c -o rigs/flrig-FTdx9000.o `test -f 'rigs/FTdx9000.cxx' || echo '$(srcdir)/'`rigs/FTdx9000.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FTdx9000.Tpo rigs/$(DEPDIR)/flrig-FTdx9000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FTdx9000.cxx' object='rigs/flrig-FTdx9000.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FTdx9000.o `test -f 'rigs/FTdx9000.cxx' || echo '$(srcdir)/'`rigs/FTdx9000.cxx rigs/flrig-FTdx9000.obj: rigs/FTdx9000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-FTdx9000.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-FTdx9000.Tpo -c -o rigs/flrig-FTdx9000.obj `if test -f 'rigs/FTdx9000.cxx'; then $(CYGPATH_W) 'rigs/FTdx9000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FTdx9000.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-FTdx9000.Tpo rigs/$(DEPDIR)/flrig-FTdx9000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/FTdx9000.cxx' object='rigs/flrig-FTdx9000.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-FTdx9000.obj `if test -f 'rigs/FTdx9000.cxx'; then $(CYGPATH_W) 'rigs/FTdx9000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/FTdx9000.cxx'; fi` rigs/flrig-ICbase.o: rigs/ICbase.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-ICbase.o -MD -MP -MF rigs/$(DEPDIR)/flrig-ICbase.Tpo -c -o rigs/flrig-ICbase.o `test -f 'rigs/ICbase.cxx' || echo '$(srcdir)/'`rigs/ICbase.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-ICbase.Tpo rigs/$(DEPDIR)/flrig-ICbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/ICbase.cxx' object='rigs/flrig-ICbase.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-ICbase.o `test -f 'rigs/ICbase.cxx' || echo '$(srcdir)/'`rigs/ICbase.cxx rigs/flrig-ICbase.obj: rigs/ICbase.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-ICbase.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-ICbase.Tpo -c -o rigs/flrig-ICbase.obj `if test -f 'rigs/ICbase.cxx'; then $(CYGPATH_W) 'rigs/ICbase.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/ICbase.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-ICbase.Tpo rigs/$(DEPDIR)/flrig-ICbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/ICbase.cxx' object='rigs/flrig-ICbase.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-ICbase.obj `if test -f 'rigs/ICbase.cxx'; then $(CYGPATH_W) 'rigs/ICbase.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/ICbase.cxx'; fi` rigs/flrig-IC703.o: rigs/IC703.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC703.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC703.Tpo -c -o rigs/flrig-IC703.o `test -f 'rigs/IC703.cxx' || echo '$(srcdir)/'`rigs/IC703.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC703.Tpo rigs/$(DEPDIR)/flrig-IC703.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC703.cxx' object='rigs/flrig-IC703.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC703.o `test -f 'rigs/IC703.cxx' || echo '$(srcdir)/'`rigs/IC703.cxx rigs/flrig-IC703.obj: rigs/IC703.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC703.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC703.Tpo -c -o rigs/flrig-IC703.obj `if test -f 'rigs/IC703.cxx'; then $(CYGPATH_W) 'rigs/IC703.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC703.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC703.Tpo rigs/$(DEPDIR)/flrig-IC703.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC703.cxx' object='rigs/flrig-IC703.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC703.obj `if test -f 'rigs/IC703.cxx'; then $(CYGPATH_W) 'rigs/IC703.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC703.cxx'; fi` rigs/flrig-IC706MKIIG.o: rigs/IC706MKIIG.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC706MKIIG.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC706MKIIG.Tpo -c -o rigs/flrig-IC706MKIIG.o `test -f 'rigs/IC706MKIIG.cxx' || echo '$(srcdir)/'`rigs/IC706MKIIG.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC706MKIIG.Tpo rigs/$(DEPDIR)/flrig-IC706MKIIG.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC706MKIIG.cxx' object='rigs/flrig-IC706MKIIG.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC706MKIIG.o `test -f 'rigs/IC706MKIIG.cxx' || echo '$(srcdir)/'`rigs/IC706MKIIG.cxx rigs/flrig-IC706MKIIG.obj: rigs/IC706MKIIG.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC706MKIIG.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC706MKIIG.Tpo -c -o rigs/flrig-IC706MKIIG.obj `if test -f 'rigs/IC706MKIIG.cxx'; then $(CYGPATH_W) 'rigs/IC706MKIIG.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC706MKIIG.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC706MKIIG.Tpo rigs/$(DEPDIR)/flrig-IC706MKIIG.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC706MKIIG.cxx' object='rigs/flrig-IC706MKIIG.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC706MKIIG.obj `if test -f 'rigs/IC706MKIIG.cxx'; then $(CYGPATH_W) 'rigs/IC706MKIIG.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC706MKIIG.cxx'; fi` rigs/flrig-IC718.o: rigs/IC718.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC718.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC718.Tpo -c -o rigs/flrig-IC718.o `test -f 'rigs/IC718.cxx' || echo '$(srcdir)/'`rigs/IC718.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC718.Tpo rigs/$(DEPDIR)/flrig-IC718.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC718.cxx' object='rigs/flrig-IC718.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC718.o `test -f 'rigs/IC718.cxx' || echo '$(srcdir)/'`rigs/IC718.cxx rigs/flrig-IC718.obj: rigs/IC718.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC718.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC718.Tpo -c -o rigs/flrig-IC718.obj `if test -f 'rigs/IC718.cxx'; then $(CYGPATH_W) 'rigs/IC718.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC718.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC718.Tpo rigs/$(DEPDIR)/flrig-IC718.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC718.cxx' object='rigs/flrig-IC718.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC718.obj `if test -f 'rigs/IC718.cxx'; then $(CYGPATH_W) 'rigs/IC718.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC718.cxx'; fi` rigs/flrig-IC728.o: rigs/IC728.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC728.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC728.Tpo -c -o rigs/flrig-IC728.o `test -f 'rigs/IC728.cxx' || echo '$(srcdir)/'`rigs/IC728.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC728.Tpo rigs/$(DEPDIR)/flrig-IC728.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC728.cxx' object='rigs/flrig-IC728.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC728.o `test -f 'rigs/IC728.cxx' || echo '$(srcdir)/'`rigs/IC728.cxx rigs/flrig-IC728.obj: rigs/IC728.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC728.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC728.Tpo -c -o rigs/flrig-IC728.obj `if test -f 'rigs/IC728.cxx'; then $(CYGPATH_W) 'rigs/IC728.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC728.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC728.Tpo rigs/$(DEPDIR)/flrig-IC728.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC728.cxx' object='rigs/flrig-IC728.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC728.obj `if test -f 'rigs/IC728.cxx'; then $(CYGPATH_W) 'rigs/IC728.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC728.cxx'; fi` rigs/flrig-IC735.o: rigs/IC735.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC735.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC735.Tpo -c -o rigs/flrig-IC735.o `test -f 'rigs/IC735.cxx' || echo '$(srcdir)/'`rigs/IC735.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC735.Tpo rigs/$(DEPDIR)/flrig-IC735.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC735.cxx' object='rigs/flrig-IC735.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC735.o `test -f 'rigs/IC735.cxx' || echo '$(srcdir)/'`rigs/IC735.cxx rigs/flrig-IC735.obj: rigs/IC735.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC735.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC735.Tpo -c -o rigs/flrig-IC735.obj `if test -f 'rigs/IC735.cxx'; then $(CYGPATH_W) 'rigs/IC735.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC735.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC735.Tpo rigs/$(DEPDIR)/flrig-IC735.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC735.cxx' object='rigs/flrig-IC735.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC735.obj `if test -f 'rigs/IC735.cxx'; then $(CYGPATH_W) 'rigs/IC735.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC735.cxx'; fi` rigs/flrig-IC746.o: rigs/IC746.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC746.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC746.Tpo -c -o rigs/flrig-IC746.o `test -f 'rigs/IC746.cxx' || echo '$(srcdir)/'`rigs/IC746.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC746.Tpo rigs/$(DEPDIR)/flrig-IC746.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC746.cxx' object='rigs/flrig-IC746.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC746.o `test -f 'rigs/IC746.cxx' || echo '$(srcdir)/'`rigs/IC746.cxx rigs/flrig-IC746.obj: rigs/IC746.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC746.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC746.Tpo -c -o rigs/flrig-IC746.obj `if test -f 'rigs/IC746.cxx'; then $(CYGPATH_W) 'rigs/IC746.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC746.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC746.Tpo rigs/$(DEPDIR)/flrig-IC746.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC746.cxx' object='rigs/flrig-IC746.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC746.obj `if test -f 'rigs/IC746.cxx'; then $(CYGPATH_W) 'rigs/IC746.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC746.cxx'; fi` rigs/flrig-IC756.o: rigs/IC756.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC756.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC756.Tpo -c -o rigs/flrig-IC756.o `test -f 'rigs/IC756.cxx' || echo '$(srcdir)/'`rigs/IC756.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC756.Tpo rigs/$(DEPDIR)/flrig-IC756.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC756.cxx' object='rigs/flrig-IC756.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC756.o `test -f 'rigs/IC756.cxx' || echo '$(srcdir)/'`rigs/IC756.cxx rigs/flrig-IC756.obj: rigs/IC756.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC756.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC756.Tpo -c -o rigs/flrig-IC756.obj `if test -f 'rigs/IC756.cxx'; then $(CYGPATH_W) 'rigs/IC756.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC756.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC756.Tpo rigs/$(DEPDIR)/flrig-IC756.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC756.cxx' object='rigs/flrig-IC756.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC756.obj `if test -f 'rigs/IC756.cxx'; then $(CYGPATH_W) 'rigs/IC756.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC756.cxx'; fi` rigs/flrig-IC756PRO2.o: rigs/IC756PRO2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC756PRO2.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC756PRO2.Tpo -c -o rigs/flrig-IC756PRO2.o `test -f 'rigs/IC756PRO2.cxx' || echo '$(srcdir)/'`rigs/IC756PRO2.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC756PRO2.Tpo rigs/$(DEPDIR)/flrig-IC756PRO2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC756PRO2.cxx' object='rigs/flrig-IC756PRO2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC756PRO2.o `test -f 'rigs/IC756PRO2.cxx' || echo '$(srcdir)/'`rigs/IC756PRO2.cxx rigs/flrig-IC756PRO2.obj: rigs/IC756PRO2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC756PRO2.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC756PRO2.Tpo -c -o rigs/flrig-IC756PRO2.obj `if test -f 'rigs/IC756PRO2.cxx'; then $(CYGPATH_W) 'rigs/IC756PRO2.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC756PRO2.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC756PRO2.Tpo rigs/$(DEPDIR)/flrig-IC756PRO2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC756PRO2.cxx' object='rigs/flrig-IC756PRO2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC756PRO2.obj `if test -f 'rigs/IC756PRO2.cxx'; then $(CYGPATH_W) 'rigs/IC756PRO2.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC756PRO2.cxx'; fi` rigs/flrig-IC756PRO3.o: rigs/IC756PRO3.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC756PRO3.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC756PRO3.Tpo -c -o rigs/flrig-IC756PRO3.o `test -f 'rigs/IC756PRO3.cxx' || echo '$(srcdir)/'`rigs/IC756PRO3.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC756PRO3.Tpo rigs/$(DEPDIR)/flrig-IC756PRO3.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC756PRO3.cxx' object='rigs/flrig-IC756PRO3.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC756PRO3.o `test -f 'rigs/IC756PRO3.cxx' || echo '$(srcdir)/'`rigs/IC756PRO3.cxx rigs/flrig-IC756PRO3.obj: rigs/IC756PRO3.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC756PRO3.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC756PRO3.Tpo -c -o rigs/flrig-IC756PRO3.obj `if test -f 'rigs/IC756PRO3.cxx'; then $(CYGPATH_W) 'rigs/IC756PRO3.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC756PRO3.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC756PRO3.Tpo rigs/$(DEPDIR)/flrig-IC756PRO3.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC756PRO3.cxx' object='rigs/flrig-IC756PRO3.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC756PRO3.obj `if test -f 'rigs/IC756PRO3.cxx'; then $(CYGPATH_W) 'rigs/IC756PRO3.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC756PRO3.cxx'; fi` rigs/flrig-IC910.o: rigs/IC910.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC910.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC910.Tpo -c -o rigs/flrig-IC910.o `test -f 'rigs/IC910.cxx' || echo '$(srcdir)/'`rigs/IC910.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC910.Tpo rigs/$(DEPDIR)/flrig-IC910.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC910.cxx' object='rigs/flrig-IC910.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC910.o `test -f 'rigs/IC910.cxx' || echo '$(srcdir)/'`rigs/IC910.cxx rigs/flrig-IC910.obj: rigs/IC910.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC910.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC910.Tpo -c -o rigs/flrig-IC910.obj `if test -f 'rigs/IC910.cxx'; then $(CYGPATH_W) 'rigs/IC910.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC910.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC910.Tpo rigs/$(DEPDIR)/flrig-IC910.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC910.cxx' object='rigs/flrig-IC910.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC910.obj `if test -f 'rigs/IC910.cxx'; then $(CYGPATH_W) 'rigs/IC910.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC910.cxx'; fi` rigs/flrig-IC7000.o: rigs/IC7000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7000.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7000.Tpo -c -o rigs/flrig-IC7000.o `test -f 'rigs/IC7000.cxx' || echo '$(srcdir)/'`rigs/IC7000.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7000.Tpo rigs/$(DEPDIR)/flrig-IC7000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7000.cxx' object='rigs/flrig-IC7000.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7000.o `test -f 'rigs/IC7000.cxx' || echo '$(srcdir)/'`rigs/IC7000.cxx rigs/flrig-IC7000.obj: rigs/IC7000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7000.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7000.Tpo -c -o rigs/flrig-IC7000.obj `if test -f 'rigs/IC7000.cxx'; then $(CYGPATH_W) 'rigs/IC7000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7000.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7000.Tpo rigs/$(DEPDIR)/flrig-IC7000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7000.cxx' object='rigs/flrig-IC7000.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7000.obj `if test -f 'rigs/IC7000.cxx'; then $(CYGPATH_W) 'rigs/IC7000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7000.cxx'; fi` rigs/flrig-IC7100.o: rigs/IC7100.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7100.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7100.Tpo -c -o rigs/flrig-IC7100.o `test -f 'rigs/IC7100.cxx' || echo '$(srcdir)/'`rigs/IC7100.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7100.Tpo rigs/$(DEPDIR)/flrig-IC7100.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7100.cxx' object='rigs/flrig-IC7100.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7100.o `test -f 'rigs/IC7100.cxx' || echo '$(srcdir)/'`rigs/IC7100.cxx rigs/flrig-IC7100.obj: rigs/IC7100.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7100.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7100.Tpo -c -o rigs/flrig-IC7100.obj `if test -f 'rigs/IC7100.cxx'; then $(CYGPATH_W) 'rigs/IC7100.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7100.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7100.Tpo rigs/$(DEPDIR)/flrig-IC7100.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7100.cxx' object='rigs/flrig-IC7100.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7100.obj `if test -f 'rigs/IC7100.cxx'; then $(CYGPATH_W) 'rigs/IC7100.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7100.cxx'; fi` rigs/flrig-IC7200.o: rigs/IC7200.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7200.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7200.Tpo -c -o rigs/flrig-IC7200.o `test -f 'rigs/IC7200.cxx' || echo '$(srcdir)/'`rigs/IC7200.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7200.Tpo rigs/$(DEPDIR)/flrig-IC7200.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7200.cxx' object='rigs/flrig-IC7200.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7200.o `test -f 'rigs/IC7200.cxx' || echo '$(srcdir)/'`rigs/IC7200.cxx rigs/flrig-IC7200.obj: rigs/IC7200.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7200.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7200.Tpo -c -o rigs/flrig-IC7200.obj `if test -f 'rigs/IC7200.cxx'; then $(CYGPATH_W) 'rigs/IC7200.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7200.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7200.Tpo rigs/$(DEPDIR)/flrig-IC7200.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7200.cxx' object='rigs/flrig-IC7200.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7200.obj `if test -f 'rigs/IC7200.cxx'; then $(CYGPATH_W) 'rigs/IC7200.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7200.cxx'; fi` rigs/flrig-IC7410.o: rigs/IC7410.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7410.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7410.Tpo -c -o rigs/flrig-IC7410.o `test -f 'rigs/IC7410.cxx' || echo '$(srcdir)/'`rigs/IC7410.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7410.Tpo rigs/$(DEPDIR)/flrig-IC7410.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7410.cxx' object='rigs/flrig-IC7410.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7410.o `test -f 'rigs/IC7410.cxx' || echo '$(srcdir)/'`rigs/IC7410.cxx rigs/flrig-IC7410.obj: rigs/IC7410.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7410.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7410.Tpo -c -o rigs/flrig-IC7410.obj `if test -f 'rigs/IC7410.cxx'; then $(CYGPATH_W) 'rigs/IC7410.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7410.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7410.Tpo rigs/$(DEPDIR)/flrig-IC7410.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7410.cxx' object='rigs/flrig-IC7410.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7410.obj `if test -f 'rigs/IC7410.cxx'; then $(CYGPATH_W) 'rigs/IC7410.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7410.cxx'; fi` rigs/flrig-IC7600.o: rigs/IC7600.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7600.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7600.Tpo -c -o rigs/flrig-IC7600.o `test -f 'rigs/IC7600.cxx' || echo '$(srcdir)/'`rigs/IC7600.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7600.Tpo rigs/$(DEPDIR)/flrig-IC7600.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7600.cxx' object='rigs/flrig-IC7600.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7600.o `test -f 'rigs/IC7600.cxx' || echo '$(srcdir)/'`rigs/IC7600.cxx rigs/flrig-IC7600.obj: rigs/IC7600.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7600.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7600.Tpo -c -o rigs/flrig-IC7600.obj `if test -f 'rigs/IC7600.cxx'; then $(CYGPATH_W) 'rigs/IC7600.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7600.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7600.Tpo rigs/$(DEPDIR)/flrig-IC7600.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7600.cxx' object='rigs/flrig-IC7600.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7600.obj `if test -f 'rigs/IC7600.cxx'; then $(CYGPATH_W) 'rigs/IC7600.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7600.cxx'; fi` rigs/flrig-IC7800.o: rigs/IC7800.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7800.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7800.Tpo -c -o rigs/flrig-IC7800.o `test -f 'rigs/IC7800.cxx' || echo '$(srcdir)/'`rigs/IC7800.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7800.Tpo rigs/$(DEPDIR)/flrig-IC7800.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7800.cxx' object='rigs/flrig-IC7800.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7800.o `test -f 'rigs/IC7800.cxx' || echo '$(srcdir)/'`rigs/IC7800.cxx rigs/flrig-IC7800.obj: rigs/IC7800.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7800.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7800.Tpo -c -o rigs/flrig-IC7800.obj `if test -f 'rigs/IC7800.cxx'; then $(CYGPATH_W) 'rigs/IC7800.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7800.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7800.Tpo rigs/$(DEPDIR)/flrig-IC7800.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7800.cxx' object='rigs/flrig-IC7800.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7800.obj `if test -f 'rigs/IC7800.cxx'; then $(CYGPATH_W) 'rigs/IC7800.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7800.cxx'; fi` rigs/flrig-IC9100.o: rigs/IC9100.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC9100.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC9100.Tpo -c -o rigs/flrig-IC9100.o `test -f 'rigs/IC9100.cxx' || echo '$(srcdir)/'`rigs/IC9100.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC9100.Tpo rigs/$(DEPDIR)/flrig-IC9100.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC9100.cxx' object='rigs/flrig-IC9100.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC9100.o `test -f 'rigs/IC9100.cxx' || echo '$(srcdir)/'`rigs/IC9100.cxx rigs/flrig-IC9100.obj: rigs/IC9100.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC9100.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC9100.Tpo -c -o rigs/flrig-IC9100.obj `if test -f 'rigs/IC9100.cxx'; then $(CYGPATH_W) 'rigs/IC9100.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC9100.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC9100.Tpo rigs/$(DEPDIR)/flrig-IC9100.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC9100.cxx' object='rigs/flrig-IC9100.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC9100.obj `if test -f 'rigs/IC9100.cxx'; then $(CYGPATH_W) 'rigs/IC9100.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC9100.cxx'; fi` rigs/flrig-IC7700.o: rigs/IC7700.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7700.o -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7700.Tpo -c -o rigs/flrig-IC7700.o `test -f 'rigs/IC7700.cxx' || echo '$(srcdir)/'`rigs/IC7700.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7700.Tpo rigs/$(DEPDIR)/flrig-IC7700.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7700.cxx' object='rigs/flrig-IC7700.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7700.o `test -f 'rigs/IC7700.cxx' || echo '$(srcdir)/'`rigs/IC7700.cxx rigs/flrig-IC7700.obj: rigs/IC7700.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-IC7700.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-IC7700.Tpo -c -o rigs/flrig-IC7700.obj `if test -f 'rigs/IC7700.cxx'; then $(CYGPATH_W) 'rigs/IC7700.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7700.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-IC7700.Tpo rigs/$(DEPDIR)/flrig-IC7700.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/IC7700.cxx' object='rigs/flrig-IC7700.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-IC7700.obj `if test -f 'rigs/IC7700.cxx'; then $(CYGPATH_W) 'rigs/IC7700.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/IC7700.cxx'; fi` rigs/flrig-K2.o: rigs/K2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-K2.o -MD -MP -MF rigs/$(DEPDIR)/flrig-K2.Tpo -c -o rigs/flrig-K2.o `test -f 'rigs/K2.cxx' || echo '$(srcdir)/'`rigs/K2.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-K2.Tpo rigs/$(DEPDIR)/flrig-K2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/K2.cxx' object='rigs/flrig-K2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-K2.o `test -f 'rigs/K2.cxx' || echo '$(srcdir)/'`rigs/K2.cxx rigs/flrig-K2.obj: rigs/K2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-K2.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-K2.Tpo -c -o rigs/flrig-K2.obj `if test -f 'rigs/K2.cxx'; then $(CYGPATH_W) 'rigs/K2.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/K2.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-K2.Tpo rigs/$(DEPDIR)/flrig-K2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/K2.cxx' object='rigs/flrig-K2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-K2.obj `if test -f 'rigs/K2.cxx'; then $(CYGPATH_W) 'rigs/K2.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/K2.cxx'; fi` rigs/flrig-K3.o: rigs/K3.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-K3.o -MD -MP -MF rigs/$(DEPDIR)/flrig-K3.Tpo -c -o rigs/flrig-K3.o `test -f 'rigs/K3.cxx' || echo '$(srcdir)/'`rigs/K3.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-K3.Tpo rigs/$(DEPDIR)/flrig-K3.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/K3.cxx' object='rigs/flrig-K3.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-K3.o `test -f 'rigs/K3.cxx' || echo '$(srcdir)/'`rigs/K3.cxx rigs/flrig-K3.obj: rigs/K3.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-K3.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-K3.Tpo -c -o rigs/flrig-K3.obj `if test -f 'rigs/K3.cxx'; then $(CYGPATH_W) 'rigs/K3.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/K3.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-K3.Tpo rigs/$(DEPDIR)/flrig-K3.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/K3.cxx' object='rigs/flrig-K3.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-K3.obj `if test -f 'rigs/K3.cxx'; then $(CYGPATH_W) 'rigs/K3.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/K3.cxx'; fi` rigs/flrig-KX3.o: rigs/KX3.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-KX3.o -MD -MP -MF rigs/$(DEPDIR)/flrig-KX3.Tpo -c -o rigs/flrig-KX3.o `test -f 'rigs/KX3.cxx' || echo '$(srcdir)/'`rigs/KX3.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-KX3.Tpo rigs/$(DEPDIR)/flrig-KX3.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/KX3.cxx' object='rigs/flrig-KX3.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-KX3.o `test -f 'rigs/KX3.cxx' || echo '$(srcdir)/'`rigs/KX3.cxx rigs/flrig-KX3.obj: rigs/KX3.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-KX3.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-KX3.Tpo -c -o rigs/flrig-KX3.obj `if test -f 'rigs/KX3.cxx'; then $(CYGPATH_W) 'rigs/KX3.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/KX3.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-KX3.Tpo rigs/$(DEPDIR)/flrig-KX3.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/KX3.cxx' object='rigs/flrig-KX3.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-KX3.obj `if test -f 'rigs/KX3.cxx'; then $(CYGPATH_W) 'rigs/KX3.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/KX3.cxx'; fi` rigs/flrig-PCR1000.o: rigs/PCR1000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-PCR1000.o -MD -MP -MF rigs/$(DEPDIR)/flrig-PCR1000.Tpo -c -o rigs/flrig-PCR1000.o `test -f 'rigs/PCR1000.cxx' || echo '$(srcdir)/'`rigs/PCR1000.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-PCR1000.Tpo rigs/$(DEPDIR)/flrig-PCR1000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/PCR1000.cxx' object='rigs/flrig-PCR1000.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-PCR1000.o `test -f 'rigs/PCR1000.cxx' || echo '$(srcdir)/'`rigs/PCR1000.cxx rigs/flrig-PCR1000.obj: rigs/PCR1000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-PCR1000.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-PCR1000.Tpo -c -o rigs/flrig-PCR1000.obj `if test -f 'rigs/PCR1000.cxx'; then $(CYGPATH_W) 'rigs/PCR1000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/PCR1000.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-PCR1000.Tpo rigs/$(DEPDIR)/flrig-PCR1000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/PCR1000.cxx' object='rigs/flrig-PCR1000.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-PCR1000.obj `if test -f 'rigs/PCR1000.cxx'; then $(CYGPATH_W) 'rigs/PCR1000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/PCR1000.cxx'; fi` rigs/flrig-RAY152.o: rigs/RAY152.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-RAY152.o -MD -MP -MF rigs/$(DEPDIR)/flrig-RAY152.Tpo -c -o rigs/flrig-RAY152.o `test -f 'rigs/RAY152.cxx' || echo '$(srcdir)/'`rigs/RAY152.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-RAY152.Tpo rigs/$(DEPDIR)/flrig-RAY152.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/RAY152.cxx' object='rigs/flrig-RAY152.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-RAY152.o `test -f 'rigs/RAY152.cxx' || echo '$(srcdir)/'`rigs/RAY152.cxx rigs/flrig-RAY152.obj: rigs/RAY152.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-RAY152.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-RAY152.Tpo -c -o rigs/flrig-RAY152.obj `if test -f 'rigs/RAY152.cxx'; then $(CYGPATH_W) 'rigs/RAY152.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/RAY152.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-RAY152.Tpo rigs/$(DEPDIR)/flrig-RAY152.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/RAY152.cxx' object='rigs/flrig-RAY152.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-RAY152.obj `if test -f 'rigs/RAY152.cxx'; then $(CYGPATH_W) 'rigs/RAY152.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/RAY152.cxx'; fi` rigs/flrig-TS140.o: rigs/TS140.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS140.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TS140.Tpo -c -o rigs/flrig-TS140.o `test -f 'rigs/TS140.cxx' || echo '$(srcdir)/'`rigs/TS140.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS140.Tpo rigs/$(DEPDIR)/flrig-TS140.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS140.cxx' object='rigs/flrig-TS140.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS140.o `test -f 'rigs/TS140.cxx' || echo '$(srcdir)/'`rigs/TS140.cxx rigs/flrig-TS140.obj: rigs/TS140.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS140.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TS140.Tpo -c -o rigs/flrig-TS140.obj `if test -f 'rigs/TS140.cxx'; then $(CYGPATH_W) 'rigs/TS140.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS140.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS140.Tpo rigs/$(DEPDIR)/flrig-TS140.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS140.cxx' object='rigs/flrig-TS140.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS140.obj `if test -f 'rigs/TS140.cxx'; then $(CYGPATH_W) 'rigs/TS140.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS140.cxx'; fi` rigs/flrig-TS450S.o: rigs/TS450S.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS450S.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TS450S.Tpo -c -o rigs/flrig-TS450S.o `test -f 'rigs/TS450S.cxx' || echo '$(srcdir)/'`rigs/TS450S.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS450S.Tpo rigs/$(DEPDIR)/flrig-TS450S.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS450S.cxx' object='rigs/flrig-TS450S.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS450S.o `test -f 'rigs/TS450S.cxx' || echo '$(srcdir)/'`rigs/TS450S.cxx rigs/flrig-TS450S.obj: rigs/TS450S.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS450S.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TS450S.Tpo -c -o rigs/flrig-TS450S.obj `if test -f 'rigs/TS450S.cxx'; then $(CYGPATH_W) 'rigs/TS450S.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS450S.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS450S.Tpo rigs/$(DEPDIR)/flrig-TS450S.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS450S.cxx' object='rigs/flrig-TS450S.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS450S.obj `if test -f 'rigs/TS450S.cxx'; then $(CYGPATH_W) 'rigs/TS450S.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS450S.cxx'; fi` rigs/flrig-TS480HX.o: rigs/TS480HX.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS480HX.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TS480HX.Tpo -c -o rigs/flrig-TS480HX.o `test -f 'rigs/TS480HX.cxx' || echo '$(srcdir)/'`rigs/TS480HX.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS480HX.Tpo rigs/$(DEPDIR)/flrig-TS480HX.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS480HX.cxx' object='rigs/flrig-TS480HX.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS480HX.o `test -f 'rigs/TS480HX.cxx' || echo '$(srcdir)/'`rigs/TS480HX.cxx rigs/flrig-TS480HX.obj: rigs/TS480HX.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS480HX.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TS480HX.Tpo -c -o rigs/flrig-TS480HX.obj `if test -f 'rigs/TS480HX.cxx'; then $(CYGPATH_W) 'rigs/TS480HX.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS480HX.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS480HX.Tpo rigs/$(DEPDIR)/flrig-TS480HX.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS480HX.cxx' object='rigs/flrig-TS480HX.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS480HX.obj `if test -f 'rigs/TS480HX.cxx'; then $(CYGPATH_W) 'rigs/TS480HX.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS480HX.cxx'; fi` rigs/flrig-TS480SAT.o: rigs/TS480SAT.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS480SAT.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TS480SAT.Tpo -c -o rigs/flrig-TS480SAT.o `test -f 'rigs/TS480SAT.cxx' || echo '$(srcdir)/'`rigs/TS480SAT.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS480SAT.Tpo rigs/$(DEPDIR)/flrig-TS480SAT.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS480SAT.cxx' object='rigs/flrig-TS480SAT.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS480SAT.o `test -f 'rigs/TS480SAT.cxx' || echo '$(srcdir)/'`rigs/TS480SAT.cxx rigs/flrig-TS480SAT.obj: rigs/TS480SAT.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS480SAT.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TS480SAT.Tpo -c -o rigs/flrig-TS480SAT.obj `if test -f 'rigs/TS480SAT.cxx'; then $(CYGPATH_W) 'rigs/TS480SAT.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS480SAT.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS480SAT.Tpo rigs/$(DEPDIR)/flrig-TS480SAT.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS480SAT.cxx' object='rigs/flrig-TS480SAT.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS480SAT.obj `if test -f 'rigs/TS480SAT.cxx'; then $(CYGPATH_W) 'rigs/TS480SAT.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS480SAT.cxx'; fi` rigs/flrig-TS570.o: rigs/TS570.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS570.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TS570.Tpo -c -o rigs/flrig-TS570.o `test -f 'rigs/TS570.cxx' || echo '$(srcdir)/'`rigs/TS570.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS570.Tpo rigs/$(DEPDIR)/flrig-TS570.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS570.cxx' object='rigs/flrig-TS570.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS570.o `test -f 'rigs/TS570.cxx' || echo '$(srcdir)/'`rigs/TS570.cxx rigs/flrig-TS570.obj: rigs/TS570.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS570.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TS570.Tpo -c -o rigs/flrig-TS570.obj `if test -f 'rigs/TS570.cxx'; then $(CYGPATH_W) 'rigs/TS570.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS570.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS570.Tpo rigs/$(DEPDIR)/flrig-TS570.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS570.cxx' object='rigs/flrig-TS570.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS570.obj `if test -f 'rigs/TS570.cxx'; then $(CYGPATH_W) 'rigs/TS570.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS570.cxx'; fi` rigs/flrig-TS590S.o: rigs/TS590S.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS590S.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TS590S.Tpo -c -o rigs/flrig-TS590S.o `test -f 'rigs/TS590S.cxx' || echo '$(srcdir)/'`rigs/TS590S.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS590S.Tpo rigs/$(DEPDIR)/flrig-TS590S.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS590S.cxx' object='rigs/flrig-TS590S.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS590S.o `test -f 'rigs/TS590S.cxx' || echo '$(srcdir)/'`rigs/TS590S.cxx rigs/flrig-TS590S.obj: rigs/TS590S.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS590S.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TS590S.Tpo -c -o rigs/flrig-TS590S.obj `if test -f 'rigs/TS590S.cxx'; then $(CYGPATH_W) 'rigs/TS590S.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS590S.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS590S.Tpo rigs/$(DEPDIR)/flrig-TS590S.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS590S.cxx' object='rigs/flrig-TS590S.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS590S.obj `if test -f 'rigs/TS590S.cxx'; then $(CYGPATH_W) 'rigs/TS590S.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS590S.cxx'; fi` rigs/flrig-TS590SG.o: rigs/TS590SG.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS590SG.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TS590SG.Tpo -c -o rigs/flrig-TS590SG.o `test -f 'rigs/TS590SG.cxx' || echo '$(srcdir)/'`rigs/TS590SG.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS590SG.Tpo rigs/$(DEPDIR)/flrig-TS590SG.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS590SG.cxx' object='rigs/flrig-TS590SG.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS590SG.o `test -f 'rigs/TS590SG.cxx' || echo '$(srcdir)/'`rigs/TS590SG.cxx rigs/flrig-TS590SG.obj: rigs/TS590SG.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS590SG.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TS590SG.Tpo -c -o rigs/flrig-TS590SG.obj `if test -f 'rigs/TS590SG.cxx'; then $(CYGPATH_W) 'rigs/TS590SG.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS590SG.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS590SG.Tpo rigs/$(DEPDIR)/flrig-TS590SG.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS590SG.cxx' object='rigs/flrig-TS590SG.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS590SG.obj `if test -f 'rigs/TS590SG.cxx'; then $(CYGPATH_W) 'rigs/TS590SG.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS590SG.cxx'; fi` rigs/flrig-TS990.o: rigs/TS990.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS990.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TS990.Tpo -c -o rigs/flrig-TS990.o `test -f 'rigs/TS990.cxx' || echo '$(srcdir)/'`rigs/TS990.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS990.Tpo rigs/$(DEPDIR)/flrig-TS990.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS990.cxx' object='rigs/flrig-TS990.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS990.o `test -f 'rigs/TS990.cxx' || echo '$(srcdir)/'`rigs/TS990.cxx rigs/flrig-TS990.obj: rigs/TS990.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS990.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TS990.Tpo -c -o rigs/flrig-TS990.obj `if test -f 'rigs/TS990.cxx'; then $(CYGPATH_W) 'rigs/TS990.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS990.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS990.Tpo rigs/$(DEPDIR)/flrig-TS990.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS990.cxx' object='rigs/flrig-TS990.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS990.obj `if test -f 'rigs/TS990.cxx'; then $(CYGPATH_W) 'rigs/TS990.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS990.cxx'; fi` rigs/flrig-TS870S.o: rigs/TS870S.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS870S.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TS870S.Tpo -c -o rigs/flrig-TS870S.o `test -f 'rigs/TS870S.cxx' || echo '$(srcdir)/'`rigs/TS870S.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS870S.Tpo rigs/$(DEPDIR)/flrig-TS870S.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS870S.cxx' object='rigs/flrig-TS870S.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS870S.o `test -f 'rigs/TS870S.cxx' || echo '$(srcdir)/'`rigs/TS870S.cxx rigs/flrig-TS870S.obj: rigs/TS870S.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS870S.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TS870S.Tpo -c -o rigs/flrig-TS870S.obj `if test -f 'rigs/TS870S.cxx'; then $(CYGPATH_W) 'rigs/TS870S.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS870S.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS870S.Tpo rigs/$(DEPDIR)/flrig-TS870S.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS870S.cxx' object='rigs/flrig-TS870S.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS870S.obj `if test -f 'rigs/TS870S.cxx'; then $(CYGPATH_W) 'rigs/TS870S.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS870S.cxx'; fi` rigs/flrig-TS2000.o: rigs/TS2000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS2000.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TS2000.Tpo -c -o rigs/flrig-TS2000.o `test -f 'rigs/TS2000.cxx' || echo '$(srcdir)/'`rigs/TS2000.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS2000.Tpo rigs/$(DEPDIR)/flrig-TS2000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS2000.cxx' object='rigs/flrig-TS2000.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS2000.o `test -f 'rigs/TS2000.cxx' || echo '$(srcdir)/'`rigs/TS2000.cxx rigs/flrig-TS2000.obj: rigs/TS2000.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TS2000.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TS2000.Tpo -c -o rigs/flrig-TS2000.obj `if test -f 'rigs/TS2000.cxx'; then $(CYGPATH_W) 'rigs/TS2000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS2000.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TS2000.Tpo rigs/$(DEPDIR)/flrig-TS2000.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TS2000.cxx' object='rigs/flrig-TS2000.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TS2000.obj `if test -f 'rigs/TS2000.cxx'; then $(CYGPATH_W) 'rigs/TS2000.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TS2000.cxx'; fi` rigs/flrig-TT516.o: rigs/TT516.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT516.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TT516.Tpo -c -o rigs/flrig-TT516.o `test -f 'rigs/TT516.cxx' || echo '$(srcdir)/'`rigs/TT516.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT516.Tpo rigs/$(DEPDIR)/flrig-TT516.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT516.cxx' object='rigs/flrig-TT516.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT516.o `test -f 'rigs/TT516.cxx' || echo '$(srcdir)/'`rigs/TT516.cxx rigs/flrig-TT516.obj: rigs/TT516.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT516.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TT516.Tpo -c -o rigs/flrig-TT516.obj `if test -f 'rigs/TT516.cxx'; then $(CYGPATH_W) 'rigs/TT516.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT516.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT516.Tpo rigs/$(DEPDIR)/flrig-TT516.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT516.cxx' object='rigs/flrig-TT516.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT516.obj `if test -f 'rigs/TT516.cxx'; then $(CYGPATH_W) 'rigs/TT516.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT516.cxx'; fi` rigs/flrig-DELTA-II.o: rigs/DELTA-II.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-DELTA-II.o -MD -MP -MF rigs/$(DEPDIR)/flrig-DELTA-II.Tpo -c -o rigs/flrig-DELTA-II.o `test -f 'rigs/DELTA-II.cxx' || echo '$(srcdir)/'`rigs/DELTA-II.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-DELTA-II.Tpo rigs/$(DEPDIR)/flrig-DELTA-II.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/DELTA-II.cxx' object='rigs/flrig-DELTA-II.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-DELTA-II.o `test -f 'rigs/DELTA-II.cxx' || echo '$(srcdir)/'`rigs/DELTA-II.cxx rigs/flrig-DELTA-II.obj: rigs/DELTA-II.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-DELTA-II.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-DELTA-II.Tpo -c -o rigs/flrig-DELTA-II.obj `if test -f 'rigs/DELTA-II.cxx'; then $(CYGPATH_W) 'rigs/DELTA-II.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/DELTA-II.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-DELTA-II.Tpo rigs/$(DEPDIR)/flrig-DELTA-II.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/DELTA-II.cxx' object='rigs/flrig-DELTA-II.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-DELTA-II.obj `if test -f 'rigs/DELTA-II.cxx'; then $(CYGPATH_W) 'rigs/DELTA-II.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/DELTA-II.cxx'; fi` rigs/flrig-TT538.o: rigs/TT538.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT538.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TT538.Tpo -c -o rigs/flrig-TT538.o `test -f 'rigs/TT538.cxx' || echo '$(srcdir)/'`rigs/TT538.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT538.Tpo rigs/$(DEPDIR)/flrig-TT538.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT538.cxx' object='rigs/flrig-TT538.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT538.o `test -f 'rigs/TT538.cxx' || echo '$(srcdir)/'`rigs/TT538.cxx rigs/flrig-TT538.obj: rigs/TT538.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT538.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TT538.Tpo -c -o rigs/flrig-TT538.obj `if test -f 'rigs/TT538.cxx'; then $(CYGPATH_W) 'rigs/TT538.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT538.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT538.Tpo rigs/$(DEPDIR)/flrig-TT538.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT538.cxx' object='rigs/flrig-TT538.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT538.obj `if test -f 'rigs/TT538.cxx'; then $(CYGPATH_W) 'rigs/TT538.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT538.cxx'; fi` rigs/flrig-TT550.o: rigs/TT550.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT550.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TT550.Tpo -c -o rigs/flrig-TT550.o `test -f 'rigs/TT550.cxx' || echo '$(srcdir)/'`rigs/TT550.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT550.Tpo rigs/$(DEPDIR)/flrig-TT550.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT550.cxx' object='rigs/flrig-TT550.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT550.o `test -f 'rigs/TT550.cxx' || echo '$(srcdir)/'`rigs/TT550.cxx rigs/flrig-TT550.obj: rigs/TT550.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT550.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TT550.Tpo -c -o rigs/flrig-TT550.obj `if test -f 'rigs/TT550.cxx'; then $(CYGPATH_W) 'rigs/TT550.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT550.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT550.Tpo rigs/$(DEPDIR)/flrig-TT550.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT550.cxx' object='rigs/flrig-TT550.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT550.obj `if test -f 'rigs/TT550.cxx'; then $(CYGPATH_W) 'rigs/TT550.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT550.cxx'; fi` rigs/flrig-TT563.o: rigs/TT563.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT563.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TT563.Tpo -c -o rigs/flrig-TT563.o `test -f 'rigs/TT563.cxx' || echo '$(srcdir)/'`rigs/TT563.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT563.Tpo rigs/$(DEPDIR)/flrig-TT563.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT563.cxx' object='rigs/flrig-TT563.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT563.o `test -f 'rigs/TT563.cxx' || echo '$(srcdir)/'`rigs/TT563.cxx rigs/flrig-TT563.obj: rigs/TT563.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT563.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TT563.Tpo -c -o rigs/flrig-TT563.obj `if test -f 'rigs/TT563.cxx'; then $(CYGPATH_W) 'rigs/TT563.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT563.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT563.Tpo rigs/$(DEPDIR)/flrig-TT563.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT563.cxx' object='rigs/flrig-TT563.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT563.obj `if test -f 'rigs/TT563.cxx'; then $(CYGPATH_W) 'rigs/TT563.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT563.cxx'; fi` rigs/flrig-TT566.o: rigs/TT566.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT566.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TT566.Tpo -c -o rigs/flrig-TT566.o `test -f 'rigs/TT566.cxx' || echo '$(srcdir)/'`rigs/TT566.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT566.Tpo rigs/$(DEPDIR)/flrig-TT566.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT566.cxx' object='rigs/flrig-TT566.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT566.o `test -f 'rigs/TT566.cxx' || echo '$(srcdir)/'`rigs/TT566.cxx rigs/flrig-TT566.obj: rigs/TT566.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT566.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TT566.Tpo -c -o rigs/flrig-TT566.obj `if test -f 'rigs/TT566.cxx'; then $(CYGPATH_W) 'rigs/TT566.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT566.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT566.Tpo rigs/$(DEPDIR)/flrig-TT566.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT566.cxx' object='rigs/flrig-TT566.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT566.obj `if test -f 'rigs/TT566.cxx'; then $(CYGPATH_W) 'rigs/TT566.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT566.cxx'; fi` rigs/flrig-TT588.o: rigs/TT588.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT588.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TT588.Tpo -c -o rigs/flrig-TT588.o `test -f 'rigs/TT588.cxx' || echo '$(srcdir)/'`rigs/TT588.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT588.Tpo rigs/$(DEPDIR)/flrig-TT588.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT588.cxx' object='rigs/flrig-TT588.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT588.o `test -f 'rigs/TT588.cxx' || echo '$(srcdir)/'`rigs/TT588.cxx rigs/flrig-TT588.obj: rigs/TT588.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT588.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TT588.Tpo -c -o rigs/flrig-TT588.obj `if test -f 'rigs/TT588.cxx'; then $(CYGPATH_W) 'rigs/TT588.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT588.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT588.Tpo rigs/$(DEPDIR)/flrig-TT588.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT588.cxx' object='rigs/flrig-TT588.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT588.obj `if test -f 'rigs/TT588.cxx'; then $(CYGPATH_W) 'rigs/TT588.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT588.cxx'; fi` rigs/flrig-TT599.o: rigs/TT599.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT599.o -MD -MP -MF rigs/$(DEPDIR)/flrig-TT599.Tpo -c -o rigs/flrig-TT599.o `test -f 'rigs/TT599.cxx' || echo '$(srcdir)/'`rigs/TT599.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT599.Tpo rigs/$(DEPDIR)/flrig-TT599.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT599.cxx' object='rigs/flrig-TT599.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT599.o `test -f 'rigs/TT599.cxx' || echo '$(srcdir)/'`rigs/TT599.cxx rigs/flrig-TT599.obj: rigs/TT599.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT rigs/flrig-TT599.obj -MD -MP -MF rigs/$(DEPDIR)/flrig-TT599.Tpo -c -o rigs/flrig-TT599.obj `if test -f 'rigs/TT599.cxx'; then $(CYGPATH_W) 'rigs/TT599.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT599.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) rigs/$(DEPDIR)/flrig-TT599.Tpo rigs/$(DEPDIR)/flrig-TT599.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='rigs/TT599.cxx' object='rigs/flrig-TT599.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o rigs/flrig-TT599.obj `if test -f 'rigs/TT599.cxx'; then $(CYGPATH_W) 'rigs/TT599.cxx'; else $(CYGPATH_W) '$(srcdir)/rigs/TT599.cxx'; fi` support/flrig-debug.o: support/debug.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-debug.o -MD -MP -MF support/$(DEPDIR)/flrig-debug.Tpo -c -o support/flrig-debug.o `test -f 'support/debug.cxx' || echo '$(srcdir)/'`support/debug.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-debug.Tpo support/$(DEPDIR)/flrig-debug.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/debug.cxx' object='support/flrig-debug.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-debug.o `test -f 'support/debug.cxx' || echo '$(srcdir)/'`support/debug.cxx support/flrig-debug.obj: support/debug.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-debug.obj -MD -MP -MF support/$(DEPDIR)/flrig-debug.Tpo -c -o support/flrig-debug.obj `if test -f 'support/debug.cxx'; then $(CYGPATH_W) 'support/debug.cxx'; else $(CYGPATH_W) '$(srcdir)/support/debug.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-debug.Tpo support/$(DEPDIR)/flrig-debug.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/debug.cxx' object='support/flrig-debug.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-debug.obj `if test -f 'support/debug.cxx'; then $(CYGPATH_W) 'support/debug.cxx'; else $(CYGPATH_W) '$(srcdir)/support/debug.cxx'; fi` support/flrig-dialogs.o: support/dialogs.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-dialogs.o -MD -MP -MF support/$(DEPDIR)/flrig-dialogs.Tpo -c -o support/flrig-dialogs.o `test -f 'support/dialogs.cxx' || echo '$(srcdir)/'`support/dialogs.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-dialogs.Tpo support/$(DEPDIR)/flrig-dialogs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/dialogs.cxx' object='support/flrig-dialogs.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-dialogs.o `test -f 'support/dialogs.cxx' || echo '$(srcdir)/'`support/dialogs.cxx support/flrig-dialogs.obj: support/dialogs.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-dialogs.obj -MD -MP -MF support/$(DEPDIR)/flrig-dialogs.Tpo -c -o support/flrig-dialogs.obj `if test -f 'support/dialogs.cxx'; then $(CYGPATH_W) 'support/dialogs.cxx'; else $(CYGPATH_W) '$(srcdir)/support/dialogs.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-dialogs.Tpo support/$(DEPDIR)/flrig-dialogs.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/dialogs.cxx' object='support/flrig-dialogs.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-dialogs.obj `if test -f 'support/dialogs.cxx'; then $(CYGPATH_W) 'support/dialogs.cxx'; else $(CYGPATH_W) '$(srcdir)/support/dialogs.cxx'; fi` support/flrig-ptt.o: support/ptt.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-ptt.o -MD -MP -MF support/$(DEPDIR)/flrig-ptt.Tpo -c -o support/flrig-ptt.o `test -f 'support/ptt.cxx' || echo '$(srcdir)/'`support/ptt.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-ptt.Tpo support/$(DEPDIR)/flrig-ptt.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/ptt.cxx' object='support/flrig-ptt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-ptt.o `test -f 'support/ptt.cxx' || echo '$(srcdir)/'`support/ptt.cxx support/flrig-ptt.obj: support/ptt.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-ptt.obj -MD -MP -MF support/$(DEPDIR)/flrig-ptt.Tpo -c -o support/flrig-ptt.obj `if test -f 'support/ptt.cxx'; then $(CYGPATH_W) 'support/ptt.cxx'; else $(CYGPATH_W) '$(srcdir)/support/ptt.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-ptt.Tpo support/$(DEPDIR)/flrig-ptt.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/ptt.cxx' object='support/flrig-ptt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-ptt.obj `if test -f 'support/ptt.cxx'; then $(CYGPATH_W) 'support/ptt.cxx'; else $(CYGPATH_W) '$(srcdir)/support/ptt.cxx'; fi` support/flrig-rig_io.o: support/rig_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-rig_io.o -MD -MP -MF support/$(DEPDIR)/flrig-rig_io.Tpo -c -o support/flrig-rig_io.o `test -f 'support/rig_io.cxx' || echo '$(srcdir)/'`support/rig_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-rig_io.Tpo support/$(DEPDIR)/flrig-rig_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/rig_io.cxx' object='support/flrig-rig_io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-rig_io.o `test -f 'support/rig_io.cxx' || echo '$(srcdir)/'`support/rig_io.cxx support/flrig-rig_io.obj: support/rig_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-rig_io.obj -MD -MP -MF support/$(DEPDIR)/flrig-rig_io.Tpo -c -o support/flrig-rig_io.obj `if test -f 'support/rig_io.cxx'; then $(CYGPATH_W) 'support/rig_io.cxx'; else $(CYGPATH_W) '$(srcdir)/support/rig_io.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-rig_io.Tpo support/$(DEPDIR)/flrig-rig_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/rig_io.cxx' object='support/flrig-rig_io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-rig_io.obj `if test -f 'support/rig_io.cxx'; then $(CYGPATH_W) 'support/rig_io.cxx'; else $(CYGPATH_W) '$(srcdir)/support/rig_io.cxx'; fi` support/flrig-serial.o: support/serial.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-serial.o -MD -MP -MF support/$(DEPDIR)/flrig-serial.Tpo -c -o support/flrig-serial.o `test -f 'support/serial.cxx' || echo '$(srcdir)/'`support/serial.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-serial.Tpo support/$(DEPDIR)/flrig-serial.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/serial.cxx' object='support/flrig-serial.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-serial.o `test -f 'support/serial.cxx' || echo '$(srcdir)/'`support/serial.cxx support/flrig-serial.obj: support/serial.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-serial.obj -MD -MP -MF support/$(DEPDIR)/flrig-serial.Tpo -c -o support/flrig-serial.obj `if test -f 'support/serial.cxx'; then $(CYGPATH_W) 'support/serial.cxx'; else $(CYGPATH_W) '$(srcdir)/support/serial.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-serial.Tpo support/$(DEPDIR)/flrig-serial.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/serial.cxx' object='support/flrig-serial.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-serial.obj `if test -f 'support/serial.cxx'; then $(CYGPATH_W) 'support/serial.cxx'; else $(CYGPATH_W) '$(srcdir)/support/serial.cxx'; fi` support/flrig-socket.o: support/socket.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-socket.o -MD -MP -MF support/$(DEPDIR)/flrig-socket.Tpo -c -o support/flrig-socket.o `test -f 'support/socket.cxx' || echo '$(srcdir)/'`support/socket.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-socket.Tpo support/$(DEPDIR)/flrig-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/socket.cxx' object='support/flrig-socket.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-socket.o `test -f 'support/socket.cxx' || echo '$(srcdir)/'`support/socket.cxx support/flrig-socket.obj: support/socket.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-socket.obj -MD -MP -MF support/$(DEPDIR)/flrig-socket.Tpo -c -o support/flrig-socket.obj `if test -f 'support/socket.cxx'; then $(CYGPATH_W) 'support/socket.cxx'; else $(CYGPATH_W) '$(srcdir)/support/socket.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-socket.Tpo support/$(DEPDIR)/flrig-socket.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/socket.cxx' object='support/flrig-socket.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-socket.obj `if test -f 'support/socket.cxx'; then $(CYGPATH_W) 'support/socket.cxx'; else $(CYGPATH_W) '$(srcdir)/support/socket.cxx'; fi` support/flrig-socket_io.o: support/socket_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-socket_io.o -MD -MP -MF support/$(DEPDIR)/flrig-socket_io.Tpo -c -o support/flrig-socket_io.o `test -f 'support/socket_io.cxx' || echo '$(srcdir)/'`support/socket_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-socket_io.Tpo support/$(DEPDIR)/flrig-socket_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/socket_io.cxx' object='support/flrig-socket_io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-socket_io.o `test -f 'support/socket_io.cxx' || echo '$(srcdir)/'`support/socket_io.cxx support/flrig-socket_io.obj: support/socket_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-socket_io.obj -MD -MP -MF support/$(DEPDIR)/flrig-socket_io.Tpo -c -o support/flrig-socket_io.obj `if test -f 'support/socket_io.cxx'; then $(CYGPATH_W) 'support/socket_io.cxx'; else $(CYGPATH_W) '$(srcdir)/support/socket_io.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-socket_io.Tpo support/$(DEPDIR)/flrig-socket_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/socket_io.cxx' object='support/flrig-socket_io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-socket_io.obj `if test -f 'support/socket_io.cxx'; then $(CYGPATH_W) 'support/socket_io.cxx'; else $(CYGPATH_W) '$(srcdir)/support/socket_io.cxx'; fi` support/flrig-status.o: support/status.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-status.o -MD -MP -MF support/$(DEPDIR)/flrig-status.Tpo -c -o support/flrig-status.o `test -f 'support/status.cxx' || echo '$(srcdir)/'`support/status.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-status.Tpo support/$(DEPDIR)/flrig-status.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/status.cxx' object='support/flrig-status.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-status.o `test -f 'support/status.cxx' || echo '$(srcdir)/'`support/status.cxx support/flrig-status.obj: support/status.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-status.obj -MD -MP -MF support/$(DEPDIR)/flrig-status.Tpo -c -o support/flrig-status.obj `if test -f 'support/status.cxx'; then $(CYGPATH_W) 'support/status.cxx'; else $(CYGPATH_W) '$(srcdir)/support/status.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-status.Tpo support/$(DEPDIR)/flrig-status.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/status.cxx' object='support/flrig-status.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-status.obj `if test -f 'support/status.cxx'; then $(CYGPATH_W) 'support/status.cxx'; else $(CYGPATH_W) '$(srcdir)/support/status.cxx'; fi` support/flrig-support.o: support/support.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-support.o -MD -MP -MF support/$(DEPDIR)/flrig-support.Tpo -c -o support/flrig-support.o `test -f 'support/support.cxx' || echo '$(srcdir)/'`support/support.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-support.Tpo support/$(DEPDIR)/flrig-support.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/support.cxx' object='support/flrig-support.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-support.o `test -f 'support/support.cxx' || echo '$(srcdir)/'`support/support.cxx support/flrig-support.obj: support/support.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-support.obj -MD -MP -MF support/$(DEPDIR)/flrig-support.Tpo -c -o support/flrig-support.obj `if test -f 'support/support.cxx'; then $(CYGPATH_W) 'support/support.cxx'; else $(CYGPATH_W) '$(srcdir)/support/support.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-support.Tpo support/$(DEPDIR)/flrig-support.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/support.cxx' object='support/flrig-support.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-support.obj `if test -f 'support/support.cxx'; then $(CYGPATH_W) 'support/support.cxx'; else $(CYGPATH_W) '$(srcdir)/support/support.cxx'; fi` support/flrig-threads.o: support/threads.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-threads.o -MD -MP -MF support/$(DEPDIR)/flrig-threads.Tpo -c -o support/flrig-threads.o `test -f 'support/threads.cxx' || echo '$(srcdir)/'`support/threads.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-threads.Tpo support/$(DEPDIR)/flrig-threads.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/threads.cxx' object='support/flrig-threads.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-threads.o `test -f 'support/threads.cxx' || echo '$(srcdir)/'`support/threads.cxx support/flrig-threads.obj: support/threads.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-threads.obj -MD -MP -MF support/$(DEPDIR)/flrig-threads.Tpo -c -o support/flrig-threads.obj `if test -f 'support/threads.cxx'; then $(CYGPATH_W) 'support/threads.cxx'; else $(CYGPATH_W) '$(srcdir)/support/threads.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-threads.Tpo support/$(DEPDIR)/flrig-threads.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/threads.cxx' object='support/flrig-threads.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-threads.obj `if test -f 'support/threads.cxx'; then $(CYGPATH_W) 'support/threads.cxx'; else $(CYGPATH_W) '$(srcdir)/support/threads.cxx'; fi` support/flrig-util.o: support/util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-util.o -MD -MP -MF support/$(DEPDIR)/flrig-util.Tpo -c -o support/flrig-util.o `test -f 'support/util.cxx' || echo '$(srcdir)/'`support/util.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-util.Tpo support/$(DEPDIR)/flrig-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/util.cxx' object='support/flrig-util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-util.o `test -f 'support/util.cxx' || echo '$(srcdir)/'`support/util.cxx support/flrig-util.obj: support/util.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-util.obj -MD -MP -MF support/$(DEPDIR)/flrig-util.Tpo -c -o support/flrig-util.obj `if test -f 'support/util.cxx'; then $(CYGPATH_W) 'support/util.cxx'; else $(CYGPATH_W) '$(srcdir)/support/util.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-util.Tpo support/$(DEPDIR)/flrig-util.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/util.cxx' object='support/flrig-util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-util.obj `if test -f 'support/util.cxx'; then $(CYGPATH_W) 'support/util.cxx'; else $(CYGPATH_W) '$(srcdir)/support/util.cxx'; fi` support/flrig-xml_io.o: support/xml_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-xml_io.o -MD -MP -MF support/$(DEPDIR)/flrig-xml_io.Tpo -c -o support/flrig-xml_io.o `test -f 'support/xml_io.cxx' || echo '$(srcdir)/'`support/xml_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-xml_io.Tpo support/$(DEPDIR)/flrig-xml_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/xml_io.cxx' object='support/flrig-xml_io.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-xml_io.o `test -f 'support/xml_io.cxx' || echo '$(srcdir)/'`support/xml_io.cxx support/flrig-xml_io.obj: support/xml_io.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT support/flrig-xml_io.obj -MD -MP -MF support/$(DEPDIR)/flrig-xml_io.Tpo -c -o support/flrig-xml_io.obj `if test -f 'support/xml_io.cxx'; then $(CYGPATH_W) 'support/xml_io.cxx'; else $(CYGPATH_W) '$(srcdir)/support/xml_io.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) support/$(DEPDIR)/flrig-xml_io.Tpo support/$(DEPDIR)/flrig-xml_io.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='support/xml_io.cxx' object='support/flrig-xml_io.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o support/flrig-xml_io.obj `if test -f 'support/xml_io.cxx'; then $(CYGPATH_W) 'support/xml_io.cxx'; else $(CYGPATH_W) '$(srcdir)/support/xml_io.cxx'; fi` UI/flrig-K3_ui.o: UI/K3_ui.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT UI/flrig-K3_ui.o -MD -MP -MF UI/$(DEPDIR)/flrig-K3_ui.Tpo -c -o UI/flrig-K3_ui.o `test -f 'UI/K3_ui.cxx' || echo '$(srcdir)/'`UI/K3_ui.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) UI/$(DEPDIR)/flrig-K3_ui.Tpo UI/$(DEPDIR)/flrig-K3_ui.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='UI/K3_ui.cxx' object='UI/flrig-K3_ui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o UI/flrig-K3_ui.o `test -f 'UI/K3_ui.cxx' || echo '$(srcdir)/'`UI/K3_ui.cxx UI/flrig-K3_ui.obj: UI/K3_ui.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT UI/flrig-K3_ui.obj -MD -MP -MF UI/$(DEPDIR)/flrig-K3_ui.Tpo -c -o UI/flrig-K3_ui.obj `if test -f 'UI/K3_ui.cxx'; then $(CYGPATH_W) 'UI/K3_ui.cxx'; else $(CYGPATH_W) '$(srcdir)/UI/K3_ui.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) UI/$(DEPDIR)/flrig-K3_ui.Tpo UI/$(DEPDIR)/flrig-K3_ui.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='UI/K3_ui.cxx' object='UI/flrig-K3_ui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o UI/flrig-K3_ui.obj `if test -f 'UI/K3_ui.cxx'; then $(CYGPATH_W) 'UI/K3_ui.cxx'; else $(CYGPATH_W) '$(srcdir)/UI/K3_ui.cxx'; fi` UI/flrig-KX3_ui.o: UI/KX3_ui.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT UI/flrig-KX3_ui.o -MD -MP -MF UI/$(DEPDIR)/flrig-KX3_ui.Tpo -c -o UI/flrig-KX3_ui.o `test -f 'UI/KX3_ui.cxx' || echo '$(srcdir)/'`UI/KX3_ui.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) UI/$(DEPDIR)/flrig-KX3_ui.Tpo UI/$(DEPDIR)/flrig-KX3_ui.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='UI/KX3_ui.cxx' object='UI/flrig-KX3_ui.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o UI/flrig-KX3_ui.o `test -f 'UI/KX3_ui.cxx' || echo '$(srcdir)/'`UI/KX3_ui.cxx UI/flrig-KX3_ui.obj: UI/KX3_ui.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT UI/flrig-KX3_ui.obj -MD -MP -MF UI/$(DEPDIR)/flrig-KX3_ui.Tpo -c -o UI/flrig-KX3_ui.obj `if test -f 'UI/KX3_ui.cxx'; then $(CYGPATH_W) 'UI/KX3_ui.cxx'; else $(CYGPATH_W) '$(srcdir)/UI/KX3_ui.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) UI/$(DEPDIR)/flrig-KX3_ui.Tpo UI/$(DEPDIR)/flrig-KX3_ui.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='UI/KX3_ui.cxx' object='UI/flrig-KX3_ui.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o UI/flrig-KX3_ui.obj `if test -f 'UI/KX3_ui.cxx'; then $(CYGPATH_W) 'UI/KX3_ui.cxx'; else $(CYGPATH_W) '$(srcdir)/UI/KX3_ui.cxx'; fi` UI/flrig-rigpanel.o: UI/rigpanel.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT UI/flrig-rigpanel.o -MD -MP -MF UI/$(DEPDIR)/flrig-rigpanel.Tpo -c -o UI/flrig-rigpanel.o `test -f 'UI/rigpanel.cxx' || echo '$(srcdir)/'`UI/rigpanel.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) UI/$(DEPDIR)/flrig-rigpanel.Tpo UI/$(DEPDIR)/flrig-rigpanel.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='UI/rigpanel.cxx' object='UI/flrig-rigpanel.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o UI/flrig-rigpanel.o `test -f 'UI/rigpanel.cxx' || echo '$(srcdir)/'`UI/rigpanel.cxx UI/flrig-rigpanel.obj: UI/rigpanel.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT UI/flrig-rigpanel.obj -MD -MP -MF UI/$(DEPDIR)/flrig-rigpanel.Tpo -c -o UI/flrig-rigpanel.obj `if test -f 'UI/rigpanel.cxx'; then $(CYGPATH_W) 'UI/rigpanel.cxx'; else $(CYGPATH_W) '$(srcdir)/UI/rigpanel.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) UI/$(DEPDIR)/flrig-rigpanel.Tpo UI/$(DEPDIR)/flrig-rigpanel.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='UI/rigpanel.cxx' object='UI/flrig-rigpanel.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o UI/flrig-rigpanel.obj `if test -f 'UI/rigpanel.cxx'; then $(CYGPATH_W) 'UI/rigpanel.cxx'; else $(CYGPATH_W) '$(srcdir)/UI/rigpanel.cxx'; fi` widgets/flrig-combo.o: widgets/combo.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-combo.o -MD -MP -MF widgets/$(DEPDIR)/flrig-combo.Tpo -c -o widgets/flrig-combo.o `test -f 'widgets/combo.cxx' || echo '$(srcdir)/'`widgets/combo.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-combo.Tpo widgets/$(DEPDIR)/flrig-combo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/combo.cxx' object='widgets/flrig-combo.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-combo.o `test -f 'widgets/combo.cxx' || echo '$(srcdir)/'`widgets/combo.cxx widgets/flrig-combo.obj: widgets/combo.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-combo.obj -MD -MP -MF widgets/$(DEPDIR)/flrig-combo.Tpo -c -o widgets/flrig-combo.obj `if test -f 'widgets/combo.cxx'; then $(CYGPATH_W) 'widgets/combo.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/combo.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-combo.Tpo widgets/$(DEPDIR)/flrig-combo.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/combo.cxx' object='widgets/flrig-combo.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-combo.obj `if test -f 'widgets/combo.cxx'; then $(CYGPATH_W) 'widgets/combo.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/combo.cxx'; fi` widgets/flrig-Fl_SigBar.o: widgets/Fl_SigBar.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-Fl_SigBar.o -MD -MP -MF widgets/$(DEPDIR)/flrig-Fl_SigBar.Tpo -c -o widgets/flrig-Fl_SigBar.o `test -f 'widgets/Fl_SigBar.cxx' || echo '$(srcdir)/'`widgets/Fl_SigBar.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-Fl_SigBar.Tpo widgets/$(DEPDIR)/flrig-Fl_SigBar.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Fl_SigBar.cxx' object='widgets/flrig-Fl_SigBar.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-Fl_SigBar.o `test -f 'widgets/Fl_SigBar.cxx' || echo '$(srcdir)/'`widgets/Fl_SigBar.cxx widgets/flrig-Fl_SigBar.obj: widgets/Fl_SigBar.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-Fl_SigBar.obj -MD -MP -MF widgets/$(DEPDIR)/flrig-Fl_SigBar.Tpo -c -o widgets/flrig-Fl_SigBar.obj `if test -f 'widgets/Fl_SigBar.cxx'; then $(CYGPATH_W) 'widgets/Fl_SigBar.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_SigBar.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-Fl_SigBar.Tpo widgets/$(DEPDIR)/flrig-Fl_SigBar.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/Fl_SigBar.cxx' object='widgets/flrig-Fl_SigBar.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-Fl_SigBar.obj `if test -f 'widgets/Fl_SigBar.cxx'; then $(CYGPATH_W) 'widgets/Fl_SigBar.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/Fl_SigBar.cxx'; fi` widgets/flrig-flinput2.o: widgets/flinput2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-flinput2.o -MD -MP -MF widgets/$(DEPDIR)/flrig-flinput2.Tpo -c -o widgets/flrig-flinput2.o `test -f 'widgets/flinput2.cxx' || echo '$(srcdir)/'`widgets/flinput2.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-flinput2.Tpo widgets/$(DEPDIR)/flrig-flinput2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/flinput2.cxx' object='widgets/flrig-flinput2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-flinput2.o `test -f 'widgets/flinput2.cxx' || echo '$(srcdir)/'`widgets/flinput2.cxx widgets/flrig-flinput2.obj: widgets/flinput2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-flinput2.obj -MD -MP -MF widgets/$(DEPDIR)/flrig-flinput2.Tpo -c -o widgets/flrig-flinput2.obj `if test -f 'widgets/flinput2.cxx'; then $(CYGPATH_W) 'widgets/flinput2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flinput2.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-flinput2.Tpo widgets/$(DEPDIR)/flrig-flinput2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/flinput2.cxx' object='widgets/flrig-flinput2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-flinput2.obj `if test -f 'widgets/flinput2.cxx'; then $(CYGPATH_W) 'widgets/flinput2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flinput2.cxx'; fi` widgets/flrig-flslider2.o: widgets/flslider2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-flslider2.o -MD -MP -MF widgets/$(DEPDIR)/flrig-flslider2.Tpo -c -o widgets/flrig-flslider2.o `test -f 'widgets/flslider2.cxx' || echo '$(srcdir)/'`widgets/flslider2.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-flslider2.Tpo widgets/$(DEPDIR)/flrig-flslider2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/flslider2.cxx' object='widgets/flrig-flslider2.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-flslider2.o `test -f 'widgets/flslider2.cxx' || echo '$(srcdir)/'`widgets/flslider2.cxx widgets/flrig-flslider2.obj: widgets/flslider2.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-flslider2.obj -MD -MP -MF widgets/$(DEPDIR)/flrig-flslider2.Tpo -c -o widgets/flrig-flslider2.obj `if test -f 'widgets/flslider2.cxx'; then $(CYGPATH_W) 'widgets/flslider2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flslider2.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-flslider2.Tpo widgets/$(DEPDIR)/flrig-flslider2.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/flslider2.cxx' object='widgets/flrig-flslider2.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-flslider2.obj `if test -f 'widgets/flslider2.cxx'; then $(CYGPATH_W) 'widgets/flslider2.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/flslider2.cxx'; fi` widgets/flrig-font_browser.o: widgets/font_browser.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-font_browser.o -MD -MP -MF widgets/$(DEPDIR)/flrig-font_browser.Tpo -c -o widgets/flrig-font_browser.o `test -f 'widgets/font_browser.cxx' || echo '$(srcdir)/'`widgets/font_browser.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-font_browser.Tpo widgets/$(DEPDIR)/flrig-font_browser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/font_browser.cxx' object='widgets/flrig-font_browser.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-font_browser.o `test -f 'widgets/font_browser.cxx' || echo '$(srcdir)/'`widgets/font_browser.cxx widgets/flrig-font_browser.obj: widgets/font_browser.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-font_browser.obj -MD -MP -MF widgets/$(DEPDIR)/flrig-font_browser.Tpo -c -o widgets/flrig-font_browser.obj `if test -f 'widgets/font_browser.cxx'; then $(CYGPATH_W) 'widgets/font_browser.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/font_browser.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-font_browser.Tpo widgets/$(DEPDIR)/flrig-font_browser.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/font_browser.cxx' object='widgets/flrig-font_browser.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-font_browser.obj `if test -f 'widgets/font_browser.cxx'; then $(CYGPATH_W) 'widgets/font_browser.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/font_browser.cxx'; fi` widgets/flrig-FreqControl.o: widgets/FreqControl.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-FreqControl.o -MD -MP -MF widgets/$(DEPDIR)/flrig-FreqControl.Tpo -c -o widgets/flrig-FreqControl.o `test -f 'widgets/FreqControl.cxx' || echo '$(srcdir)/'`widgets/FreqControl.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-FreqControl.Tpo widgets/$(DEPDIR)/flrig-FreqControl.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/FreqControl.cxx' object='widgets/flrig-FreqControl.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-FreqControl.o `test -f 'widgets/FreqControl.cxx' || echo '$(srcdir)/'`widgets/FreqControl.cxx widgets/flrig-FreqControl.obj: widgets/FreqControl.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-FreqControl.obj -MD -MP -MF widgets/$(DEPDIR)/flrig-FreqControl.Tpo -c -o widgets/flrig-FreqControl.obj `if test -f 'widgets/FreqControl.cxx'; then $(CYGPATH_W) 'widgets/FreqControl.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/FreqControl.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-FreqControl.Tpo widgets/$(DEPDIR)/flrig-FreqControl.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/FreqControl.cxx' object='widgets/flrig-FreqControl.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-FreqControl.obj `if test -f 'widgets/FreqControl.cxx'; then $(CYGPATH_W) 'widgets/FreqControl.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/FreqControl.cxx'; fi` widgets/flrig-hspinner.o: widgets/hspinner.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-hspinner.o -MD -MP -MF widgets/$(DEPDIR)/flrig-hspinner.Tpo -c -o widgets/flrig-hspinner.o `test -f 'widgets/hspinner.cxx' || echo '$(srcdir)/'`widgets/hspinner.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-hspinner.Tpo widgets/$(DEPDIR)/flrig-hspinner.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/hspinner.cxx' object='widgets/flrig-hspinner.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-hspinner.o `test -f 'widgets/hspinner.cxx' || echo '$(srcdir)/'`widgets/hspinner.cxx widgets/flrig-hspinner.obj: widgets/hspinner.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-hspinner.obj -MD -MP -MF widgets/$(DEPDIR)/flrig-hspinner.Tpo -c -o widgets/flrig-hspinner.obj `if test -f 'widgets/hspinner.cxx'; then $(CYGPATH_W) 'widgets/hspinner.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/hspinner.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-hspinner.Tpo widgets/$(DEPDIR)/flrig-hspinner.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/hspinner.cxx' object='widgets/flrig-hspinner.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-hspinner.obj `if test -f 'widgets/hspinner.cxx'; then $(CYGPATH_W) 'widgets/hspinner.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/hspinner.cxx'; fi` widgets/flrig-ValueSlider.o: widgets/ValueSlider.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-ValueSlider.o -MD -MP -MF widgets/$(DEPDIR)/flrig-ValueSlider.Tpo -c -o widgets/flrig-ValueSlider.o `test -f 'widgets/ValueSlider.cxx' || echo '$(srcdir)/'`widgets/ValueSlider.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-ValueSlider.Tpo widgets/$(DEPDIR)/flrig-ValueSlider.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/ValueSlider.cxx' object='widgets/flrig-ValueSlider.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-ValueSlider.o `test -f 'widgets/ValueSlider.cxx' || echo '$(srcdir)/'`widgets/ValueSlider.cxx widgets/flrig-ValueSlider.obj: widgets/ValueSlider.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT widgets/flrig-ValueSlider.obj -MD -MP -MF widgets/$(DEPDIR)/flrig-ValueSlider.Tpo -c -o widgets/flrig-ValueSlider.obj `if test -f 'widgets/ValueSlider.cxx'; then $(CYGPATH_W) 'widgets/ValueSlider.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/ValueSlider.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) widgets/$(DEPDIR)/flrig-ValueSlider.Tpo widgets/$(DEPDIR)/flrig-ValueSlider.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='widgets/ValueSlider.cxx' object='widgets/flrig-ValueSlider.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o widgets/flrig-ValueSlider.obj `if test -f 'widgets/ValueSlider.cxx'; then $(CYGPATH_W) 'widgets/ValueSlider.cxx'; else $(CYGPATH_W) '$(srcdir)/widgets/ValueSlider.cxx'; fi` server/flrig-xml_server.o: server/xml_server.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT server/flrig-xml_server.o -MD -MP -MF server/$(DEPDIR)/flrig-xml_server.Tpo -c -o server/flrig-xml_server.o `test -f 'server/xml_server.cxx' || echo '$(srcdir)/'`server/xml_server.cxx @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) server/$(DEPDIR)/flrig-xml_server.Tpo server/$(DEPDIR)/flrig-xml_server.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='server/xml_server.cxx' object='server/flrig-xml_server.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o server/flrig-xml_server.o `test -f 'server/xml_server.cxx' || echo '$(srcdir)/'`server/xml_server.cxx server/flrig-xml_server.obj: server/xml_server.cxx @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -MT server/flrig-xml_server.obj -MD -MP -MF server/$(DEPDIR)/flrig-xml_server.Tpo -c -o server/flrig-xml_server.obj `if test -f 'server/xml_server.cxx'; then $(CYGPATH_W) 'server/xml_server.cxx'; else $(CYGPATH_W) '$(srcdir)/server/xml_server.cxx'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) server/$(DEPDIR)/flrig-xml_server.Tpo server/$(DEPDIR)/flrig-xml_server.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='server/xml_server.cxx' object='server/flrig-xml_server.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(flrig_CPPFLAGS) $(CPPFLAGS) $(flrig_CXXFLAGS) $(CXXFLAGS) -c -o server/flrig-xml_server.obj `if test -f 'server/xml_server.cxx'; then $(CYGPATH_W) 'server/xml_server.cxx'; else $(CYGPATH_W) '$(srcdir)/server/xml_server.cxx'; fi` .cxx.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cxx.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-am all-am: Makefile $(PROGRAMS) config.h installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f UI/$(DEPDIR)/$(am__dirstamp) -rm -f UI/$(am__dirstamp) -rm -f graphics/$(DEPDIR)/$(am__dirstamp) -rm -f graphics/$(am__dirstamp) -rm -f rigs/$(DEPDIR)/$(am__dirstamp) -rm -f rigs/$(am__dirstamp) -rm -f server/$(DEPDIR)/$(am__dirstamp) -rm -f server/$(am__dirstamp) -rm -f support/$(DEPDIR)/$(am__dirstamp) -rm -f support/$(am__dirstamp) -rm -f widgets/$(DEPDIR)/$(am__dirstamp) -rm -f widgets/$(am__dirstamp) -rm -f xmlrpcpp/$(DEPDIR)/$(am__dirstamp) -rm -f xmlrpcpp/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-local mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) UI/$(DEPDIR) graphics/$(DEPDIR) rigs/$(DEPDIR) server/$(DEPDIR) support/$(DEPDIR) widgets/$(DEPDIR) xmlrpcpp/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: installcheck-binPROGRAMS maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) UI/$(DEPDIR) graphics/$(DEPDIR) rigs/$(DEPDIR) server/$(DEPDIR) support/$(DEPDIR) widgets/$(DEPDIR) xmlrpcpp/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-local .MAKE: all check install install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \ clean-binPROGRAMS clean-generic clean-local cscopelist-am \ ctags ctags-am distclean distclean-compile distclean-generic \ distclean-hdr distclean-tags distdir dvi dvi-am html html-am \ info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-data-local install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am \ installcheck-binPROGRAMS installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-local .EXPORT_ALL_VARIABLES: nsisinst appbundle @HAVE_WINDRES_TRUE@@MINGW32_TRUE@.rc.o: @HAVE_WINDRES_TRUE@@MINGW32_TRUE@ $(WINDRES) -I$(srcdir)/include -I$(srcdir)/../data/win32 $< -O coff $@ install-data-local: if test -f $(srcdir)/../data/flrig.xpm; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/pixmaps; \ $(INSTALL_DATA) $(srcdir)/../data/flrig.xpm $(DESTDIR)/$(datadir)/pixmaps; \ fi if test -f $(srcdir)/../data/flrig.desktop; then \ $(mkinstalldirs) $(DESTDIR)/$(datadir)/applications; \ $(INSTALL_DATA) $(srcdir)/../data/flrig.desktop $(DESTDIR)/$(datadir)/applications; \ fi uninstall-local: rm -f $(DESTDIR)/$(datadir)/pixmaps/flrig.xpm rm -f $(DESTDIR)/$(datadir)/applications/flrig.desktop @HAVE_NSIS_TRUE@nsisinst: $(bin_PROGRAMS) @HAVE_NSIS_TRUE@ sh $(srcdir)/../scripts/mknsisinst.sh "$(srcdir)/../data" . @DARWIN_TRUE@appbundle: $(bin_PROGRAMS) @DARWIN_TRUE@ sh $(srcdir)/../scripts/mkappbundle.sh "$(srcdir)/../data" . clean-local: -rm -rf $(CLEAN_LOCAL) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: flrig-1.3.24/src/rigs/0000755000175000017500000000000012650266613011447 500000000000000flrig-1.3.24/src/rigs/TT566.cxx0000644000175000017500000003675212562731647012726 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "TT566.h" #include "rigbase.h" //============================================================================= // TT-566 const char RIG_TT566name_[] = "Orion-II"; const char *RIG_TT566modes_[] = { "USB", "LSB", "UCW", "LCW", "AM", "FM", "FSK", NULL}; static const char RIG_TT566_mode_type[] = {'U', 'L', 'U', 'L', 'U', 'U', 'L'}; const char *RIG_TT566widths[] = { "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", "3800", "4000", "4500", "5000", "5500", "6000", NULL}; static int RIG_TT566_bw_vals[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29, WVALS_LIMIT}; static char TT566setFREQa[] = "*AF"; // binary data static char TT566getFREQa[] = "?AF\r"; static char TT566rspFREQa[] = "@AF"; static char TT566setFREQb[] = "*BF"; static char TT566getFREQb[] = "?BF\r"; static char TT566rspFREQb[] = "@BF"; static char TT566setMODEa[] = "*RMM"; static char TT566getMODEa[] = "?RMM\r"; //static char TT566rspMODEa[] = "@RMM"; static char TT566setMODEb[] = "*RSM"; static char TT566getMODEb[] = "?RSM\r"; //static char TT566rspMODEb[] = "@RSM"; static char TT566setBWa[] = "*RMF"; static char TT566getBWa[] = "?RMF\r"; //static char TT566rspBWa[] = "@RMF"; static char TT566setBWb[] = "*RSF"; static char TT566getBWb[] = "?RSF\r"; //static char TT566rspBWb[] = "@RSF"; static char TT566setVOLa[] = "*UM"; static char TT566getVOLa[] = "?UM\r"; static char TT566rspVOLa[] = "@UM"; //static char TT566setVOLb[] = "*US"; //static char TT566getVOLb[] = "?US\r"; //static char TT566rspVOLb[] = "@US"; //static char TT566setPBTa[] = "*RMP"; //static char TT566getPBTa[] = "?RMP\r"; //static char TT566rspPBTa[] = "@RMP"; //static char TT566setPBTb[] = "*RSP"; //static char TT566getPBTb[] = "?RSP\r"; //static char TT566rspPBTb[] = "@RSP"; //static char TT566setAGCa[] = "*RMA"; //static char TT566getAGCa[] = "?RMA\r"; //static char TT566rspAGCa[] = "@RMA"; //static char TT566setAGCb[] = "*RSA"; //static char TT566getAGCb[] = "?RSA\r"; //static char TT566rspAGCb[] = "@RSA"; static char TT566setRFGa[] = "*RMG"; static char TT566getRFGa[] = "?RMG\r"; static char TT566rspRFGa[] = "@RMG"; //static char TT566setRFGb[] = "*RSG"; //static char TT566getRFGb[] = "?RSG\r"; //static char TT566rspRFGb[] = "@RSG"; static char TT566setATTa[] = "*RMT"; static char TT566getATTa[] = "?RMT\r"; static char TT566rspATTa[] = "@RMT"; //static char TT566setATTb[] = "*RST"; //static char TT566getATTb[] = "?RST\r"; //static char TT566rspATTb[] = "@RST"; //static char TT566setSQLa[] = "*RMS"; //static char TT566getSQLa[] = "?RMS\r"; //static char TT566rspSQLa[] = "@RMS"; //static char TT566setSQLb[] = "*RSS"; //static char TT566getSQLb[] = "?RSS\r"; //static char TT566rspSQLb[] = "@RSS"; static char TT566setANa[] = "*RMNA"; static char TT566getANa[] = "?RMNA\r"; //static char TT566rspANa[] = "@RMNA"; //static char TT566setANb[] = "*RSNA"; //static char TT566getANb[] = "?RSNA\r"; //static char TT566rspANb[] = "@RSNA"; static char TT566setNBa[] = "*RMNB"; static char TT566getNBa[] = "?RMNB\r"; //static char TT566rspNBa[] = "@RMNB"; //static char TT566setNBb[] = "*RSNB"; //static char TT566getNBb[] = "?RSNB\r"; //static char TT566rspNBb[] = "@RSNB"; static char TT566setMIC[] = "*TM"; static char TT566getMIC[] = "?TM\r"; static char TT566rspMIC[] = "@TM"; static char TT566setPWR[] = "*TP"; static char TT566getPWR[] = "?TP\r"; static char TT566rspPWR[] = "@TP"; //static char TT566setTBW[] = "*TF"; //static char TT566getTBW[] = "?TF\r"; //static char TT566rspTBW[] = "@TF"; //static char TT566setTUNE[] = "*TT"; //static char TT566getTUNE[] = "?TT\r"; //static char TT566rspTUNE[] = "@TT"; static char TT566getSMETER[] = "?S\r"; static char TT566rspSMETER[] = "@SRM"; static char TT566getPOUT[] = "?S\r"; static char TT566rspPOUT[] = "@STF"; static char TT566setPREAMP[] = "*RME"; // ONLY AVAILABLE ON PRIMARY RX static char TT566getPREAMP[] = "?RME\r"; //static char TT566rspPREAMP[] = "@RME"; //static char TT566setRITa[] = "*RMR"; //static char TT566getRITa[] = "?RMR\r"; //static char TT566rspRITa[] = "@RMR"; //static char TT566setRITb[] = "*RSR"; //static char TT566getRITb[] = "?RSR\r"; //static char TT566rspRITb[] = "@RSR"; //static char TT566setXIT[] = "*RMX"; // ONLY AVAILABLE ON PRIMARY RX //static char TT566getXIT[] = "?RMX\r"; //static char TT566rspXIT[] = "@RMX"; static char TT566setPTT[] = "*T"; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 125, 156 }, { (Fl_Widget *)sldrPOWER, 266, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_TT566::RIG_TT566() { name_ = RIG_TT566name_; modes_ = RIG_TT566modes_; bandwidths_ = RIG_TT566widths; bw_vals_ = RIG_TT566_bw_vals; widgets = rig_widgets; comm_baudrate = BR57600; stopbits = 1; comm_retries = 2; comm_wait = 10; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; def_mode = modeB = modeA = A.imode = B.imode = 1; def_bw = bwB = bwA = A.iBW = B.iBW = 19; def_freq = freqB = freqA = A.freq = B.freq = 14070000; max_power = 100; atten_level = 0; // has_ifshift_control = // has_agc_level = // has_attenuator_control = can_change_alt_vfo = has_smeter = has_power_out = has_rf_control = has_volume_control = has_micgain_control = has_swr_control = has_mode_control = has_bandwidth_control = has_ptt_control = has_preamp_control = has_noise_control = has_auto_notch = has_attenuator_control = has_power_control = true; precision = 1; ndigits = 8; }; void RIG_TT566::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = sldrMICGAIN; rig_widgets[4].W = sldrPOWER; } int RIG_TT566::adjust_bandwidth(int m) { switch (m) { case 0 : case 1 : return 19; case 2 : case 3 : return 4; case 4 : case 5 : return 24; case 6 : default : return 7; } return 19; } long RIG_TT566::get_vfoA () { cmd = TT566getFREQa; int ret = sendCommand(cmd); showresp(WARN, ASC, "get vfo A", cmd, replystr); if (ret < 8) return A.freq; size_t p = replystr.rfind(TT566rspFREQa); if (p == string::npos) return A.freq; int f = 0; sscanf(&replystr[p + strlen(TT566rspFREQa)], "%d", &f); A.freq = f; return A.freq; } void RIG_TT566::set_vfoA (long freq) { A.freq = freq; cmd = TT566setFREQa; cmd.append(to_decimal(freq, 8)); cmd += '\r'; sendCommand(cmd); showresp(WARN, ASC, "set vfo A", cmd, replystr); return; } long RIG_TT566::get_vfoB () { cmd = TT566getFREQb; int ret = sendCommand(cmd); showresp(WARN, ASC, "get vfo A", cmd, replystr); if (ret < 8) return B.freq; size_t p = replystr.rfind(TT566rspFREQb); if (p == string::npos) return B.freq; int f = 0; sscanf(&replystr[p + strlen(TT566rspFREQb)], "%d", &f); B.freq = f; return B.freq; } void RIG_TT566::set_vfoB (long freq) { B.freq = freq; cmd = TT566setFREQb; cmd.append(to_decimal(freq, 8)); cmd += '\r'; sendCommand(cmd); showresp(WARN, ASC, "set vfo B", cmd, replystr); return; } void RIG_TT566::set_PTT_control(int val) { cmd = TT566setPTT; cmd += val ? "K\r" : "U\r"; sendCommand(cmd); showresp(WARN, ASC, "set ptt", cmd, replystr); } void RIG_TT566::set_modeA(int md) { A.imode = md; cmd = TT566setMODEa; cmd += '0' + md; cmd += '\r'; sendCommand(cmd); showresp(WARN, ASC, "set mode A", cmd, replystr); } int RIG_TT566::get_modeA() { cmd = TT566getMODEa; int ret = sendCommand (cmd); if (ret >= 6) { A.imode = replystr[ret - 6 + 4] - '0'; } return A.imode; } void RIG_TT566::set_modeB(int md) { B.imode = md; cmd = TT566setMODEb; cmd += '0' + md; cmd += '\r'; sendCommand(cmd); showresp(WARN, ASC, "set mode B", cmd, replystr); } int RIG_TT566::get_modeB() { cmd = TT566getMODEb; int ret = sendCommand (cmd); if (ret >= 6) { B.imode = replystr[ret - 6 + 4] - '0'; } return B.imode; } void RIG_TT566::set_bwA(int bw) { A.iBW = bw; cmd = TT566setBWa; cmd.append(RIG_TT566widths[bw]); cmd += '\r'; sendCommand(cmd); showresp(WARN, ASC, "set bw A", cmd, replystr); } int RIG_TT566::get_bwA() { cmd = TT566getBWa; int ret = sendCommand(cmd); if (ret >= 8) { string bwstr = ""; if (replystr.length() == 9) bwstr = replystr.substr(ret - 9 + 4, 4); if (replystr.length() == 8) bwstr = replystr.substr(ret - 8 + 4, 3); if (replystr.empty()) return A.iBW; int i = 0; while( RIG_TT566widths[i] != NULL) { if (bwstr == RIG_TT566widths[i]) { A.iBW = i; break; } i++; } } return A.iBW; } void RIG_TT566::set_bwB(int bw) { B.iBW = bw; cmd = TT566setBWb; cmd.append(RIG_TT566widths[bw]); cmd += '\r'; sendCommand(cmd); showresp(WARN, ASC, "set bw B", cmd, replystr); } int RIG_TT566::get_bwB() { cmd = TT566getBWb; int ret = sendCommand(cmd); if (ret >= 8) { string bwstr = ""; if (replystr.length() == 9) bwstr = replystr.substr(ret - 9 + 4, 4); if (replystr.length() == 8) bwstr = replystr.substr(ret - 8 + 4, 3); if (replystr.empty()) return B.iBW; int i = 0; while( RIG_TT566widths[i] != NULL) { if (bwstr == RIG_TT566widths[i]) { B.iBW = i; break; } i++; } } return B.iBW; } int RIG_TT566::get_modetype(int n) { return RIG_TT566_mode_type[n]; } int RIG_TT566::get_power_control(void) { cmd = TT566getPWR; sendCommand(cmd); size_t p = replystr.rfind(TT566rspPWR); if (p == string::npos) return 0; int pwr; sscanf(&replystr[p + strlen(TT566rspPWR)], "%d", &pwr); return pwr; } void RIG_TT566::set_power_control(double val) { cmd = TT566setPWR; cmd.append(to_decimal(val,2)); cmd += '\r'; sendCommand(cmd); showresp(WARN, ASC, "set power", cmd, replystr); } void RIG_TT566::set_auto_notch(int v) { cmd = TT566setANa; cmd += v ? "1\r" : "0\r"; sendCommand(cmd); showresp(WARN, ASC, "set AN", cmd, replystr); } int RIG_TT566::get_auto_notch() { cmd = TT566getANa; int ret = sendCommand(cmd); if (ret >= 7) return replystr[ret - 7 + 5] - '0'; return 0; } int RIG_TT566::get_smeter() { int dbm = 0; cmd = TT566getSMETER; int ret = sendCommand(cmd); showresp(WARN, ASC, "get smeter", cmd, replystr); if (ret < 12) return 0; size_t p = replystr.rfind(TT566rspSMETER); if (p == string::npos) return 0; sscanf(&replystr[p + strlen(TT566rspSMETER)], "%d", &dbm); return 5 * dbm / 6; // 60 = S9 --> 50% of full scale of flrig display } int RIG_TT566::get_swr() { float swr = (sqrtf(fwdpwr) + sqrtf(refpwr))/(sqrt(fwdpwr) - sqrt(refpwr) + .0001); swr -= 1.0; swr *= 25.0; if (swr < 0) swr = 0; if (swr > 100) swr = 100; return (int)swr; } int RIG_TT566::get_power_out() { cmd = TT566getPOUT; fwdpwr = 0; refpwr = 0; int ret = sendCommand(cmd); showresp(WARN, ASC, "get pout", cmd, replystr); if (ret < 12) return 0; size_t p = replystr.rfind(TT566rspPOUT); if (p == string::npos) return 0; sscanf(&replystr[p + strlen(TT566rspPOUT)], "%d", &fwdpwr); size_t n = 4; while ( replystr[p + n] != 'R' && n < replystr.length()) n++; if (n < replystr.length()) n++; sscanf(&replystr[p + n], "%d", &refpwr); return fwdpwr; } int RIG_TT566::get_volume_control() { cmd = TT566getVOLa; int ret = sendCommand(cmd); showresp(WARN, ASC, "get vol", cmd, replystr); if (ret < 6) return 0; int val = 0; size_t p = replystr.rfind(TT566rspVOLa); sscanf(&replystr[p + strlen(TT566rspVOLa)], "%d", &val); return val; } void RIG_TT566::set_volume_control(int val) { cmd = TT566setVOLa; cmd.append(to_decimal(val,2)); cmd += '\r'; sendCommand(cmd); showresp(WARN, ASC, "set vol", cmd, replystr); } void RIG_TT566::set_mic_gain(int val) { cmd = TT566setMIC; cmd.append(to_decimal(val,2)); cmd += '\r'; sendCommand(cmd); showresp(WARN, ASC, "set mic", cmd, replystr); } int RIG_TT566::get_mic_gain() { cmd = TT566getMIC; int ret = sendCommand(cmd); showresp(WARN, ASC, "get mic", cmd, replystr); if (ret < 6) return 0; int val = 0; size_t p = replystr.rfind(TT566rspMIC); sscanf(&replystr[p + strlen(TT566rspMIC)], "%d", &val); return val; } /* void RIG_TT566::set_if_shift(int val) { char sznum[6]; snprintf(sznum, sizeof(sznum), "%d", val); cmd = "*RMP"; cmd.append(sznum); cmd += '\r'; sendCommand(cmd,0); } bool RIG_TT566::get_if_shift(int &val) { int retval = 0; cmd = "?RMP\r"; sendCommand(cmd); size_t p = replystr.rfind("@RMP"); if (p == string::npos) return false; sscanf(&replystr[p + 4], "%d", &retval); val = retval; if (val) return true; return false; } */ void RIG_TT566::set_rf_gain(int val) { cmd = TT566setRFGa; char sznum[5]; snprintf(sznum, sizeof(sznum), "%d\r", val); cmd.append(sznum); sendCommand(cmd); showresp(WARN, ASC, "set rfgain", cmd, replystr); } int RIG_TT566::get_rf_gain() { cmd = TT566getRFGa; int retval = 0; sendCommand(cmd, 8); showresp(WARN, ASC, "get rfgain", cmd, replystr); size_t p = replystr.rfind(TT566rspRFGa); if (p == string::npos) return retval; sscanf(&replystr[p + strlen(TT566getRFGa)], "%d", &retval); return retval; } void RIG_TT566::set_attenuator(int val) { cmd = TT566setATTa; atten_level++; if (atten_level == 4) atten_level = 0; switch (atten_level) { case 0: atten_label("0 dB", false); cmd += '0'; break; case 1: atten_label("6 dB", true); cmd += '1'; break; case 2: atten_label("12 dB", true); cmd += '2'; break; case 3: atten_label("18 dB", true); cmd += '3'; break; } cmd += '\r'; sendCommand(cmd); showresp(WARN, ASC, "set att A", cmd, replystr); } int RIG_TT566::get_attenuator() { cmd = TT566getATTa; int ret = sendCommand(cmd); showresp(WARN, ASC, "get att A", cmd, replystr); int val = atten_level; if (ret >= 3) { size_t p = replystr.rfind(TT566rspATTa); if (p != string::npos) val = (replystr[p + 1] - '0'); } if (atten_level != val) atten_level = val; switch (atten_level) { case 0: atten_label("0 dB", false); break; case 1: atten_label("6 dB", true); break; case 2: atten_label("12 dB", true); break; case 3: atten_label("18 dB", true); break; } return atten_level; } void RIG_TT566::set_preamp(int val) { cmd = TT566setPREAMP; cmd += val ? "1\r" : "0\r"; sendCommand(cmd); showresp(WARN, ASC, "set pre", cmd, replystr); } int RIG_TT566::get_preamp() { cmd = TT566getPREAMP; int ret = sendCommand(cmd); if (ret >= 6) return replystr[ret - 6 + 4] - '0'; return 0; } void RIG_TT566::set_noise(bool val) { cmd = TT566setNBa; cmd += val ? "1\r" : "0\r"; sendCommand(cmd); showresp(WARN, ASC, "set NB", cmd, replystr); } int RIG_TT566::get_noise() { cmd = TT566getNBa; int ret = sendCommand(cmd); if (ret >= 6) return replystr[ret - 6 + 4] - '0'; return 0; } flrig-1.3.24/src/rigs/TT599.cxx0000644000175000017500000002213412562731647012721 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "TT599.h" //============================================================================= // TT-599 const char RIG_TT599name_[] = "Eagle"; const char *RIG_TT599modes_[] = { "USB", "LSB", "CW", "AM", "FM", NULL}; const char RIG_TT599mchar_[] = { '0', '1', '3', '4', '5', 0 }; static const int RIG_TT599_def_bw[] = { 19, 19, 7, 24, 19 }; static const char RIG_TT599_mode_type[] = {'U', 'L', 'L', 'U', 'U'}; const char *RIG_TT599widths[] = { "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", NULL}; static int TT599_bw_vals[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, WVALS_LIMIT}; const int RIG_TT599w[] = { 100, 200, 300, 400, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000, 2200, 2400, 2600, 2800, 3000, 0 }; static GUI rig_widgets[]= { { (Fl_Widget *)sldrPOWER, 266, 105, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_TT599::RIG_TT599() { name_ = RIG_TT599name_; modes_ = RIG_TT599modes_; bandwidths_ = RIG_TT599widths; bw_vals_ = TT599_bw_vals; widgets = rig_widgets; comm_baudrate = BR57600; stopbits = 1; comm_retries = 2; comm_wait = 10; comm_timeout = 50; comm_echo = false; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 16; can_change_alt_vfo = true; max_power = 100; has_smeter = has_power_out = has_split = has_split_AB = has_swr_control = has_mode_control = has_bandwidth_control = has_ptt_control = has_preamp_control = has_auto_notch = has_attenuator_control = has_noise_reduction_control = has_power_control = true; // has_agc_level = true; precision = 1; ndigits = 8; }; static void wait(int msec) { for (int i = 0; i < msec; i += 10) { MilliSleep(10); Fl::awake(); } } void RIG_TT599::initialize() { rig_widgets[0].W = sldrPOWER; cmd = "X\r"; sendCommand(cmd, 0); wait(200); readResponse(); showresp(WARN, ASC, "init", cmd, replystr); split = false; cmd = "*KVAAA\r"; sendCommand(cmd, 0); wait(200); readResponse(); showresp(WARN, ASC, "normal", cmd, replystr); } void RIG_TT599::shutdown() { cmd = "*RMF0\r"; sendCommand(cmd, 0); wait(200); readResponse(); showresp(WARN, ASC, "Enable BW control", cmd, replystr); } long RIG_TT599::get_vfoA () { size_t p; cmd = "?AF\r"; if ( waitCommand( cmd, 12, "get vfoA") ) { if ((p = replystr.rfind("@AF")) != string::npos) freqA = atol(&replystr[p+3]); } return freqA; } void RIG_TT599::set_vfoA (long freq) { freqA = freq; cmd = "*AF"; cmd.append( to_decimal( freq, 8 ) ); cmd += '\r'; sendCommand(cmd); get_vfoA(); } long RIG_TT599::get_vfoB () { size_t p; cmd = "?BF\r"; if ( waitCommand( cmd, 12, "get vfoB") ) { if ((p = replystr.rfind("@BF")) != string::npos) freqB = atol(&replystr[p+3]); } return freqB; } void RIG_TT599::set_vfoB (long freq) { freqB = freq; cmd = "*BF"; cmd.append( to_decimal( freq, 8 ) ); cmd += '\r'; sendCommand(cmd); get_vfoB(); } void RIG_TT599::set_PTT_control(int val) { cmd = val ? "*TK\r" : "*TU\r"; sendCommand(cmd); wait(200); } int RIG_TT599::get_modeA() { size_t p; cmd = "?RMM\r"; if ( waitCommand( cmd, 6, "get modeA") ) { if ((p = replystr.rfind("@RMM")) != string::npos) { modeA = 0; while (RIG_TT599mchar_[modeA] != replystr[p+4]) { modeA++; if (RIG_TT599mchar_[modeA] == 0) { modeA = 0; break; } } } } return modeA; } void RIG_TT599::set_modeA(int md) { modeA = md; cmd = "*RMM"; cmd += RIG_TT599mchar_[md]; cmd += '\r'; sendCommand(cmd); get_modeA(); } int RIG_TT599::get_modeB() { size_t p; cmd = "?RMM\r"; if ( waitCommand( cmd, 6, "get modeB") ) { if ((p = replystr.rfind("@RMM")) != string::npos) { modeB = 0; while (RIG_TT599mchar_[modeB] != replystr[p+4]) { modeB++; if (RIG_TT599mchar_[modeB] == 0) { modeB = 0; break; } } } } return modeB; } void RIG_TT599::set_modeB(int md) { modeB = md; cmd = "*RMM"; cmd += RIG_TT599mchar_[md]; cmd += '\r'; sendCommand(cmd); get_modeB(); } int RIG_TT599::get_bwA() { int w = 0; size_t p; cmd = "?RMF\r"; if ( waitCommand( cmd, 12, "get bwA") ) { if ((p = replystr.rfind("@RMF")) != string::npos) { if ( p != string::npos) w = atol(&replystr[p+4]); bwA = 0; while ( (RIG_TT599w[bwA] < w) && (RIG_TT599w[bwA + 1] != 0) ) bwA++; } } return bwA; } void RIG_TT599::set_bwA(int bw) { cmd = "*RMF"; cmd.append(RIG_TT599widths[bw]); cmd += '\r'; sendCommand(cmd); get_bwA(); } int RIG_TT599::get_bwB() { int w = 0; size_t p; cmd = "?RMF\r"; if ( waitCommand( cmd, 12, "get bwB") ) { if ((p = replystr.rfind("@RMF")) != string::npos) { if ( p != string::npos) w = atol(&replystr[p+4]); bwB = 0; while ( (RIG_TT599w[bwB] < w) && (RIG_TT599w[bwB + 1] != 0) ) bwB++; } } return bwB; } void RIG_TT599::set_bwB(int bw) { cmd = "*RMF"; cmd.append(RIG_TT599widths[bw]); cmd += '\r'; sendCommand(cmd); get_bwB(); } int RIG_TT599::adjust_bandwidth(int m) { return RIG_TT599_def_bw[m]; } int RIG_TT599::def_bandwidth(int m) { return RIG_TT599_def_bw[m]; } int RIG_TT599::get_modetype(int n) { return RIG_TT599_mode_type[n]; } int RIG_TT599::get_preamp() { size_t p; cmd = "?RME\r"; if ( waitCommand( cmd, 6, "get preamp") ) { if ((p = replystr.rfind("@RME")) != string::npos) return replystr[p+4] - '0'; } return 0; } void RIG_TT599::set_preamp(int val) { cmd = val ? "*RME1\r" : "*RME0\r"; sendCommand(cmd); get_preamp(); } //void RIG_TT599::set_agc_level() //{ // *RMAF - fast *RMAM - medium *RMAS - slow //} int RIG_TT599::get_power_control(void) { size_t p; cmd = "?TP\r"; if ( waitCommand( cmd, 6, "get power control") ) { if ((p = replystr.rfind("@TP")) != string::npos) { int pwr = atol(&replystr[p+3]); return pwr; } } return progStatus.power_level; } void RIG_TT599::set_power_control(double val) { char szPwr[4]; snprintf(szPwr, sizeof(szPwr), "%d", (int)val); cmd.assign("*TP"); cmd.append(szPwr).append("\r"); sendCommand(cmd); get_power_control(); } int RIG_TT599::get_auto_notch() { cmd = "?RMNA\r"; sendCommand(cmd); if ( waitCommand( cmd, 7, "get auto notch") ) { if (replystr.rfind("@RMNA1") == string::npos) return 0; } return 1; } void RIG_TT599::set_auto_notch(int v) { cmd = v ? "*RMNA1\r" : "*RMNA0\r"; sendCommand(cmd); get_auto_notch(); } int RIG_TT599::get_attenuator() { size_t p; cmd = "?RMT\r"; if ( waitCommand( cmd, 6, "get attenuator") ) { if ((p = replystr.rfind("@RMT1")) != string::npos) return 1; } return 0; } void RIG_TT599::set_attenuator(int val) { cmd = val ? "*RMT1\r" : "*RMT0\r"; sendCommand(cmd); get_attenuator(); } int smeter_count = 10; int RIG_TT599::get_smeter() { size_t p; int dbm = 0; cmd = "?S\r"; if ( waitCommand( cmd, 20, "get smeter") ) { if ((p = replystr.rfind("@SRM")) != string::npos) dbm = atoi(&replystr[p+4]); } return 5 * dbm / 6; } int RIG_TT599::get_swr() { float swr = (sqrtf(fwdpwr) + sqrtf(refpwr/10.0))/(sqrt(fwdpwr) - sqrt(refpwr/10.0) + .0001); swr -= 1.0; swr *= 25.0; if (swr < 0) swr = 0; if (swr > 100) swr = 100; return (int)swr; } int RIG_TT599::get_power_out() { size_t p; fwdpwr = 0; refpwr = 0; cmd = "?S\r"; if ( waitCommand( cmd, 20, "get smeter") ) { if ((p = replystr.rfind ("@STF")) != string::npos) { fwdpwr = atol(&replystr[p+4]); p = replystr.find("R", p+4); if (p != string::npos) refpwr = atol(&replystr[p+1]); } } return fwdpwr; } int RIG_TT599::get_split() { cmd = "?KV\r"; if ( waitCommand( cmd, 7, "get split") ) { size_t p = replystr.find("@KVAA"); if ((p != string::npos) && (replystr[p+5] == 'B')) split = 1; else split = 0; } return split; } void RIG_TT599:: set_split(bool val) { split = val; cmd = val ? "*KVAAB\r" : "*KVAAA\r"; sendCommand(cmd); get_split(); } int RIG_TT599::get_noise_reduction_val() { int val = 1; cmd.assign("?RMNN\r"); if ( waitCommand( cmd, 7, "get noise_reduction_value") ) { size_t p = replystr.rfind("@RMNN"); if (p == string::npos) return val; val = atol(&replystr[p+5]); } return val; } void RIG_TT599::set_noise_reduction_val(int val) { cmd.assign("*RMNN"); cmd += ('0' + val); cmd.append("\r"); sendCommand(cmd); get_noise_reduction_val(); } flrig-1.3.24/src/rigs/TT538.cxx0000644000175000017500000002772012562731651012713 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- /* * Note for anyone wishing to expand on the command set. * * The Jupiter always sends a response and ends the response with a "G\r" to * indicate that the command was accepted. A rejected command is responded to by a * two character sequence "Z\r". You should always expect a maximum response equal * to the number of data bytes plus two. * * For example: * A request for the present receiver filter bandwidth is the the string: * "?W\r" which is 3 bytes in length * The response from the Argonaut V will be: * "Wn\rG\r" which is 5 bytes in length, where n is an unsigned char (byte) * If the transceiver failed to receive the command correctly it will respond: * "Z\r" ----> you need to check for that condition * */ #include "TT538.h" #include "support.h" #include "math.h" static const char TT538name_[] = "TT-538"; //static const char *TT538modes_[] = { "D-USB", "USB", "LSB", "CW", "AM", "FM", NULL} //static const char TT538mode_chr[] = { '1', '1', '2', '3', '0', '4' }; //static const char TT538mode_type[] = { 'U', 'U', 'L', 'L', 'U', 'U' }; static const char *TT538modes_[] = { "AM", "USB", "LSB", "CW", "FM", NULL}; static const char TT538mode_chr[] = { '0', '1', '2', '3', '4' }; static const char TT538mode_type[] = { 'U', 'U', 'L', 'U', 'U' }; // filter # is 38 - index static const char *TT538_widths[] = { "150", "165", "180", "225", "260", "300", "330", "375", "450", "525", "600", "675", "750", "900", "1050", "1200", "1350", "1500", "1650", "1800", "1950", "2100", "2250", "2400", "2550", "2700", "2850", "3000", "3300", "3600", "3900", "4200", "4500", "4800", "5100", "5400", "5700", "6000", "8000", NULL}; static int TT538_bw_vals[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39, WVALS_LIMIT}; static const int TT538_numeric_widths[] = { 150, 165, 180, 225, 260, 300, 330, 375, 450, 525, 600, 675, 750, 900, 1050, 1200, 1350, 1500, 1650, 1800, 1950, 2100, 2250, 2400, 2550, 2700, 2850, 3000, 3300, 3600, 3900, 4200, 4500, 4800, 5100, 5400, 5700, 6000, 8000}; static char TT538setFREQA[] = "*Annnn\r"; //static char TT538setFREQB[] = "*Bnnnn\r"; //static char TT538setAGC[] = "*Gn\r"; //static char TT538setSQLCH[] = "*Hc\r"; static char TT538setRF[] = "*Ic\r"; static char TT538setATT[] = "*Jc\r"; //static char TT538setNB[] = "*Knar\r"; static char TT538setMODE[] = "*Mnn\r"; static char TT538setPBT[] = "*Pxx\r"; static char TT538setVOL[] = "*Un\r"; static char TT538setBW[] = "*Wx\r"; static char TT538getFREQA[] = "?A\r"; //static char TT538getFREQB[] = "?B\r"; //static char TT538getFWDPWR[] = "?F\r"; //static char TT538getAGC[] = "?G\r"; //static char TT538getSQLCH[] = "?H\r"; //static char TT538getRF[] = "?I\r"; static char TT538getATT[] = "?J\r"; //static char TT538getNB[] = "?K\r"; static char TT538getMODE[] = "?M\r"; static char TT538getPBT[] = "?P\r"; static char TT538getSMETER[] = "?S\r"; static char TT538getVOL[] = "?U\r"; static char TT538getBW[] = "?W\r"; //static char TT538getREFPWR[] = "?R\r"; //static char TT538setXMT[] = "#1\r"; //static char TT538setRCV[] = "#0\r"; static char TT538setXMT[] = "Q1\r"; static char TT538setRCV[] = "Q0\r"; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 266, 125, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_TT538::RIG_TT538() { // base class values name_ = TT538name_; modes_ = TT538modes_; bandwidths_ = TT538_widths; bw_vals_ = TT538_bw_vals; widgets = rig_widgets; comm_baudrate = BR57600; stopbits = 1; comm_retries = 2; comm_wait = 20; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true;// false; comm_rtsptt = false; comm_dtrptt = false; serloop_timing = 200; def_mode = modeB = modeA = 1; def_bw = bwB = bwA = 25; def_freq = freqB = freqA = 14070000; max_power = 100; pbt = 0; VfoAdj = progStatus.vfo_adj; has_power_control = has_micgain_control = has_notch_control = has_preamp_control = has_tune_control = has_noise_control = false; has_smeter = has_power_out = has_swr_control = has_bpf_center = has_volume_control = has_rf_control = has_attenuator_control = has_ifshift_control = has_ptt_control = has_bandwidth_control = has_mode_control = has_vfo_adj = true; precision = 1; ndigits = 8; } //static int corrA = 0, corrB = 0; void RIG_TT538::checkresponse(string s) { if (RigSerial.IsOpen() == false) return; string s1 = str2hex(cmd.c_str(), cmd.length()); string s2 = str2hex(replystr.c_str(), replystr.length()); LOG_ERROR("%s:\nsent %s\nreply %s\n", s.c_str(), s1.c_str(), s2.c_str()); } void RIG_TT538::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; VfoAdj = progStatus.vfo_adj; fwdpwr = refpwr = 0.0; } void RIG_TT538::shutdown() { set_if_shift(0); } long RIG_TT538::get_vfoA () { cmd = TT538getFREQA; int ret = sendCommand(cmd); if (ret < 6) return (long)(freqA / (1 + VfoAdj/1e6) + 0.5); size_t p = replystr.rfind("A"); if (p == string::npos) return (long)(freqA / (1 + VfoAdj/1e6) + 0.5); int f = 0; for (size_t n = 1; n < 5; n++) f = f*256 + (unsigned char)replystr[p + n]; freqA = f; return (long)(freqA / (1 + VfoAdj/1e6) + 0.5); } void RIG_TT538::set_vfoA (long freq) { freqA = freq; long xfreq = freqA * (1 + VfoAdj/1e6) + 0.5; cmd = TT538setFREQA; cmd[5] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[4] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[3] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[2] = xfreq & 0xff; sendCommand(cmd); set_if_shift(pbt); return ; } long RIG_TT538::get_vfoB () { // cmd = TT538getFREQB; cmd = TT538getFREQA; int ret = sendCommand(cmd); if (ret < 6) return (long)(freqB / (1 + VfoAdj/1e6) + 0.5); size_t p = replystr.rfind("B"); if (p == string::npos) return (long)(freqB / (1 + VfoAdj/1e6) + 0.5); int f = 0; for (size_t n = 1; n < 5; n++) f = f*256 + (unsigned char)replystr[p + n]; freqB = f; return (long)(freqB / (1 + VfoAdj/1e6) + 0.5); } void RIG_TT538::set_vfoB (long freq) { freqB = freq; long xfreq = freqB * (1 + VfoAdj/1e6) + 0.5; // cmd = TT538setFREQB; cmd = TT538setFREQA; cmd[5] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[4] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[3] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[2] = xfreq & 0xff; sendCommand(cmd); set_if_shift(pbt); return ; } void RIG_TT538::setVfoAdj(double v) { VfoAdj = v; } void RIG_TT538::set_modeA(int val) { modeA = val; cmd = TT538setMODE; cmd[2] = TT538mode_chr[val]; cmd[3] = cmd[2]; sendCommand(cmd); } int RIG_TT538::get_modeA() { cmd = TT538getMODE; int ret = sendCommand(cmd); if (ret < 4) return modeA; size_t p = replystr.rfind("M"); if (p == string::npos) return modeA; modeA = replystr[p+1] - '0'; return modeA; } int RIG_TT538::get_modetype(int n) { return TT538mode_type[n]; } void RIG_TT538::set_bwA(int val) { bwA = val; cmd = TT538setBW; cmd[2] = 38 - val; sendCommand(cmd); set_if_shift(pbt); } int RIG_TT538::get_bwA() { cmd = TT538getBW; int ret = sendCommand(cmd); if (ret < 3) return bwA; size_t p = replystr.rfind("W"); if (p == string::npos) return bwA; bwA = 38 - (unsigned char)replystr[p + 1]; return bwA; } int RIG_TT538::adjust_bandwidth(int m) { if (m == 0) return 37; if (m == 1 || m == 2) return 27; if (m == 3) return 10; if (m == 4) return 27; return 27; } void RIG_TT538::set_if_shift(int val) { pbt = val; cmd = TT538setPBT; int bpval = progStatus.bpf_center - 200 - TT538_numeric_widths[bwA]/2; short int si = val; if ((modeA == 1 || modeA == 2) && progStatus.use_bpf_center) si += (bpval > 0 ? bpval : 0); cmd[2] = (si & 0xff00) >> 8; cmd[3] = (si & 0xff); sendCommand(cmd); int ret = sendCommand(TT538getPBT); if (ret < 4) return; size_t p = replystr.rfind("P"); if (p == string::npos) return; if (replystr[p+1] != cmd[2] || replystr[p+2] != cmd[3]) { sendCommand(cmd); } } bool RIG_TT538::get_if_shift(int &val) { val = 0; // cmd = TT538getPBT; // sendCommand(cmd, 0); return false; } void RIG_TT538::get_if_min_max_step(int &min, int &max, int &step) { min = -2000; max = 2000; step = 10; } void RIG_TT538::set_attenuator(int val) { cmd = TT538setATT; if (val) cmd[2] = '1'; else cmd[2] = '0'; sendCommand(cmd); } int RIG_TT538::get_attenuator() { cmd = TT538getATT; int ret = sendCommand(cmd); if (ret < 3) return 0; size_t p = replystr.rfind("J"); if (p == string::npos) return 0; if (replystr[p+1] == '1') return 1; return 0; } int RIG_TT538::get_smeter() { double sig = 0.0; cmd = TT538getSMETER; int ret = sendCommand(cmd); if (ret < 6) return 0; size_t p = replystr.rfind("S"); if (p == string::npos) return 0; int sval; replystr[p+5] = 0; sscanf(&replystr[p+1], "%4x", &sval); sig = sval / 256.0; return (int)(sig * 50.0 / 9.0); } static int gaintable[] = { 0, 2, 3, 4, 6, 7, 8, 9, 11, 12, 13, 14, 16, 17, 18, 19, 21, 22, 23, 24, 26, 27, 28, 30, 31, 32, 33, 35, 36, 37, 38, 40, 41, 42, 43, 45, 46, 47, 48, 50, 51, 52, 53, 55, 56, 57, 58, 60, 61, 62, 64, 65, 66, 68, 69, 70, 71, 72, 74, 75, 76, 77, 79, 80, 81, 82, 84, 85, 86, 88, 89, 90, 91, 92, 94, 95, 96, 98, 99, 100, 101, 103, 104, 105, 107, 108, 109, 110, 111, 113, 114, 115, 117, 118, 119, 120, 121, 123, 127, 125, 127 }; static int pot2val(int n) { int i = 0; for (i = 0; i < 100; i++) if (gaintable[i] >= n) break; return gaintable[i]; } static int val2pot(int n) { return gaintable[n]; } int RIG_TT538::get_volume_control() { cmd = TT538getVOL; int ret = sendCommand(cmd); if (ret < 3) return 0; size_t p = replystr.rfind("U"); if (p == string::npos) return 0; return pot2val(replystr[p+1] & 0x7F); } void RIG_TT538::set_volume_control(int vol) { cmd = TT538setVOL; cmd[2] = val2pot(vol); sendCommand(cmd); } void RIG_TT538::set_rf_gain(int val) { cmd = TT538setRF; cmd[2] = val2pot(val); sendCommand(cmd); } int RIG_TT538::get_rf_gain() { // cmd = TT538getRF; // sendCommand(cmd, 3, true); //showresponse(cmd); return 100; // Jupiter does not reply with values as specified in the programmers manual // Panel RF gain 0..50% replies with 80H..00H // Panel RF gain 50..100% replies with 00H } // Tranceiver PTT on/off void RIG_TT538::set_PTT_control(int val) { if (val) sendCommand(TT538setXMT); else sendCommand(TT538setRCV); } int RIG_TT538::get_power_out() { int ret = sendCommand("?S\r"); // same as get smeter in receive if (ret < 4) return fwdpwr; size_t p = replystr.rfind("T"); if (p == string::npos) return fwdpwr; fwdpwr = 0.8*fwdpwr + 0.2*(unsigned char)replystr[p+1]; refpwr = 0.8*refpwr + 0.2*(unsigned char)replystr[p+2]; LOG_INFO("%s // %4.1f : %4.1f", str2hex(replystr.c_str(), replystr.length()), fwdpwr, refpwr); return (int)fwdpwr; } int RIG_TT538::get_swr() { double swr, nu; if (fwdpwr == 0) return 0; if (fwdpwr == refpwr) return 100; nu = sqrt(refpwr / fwdpwr); swr = (1 + nu) / (1 - nu) - 1.0; swr *= 16.67; if (swr < 0) swr = 0; if (swr > 100) swr = 100; LOG_INFO("swr %4.2f", swr); return (int)swr; } flrig-1.3.24/src/rigs/TS140.cxx0000644000175000017500000000715012562731651012672 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "TS140.h" const char TS140name_[] = "TS140"; const char *TS140modes_[] = { "LSB", "USB", "CW", "FM", "AM", "CWN", NULL}; static const char TS140_mode_type[] = {'L', 'U', 'U', 'U', 'U', 'U'}; RIG_TS140::RIG_TS140() { // base class values name_ = TS140name_; modes_ = TS140modes_; bandwidths_ = NULL; comm_baudrate = BR9600; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 2; has_mode_control = has_ptt_control = true; has_attenuator_control = has_preamp_control = has_power_control = has_volume_control = has_bandwidth_control = has_micgain_control = has_notch_control = has_ifshift_control = has_tune_control = has_swr_control = false; precision = 10; ndigits = 7; } /* ======================================================================== frequency & mode data are contained in the IF; response IFaaaaaaaaaaaXXXXXbbbbbcdXeefghjklmmX; 12345678901234567890123456789012345678 01234567890123456789012345678901234567 byte # where: aaaaaaaaaaa => decimal value of vfo frequency bbbbb => rit/xit frequency c => rit off/on d => xit off/on e => memory channel f => tx/rx g => mode h => function j => scan off/on k => split off /on l => tone off /on m => tone number X => unused characters Test output from Minicom to IF; command IF00014070000 -00300 000200; 0001000 is vfoA in LSB 0002000 is vfoA in USB 0003000 CW 0004000 FM 0005000 AM 0007000 CWN (dont have narrow filter however) 0002100 VFOB in USB 0002001 VFOA in USB SPILT 0012000 PTT on in USB ======================================================================== */ long RIG_TS140::get_vfoA () { cmd = "IF;"; int ret = wait_char(';', 38, 100, "get VFO", ASC); if (ret < 38) return freqA; long f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replybuff[ret - 38 + n] - '0'; freqA = f; return freqA; } void RIG_TS140::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); } // Tranceiver PTT on/off void RIG_TS140::set_PTT_control(int val) { if (val) sendCommand("TX;"); else sendCommand("RX;"); } int RIG_TS140::get_modetype(int n) { return TS140_mode_type[n]; } void RIG_TS140::set_modeA(int val) { if (val == 5) val++; cmd = "MD0;"; cmd[2] = '1' + (val % 10); sendCommand(cmd); } int RIG_TS140::get_modeA() { modeA = 0; cmd = "IF;"; int ret = wait_char(';', 38, 100, "get mode", ASC); if (ret < 38) return modeA; int md = replybuff[ret - 38 + 29] - '1'; if (md < 0) md = 0; if (md > 5) md = 5; modeA = md; return modeA; } flrig-1.3.24/src/rigs/RAY152.cxx0000644000175000017500000001734412562731647013015 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include "RAY152.h" //============================================================================= const char RIG_RAY152name_[] = "RAY 152"; const char *RIG_RAY152modes_[] = { "USB", "LSB", "H3E", "A1A", "F1B", NULL}; static const char RIG_RAY152_mode_type[] = {'U', 'L', 'U', 'L', 'U'}; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 145, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 145, 368 }, { (Fl_Widget *)sldrRFGAIN, 54, 125, 156 }, { (Fl_Widget *)sldrSQUELCH, 266, 125, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_RAY152::RIG_RAY152() { name_ = RIG_RAY152name_; modes_ = RIG_RAY152modes_; widgets = rig_widgets; comm_baudrate = BR1200; stopbits = 1; comm_retries = 2; comm_wait = 10; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; A.freq = 14070000; A.imode = 0; A.iBW = 0; B.freq = 3580000; B.imode = 0; B.iBW = 0; precision = 100; ndigits = 6; has_mode_control = true; has_ptt_control = true; has_rf_control = true; has_volume_control = true; has_rit = true; has_sql_control = true; has_noise_control = true; has_auto_notch = true; }; static void nocr( string & s) { for (size_t i = 0; i < s.length(); i++) if (s[i] == '\r') s[i] = ' '; } /* Data string returned by the 'O' command 3 A*\r AGC ON/OFF 5 C***\r Memory channel # 5 D+/-**\r Clarifier frequency 9 FT******\r Transmit frequemcy 9 FR******\r Receive frequency 6 I****\r ITU channel # 3 M*\r Mode 3 N*\r Noise blanker status 3 P*\r Power reduction status 5 Q***\r Squelch setting 5 R***\r RF gain setting 5 V***\r Volume setting 3 Z*\r Meter function total 64 */ void RIG_RAY152::get_data() { int ret = sendCommand("O\r"); if (ret < 66) return; // test string //replystr = "A1\rC000\rD-05\rFT1407000\rFR1407000\rI0000\rM1\rN1\rP0\rQ000\rR100\rV128\rZ1\r"; if (dumpdata) LOG_WARN("\n%s", replystr.c_str()); dumpdata = false; size_t pos; pos = replystr.find("FR"); // receive frequency if (pos != string::npos) { int freq; sscanf(&replystr[pos + 2], "%d", &freq); A.freq = 100 * freq; } pos = replystr.find("M"); // mode if (pos != string::npos) A.imode = replystr[pos + 1] - '1'; pos = replystr.find("D"); if (pos != string::npos) { sscanf(&replystr[pos + 1], "%d", &RitFreq); RitFreq *= 10; } pos = replystr.find("\rR"); if (pos != string::npos) sscanf(&replystr[pos + 2], "%d", &rfg); pos = replystr.find("V"); if (pos != string::npos) { sscanf(&replystr[pos + 1], "%d", &vol); vol *= 100; vol /= 255; } pos = replystr.find("Q"); if (pos != string::npos) { sscanf(&replystr[pos + 1], "%d", &squelch); } pos = replystr.find("N"); if (pos != string::npos) { if (replystr[pos + 1] > '0') { nb_set = replystr[pos+1]; nb = 1; } else { nb = 0; nb_set = '2'; } } // RAY152 usurps the autonotch button for AGC control pos = replystr.find("A"); if (pos != string::npos) agc = replystr[1] == '1' ? 1 : 0; } void RIG_RAY152::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = sldrSQUELCH; sendCommand("E1\r", 0); sendCommand("Z1\r", 0); dumpdata = true; get_data(); set_auto_notch(agc); } void RIG_RAY152::shutdown() { sendCommand("E0\r", 0); LOG_INFO("%s", cmd.c_str()); } long RIG_RAY152::get_vfoA () { return A.freq; } void RIG_RAY152::set_vfoA (long freq) { A.freq = freq; cmd = "FT000000\r"; freq /= 100; cmd[7] += freq % 10; freq /= 10; cmd[6] += freq % 10; freq /= 10; cmd[5] += freq % 10; freq /= 10; cmd[4] += freq % 10; freq /= 10; cmd[3] += freq % 10; freq /=10; cmd[2] += freq; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); cmd[1] = 'R'; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); } long RIG_RAY152::get_vfoB () { return B.freq; } void RIG_RAY152::set_vfoB (long freq) { B.freq = freq; cmd = "FT000000\r"; freq /= 100; cmd[7] += freq % 10; freq /= 10; cmd[6] += freq % 10; freq /= 10; cmd[5] += freq % 10; freq /= 10; cmd[4] += freq % 10; freq /= 10; cmd[3] += freq % 10; freq /=10; cmd[2] += freq; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); cmd[1] = 'R'; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); } void RIG_RAY152::set_PTT_control(int val) { cmd = val ? "X1\r" : "X0\r"; sendCommand(cmd,0); LOG_INFO("%s", cmd.c_str()); } void RIG_RAY152::set_modeA(int md) { A.imode = md; cmd = "M"; cmd += (md + '1'); cmd += '\r'; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); } int RIG_RAY152::get_modeA() { return A.imode; } void RIG_RAY152::set_modeB(int md) { B.imode = md; cmd = "M"; cmd += (md + '1'); cmd += '\r'; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); } int RIG_RAY152::get_modeB() { return B.imode; } int RIG_RAY152::get_modetype(int n) { return RIG_RAY152_mode_type[n]; } void RIG_RAY152::set_volume_control(int val) { vol = val; string cmd = "V000\r"; val *= 255; val /= 100; cmd[3] += val % 10; val /= 10; cmd[2] += val % 10; val /= 10; cmd[1] += val; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); } void RIG_RAY152::set_rf_gain(int val) { rfg = val; cmd = "R000\r"; cmd[3] += val % 10; val /= 10; cmd[2] += val % 10; val /= 10; cmd[1] += val; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); } int RIG_RAY152::get_smeter(void) { cmd = "U\r"; int ret = sendCommand(cmd); string s = replystr; nocr(s); LOG_WARN("%s", s.c_str()); if (ret < 5) return 0; if (replystr[ret - 5] == 'U') { int val; sscanf(&replystr[ret - 5 + 1], "%d", &val); val = (int)(60.0 * (256.0 / (val + 16.0) - 1.0)); if (val > 100) val = 100; if (val < 0) val = 0; return val; } return 0; } int RIG_RAY152::get_power_out(void) { int ret = sendCommand("U\r"); if (ret < 5) return 0; if (replystr[ret - 5] == 'U') { int val; sscanf(&replystr[ret - 5 + 1], "%d", &val); val /= 128; val *= 100; return val; } return -1; } void RIG_RAY152::setRit(int v) { RitFreq = v; cmd = "D+00\r"; if (v < 0) cmd[1] = '-'; v /= 10; v = abs(v); cmd[3] += v % 10; v /= 10; cmd[2] += v % 10; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); } int RIG_RAY152::getRit() { return RitFreq; } void RIG_RAY152::set_squelch(int val) { squelch = val; cmd = "Q000\r"; cmd[3] += val % 10; val /= 10; cmd[2] += val % 10; val /= 10; cmd[1] += val; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); } int RIG_RAY152::get_squelch() { return squelch; } void RIG_RAY152::set_noise(bool on) { cmd = "Nx\r"; cmd[1] = on ? nb_set : '0'; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); } int RIG_RAY152::get_noise() { return nb; } void RIG_RAY152::set_auto_notch(int v) { cmd = "Ax\r"; cmd[1] = v ? '1' : '0'; sendCommand(cmd, 0); LOG_INFO("%s", cmd.c_str()); } int RIG_RAY152::get_auto_notch() { return agc; } flrig-1.3.24/src/rigs/FT450D.cxx0000644000175000017500000005634512562731647013004 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT450D.h" #include "rig.h" #define FL450D_WAIT_TIME 200 static const char FT450Dname_[] = "FT-450D"; enum mFT450D { mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mDATA_L, mRTTY_U, mFM_N, mDATA_U }; // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 mode index static const char *FT450Dmodes_[] = { "LSB", "USB", "CW", "FM", "AM", "RTTY-L", "CW-R", "DATA-L", "RTTY-U", "FM-N", "DATA-U", NULL}; static const char mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'B', 'C' }; static const char mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'L', 'U', 'U', 'U' }; static const char *FT450D_ssb_widths[] = {"1800", "2400", "3000", NULL}; static int FT450D_wvals_ssb_widths[] = {1, 2, 3, WVALS_LIMIT}; static const char *FT450D_cw_widths[] = {"300", "500", "2400", NULL}; static int FT450D_wvals_cw_widths[] = {1, 2, 3, WVALS_LIMIT}; static const char *FT450D_data_widths[] = {"300", "2400", "3000", NULL}; static int FT450D_wvals_data_widths[] = {1, 2, 3, WVALS_LIMIT}; static const char *FT450D_am_widths[] = {"3000", "6000", "9000", NULL}; static int FT450D_wvals_am_widths[] = {1, 2, 3, WVALS_LIMIT}; static const char *FT450D_fm_widths[] = {"2500", "5000", NULL}; static int FT450D_wvals_fm_widths[] = {1, 2, WVALS_LIMIT}; static const int FT450D_def_bw[] = { 2, 2, 0, 1, 1, 0, 0, 1, 0, 1, 1 }; static const char *FT450D_US_60m[] = {NULL, "126", "127", "128", "130", NULL}; // US has 5 60M presets. Using dummy numbers for all. // First NULL means skip 60m sets in set_band_selection(). // Maybe someone can do a cat command MC; on all 5 presets and add returned numbers above. // To send cat commands in flrig goto menu Config->Xcvr select->Send Cmd. // US 60M 5-USB, 5-CW static const char **Channels_60m = FT450D_US_60m; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)btnNR, 2, 165, 50 }, { (Fl_Widget *)sldrNR, 54, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_FT450D::RIG_FT450D() { // base class values name_ = FT450Dname_; modes_ = FT450Dmodes_; bandwidths_ = FT450D_ssb_widths; bw_vals_ = FT450D_wvals_ssb_widths; widgets = rig_widgets; comm_baudrate = BR38400; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 2; def_mode = 10; def_bw = 2; def_freq = 14070000; precision = 10; ndigits = 8; has_a2b = can_change_alt_vfo = has_xcvr_auto_on_off = has_noise_reduction = has_noise_reduction_control = has_band_selection = has_extras = has_vox_onoff = has_vox_gain = has_vox_hang = has_cw_wpm = has_cw_keyer = // has_cw_vol = has_cw_spot = has_cw_spot_tone = has_cw_qsk = has_cw_weight = has_cw_delay = has_cw_break_in = has_split = has_split_AB = has_smeter = has_swr_control = has_alc_control = has_power_out = has_power_control = has_volume_control = has_rf_control = has_mode_control = has_noise_control = has_bandwidth_control = has_micgain_control = has_notch_control = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = true; // derived specific notch_on = false; m_60m_indx = 0; precision = 1; ndigits = 8; } void RIG_FT450D::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; rig_widgets[9].W = btnNR; rig_widgets[10].W = sldrNR; // set progStatus defaults if (progStatus.noise_reduction_val < 1) progStatus.noise_reduction_val = 1; // first-time-thru, or reset if (progStatus.cw_qsk == 10 || progStatus.cw_qsk == 20) { progStatus.cw_qsk = 30; progStatus.cw_spot_tone = 700; progStatus.cw_weight = 3.0; progStatus.cw_wpm = 18; progStatus.vox_gain = 50; progStatus.vox_hang = 500; } // turn off auto information mode sendCommand("AI0;"); selectA(); } void RIG_FT450D::set_band_selection(int v) { int inc_60m = false; cmd = "IF;"; waitN(27, 100, "get vfo mode in set_band_selection", ASC); size_t p = replystr.rfind("IF"); if (p == string::npos) return; if (replystr[p+21] != '0') { // vfo 60M memory mode inc_60m = true; } if (v == 12) { // 5MHz 60m presets if (Channels_60m[0] == NULL) return; // no 60m Channels so skip if (inc_60m) { if (Channels_60m[++m_60m_indx] == NULL) m_60m_indx = 0; } cmd.assign("MC").append(Channels_60m[m_60m_indx]).append(";"); } else { // v == 1..11 band selection OR return to vfo mode == 0 if (inc_60m) cmd = "VM;"; else { if (v < 3) v = v - 1; cmd.assign("BS").append(to_decimal(v, 2)).append(";"); } } sendCommand(cmd); showresp(WARN, ASC, "Select Band Stacks", cmd, replystr); } void RIG_FT450D::selectA() { cmd = "VS0;"; sendCommand(cmd, 0); showresp(WARN, ASC, "select vfo A", cmd, replystr); } void RIG_FT450D::selectB() { cmd = "VS1;"; sendCommand(cmd, 0); showresp(WARN, ASC, "select vfo B", cmd, replystr); } void RIG_FT450D::A2B() { cmd = "VV;"; sendCommand(cmd); showresp(WARN, ASC, "vfo A --> B", cmd, replystr); } long RIG_FT450D::get_vfoA () { cmd = rsp = "FA"; cmd += ';'; wait_char(';',11, FL450D_WAIT_TIME, "get vfo A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqA; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqA = f; return freqA; } void RIG_FT450D::set_vfoA (long freq) { if (useB) selectA(); freqA = freq; cmd = "FA00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo A", cmd, replystr); if (useB) selectB(); } long RIG_FT450D::get_vfoB () { cmd = rsp = "FB"; cmd += ';'; wait_char(';',11, FL450D_WAIT_TIME, "get vfo B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqB; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqB = f; return freqB; } void RIG_FT450D::set_vfoB (long freq) { if (!useB) selectB(); freqB = freq; cmd = "FB00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo B", cmd, replystr); if (!useB) selectA(); } void RIG_FT450D::set_split(bool on) { if (on) cmd = "FT1;"; else cmd = "FT0;"; sendCommand(cmd); showresp(WARN, ASC, "SET split", cmd, replystr); } int RIG_FT450D::get_split() { size_t p; int split = 0; char rx, tx; // tx vfo cmd = rsp = "FT"; cmd.append(";"); wait_char(';',4, FL450D_WAIT_TIME, "get split tx vfo", ASC); p = replystr.rfind(rsp); if (p == string::npos) return false; tx = replystr[p+2] - '0'; // rx vfo cmd = rsp = "FR"; cmd.append(";"); wait_char(';',4, FL450D_WAIT_TIME, "get split rx vfo", ASC); p = replystr.rfind(rsp); if (p == string::npos) return false; rx = replystr[p+2] - '0'; split = (tx == 1 ? 2 : 0) + (rx >= 4 ? 1 : 0); return split; } int RIG_FT450D::get_smeter() { cmd = rsp = "SM0"; cmd += ';'; wait_char(';',7, FL450D_WAIT_TIME, "get smeter", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); mtr = mtr * 100.0 / 256.0; return mtr; } // measured by W3NR // SWR..... mtr ... display // 6:1..... 255 ... 100 // 3:1..... 132 ... 50 // 2:1..... 066 ... 26 // 2.5:1... 099 ... 39 // 1.5:1... 033 ... 13 // 1.1:1... 008 ... 3 int RIG_FT450D::get_swr() { cmd = rsp = "RM6"; cmd += ';'; wait_char(';',7, FL450D_WAIT_TIME, "get swr", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return (int)ceil(mtr / 2.56); } int RIG_FT450D::get_alc() { cmd = rsp = "RM4"; cmd += ';'; wait_char(';',7, FL450D_WAIT_TIME, "get alc", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return (int)ceil(mtr / 2.56); } int RIG_FT450D::get_power_out() { cmd = rsp = "RM5"; sendCommand(cmd.append(";")); wait_char(';',7, FL450D_WAIT_TIME, "get pout", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; double mtr = (double)(atoi(&replystr[p+3])); // following conversion iaw data measured by Terry, KJ4EED mtr = (.06 * mtr) + (.002 * mtr * mtr); return (int)ceil(mtr); } int RIG_FT450D::get_power_control() { cmd = rsp = "PC"; cmd += ';'; wait_char(';',6, FL450D_WAIT_TIME, "get power", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.power_level; if (p + 5 >= replystr.length()) return progStatus.power_level; int mtr = atoi(&replystr[p+2]); return mtr; } void RIG_FT450D::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET power", cmd, replystr); } // Volume control return 0 ... 100 int RIG_FT450D::get_volume_control() { cmd = rsp = "AG0"; cmd += ';'; wait_char(';',7, FL450D_WAIT_TIME, "get vol", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.volume; if (p + 6 >= replystr.length()) return progStatus.volume; int val = round(atoi(&replystr[p+3]) / 2.55); if (val > 100) val = 100; return ceil(val); } void RIG_FT450D::set_volume_control(int val) { int ivol = (int)(val * 255 / 100); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vol", cmd, replystr); } void RIG_FT450D::get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } // Tranceiver PTT on/off void RIG_FT450D::set_PTT_control(int val) { cmd = val ? "TX1;" : "TX0;"; sendCommand(cmd); showresp(WARN, ASC, "SET PTT", cmd, replystr); } void RIG_FT450D::tune_rig() { cmd = "AC002;"; sendCommand(cmd); showresp(WARN, ASC, "tune rig", cmd, replystr); } void RIG_FT450D::set_attenuator(int val) { if (val) cmd = "RA01;"; else cmd = "RA00;"; sendCommand(cmd); showresp(WARN, ASC, "get att", cmd, replystr); } int RIG_FT450D::get_attenuator() { cmd = rsp = "RA0"; cmd += ';'; wait_char(';', 5, FL450D_WAIT_TIME, "get att", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; return (replystr[p+3] == '1' ? 1 : 0); } void RIG_FT450D::set_preamp(int val) { if (val) cmd = "PA01;"; else cmd = "PA00;"; sendCommand(cmd); showresp(WARN, ASC, "set preamp", cmd, replystr); } int RIG_FT450D::get_preamp() { cmd = rsp = "PA0"; cmd += ';'; wait_char(';', 5, FL450D_WAIT_TIME, "get pre", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; return (replystr[p+3] == '1' ? 1 : 0); } int RIG_FT450D::adjust_bandwidth(int val) { switch (val) { case mCW : case mCW_R : bandwidths_ = FT450D_cw_widths; bw_vals_ = FT450D_wvals_cw_widths; break; case mFM : case mFM_N : bandwidths_ = FT450D_fm_widths; bw_vals_ = FT450D_wvals_fm_widths; break; case mAM : bandwidths_ = FT450D_am_widths; bw_vals_ = FT450D_wvals_am_widths; break; case mRTTY_L : case mRTTY_U : case mDATA_L : case mDATA_U : bandwidths_ = FT450D_data_widths; bw_vals_ = FT450D_wvals_data_widths; break; default: bandwidths_ = FT450D_ssb_widths; bw_vals_ = FT450D_wvals_ssb_widths; break; } return FT450D_def_bw[val]; } int RIG_FT450D::def_bandwidth(int val) { return FT450D_def_bw[val]; } const char ** RIG_FT450D::bwtable(int n) { switch (n) { case mCW : case mCW_R : return FT450D_cw_widths; case mFM : case mFM_N : return FT450D_fm_widths; case mAM : return FT450D_am_widths; case mRTTY_L : case mRTTY_U : case mDATA_L : case mDATA_U : return FT450D_data_widths; } return FT450D_ssb_widths; } void RIG_FT450D::set_modeA(int val) { modeA = val; cmd = "MD0"; cmd += mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode A", cmd, replystr); adjust_bandwidth(modeA); if (val == 2 || val == 6) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FT450D::get_modeA() { cmd = rsp = "MD0"; cmd += ';'; wait_char(';', 5, FL450D_WAIT_TIME, "get mode A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return modeA; int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'B'; modeA = md; adjust_bandwidth(modeA); return modeA; } void RIG_FT450D::set_bwA(int val) { bwA = val; switch (val) { case 0 : cmd = "SH000;"; break; case 1 : cmd = "SH016;"; break; case 2 : cmd = "SH031;"; break; default: cmd = "SH016;"; } sendCommand(cmd); showresp(WARN, ASC, "SET bwA", cmd, replystr); } int RIG_FT450D::get_bwA() { cmd = rsp = "SH0"; cmd += ';'; wait_char(';', 6, FL450D_WAIT_TIME, "get bw A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return bwA; string bws = replystr.substr(p+3,2); if (bws == "00") bwA = 0; else if (bws == "16") bwA = 1; else if (bws == "31") bwA = 2; return bwA; } void RIG_FT450D::set_modeB(int val) { modeB = val; cmd = "MD0"; cmd += mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode B", cmd, replystr); adjust_bandwidth(modeB); if (val == 2 || val == 6) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FT450D::get_modeB() { cmd = rsp = "MD0"; cmd += ';'; wait_char(';', 5, FL450D_WAIT_TIME, "get mode B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return modeB; int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'B'; modeB = md; adjust_bandwidth(modeB); return modeB; } void RIG_FT450D::set_bwB(int val) { bwB = val; switch (val) { case 0 : cmd = "SH000;"; break; case 1 : cmd = "SH016;"; break; case 2 : cmd = "SH031;"; break; default: cmd = "SH031;"; } sendCommand(cmd); showresp(WARN, ASC, "SET bwB", cmd, replystr); } int RIG_FT450D::get_bwB() { cmd = rsp = "SH0"; cmd += ';'; wait_char(';', 6, FL450D_WAIT_TIME, "get bw B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return bwB; string bws = replystr.substr(p+3,2); if (bws == "00") bwB = 0; else if (bws == "16") bwB = 1; else if (bws == "31") bwB = 2; return bwB; } int RIG_FT450D::get_modetype(int n) { return mode_type[n]; } void RIG_FT450D::set_if_shift(int val) { cmd = "IS0+0000;"; if (val < 0) cmd[3] = '-'; val = abs(val); for (int i = 4; i > 0; i--) { cmd[3+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET ifshift", cmd, replystr); } bool RIG_FT450D::get_if_shift(int &val) { cmd = rsp = "IS0"; cmd += ';'; wait_char(';', 9, FL450D_WAIT_TIME, "get if shift", ASC); size_t p = replystr.rfind(rsp); val = progStatus.shift_val; if (p == string::npos) return progStatus.shift; val = atoi(&replystr[p+4]); if (replystr[p+3] == '-') val = -val; return (val != 0); } void RIG_FT450D::get_if_min_max_step(int &min, int &max, int &step) { min = -1000; max = 1000; step = 100; } void RIG_FT450D::set_notch(bool on, int val) { cmd = "BP00000;"; if (!on) { if (notch_on) { sendCommand(cmd); showresp(WARN, ASC, "SET notch off", cmd, replystr); notch_on = false; } return; } cmd = "BP00001;"; if (!notch_on) { sendCommand(cmd); showresp(WARN, ASC, "SET notch on", cmd, replystr); notch_on = true; } cmd = "BP01nnn;"; val = val / 10; for (int i = 3; i > 0; i--) { cmd[3 + i] = val % 10 + '0'; val /=10; } sendCommand(cmd); showresp(WARN, ASC, "SET notch val", cmd, replystr); } bool RIG_FT450D::get_notch(int &val) { bool ison = false; cmd = rsp = "BP00"; cmd += ';'; wait_char(';', 8, FL450D_WAIT_TIME, "get notch on/off", ASC); size_t p = replystr.rfind(rsp); val = progStatus.notch_val = 0; // disabled default slider position if (p == string::npos) return ison; if (replystr[p+6] == '1') { // manual notch enabled ison = true; val = progStatus.notch_val; cmd = rsp = "BP01"; cmd += ';'; waitN(8, 100, "get notch val", ASC); p = replystr.rfind(rsp); if (p == string::npos || rsp.length() < 8) return ison; val = atoi(&replystr[p+4]); val = val * 10; } notch_on = ison; return ison; } void RIG_FT450D::get_notch_min_max_step(int &min, int &max, int &step) { min = 10; max = 4000; step = 10; } void RIG_FT450D::set_noise(bool b) { if (b) cmd = "NB01;"; else cmd = "NB00;"; sendCommand (cmd); showresp(WARN, ASC, "SET NB", cmd, replystr); } void RIG_FT450D::set_xcvr_auto_on() { if (!progStatus.xcvr_auto_on) return; cmd = rsp = "PS"; cmd.append(";"); waitN(4, 100, "Test: Is Rig ON", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) { // rig is off, power on cmd = "PS1;"; sendCommand(cmd); MilliSleep(1500); // 1.0 < T < 2.0 seconds sendCommand(cmd); MilliSleep(3000); // Wait for rig startup? Maybe not needed. } } void RIG_FT450D::set_xcvr_auto_off() { if (!progStatus.xcvr_auto_off) return; cmd = "PS0;"; sendCommand(cmd); } // val 0 .. 100 void RIG_FT450D::set_mic_gain(int val) { cmd = "MG000;"; val = (int)(val * 2.55); // convert to 0 .. 255 for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET mic", cmd, replystr); } int RIG_FT450D::get_mic_gain() { cmd = rsp = "MG"; cmd += ';'; wait_char(';', 6, FL450D_WAIT_TIME, "get mic", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; replystr[p+5] = 0; return atoi(&replystr[p+2]);; } void RIG_FT450D::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FT450D::set_special(int v) { if (v) cmd = "VR1;"; else cmd = "VR0;"; sendCommand(cmd); showresp(WARN, ASC, "Set special", cmd, replystr); } void RIG_FT450D::set_vox_onoff() { cmd = "VX0;"; if (progStatus.vox_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox on/off", cmd, replystr); } void RIG_FT450D::set_vox_gain() { cmd = "VG"; cmd.append(to_decimal(progStatus.vox_gain, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox gain", cmd, replystr); } void RIG_FT450D::set_vox_hang() { cmd = "VD"; cmd.append(to_decimal(progStatus.vox_hang, 4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox delay", cmd, replystr); } void RIG_FT450D::set_cw_wpm() { cmd = "KS"; if (progStatus.cw_wpm > 60) progStatus.cw_wpm = 60; if (progStatus.cw_wpm < 4) progStatus.cw_wpm = 4; cmd.append(to_decimal(progStatus.cw_wpm, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw wpm", cmd, replystr); } void RIG_FT450D::enable_keyer() { cmd = "KR0;"; if (progStatus.enable_keyer) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET keyer on/off", cmd, replystr); } bool RIG_FT450D::set_cw_spot() { if (vfo.imode == 2 || vfo.imode == 6) { cmd = "CS0;"; if (progStatus.spot_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET spot on/off", cmd, replystr); return true; } else return false; } void RIG_FT450D::set_cw_weight() { int n = round(progStatus.cw_weight * 10); cmd.assign("EX024").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw weight", cmd, replystr); } void RIG_FT450D::enable_break_in() { if (progStatus.break_in) cmd = "BI1;"; else cmd = "BI0;"; sendCommand(cmd); showresp(WARN, ASC, "SET keyer on/off", cmd, replystr); } void RIG_FT450D::set_cw_delay() { if (progStatus.break_in) return; int n = progStatus.cw_delay; cmd.assign("EX016").append(to_decimal(n,4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw delay", cmd, replystr); } void RIG_FT450D::set_cw_qsk() { if (progStatus.cw_qsk == 0) { cmd.assign("BI1;"); sendCommand(cmd); showresp(WARN, ASC, "SET break-in ON", cmd, replystr); return; } cmd.assign("BI0;"); sendCommand(cmd); int n = progStatus.cw_qsk / 5 - 3; cmd.assign("EX018").append(to_decimal(n, 1)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw qsk", cmd, replystr); } void RIG_FT450D::set_cw_spot_tone() { int n = (progStatus.cw_spot_tone - 400) / 50 + 1; cmd = "EX020"; cmd.append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw tone", cmd, replystr); } // DNR void RIG_FT450D::set_noise_reduction_val(int val) { cmd.assign("RL0").append(to_decimal(val, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET_noise_reduction_val", cmd, replystr); } int RIG_FT450D::get_noise_reduction_val() { int val = 1; cmd = rsp = "RL0"; cmd.append(";"); waitN(6, 100, "GET noise reduction val", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return val; val = atoi(&replystr[p+3]); return val; } // DNR void RIG_FT450D::set_noise_reduction(int val) { cmd.assign("NR0").append(val ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET noise reduction", cmd, replystr); } int RIG_FT450D::get_noise_reduction() { int val; cmd = rsp = "NR0"; cmd.append(";"); wait_char(';', 5, FL450D_WAIT_TIME, "GET noise reduction val", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; val = replystr[p+3] - '0'; return val; } void RIG_FT450D::set_rf_gain(int val) { cmd = "RG0000;"; int rfval = (int)((100 - val) * 2.55); for (int i = 5; i > 2; i--) { cmd[i] = rfval % 10 + '0'; rfval /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET rfgain", cmd, replystr); } int RIG_FT450D::get_rf_gain() { int rfval = 0; cmd = rsp = "RG0"; cmd += ';'; wait_char(';', 7, FL450D_WAIT_TIME, "get rfgain", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.rfgain; for (int i = 3; i < 6; i++) { rfval *= 10; rfval += replystr[p+i] - '0'; } rfval = 100 - (int)(rfval / 2.55); if (rfval > 100) rfval = 100; return ceil(rfval); } void RIG_FT450D::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } flrig-1.3.24/src/rigs/IC7100.cxx0000644000175000017500000003240412642041360012710 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC7100.h" bool IC7100_DEBUG = true; //============================================================================= // IC-7100 /* */ const char IC7100name_[] = "IC-7100"; const char *IC7100modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "WFM", "CW-R", "RTTY-R", "DV", "USB-D", "AM-D", "FM-D", NULL}; enum { LSB7100, USB7100, AM7100, CW7100, RTTY7100, FM7100, WFM7100, CWR7100, RTTYR7100, DV7100, USBD7100, AMD7100, FMD7100 }; const char IC7100_mode_type[] = { 'L', 'U', 'U', 'L', 'L', 'U', 'U', 'U', 'U', 'U', 'U', 'U', 'U', 'U' }; const char IC7100_mode_nbr[] = { 0x00, // Select the LSB mode 0x01, // Select the USB mode 0x02, // Select the AM mode 0x03, // Select the CW mode 0x04, // Select the RTTY mode 0x05, // Select the FM mode 0x06, // Select the WFM mode 0x07, // Select the CW-R mode 0x08, // Select the RTTY-R mode 0x17, // Select the DV mode 0x01, // USB-D 0x02, // AM-D 0x05, // FM-D }; const char *IC7100_ssb_bws[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3100", "3200", "3300", "3400", "3500", "3600", NULL }; static int IC7100_bw_vals_SSB[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41, WVALS_LIMIT}; const char *IC7100_rtty_bws[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", NULL }; static int IC7100_bw_vals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32, WVALS_LIMIT}; const char *IC7100_am_bws[] = { "200", "400", "600", "800", "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", "3800", "4000", "4200", "4400", "4600", "4800", "5000", "5200", "5400", "5600", "5800", "6000", "6200", "6400", "6600", "6800", "7000", "7200", "7400", "7100", "7800", "8000", "8200", "8400", "8600", "8800", "9000", "9200", "9400", "9600", "9800", "10000", NULL }; static int IC7100_bw_vals_AM[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41,42,43,44,45,46,47,48,49,50, WVALS_LIMIT}; const char *IC7100_fm_bws[] = { "FIXED", NULL }; static int IC7100_bw_vals_FM[] = { 1, WVALS_LIMIT}; const char *IC7100_dv_bws[] = { "FIXED", NULL }; static int IC7100_bw_vals_DV[] = { 1, WVALS_LIMIT}; static GUI IC7100_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 54, 165, 156 }, { (Fl_Widget *)btnNR, 2, 185, 50 }, { (Fl_Widget *)sldrNR, 54, 185, 156 }, { (Fl_Widget *)btnIFsh, 214, 125, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 125, 156 }, { (Fl_Widget *)btnNotch, 214, 145, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 165, 156 }, { (Fl_Widget *)sldrPOWER, 266, 185, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC7100::RIG_IC7100() { defaultCIV = 0x88; name_ = IC7100name_; modes_ = IC7100modes_; bandwidths_ = IC7100_ssb_bws; bw_vals_ = IC7100_bw_vals_SSB; _mode_type = IC7100_mode_type; adjustCIV(defaultCIV); comm_retries = 2; comm_wait = 20; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; widgets = IC7100_widgets; has_extras = has_cw_wpm = has_cw_spot_tone = has_cw_qsk = has_cw_vol = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_compON = has_compression = has_micgain_control = has_bandwidth_control = true; precision = 1; ndigits = 9; }; //====================================================================== // IC7100 unique commands //====================================================================== void RIG_IC7100::initialize() { IC7100_widgets[0].W = btnVol; IC7100_widgets[1].W = sldrVOLUME; IC7100_widgets[2].W = sldrRFGAIN; IC7100_widgets[3].W = sldrSQUELCH; IC7100_widgets[4].W = btnNR; IC7100_widgets[5].W = sldrNR; IC7100_widgets[6].W = btnIFsh; IC7100_widgets[7].W = sldrIFSHIFT; IC7100_widgets[8].W = btnNotch; IC7100_widgets[9].W = sldrNOTCH; IC7100_widgets[10].W = sldrMICGAIN; IC7100_widgets[11].W = sldrPOWER; } void RIG_IC7100::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\x00'; cmd.append(post); waitFB("select A"); } void RIG_IC7100::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\x01'; cmd.append(post); waitFB("select B"); } void RIG_IC7100::set_modeA(int val) { A.imode = val; cmd = pre_to; cmd += '\x06'; cmd += IC7100_mode_nbr[val]; cmd.append( post ); waitFB("set mode A"); // digital set / clear if (val == USBD7100 || val == AMD7100 || val == FMD7100) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; cmd += '\x01'; cmd += '\x01'; cmd.append( post); waitFB("set digital"); } } int RIG_IC7100::get_modeA() { int md = 0; cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); for (md = CW7100; md <= DV7100; md++) if (replystr[p+6] == IC7100_mode_nbr[md]) break; if (md == USB7100 || md == AM7100 || md == FM7100) { cmd = pre_to; cmd.append("\x1a\x06"); cmd.append(post); resp = pre_fm; resp.append("\x1a\x06"); if (waitFOR(9, "get digital setting")) { size_t p = replystr.rfind(resp); if ((replystr[p+6] & 0x04) == 0x04) { // if (replystr[p+6] == 0x01) { if (md == USB7100) md = USBD7100; else if (md == AM7100) md = AMD7100; else if (md == FM7100) md = FMD7100; } } } A.imode = md; } return A.imode; } void RIG_IC7100::set_modeB(int val) { B.imode = val; cmd = pre_to; cmd += '\x06'; cmd += IC7100_mode_nbr[val]; cmd.append( post ); waitFB("set mode B"); if (val == USBD7100 || val == AMD7100 || val == FMD7100) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; cmd += '\x01'; cmd += '\x01'; cmd.append( post); waitFB("set digital"); } } int RIG_IC7100::get_modeB() { int md = 0; cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get mode B")) { size_t p = replystr.rfind(resp); for (md = CW7100; md <= DV7100; md++) if (replystr[p+6] == IC7100_mode_nbr[md]) break; if (md == USB7100 || md == AM7100 || md == FM7100) { cmd = pre_to; cmd.append("\x1a\x06"); cmd.append(post); resp = pre_fm; resp.append("\x1a\x06"); if (waitFOR(9, "get digital")) { size_t p = replystr.rfind(resp); if ((replystr[p+6] & 0x04) == 0x04) { if (md == USB7100) md = USBD7100; else if (md == AM7100) md = AMD7100; else if (md == FM7100) md = FMD7100; } } } B.imode = md; } return B.imode; } int RIG_IC7100::get_bwA() { cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(post); string resp = pre_fm; resp.append("\x1a\x03"); if (waitFOR(8, "get bw A")) { size_t p = replystr.rfind(resp); A.iBW = fm_bcd(&replystr[p+6], 2); } return A.iBW; } void RIG_IC7100::set_bwA(int val) { if (A.imode == DV7100 || A.imode == FM7100 || A.imode == WFM7100 || A.imode == FMD7100) return; A.iBW = val; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(to_bcd(A.iBW, 2)); cmd.append(post); waitFB("set bw A"); } int RIG_IC7100::get_bwB() { cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(post); string resp = pre_fm; resp.append("\x1a\x03"); if (waitFOR(8, "get bw B")) { size_t p = replystr.rfind(resp); B.iBW = fm_bcd(&replystr[p+6], 2); } return B.iBW; } void RIG_IC7100::set_bwB(int val) { if (B.imode == DV7100 || B.imode == FM7100 || B.imode == WFM7100 || B.imode == FMD7100) return; B.iBW = val; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(to_bcd(B.iBW, 2)); cmd.append(post); waitFB("set bw A"); } int RIG_IC7100::adjust_bandwidth(int m) { switch (m) { case USB7100: case LSB7100: case USBD7100: bandwidths_ = IC7100_ssb_bws; bw_vals_ = IC7100_bw_vals_SSB; return 34; case AM7100: case AMD7100: bandwidths_ = IC7100_am_bws; bw_vals_ = IC7100_bw_vals_AM; return 29; break; case FM7100: case WFM7100: case FMD7100: bandwidths_ = IC7100_fm_bws; bw_vals_ = IC7100_bw_vals_FM; return 0; break; case RTTY7100: case RTTYR7100: bandwidths_ = IC7100_rtty_bws; bw_vals_ = IC7100_bw_vals_RTTY; return 12; break; case CW7100: case CWR7100: bandwidths_ = IC7100_ssb_bws; bw_vals_ = IC7100_bw_vals_SSB; return 10; break; case DV7100: bandwidths_ = IC7100_dv_bws; bw_vals_ = IC7100_bw_vals_DV; return 0; break; default: bandwidths_ = IC7100_ssb_bws; return 34; } return 0; } int RIG_IC7100::def_bandwidth(int m) { return adjust_bandwidth(m); } void RIG_IC7100::set_mic_gain(int v) { ICvol = (int)(v * 255 / 100); if (!progStatus.USBaudio) { cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); } else { cmd = pre_to; cmd += '\x1A'; cmd += '\x05'; cmd += '\x00'; cmd += '\x29'; cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); } waitFB("set mic gain"); } void RIG_IC7100::set_attenuator(int val) { int cmdval = 0; if (atten_level == 0) { atten_level = 1; atten_label("12 dB", true); cmdval = 0x12; } else if (atten_level == 1) { atten_level = 0; atten_label("Att", false); cmdval = 0x00; } cmd = pre_to; cmd += '\x11'; cmd += cmdval; cmd.append( post ); waitFB("set attenuator"); } int RIG_IC7100::get_attenuator() { cmd = pre_to; cmd += '\x11'; cmd.append( post ); string resp = pre_fm; resp += '\x11'; if (waitFOR(7, "get attenuator")) { size_t p = replystr.rfind(resp); if (replystr[p+6] == 0x12) { atten_level = 1; atten_label("12 dB", true); } else { atten_level = 0; atten_label("Att", false); } } return atten_level; } void RIG_IC7100::set_compression() { if (progStatus.compON) { cmd.assign(pre_to).append("\x14\x0E"); cmd.append(to_bcd(progStatus.compression * 255 / 100, 3)); cmd.append( post ); waitFB("set comp"); cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x01'; cmd.append(post); waitFB("set Comp ON"); } else{ cmd.assign(pre_to).append("\x16\x44"); cmd += '\x00'; cmd.append(post); waitFB("set Comp OFF"); } } void RIG_IC7100::set_vox_onoff() { if (progStatus.vox_onoff) { cmd.assign(pre_to).append("\x16\x46\x01"); cmd.append( post ); waitFB("set vox ON"); } else { cmd.assign(pre_to).append("\x16\x46"); cmd += '\x00'; cmd.append( post ); waitFB("set vox OFF"); } } void RIG_IC7100::set_vox_gain() { cmd.assign(pre_to).append("\x1A\x05"); // values 0-255 = 0 - 100% cmd +='\x01'; cmd +='\x63'; cmd.append(to_bcd((int)(progStatus.vox_gain * 2.55), 3)); cmd.append( post ); waitFB("SET vox gain"); } void RIG_IC7100::set_vox_anti() { cmd.assign(pre_to).append("\x1A\x05"); // values 0-255 = 0 - 100% cmd +='\x01'; cmd +='\x64'; cmd.append(to_bcd((int)(progStatus.vox_anti * 2.55), 3)); cmd.append( post ); waitFB("SET anti-vox"); } void RIG_IC7100::set_vox_hang() { cmd.assign(pre_to).append("\x1A\x05"); // values 00-20 = 0.0 - 2.0 sec cmd +='\x01'; cmd +='\x65'; cmd.append(to_bcd((int)(progStatus.vox_hang / 10 ), 2)); cmd.append( post ); waitFB("SET vox hang"); } // CW controls void RIG_IC7100::set_cw_wpm() { cmd.assign(pre_to).append("\x14\x0C"); // values 0-255 = 6 to 48 WPM cmd.append(to_bcd(round((progStatus.cw_wpm - 6) * 255 / (48 - 6)), 3)); cmd.append( post ); waitFB("SET cw wpm"); } void RIG_IC7100::set_cw_qsk() { int n = round(progStatus.cw_qsk * 10); // values 0-255 cmd.assign(pre_to).append("\x14\x0F"); cmd.append(to_bcd(n, 3)); cmd.append(post); waitFB("Set cw qsk delay"); } void RIG_IC7100::set_cw_spot_tone() { cmd.assign(pre_to).append("\x14\x09"); // values 0=300Hz 255=900Hz int n = round((progStatus.cw_spot_tone - 300) * 255.0 / 600.0); if (n > 255) n = 255; if (n < 0) n = 0; cmd.append(to_bcd(n, 3)); cmd.append( post ); waitFB("SET cw spot tone"); } void RIG_IC7100::set_cw_vol() { cmd.assign(pre_to); cmd.append("\x1A\x05"); cmd += '\x01'; cmd += '\x32'; cmd.append(to_bcd((int)(progStatus.cw_vol * 2.55), 3)); cmd.append( post ); waitFB("SET cw sidetone volume"); } flrig-1.3.24/src/rigs/rigs.cxx0000644000175000017500000000776712646444222013077 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- //============================================================================= // Reference Transceiver unique drivers #include "rigs.h" #include "util.h" #include "debug.h" #include "rig_io.h" rigbase rig_null; RIG_FT100D rig_FT100D; RIG_FT450 rig_FT450; RIG_FT450D rig_FT450D; RIG_FT747 rig_FT747; RIG_FT767 rig_FT767; RIG_FT817 rig_FT817; RIG_FT847 rig_FT847; RIG_FT857D rig_FT857D; RIG_FT890 rig_FT890; RIG_FT897D rig_FT897D; RIG_FT900 rig_FT900; RIG_FT920 rig_FT920; RIG_FT950 rig_FT950; RIG_FT990 rig_FT990; RIG_FT990A rig_FT990A; RIG_FT991 rig_FT991; RIG_FT1000MP rig_FT1000MP; RIG_FT2000 rig_FT2000; RIG_FTdx1200 rig_FTdx1200; RIG_FTdx3000 rig_FTdx3000; RIG_FT5000 rig_FT5000; RIG_FTdx9000 rig_FTdx9000; RIG_IC703 rig_IC703; RIG_IC706MKIIG rig_IC706MKIIG; RIG_IC718 rig_IC718; RIG_IC728 rig_IC728; RIG_IC735 rig_IC735; RIG_IC746 rig_IC746; RIG_IC746PRO rig_IC746PRO; RIG_IC756 rig_IC756; RIG_IC756PRO rig_IC756PRO; RIG_IC756PRO2 rig_IC756PRO2; RIG_IC756PRO3 rig_IC756PRO3; RIG_IC7000 rig_IC7000; RIG_IC7100 rig_IC7100; RIG_IC7410 rig_IC7410; RIG_IC7200 rig_IC7200; RIG_IC7600 rig_IC7600; RIG_IC7700 rig_IC7700; RIG_IC7800 rig_IC7800; RIG_IC9100 rig_IC9100; RIG_IC910H rig_IC910H; RIG_K2 rig_K2; RIG_K3 rig_K3; RIG_KX3 rig_KX3; RIG_PCR1000 rig_PCR1000; RIG_RAY152 rig_RAY152; RIG_TS140 rig_TS140; RIG_TS450S rig_TS450S; RIG_TS480HX rig_TS480HX; RIG_TS480SAT rig_TS480SAT; RIG_TS570 rig_TS570; RIG_TS590S rig_TS590S; RIG_TS590SG rig_TS590SG; RIG_TS870S rig_TS870S; RIG_TS990 rig_TS990; RIG_TS2000 rig_TS2000; RIG_TT516 rig_TT516; RIG_TT535 rig_TT535; RIG_TT538 rig_TT538; RIG_TT550 rig_TT550; RIG_TT563 rig_TT563; RIG_TT566 rig_TT566; RIG_TT588 rig_TT588; RIG_TT599 rig_TT599; rigbase *rigs[] = { &rig_null, // 0 &rig_FT100D, // 1 &rig_FT450, // 2 &rig_FT450D, // 3 &rig_FT747, // 4 &rig_FT767, // 5 &rig_FT817, // 6 &rig_FT847, // 7 &rig_FT857D, // 8 &rig_FT890, // 9 &rig_FT897D, // 10 &rig_FT900, // 11 &rig_FT920, // 12 &rig_FT950, // 13 &rig_FT990, // 14 &rig_FT990A, // 15 &rig_FT991, // 16 &rig_FT1000MP, // 17 &rig_FT2000, // 18 &rig_FTdx1200, // 19 &rig_FTdx3000, // 20 &rig_FT5000, // 21 &rig_FTdx9000, // 22 &rig_IC703, // 23 &rig_IC706MKIIG,// 24 &rig_IC718, // 25 &rig_IC728, // 26 &rig_IC735, // 27 &rig_IC746, // 28 &rig_IC746PRO, // 29 &rig_IC756, // 30 &rig_IC756PRO, // 31 &rig_IC756PRO2, // 32 &rig_IC756PRO3, // 33 &rig_IC7000, // 34 &rig_IC7100, // 35 &rig_IC7200, // 36 &rig_IC7410, // 37 &rig_IC7600, // 38 &rig_IC7700, // 39 &rig_IC7800, // 40 &rig_IC9100, // 41 &rig_IC910H, // 42 &rig_K2, // 43 &rig_K3, // 44 &rig_KX3, // 45 &rig_PCR1000, // 46 &rig_RAY152, // 47 &rig_TS140, // 48 &rig_TS450S, // 49 &rig_TS480HX, // 50 &rig_TS480SAT, // 51 &rig_TS570, // 52 &rig_TS590S, // 53 &rig_TS590SG, // 54 &rig_TS870S, // 55 wbx &rig_TS990, // 56 &rig_TS2000, // 57 &rig_TT516, // 58 &rig_TT535, // 59 &rig_TT538, // 60 &rig_TT550, // 61 &rig_TT563, // 62 &rig_TT566, // 63 &rig_TT588, // 64 &rig_TT599, // 65 NULL }; //============================================================================= flrig-1.3.24/src/rigs/FTdx9000.cxx0000644000175000017500000006256212646444222013303 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FTdx9000.h" #include "debug.h" #include "support.h" enum mFTdx9000 { mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mPKT_L, mRTTY_U, mPKT_FM, mFM_N, mPKT_U, mAM_N }; // mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mPKT_L, mRTTY_U, mPKT_FM, mFM_N, mPKT_U, mAM_N // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 // mode index // 19, 19, 9, 0, 0, 10, 9, 15, 10, 0, 0, 15, 0 // FTdx9000_def_bw static const char FTdx9000name_[] = "FTdx9000"; static const char *FTdx9000modes_[] = { "LSB", "USB", "CW", "FM", "AM", "RTTY-L", "CW-R", "PSK-L", "RTTY-U", "PKT-FM", "FM-N", "PSK-U", "AM-N", NULL}; static const int FTdx9000_def_bw[] = { 20, 20, 9, 0, 0, 10, 9, 15, 10, 0, 0, 15, 0 }; static const char FTdx9000_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D' }; static const char FTdx9000_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'L', 'U', 'U', 'U', 'U', 'U' }; static const char *FTdx9000_widths_SSB[] = { "200", "400", "600", "850", "1100", "1350", "1500", "1650", "1800", "1950", "2100", "2250", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3200", "3400", "3600", "3800", "4000", NULL }; static int FTdx9000_wvals_SSB[] = { 1,2,3,4,5,6,7, 8,9,10,11,12,13, 15,16,17,18,19,20, 21,22,23,24,25, WVALS_LIMIT}; static const char *FTdx9000_widths_CW[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "800", "1200", "1400", "1700", "2000", "2400", NULL }; static int FTdx9000_wvals_CW[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, WVALS_LIMIT }; static const char *FTdx9000_widths_RTTY[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "800", "1200", "1400", "1700", "2000", "2400", NULL }; static int FTdx9000_wvals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, WVALS_LIMIT }; static const char *FTdx9000_widths_PSK[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "800", "1200", "1400", "1700", "2000", "2400", NULL }; static int FTdx9000_wvals_PSK[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, WVALS_LIMIT }; static const int FTdx9000_wvals_AMFM[] = { 0, WVALS_LIMIT }; static const char *FTdx9000_widths_AMwide[] = { "AM-bw", NULL }; static const char *FTdx9000_widths_AMnar[] = { "AM-nar", NULL }; static const char *FTdx9000_widths_FMnar[] = { "FM-nar", NULL }; static const char *FTdx9000_widths_FMwide[] = { "FM-wid", NULL }; static const char *FTdx9000_widths_FMpkt[] = { "FM-pkt", NULL }; static const char *FTdx9000_US_60m[] = {NULL, "126", "127", "128", "130", NULL}; // US has 5 60M presets. Using dummy numbers for all. // First NULL means skip 60m sets in set_band_selection(). // Maybe someone can do a cat command MC; on all 5 presets and add returned numbers above. // To send cat commands in flrig goto menu Config->Xcvr select->Send Cmd. // // UK has 7 60M presets. Using dummy numbers for all. If you want support, // Maybe someone can do a cat command MC; on all 7 presets and add returned numbers below. // static const char *FTdx9000_UK_60m[] = {NULL, "126", "127", "128", "130", "131", "132", NULL}; static const char **Channels_60m = FTdx9000_US_60m; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 54, 165, 368 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; void RIG_FTdx9000::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; cmd = "AI0;"; sendCommand(cmd); showresp(WARN, ASC, "Auto Info OFF", cmd, replystr); } RIG_FTdx9000::RIG_FTdx9000() { // base class values name_ = FTdx9000name_; modes_ = FTdx9000modes_; bandwidths_ = FTdx9000_widths_SSB; bw_vals_ = FTdx9000_wvals_SSB; widgets = rig_widgets; comm_baudrate = BR38400; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; A.imode = B.imode = modeB = modeA = def_mode = 1; A.iBW = B.iBW = bwA = bwB = def_bw = 19; A.freq = B.freq = freqA = freqB = def_freq = 14070000; notch_on = false; has_band_selection = has_extras = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_vox_on_dataport = has_cw_wpm = has_cw_keyer = // has_cw_vol = has_cw_spot = // has_cw_spot_tone = // does not exist??? has_cw_qsk = has_cw_weight = has_split_AB = can_change_alt_vfo = has_smeter = has_swr_control = has_power_out = has_power_control = has_volume_control = has_rf_control = has_micgain_control = has_mode_control = has_noise_control = has_bandwidth_control = has_notch_control = has_auto_notch = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = true; // derived specific atten_level = 0; preamp_level = 0; notch_on = false; m_60m_indx = 0; precision = 1; ndigits = 8; } void RIG_FTdx9000::set_band_selection(int v) { int inc_60m = false; cmd = "IF;"; waitN(27, 100, "get vfo mode in set_band_selection", ASC); size_t p = replystr.rfind("IF"); if (p == string::npos) return; if (replystr[p+21] != '0') { // vfo 60M memory mode inc_60m = true; } if (v == 12) { // 5MHz 60m presets if (Channels_60m[0] == NULL) return; // no 60m Channels so skip if (inc_60m) { if (Channels_60m[++m_60m_indx] == NULL) m_60m_indx = 0; } cmd.assign("MC").append(Channels_60m[m_60m_indx]).append(";"); } else { // v == 1..11 band selection OR return to vfo mode == 0 if (inc_60m) cmd = "VM;"; else { if (v < 3) v = v - 1; cmd.assign("BS").append(to_decimal(v, 2)).append(";"); } } sendCommand(cmd); showresp(WARN, ASC, "Select Band Stacks", cmd, replystr); } long RIG_FTdx9000::get_vfoA () { cmd = rsp = "FA"; cmd += ';'; waitN(11, 100, "get vfo A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqA; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqA = f; return freqA; } void RIG_FTdx9000::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo A", cmd, replystr); } long RIG_FTdx9000::get_vfoB () { cmd = rsp = "FB"; cmd += ';'; waitN(11, 100, "get vfo B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqB; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqB = f; return freqB; } void RIG_FTdx9000::set_vfoB (long freq) { freqB = freq; cmd = "FB00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo B", cmd, replystr); } bool RIG_FTdx9000::twovfos() { return true; } void RIG_FTdx9000::selectA() { cmd = "FR0;FT2;"; sendCommand(cmd); showresp(WARN, ASC, "select A", cmd, replystr); } void RIG_FTdx9000::selectB() { cmd = "FR4;FT3;"; sendCommand(cmd); showresp(WARN, ASC, "select B", cmd, replystr); } void RIG_FTdx9000::A2B() { cmd = "AB;"; sendCommand(cmd); showresp(WARN, ASC, "vfo A --> B", cmd, replystr); } bool RIG_FTdx9000::can_split() { return true; } void RIG_FTdx9000::set_split(bool val) { split = val; if (val) { useB = false; cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A", cmd, replystr); cmd = "FT3;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on B", cmd, replystr); } else { cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A", cmd, replystr); cmd = "FT2;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on A", cmd, replystr); } Fl::awake(highlight_vfo, (void *)0); } int RIG_FTdx9000::get_split() { return split; } int RIG_FTdx9000::get_smeter() { cmd = rsp = "SM0"; cmd += ';'; waitN(7, 100, "get smeter", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); mtr = mtr * 100.0 / 256.0; return mtr; } int RIG_FTdx9000::get_swr() { cmd = rsp = "RM6"; cmd += ';'; waitN(7, 100, "get swr", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return mtr / 2.56; } int RIG_FTdx9000::get_power_out() { cmd = rsp = "RM5"; sendCommand(cmd.append(";")); waitN(7, 100, "get pout", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; double mtr = (double)(atoi(&replystr[p+3])); // mtr = -6.6263535 + .11813178 * mtr + .0013607405 * mtr * mtr; mtr = 0.116 * mtr + 0.0011 * mtr * mtr; return (int)mtr; } // Transceiver power level int RIG_FTdx9000::get_power_control() { cmd = rsp = "PC"; cmd += ';'; waitN(6, 100, "get power", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.power_level; if (p + 5 >= replystr.length()) return progStatus.power_level; int mtr = atoi(&replystr[p+2]); return mtr; } void RIG_FTdx9000::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET power", cmd, replystr); } // Volume control return 0 ... 100 int RIG_FTdx9000::get_volume_control() { cmd = rsp = "AG0"; cmd += ';'; waitN(7, 100, "get vol", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.volume; if (p + 6 >= replystr.length()) return progStatus.volume; int val = atoi(&replystr[p+3]) * 100 / 250; if (val > 100) val = 100; return val; } void RIG_FTdx9000::set_volume_control(int val) { int ivol = (int)(val * 250 / 100); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vol", cmd, replystr); } // Tranceiver PTT on/off void RIG_FTdx9000::set_PTT_control(int val) { cmd = val ? "TX1;" : "TX0;"; sendCommand(cmd); showresp(WARN, ASC, "SET PTT", cmd, replystr); } void RIG_FTdx9000::tune_rig() { cmd = "AC002;"; sendCommand(cmd); showresp(WARN, ASC, "tune rig", cmd, replystr); } void RIG_FTdx9000::set_attenuator(int val) { if (atten_level == 0) { atten_level = 1; atten_label("6 dB", true); } else if (atten_level == 1) { atten_level = 2; atten_label("12 dB", true); } else if (atten_level == 2) { atten_level = 3; atten_label("18 dB", true); } else if (atten_level == 3) { atten_level = 0; atten_label("Att", false); } cmd = "RA00;"; cmd[3] += atten_level; sendCommand(cmd); showresp(WARN, ASC, "SET att", cmd, replystr); } int RIG_FTdx9000::get_attenuator() { cmd = rsp = "RA0"; cmd += ';'; waitN(5, 100, "get att", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.attenuator; if (p + 3 >= replystr.length()) return progStatus.attenuator; atten_level = replystr[p+3] - '0'; if (atten_level == 1) { atten_label("6 dB", true); } else if (atten_level == 2) { atten_label("12 dB", true); } else if (atten_level == 3) { atten_label("18 dB", true); } else { atten_level = 0; atten_label("Att", false); } return atten_level; } void RIG_FTdx9000::set_preamp(int val) { cmd = "PA00;"; if (preamp_level == 0) { preamp_level = 1; preamp_label("Amp 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Amp 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("IPO", false); } cmd[3] = '0' + preamp_level; sendCommand (cmd); showresp(WARN, ASC, "SET preamp", cmd, replystr); } int RIG_FTdx9000::get_preamp() { cmd = rsp = "PA0"; cmd += ';'; waitN(5, 100, "get pre", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) preamp_level = replystr[p+3] - '0'; if (preamp_level == 1) { preamp_label("Amp 1", true); } else if (preamp_level == 2) { preamp_label("Amp 2", true); } else { preamp_label("IPO", false); preamp_level = 0; } return preamp_level; } int RIG_FTdx9000::adjust_bandwidth(int val) { int bw = 0; if (val == mCW || val == mCW_R) { bandwidths_ = FTdx9000_widths_CW; bw_vals_ = FTdx9000_wvals_CW; } else if (val == mFM || val == mAM || val == mFM_N || val == mPKT_FM || val == mAM_N) { if (val == mFM) bandwidths_ = FTdx9000_widths_FMwide; else if (val == mAM) bandwidths_ = FTdx9000_widths_AMwide; else if (val == mAM_N) bandwidths_ = FTdx9000_widths_AMnar; else if (val == mFM_N) bandwidths_ = FTdx9000_widths_FMnar; else if (val == mPKT_FM) bandwidths_ = FTdx9000_widths_FMpkt; bw_vals_ = FTdx9000_wvals_AMFM; } else if (val == mRTTY_L || val == mRTTY_U) { // RTTY bandwidths_ = FTdx9000_widths_RTTY; bw_vals_ = FTdx9000_wvals_RTTY; } else if (val == mPKT_L || val == mPKT_U) { // PSK bandwidths_ = FTdx9000_widths_PSK; bw_vals_ = FTdx9000_wvals_PSK; } else { bandwidths_ = FTdx9000_widths_SSB; bw_vals_ = FTdx9000_wvals_SSB; } bw = FTdx9000_def_bw[val]; return bw; } int RIG_FTdx9000::def_bandwidth(int val) { return FTdx9000_def_bw[val]; } const char ** RIG_FTdx9000::bwtable(int n) { switch (n) { case mCW: case mCW_R: return FTdx9000_widths_CW; case mFM: return FTdx9000_widths_FMwide; case mAM: return FTdx9000_widths_AMwide; case mAM_N : return FTdx9000_widths_AMnar; case mRTTY_L: case mRTTY_U: return FTdx9000_widths_RTTY; case mPKT_L: case mPKT_U: return FTdx9000_widths_PSK; case mFM_N: return FTdx9000_widths_FMnar; case mPKT_FM: return FTdx9000_widths_FMpkt; default: ; } return FTdx9000_widths_SSB; } void RIG_FTdx9000::set_modeA(int val) { modeA = val; cmd = "MD0"; cmd += FTdx9000_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode A", cmd, replystr); adjust_bandwidth(modeA); if (val == mCW || val == mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FTdx9000::get_modeA() { cmd = rsp = "MD0"; cmd += ';'; waitN(5, 100, "get mode A", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'A'; modeA = md; } } adjust_bandwidth(modeA); return modeA; } void RIG_FTdx9000::set_modeB(int val) { modeB = val; cmd = "MD0"; cmd += FTdx9000_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode B", cmd, replystr); adjust_bandwidth(modeA); if (val == mCW || val == mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FTdx9000::get_modeB() { cmd = rsp = "MD0"; cmd += ';'; waitN(5, 100, "get mode B", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'A'; modeB = md; } } adjust_bandwidth(modeB); return modeB; } void RIG_FTdx9000::set_bwA(int val) { int bw_indx = bw_vals_[val]; bwA = val; if (modeA == mFM || modeA == mAM || modeA == mFM_N || modeA == mPKT_FM ) { return; } if ((((modeA == mLSB || modeA == mUSB) && val < 8)) || ((modeA == mCW || modeA == mCW_R) && val < 11) || ((modeA == mRTTY_L || modeA == mRTTY_U) && val < 11) || ((modeA == mPKT_L || modeA == mPKT_U) && val < 11)) cmd = "NA01;"; else cmd = "NA00;"; cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw A", cmd, replystr); } int RIG_FTdx9000::get_bwA() { if (modeA == mFM || modeA == mAM || modeA == mFM_N || modeA == mPKT_FM) { bwA = 0; return bwA; } cmd = rsp = "SH0"; cmd += ';'; waitN(6, 100, "get bw A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return bwA; if (p + 5 >= replystr.length()) return bwA; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwA = i; return bwA; } void RIG_FTdx9000::set_bwB(int val) { int bw_indx = bw_vals_[val]; bwB = val; if (modeB == mFM || modeB == mAM || modeB == mFM_N || modeB == mPKT_FM) { return; } if ((((modeB == mLSB || modeB == mUSB) && val < 8)) || ((modeB == mCW || modeB == mCW_R) && val < 11) || ((modeB == mRTTY_L || modeB == mRTTY_U) && val < 11) || ((modeB == mPKT_L || modeB == mPKT_U) && val < 11)) cmd = "NA01;"; else cmd = "NA00;"; cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw B", cmd, replystr); } int RIG_FTdx9000::get_bwB() { if (modeB == mFM || modeB == mAM || modeB == mFM_N || modeB == mPKT_FM) { bwB = 0; return bwB; } cmd = rsp = "SH0"; cmd += ';'; waitN(6, 100, "get bw B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return bwB; if (p + 5 >= replystr.length()) return bwB; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwB = i; return bwB; } int RIG_FTdx9000::get_modetype(int n) { return FTdx9000_mode_type[n]; } void RIG_FTdx9000::set_if_shift(int val) { cmd = "IS0+0000;"; if (val != 0) progStatus.shift = true; else progStatus.shift = false; if (val < 0) cmd[3] = '-'; val = abs(val); for (int i = 4; i > 0; i--) { cmd[3+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET if shift", cmd, replystr); } bool RIG_FTdx9000::get_if_shift(int &val) { cmd = rsp = "IS0"; cmd += ';'; waitN(9, 100, "get if shift", ASC); size_t p = replystr.rfind(rsp); val = progStatus.shift_val; if (p == string::npos) return progStatus.shift; val = atoi(&replystr[p+4]); if (replystr[p+3] == '-') val = -val; return (val != 0); } void RIG_FTdx9000::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = -1000; if_shift_max = max = 1000; if_shift_step = step = 50; if_shift_mid = 0; } void RIG_FTdx9000::set_notch(bool on, int val) { if (on && !notch_on) { notch_on = true; cmd = "BP00001;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch on", cmd, replystr); } else if (!on && notch_on) { notch_on = false; cmd = "BP00000;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch off", cmd, replystr); return; } cmd = "BP01"; val /= 10; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET notch val", cmd, replystr); } bool RIG_FTdx9000::get_notch(int &val) { bool ison = false; cmd = rsp = "BP00"; cmd += ';'; waitN(8, 100, "get notch on/off", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return ison; if (replystr[p+6] == '1') // manual notch enabled ison = true; val = progStatus.notch_val; cmd = rsp = "BP01"; cmd += ';'; waitN(8, 100, "get notch val", ASC); p = replystr.rfind(rsp); if (p == string::npos) val = 10; else val = fm_decimal(&replystr[p+4],3) * 10; return (notch_on = ison); } void RIG_FTdx9000::get_notch_min_max_step(int &min, int &max, int &step) { min = 10; max = 3000; step = 10; } void RIG_FTdx9000::set_auto_notch(int v) { cmd = "BC00;"; if (v) cmd[3] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET auto notch", cmd, replystr); } int RIG_FTdx9000::get_auto_notch() { cmd = "BC0;"; waitN(5, 100, "get auto notch", ASC); size_t p = replystr.rfind("BC0"); if (p == string::npos) return 0; if (replystr[p+3] == '1') return 1; return 0; } int FTdx9000_blanker_level = 0; void RIG_FTdx9000::set_noise(bool b) { cmd = "NB00;"; if (FTdx9000_blanker_level == 0) { FTdx9000_blanker_level = 1; nb_label("NB 1", true); } else if (FTdx9000_blanker_level == 1) { FTdx9000_blanker_level = 2; nb_label("NB 2", true); } else if (FTdx9000_blanker_level == 2) { FTdx9000_blanker_level = 0; nb_label("NB", false); } cmd[3] = '0' + FTdx9000_blanker_level; sendCommand (cmd); showresp(WARN, ASC, "SET NB", cmd, replystr); } int RIG_FTdx9000::get_noise() { cmd = rsp = "NB0"; cmd += ';'; waitN(5, 100, "get NB", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return FTdx9000_blanker_level; FTdx9000_blanker_level = replystr[p+3] - '0'; if (FTdx9000_blanker_level == 1) { nb_label("NB 1", true); } else if (FTdx9000_blanker_level == 2) { nb_label("NB 2", true); } else { nb_label("NB", false); FTdx9000_blanker_level = 0; } return FTdx9000_blanker_level; } // val 0 .. 100 void RIG_FTdx9000::set_mic_gain(int val) { cmd = "MG000;"; val = (int)(val * 255 / 100); // convert to 0 .. 255 for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET mic", cmd, replystr); } int RIG_FTdx9000::get_mic_gain() { cmd = rsp = "MG"; cmd += ';'; waitN(6, 100, "get mic", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.mic_gain; int val = atoi(&replystr[p+2]); return val * 100 / 255; } void RIG_FTdx9000::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FTdx9000::set_rf_gain(int val) { cmd = "RG0000;"; int rfval = val * 250 / 100; for (int i = 5; i > 2; i--) { cmd[i] = rfval % 10 + '0'; rfval /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET rfgain", cmd, replystr); } int RIG_FTdx9000::get_rf_gain() { int rfval = 0; cmd = rsp = "RG0"; cmd += ';'; waitN(7, 100, "get rfgain", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.rfgain; for (int i = 3; i < 6; i++) { rfval *= 10; rfval += replystr[p+i] - '0'; } rfval = rfval * 100 / 250; if (rfval > 100) rfval = 100; return rfval; } void RIG_FTdx9000::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FTdx9000::set_vox_onoff() { cmd = "VX0;"; if (progStatus.vox_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox", cmd, replystr); } void RIG_FTdx9000::set_vox_gain() { cmd = "VG"; cmd.append(to_decimal(progStatus.vox_gain, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox gain", cmd, replystr); } void RIG_FTdx9000::set_vox_anti() { cmd = "EX175"; cmd.append(to_decimal(progStatus.vox_anti, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET anti-vox", cmd, replystr); } void RIG_FTdx9000::set_vox_hang() { cmd = "VD"; cmd.append(to_decimal(progStatus.vox_hang, 4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox delay", cmd, replystr); } void RIG_FTdx9000::set_vox_on_dataport() { cmd = "EX1140;"; if (progStatus.vox_on_dataport) cmd[5] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox on data port", cmd, replystr); } void RIG_FTdx9000::set_cw_wpm() { cmd = "KS"; if (progStatus.cw_wpm > 60) progStatus.cw_wpm = 60; if (progStatus.cw_wpm < 4) progStatus.cw_wpm = 4; cmd.append(to_decimal(progStatus.cw_wpm, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw wpm", cmd, replystr); } void RIG_FTdx9000::enable_keyer() { cmd = "KR0;"; if (progStatus.enable_keyer) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET keyer on/off", cmd, replystr); } bool RIG_FTdx9000::set_cw_spot() { if (vfo.imode == 2 || vfo.imode == 6) { cmd = "CS0;"; if (progStatus.spot_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET spot on/off", cmd, replystr); return true; } else return false; } void RIG_FTdx9000::set_cw_weight() { int n = round(progStatus.cw_weight * 10); cmd.assign("EX056").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw weight", cmd, replystr); } void RIG_FTdx9000::set_cw_qsk() { int n = progStatus.cw_qsk / 5 - 3; cmd.assign("EX059").append(to_decimal(n, 1)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw qsk", cmd, replystr); } /* void RIG_FTdx9000::set_cw_spot_tone() { int n = (progStatus.cw_spot_tone - 300) / 50; cmd = "EX045"; cmd.append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw tone", cmd, replystr); } void RIG_FTdx9000::set_cw_vol() { } */ flrig-1.3.24/src/rigs/FTdx1200.cxx0000644000175000017500000007602212562731647013300 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FTdx1200.h" #include "debug.h" #include "support.h" enum mFTdx1200 { mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mDATA_L, mRTTY_U, mFM_N, mDATA_U }; // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 // mode index static const char FTdx1200name_[] = "FTdx1200"; static const char *FTdx1200modes_[] = { "LSB", "USB", "CW", "FM", "AM", "RTTY-L", "CW-R", "DATA-L", "RTTY-U", "FM-N", "DATA-U", NULL}; static const char FTdx1200_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'B', 'C' }; static const char FTdx1200_mode_type[] = { 'L', 'U', 'L', 'U', 'U', 'L', 'U', 'L', 'U', 'U', 'U' }; // lsb usb cw fm am ttyL cwR datL ttyU fmN datU static const int FTdx1200_def_bw[] = { 18, 18, 10, 0, 0, 6, 10, 15, 6, 0, 15 }; // mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mDATA_L, mRTTY_U, mFM_N, mDATA_U static const char *FTdx1200_widths_SSB[] = { "200", "400", "600", "850", "1100", "1350", "1500", "1650", "1800", "1950", "2100", "2250", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3200", "3400", "3800", "4000", NULL }; // def_bw = 18 static int FTdx1200_wvals_SSB[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23, WVALS_LIMIT}; static const char *FTdx1200_widths_SSBD[] = { "50", "150", "100", "150", "200", "250", "300", "350", "400", "450", "500", "800", "1200", "1400", "1700", "2000", "2400", NULL }; // def_bw = 16 for DATA, 6 for RTTY static int FTdx1200_wvals_SSBD[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, WVALS_LIMIT}; static const char *FTdx1200_widths_CW[] = { "50", "150", "100", "150", "200", "250", "300", "350", "400", "450", "500", "800", "1200", "1400", "1700", "2000", "2400", NULL }; // def_bw = 10 static int FTdx1200_wvals_CW[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, WVALS_LIMIT}; // Single bandwidth modes static const char *FTdx1200_widths_FMnar[] = { "NARR", NULL }; static const char *FTdx1200_widths_AMFM[] = { "NORM", NULL }; static const int FTdx1200_wvals_AMFM[] = { 0, WVALS_LIMIT }; // US 60M 5-USB, 5-CW static const char *US_60m_chan[] = {"000","125","126","127","128","130","141","142","143","144","146",NULL}; static const char *US_60m_label[] = {"VFO","U51","U52","U53","U54","U55","U56","U57","U58","U59","U50",NULL}; // UK 60m channel numbers by Brian, G8SEZ static const char *UK_60m_chan[] = {"000","118","120","121","127","128","129","130",NULL}; static const char *UK_60m_label[] = {"VFO","U51","U52","U53","U54","U55","U56","U57",NULL}; static const char **Channels_60m = US_60m_chan; static const char **label_60m = US_60m_label; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)btnNR, 2, 165, 50 }, { (Fl_Widget *)sldrNR, 54, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_FTdx1200::RIG_FTdx1200() { // base class values name_ = FTdx1200name_; modes_ = FTdx1200modes_; bandwidths_ = FTdx1200_widths_SSB; bw_vals_ = FTdx1200_wvals_SSB; widgets = rig_widgets; comm_baudrate = BR38400; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; A.imode = B.imode = modeB = modeA = def_mode = 1; A.iBW = B.iBW = bwA = bwB = def_bw = 12; A.freq = B.freq = freqA = freqB = def_freq = 14070000; has_compON = has_compression = has_a2b = has_xcvr_auto_on_off = has_split = has_split_AB = has_band_selection = has_noise_reduction = has_noise_reduction_control = has_extras = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_vox_on_dataport = has_vfo_adj = has_cw_wpm = has_cw_keyer = // has_cw_vol = has_cw_spot = has_cw_spot_tone = has_cw_qsk = has_cw_weight = can_change_alt_vfo = has_smeter = has_alc_control = has_swr_control = has_power_out = has_power_control = has_volume_control = has_rf_control = has_micgain_control = has_mode_control = has_noise_control = has_bandwidth_control = has_notch_control = has_auto_notch = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = true; // derived specific atten_level = 3; preamp_level = 2; notch_on = false; m_60m_indx = 0; precision = 1; ndigits = 8; } void RIG_FTdx1200::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; rig_widgets[9].W = btnNR; rig_widgets[10].W = sldrNR; // set progStatus defaults if (progStatus.notch_val < 10) progStatus.notch_val = 1500; if (progStatus.noise_reduction_val < 1) progStatus.noise_reduction_val = 1; if (progStatus.power_level < 5) progStatus.power_level = 5; // first-time-thru, or reset if (progStatus.cw_qsk < 15) { progStatus.cw_qsk = 15; progStatus.cw_spot_tone = 700; progStatus.cw_weight = 3.0; progStatus.cw_wpm = 18; progStatus.vox_on_dataport = false; progStatus.vox_gain = 50; progStatus.vox_anti = 50; progStatus.vox_hang = 500; } // Disable Auto Information mode sendCommand("AI0;"); // "MRnnn;" if valid, returns last channel used, "mrlll...;", along with channel nnn info. cmd = "MR118;"; waitN(27, 100, "Read UK 60m Channel Mem", ASC); size_t p = replystr.rfind("MR"); if (p == string::npos) { Channels_60m = US_60m_chan; label_60m = US_60m_label; opSelect60->clear(); char **p = (char **)US_60m_label; while (*p) opSelect60->add(*p++); } else { Channels_60m = UK_60m_chan; label_60m = UK_60m_label; opSelect60->clear(); char **p = (char **)UK_60m_label; while (*p) opSelect60->add(*p++); } opSelect60->index(m_60m_indx); // cmd = "EX035;"; // waitN(11,100,"Read Vfo Adjust", ASC); // size_t p = replystr.rfind("EX035"); } void RIG_FTdx1200::post_initialize() { enable_bandselect_btn(12, false); enable_bandselect_btn(13, true); } void RIG_FTdx1200::shutdown() { } long RIG_FTdx1200::get_vfoA () { cmd = rsp = "FA"; cmd += ';'; waitN(11, 100, "get vfo A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqA; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqA = f; return freqA; } void RIG_FTdx1200::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo A", cmd, replystr); } long RIG_FTdx1200::get_vfoB () { cmd = rsp = "FB"; cmd += ';'; waitN(11, 100, "get vfo B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqB; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqB = f; return freqB; } void RIG_FTdx1200::set_vfoB (long freq) { freqB = freq; cmd = "FB00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo B", cmd, replystr); } void RIG_FTdx1200::setVfoAdj(double v) { char cmdstr[20]; snprintf(cmdstr, sizeof(cmdstr), "EX035%+03d;", (int)v); cmd = cmdstr; sendCommand(cmd); } double RIG_FTdx1200::getVfoAdj() { cmd = rsp = "EX035"; sendCommand(cmd.append(";")); waitN(9, 100, "get Vfo Adjust", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; return (double)(atoi(&replystr[p+5])); } void RIG_FTdx1200::get_vfoadj_min_max_step(int &min, int &max, int &step) { min = -25; max = 25; step = 1; } bool RIG_FTdx1200::twovfos() { return true; } void RIG_FTdx1200::selectA() { cmd = "FR0;FT2;"; sendCommand(cmd); showresp(WARN, ASC, "select A", cmd, replystr); } void RIG_FTdx1200::selectB() { cmd = "FR4;FT3;"; sendCommand(cmd); showresp(WARN, ASC, "select B", cmd, replystr); } void RIG_FTdx1200::A2B() { cmd = "AB;"; sendCommand(cmd); showresp(WARN, ASC, "vfo A --> B", cmd, replystr); } bool RIG_FTdx1200::can_split() { return true; } void RIG_FTdx1200::set_split(bool val) { split = val; if (useB) { if (val) { cmd = "FR4;FT2;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on A", cmd, replystr); } else { cmd = "FR4;FT3;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, replystr); } } else { if (val) { cmd = "FR0;FT3;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on B", cmd, replystr); } else { cmd = "FR0;FT2;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, replystr); } } Fl::awake(highlight_vfo, (void *)0); } int RIG_FTdx1200::get_split() { size_t p; int split = 0; char rx, tx; // tx vfo cmd = rsp = "FT"; cmd.append(";"); waitN(4, 100, "get split tx vfo", ASC); p = replystr.rfind(rsp); if (p == string::npos) return false; tx = replystr[p+2] - '0'; // rx vfo cmd = rsp = "FR"; cmd.append(";"); waitN(4, 100, "get split rx vfo", ASC); p = replystr.rfind(rsp); if (p == string::npos) return false; rx = replystr[p+2] - '0'; split = (tx == 1 ? 2 : 0) + (rx >= 4 ? 1 : 0); return split; } int RIG_FTdx1200::get_smeter() { cmd = rsp = "SM0"; cmd += ';'; waitN(7, 100, "get smeter", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); mtr = mtr * 100.0 / 256.0; return mtr; } int RIG_FTdx1200::get_swr() { cmd = rsp = "RM6"; cmd += ';'; waitN(7, 100, "get swr", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return (int)ceil(mtr / 2.56); } int RIG_FTdx1200::get_alc() { cmd = rsp = "RM4"; cmd += ';'; waitN(7, 100, "get alc", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return (int)ceil(mtr / 2.56); } int RIG_FTdx1200::get_power_out() { cmd = rsp = "RM5"; sendCommand(cmd.append(";")); waitN(7, 100, "get pout", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; double mtr = (double)(atoi(&replystr[p+3])); // following conversion iaw data measured by Terry, KJ4EED mtr = (.06 * mtr) + (.002 * mtr * mtr); return (int)ceil(mtr); } // Transceiver power level int RIG_FTdx1200::get_power_control() { cmd = rsp = "PC"; cmd += ';'; waitN(6, 100, "get power", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.power_level; if (p + 5 >= replystr.length()) return progStatus.power_level; int mtr = atoi(&replystr[p+2]); return mtr; } void RIG_FTdx1200::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET power", cmd, replystr); } // Volume control return 0 ... 100 int RIG_FTdx1200::get_volume_control() { cmd = rsp = "AG0"; cmd += ';'; waitN(7, 100, "get vol", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.volume; if (p + 6 >= replystr.length()) return progStatus.volume; int val = round(atoi(&replystr[p+3]) / 2.55); if (val > 100) val = 100; return ceil(val); } void RIG_FTdx1200::set_volume_control(int val) { int ivol = (int)(val * 2.55); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vol", cmd, replystr); } // Tranceiver PTT on/off void RIG_FTdx1200::set_PTT_control(int val) { cmd = val ? "TX1;" : "TX0;"; sendCommand(cmd); showresp(WARN, ASC, "SET PTT", cmd, replystr); } // internal or external tune mode void RIG_FTdx1200::tune_rig() { static bool extun_on = false; static int rmd = modeA; static int rbw = bwA; static int rpwr = 100; static long rfreq = freqA; // fix for menu 047 OFSt default int use_int_tuner = true; // On-The-Fly bandstack by bandstack int/ext tuner // if rig "Tuner" light is on internal else external cmd = rsp = "AC"; cmd.append(";"); waitN(6, 100, "is Int. Tuner Enabled", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return; if ((p + 5) >= replystr.length()) return; if (replystr[p+4] == '0') { use_int_tuner = false; } if (use_int_tuner) { cmd = "AC002;"; sendCommand(cmd); showresp(WARN, ASC, "tune rig", cmd, replystr); } else { if (extun_on == false) { if (btnPTT->value() == true) return; if (get_split() == 1 || get_split() == 2) return; // no split extune useB ? rmd = modeB : rmd = modeA; useB ? rbw = bwB : rbw = bwA; useB ? rfreq = freqB : rfreq = freqA; useB ? set_modeB(mAM) : set_modeA(mAM); useB ? set_vfoB(rfreq) : set_vfoA(rfreq); rpwr = get_power_control(); set_power_control(10); sendCommand("EX0360000;"); // AM mic off // sendCommand("EX0560000;"); // FM mic off extun_on = true; btnPTT->value(true); sendCommand("MX1;"); } else { extun_on = false; btnPTT->value(false); sendCommand("MX0;"); sendCommand("EX0361000;"); // AM mic default // sendCommand("EX0560050;"); // FM mic default set_power_control(rpwr); useB ? set_modeB(rmd) : set_modeA(rmd); useB ? set_bwB(rbw) : set_bwA(rbw); useB ? set_vfoB(rfreq) : set_vfoA(rfreq); } } } void RIG_FTdx1200::set_attenuator(int val) { if (atten_level == 0) { atten_level = 1; atten_label("6 dB", true); } else if (atten_level == 1) { atten_level = 2; atten_label("12 dB", true); } else if (atten_level == 2) { atten_level = 3; atten_label("18 dB", true); } else if (atten_level == 3) { atten_level = 0; atten_label("Att", false); } cmd = "RA00;"; cmd[3] += atten_level; sendCommand(cmd); showresp(WARN, ASC, "SET att", cmd, replystr); } int RIG_FTdx1200::get_attenuator() { cmd = rsp = "RA0"; cmd += ';'; waitN(5, 100, "get att", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.attenuator; if (p + 3 >= replystr.length()) return progStatus.attenuator; atten_level = replystr[p+3] - '0'; if (atten_level == 1) { atten_label("6 dB", true); } else if (atten_level == 2) { atten_label("12 dB", true); } else if (atten_level == 3) { atten_label("18 dB", true); } else { atten_level = 0; atten_label("Att", false); } return atten_level; } void RIG_FTdx1200::set_preamp(int val) { cmd = "PA00;"; if (preamp_level == 0) { preamp_level = 1; preamp_label("Amp 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Amp 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("IPO", false); } cmd[3] = '0' + preamp_level; sendCommand (cmd); showresp(WARN, ASC, "SET preamp", cmd, replystr); } int RIG_FTdx1200::get_preamp() { cmd = rsp = "PA0"; cmd += ';'; waitN(5, 100, "get pre", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) preamp_level = replystr[p+3] - '0'; if (preamp_level == 1) { preamp_label("Amp 1", true); } else if (preamp_level == 2) { preamp_label("Amp 2", true); } else { preamp_label("IPO", false); preamp_level = 0; } return preamp_level; } int RIG_FTdx1200::adjust_bandwidth(int val) { switch (val) { case mCW : case mCW_R : bandwidths_ = FTdx1200_widths_CW; bw_vals_ = FTdx1200_wvals_CW; break; case mFM : case mAM : bandwidths_ = FTdx1200_widths_AMFM; bw_vals_ = FTdx1200_wvals_AMFM; break; case mFM_N : bandwidths_ = FTdx1200_widths_FMnar; bw_vals_ = FTdx1200_wvals_AMFM; break; case mDATA_L : case mDATA_U : case mRTTY_L : case mRTTY_U : bandwidths_ = FTdx1200_widths_SSBD; bw_vals_ = FTdx1200_wvals_SSBD; break; default: bandwidths_ = FTdx1200_widths_SSB; bw_vals_ = FTdx1200_wvals_SSB; } return FTdx1200_def_bw[val]; } int RIG_FTdx1200::def_bandwidth(int val) { return FTdx1200_def_bw[val]; } const char ** RIG_FTdx1200::bwtable(int n) { switch (n) { case mFM : return FTdx1200_widths_AMFM; case mAM : return FTdx1200_widths_AMFM; case mFM_N : return FTdx1200_widths_FMnar; case mCW : return FTdx1200_widths_CW; case mCW_R : return FTdx1200_widths_CW; case mRTTY_L : return FTdx1200_widths_SSBD; case mRTTY_U : return FTdx1200_widths_SSBD; case mDATA_L : return FTdx1200_widths_SSBD; case mDATA_U : return FTdx1200_widths_SSBD; } return FTdx1200_widths_SSB; } void RIG_FTdx1200::set_modeA(int val) { modeA = val; cmd = "MD0"; cmd += FTdx1200_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode A", cmd, replystr); adjust_bandwidth(modeA); if (val != mCW && val != mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FTdx1200::get_modeA() { cmd = rsp = "MD0"; cmd += ';'; waitN(5, 100, "get mode A", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md -= '1'; else md = md - 'B' + 9; modeA = md; } } adjust_bandwidth(modeA); return modeA; } void RIG_FTdx1200::set_modeB(int val) { modeB = val; cmd = "MD0"; cmd += FTdx1200_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode B", cmd, replystr); adjust_bandwidth(modeB); if (val != mCW && val != mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FTdx1200::get_modeB() { cmd = rsp = "MD0"; cmd += ';'; waitN(5, 100, "get mode B", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md -= '1'; else md = md - 'B' + 9; modeB = md; } } adjust_bandwidth(modeB); return modeB; } void RIG_FTdx1200::set_bwA(int val) { int bw_indx = bw_vals_[val]; bwA = val; int md = modeA; if (md == mFM || md == mAM || md == mFM_N ) return; cmd = "NA00;"; switch (md) { case mLSB : case mUSB : if (val < 8 ) ++cmd[3]; break; case mCW : case mCW_R : if (val < 9) ++cmd[3]; break; case mRTTY_L : case mRTTY_U : case mDATA_L : case mDATA_U : if (val < 9) ++cmd[3]; break; } cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw A", cmd, replystr); } int RIG_FTdx1200::get_bwA() { size_t p; if (modeA == mFM || modeA == mAM || modeA == mFM_N) { bwA = 0; return bwA; } cmd = rsp = "SH0"; cmd += ';'; waitN(6, 100, "get bw A", ASC); p = replystr.rfind(rsp); if (p == string::npos) return bwA; if (p + 5 >= replystr.length()) return bwA; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwA = i; return bwA; } void RIG_FTdx1200::set_bwB(int val) { int bw_indx = bw_vals_[val]; bwB = val; int md = modeB; if (md == mFM || md == mAM || md == mFM_N ) return; cmd = "NA00;"; switch (md) { case mLSB : case mUSB : if (val < 8 ) ++cmd[3]; break; case mCW : case mCW_R : if (val < 9) ++cmd[3]; break; case mRTTY_L : case mRTTY_U : case mDATA_L : case mDATA_U : if (val < 9) ++cmd[3]; break; } cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw B", cmd, replystr); } int RIG_FTdx1200::get_bwB() { size_t p; if (modeB == mFM || modeB == mAM || modeB == mFM_N) { bwB = 0; return bwB; } cmd = rsp = "SH0"; cmd += ';'; waitN(6, 100, "get bw B", ASC); p = replystr.rfind(rsp); if (p == string::npos) return bwB; if (p + 5 >= replystr.length()) return bwB; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwB = i; return bwB; } int RIG_FTdx1200::get_modetype(int n) { return FTdx1200_mode_type[n]; } void RIG_FTdx1200::set_if_shift(int val) { cmd = "IS0+0000;"; if (val < 0) cmd[3] = '-'; val = abs(val); for (int i = 4; i > 0; i--) { cmd[3+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET if shift", cmd, replystr); } bool RIG_FTdx1200::get_if_shift(int &val) { cmd = rsp = "IS0"; cmd += ';'; waitN(9, 100, "get if shift", ASC); size_t p = replystr.rfind(rsp); val = progStatus.shift_val; if (p == string::npos) return progStatus.shift; val = atoi(&replystr[p+4]); if (replystr[p+3] == '-') val = -val; return (val != 0); } void RIG_FTdx1200::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = -1000; if_shift_max = max = 1000; if_shift_step = step = 20; if_shift_mid = 0; } void RIG_FTdx1200::set_notch(bool on, int val) { // set notch frequency if (on) { cmd = "BP00001;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch on", cmd, replystr); cmd = "BP01000;"; if (val % 10 >= 5) val += 10; val /= 10; for (int i = 3; i > 0; i--) { cmd[3 + i] += val % 10; val /=10; } sendCommand(cmd); showresp(WARN, ASC, "SET notch val", cmd, replystr); return; } // set notch off cmd = "BP00000;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch off", cmd, replystr); } bool RIG_FTdx1200::get_notch(int &val) { bool ison = false; cmd = rsp = "BP00"; cmd += ';'; waitN(8, 100, "get notch on/off", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return ison; if (replystr[p+6] == '1') { // manual notch enabled ison = true; val = progStatus.notch_val; cmd = rsp = "BP01"; cmd += ';'; waitN(8, 100, "get notch val", ASC); p = replystr.rfind(rsp); if (p == string::npos) val = 10; else val = fm_decimal(&replystr[p+4],3) * 10; } return ison; } void RIG_FTdx1200::get_notch_min_max_step(int &min, int &max, int &step) { min = 10; max = 3000; step = 10; } void RIG_FTdx1200::set_auto_notch(int v) { cmd.assign("BC0").append(v ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET DNF Auto Notch Filter", cmd, replystr); } int RIG_FTdx1200::get_auto_notch() { cmd = "BC0;"; waitN(5, 100, "get auto notch", ASC); size_t p = replystr.rfind("BC0"); if (p == string::npos) return 0; if (replystr[p+3] == '1') return 1; return 0; } int FTdx1200_blanker_level = 2; void RIG_FTdx1200::set_noise(bool b) { cmd = "NB00;"; if (FTdx1200_blanker_level == 0) { FTdx1200_blanker_level = 1; nb_label("NB 1", true); } else if (FTdx1200_blanker_level == 1) { FTdx1200_blanker_level = 2; nb_label("NB 2", true); } else if (FTdx1200_blanker_level == 2) { FTdx1200_blanker_level = 0; nb_label("NB", false); } cmd[3] = '0' + FTdx1200_blanker_level; sendCommand (cmd); showresp(WARN, ASC, "SET NB", cmd, replystr); } int RIG_FTdx1200::get_noise() { cmd = rsp = "NB0"; cmd += ';'; waitN(5, 100, "get NB", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return FTdx1200_blanker_level; FTdx1200_blanker_level = replystr[p+3] - '0'; if (FTdx1200_blanker_level == 1) { nb_label("NB 1", true); } else if (FTdx1200_blanker_level == 2) { nb_label("NB 2", true); } else { nb_label("NB", false); FTdx1200_blanker_level = 0; } return FTdx1200_blanker_level; } // val 0 .. 100 void RIG_FTdx1200::set_mic_gain(int val) { cmd = "MG000;"; val = (int)(val * 2.50); for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET mic", cmd, replystr); } int RIG_FTdx1200::get_mic_gain() { cmd = rsp = "MG"; cmd += ';'; waitN(6, 100, "get mic", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.mic_gain; int val = atoi(&replystr[p+2]); val = (int)(val / 2.50); if (val > 100) val = 100; return ceil(val); } void RIG_FTdx1200::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FTdx1200::set_rf_gain(int val) { cmd = "RG0000;"; int rfval = (int)(val * 2.50); for (int i = 5; i > 2; i--) { cmd[i] = rfval % 10 + '0'; rfval /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET rfgain", cmd, replystr); } int RIG_FTdx1200::get_rf_gain() { int rfval = 0; cmd = rsp = "RG0"; cmd += ';'; waitN(7, 100, "get rfgain", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.rfgain; for (int i = 3; i < 6; i++) { rfval *= 10; rfval += replystr[p+i] - '0'; } rfval = (int)(rfval / 2.50); if (rfval > 100) rfval = 100; return ceil(rfval); } void RIG_FTdx1200::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FTdx1200::set_vox_onoff() { cmd = "VX0;"; if (progStatus.vox_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox", cmd, replystr); } void RIG_FTdx1200::set_vox_gain() { cmd = "VG"; cmd.append(to_decimal(progStatus.vox_gain, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox gain", cmd, replystr); } void RIG_FTdx1200::set_vox_anti() { cmd = "EX117"; cmd.append(to_decimal(progStatus.vox_anti, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET anti-vox", cmd, replystr); } void RIG_FTdx1200::set_vox_hang() { cmd = "VD"; cmd.append(to_decimal(progStatus.vox_hang, 4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox delay", cmd, replystr); } void RIG_FTdx1200::set_vox_on_dataport() { cmd = "EX1140;"; if (progStatus.vox_on_dataport) cmd[5] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox on data port", cmd, replystr); } void RIG_FTdx1200::set_cw_wpm() { cmd = "KS"; if (progStatus.cw_wpm > 60) progStatus.cw_wpm = 60; if (progStatus.cw_wpm < 4) progStatus.cw_wpm = 4; cmd.append(to_decimal(progStatus.cw_wpm, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw wpm", cmd, replystr); } void RIG_FTdx1200::enable_keyer() { cmd = "KR0;"; if (progStatus.enable_keyer) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET keyer on/off", cmd, replystr); } bool RIG_FTdx1200::set_cw_spot() { if (vfo.imode == mCW || vfo.imode == mCW_R) { cmd = "CS0;"; if (progStatus.spot_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET spot on/off", cmd, replystr); return true; } else return false; } void RIG_FTdx1200::set_cw_weight() { int n = round(progStatus.cw_weight * 10); cmd.assign("EX046").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw weight", cmd, replystr); } void RIG_FTdx1200::set_cw_qsk() { int n = progStatus.cw_qsk / 5 - 3; cmd.assign("EX049").append(to_decimal(n, 1)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw qsk", cmd, replystr); } void RIG_FTdx1200::set_cw_spot_tone() { int n = (progStatus.cw_spot_tone - 300) / 50; cmd.assign("EX045").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw tone", cmd, replystr); } /* void RIG_FTdx1200::set_cw_vol() { } */ void RIG_FTdx1200::set_band_selection(int v) { int chan_mem_on = false; cmd = "IF;"; waitN(27, 100, "get vfo mode in set_band_selection", ASC); size_t p = replystr.rfind("IF"); if (p == string::npos) return; if ((p + 26) >= replystr.length()) return; if (replystr[p+21] != '0') { // vfo 60M memory mode chan_mem_on = true; } if (v == 13) { m_60m_indx = opSelect60->index(); if (m_60m_indx) cmd.assign("MC").append(Channels_60m[m_60m_indx]).append(";"); else if (chan_mem_on) cmd = "VM;"; } else { // v == 1..11 band selection OR return to vfo mode == 0 if (chan_mem_on) { cmd = "VM;"; opSelect60->index(m_60m_indx = 0); } else { if (v < 3) v = v - 1; cmd.assign("BS").append(to_decimal(v, 2)).append(";"); } } sendCommand(cmd); showresp(WARN, ASC, "Select Band Stacks", cmd, replystr); } // DNR void RIG_FTdx1200::set_noise_reduction_val(int val) { cmd.assign("RL0").append(to_decimal(val, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET_noise_reduction_val", cmd, replystr); } int RIG_FTdx1200::get_noise_reduction_val() { int val = 1; cmd = rsp = "RL0"; cmd.append(";"); waitN(6, 100, "GET noise reduction val", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return val; val = atoi(&replystr[p+3]); return val; } // DNR void RIG_FTdx1200::set_noise_reduction(int val) { cmd.assign("NR0").append(val ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET noise reduction", cmd, replystr); } int RIG_FTdx1200::get_noise_reduction() { int val; cmd = rsp = "NR0"; cmd.append(";"); waitN(5, 100, "GET noise reduction", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; val = replystr[p+3] - '0'; return val; } void RIG_FTdx1200::set_xcvr_auto_on() { if (!progStatus.xcvr_auto_on) return; cmd = rsp = "PS"; cmd.append(";"); waitN(4, 100, "Test: Is Rig ON", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) { // rig is off, power on cmd = "PS1;"; sendCommand(cmd); MilliSleep(1500); // 1.0 < T < 2.0 seconds sendCommand(cmd); MilliSleep(3000); // Wait for rig startup? Maybe not needed. } } void RIG_FTdx1200::set_xcvr_auto_off() { if (!progStatus.xcvr_auto_off) return; cmd = "PS0;"; sendCommand(cmd); } void RIG_FTdx1200::set_compression() { if (progStatus.compON) { if (progStatus.compression == 0) { cmd.assign("PR2;"); // mic eq on sendCommand(cmd); showresp(WARN, ASC, "set Comp EQ on", cmd, replystr); } else { cmd.assign("PR1;PL").append(to_decimal(progStatus.compression, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set Comp on", cmd, replystr); } } else{ cmd.assign("PR0;"); sendCommand(cmd); showresp(WARN, ASC, "set Comp off", cmd, replystr); } } /* // Audio Peak Filter, like set_cw_spot bool RIG_FTdx1200::set_cw_APF() { if (vfo.imode == mCW || vfo.imode == mCW_R) { cmd = "CO0000;"; if (progStatus.apf_onoff) cmd[5] = '2'; sendCommand(cmd); showresp(WARN, ASC, "SET APF on/off", cmd, replystr); return true; } else return false; } */ flrig-1.3.24/src/rigs/TS990.cxx0000644000175000017500000022126612562731647012722 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- /* * Copyright (c) 2014 Andy Burnett, G0HIX */ #include "config.h" #include "TS990.h" #include "support.h" static const char TS990name_[] = "TS-990"; static const char *TS990modes_[] = { "LSB", "USB", "CW", "FM", "AM", "FSK", "PSK", "CW-R", "FSK-R", "PSK-R", "LSB-D1", "USB-D1", "FM-D1", "AM-D1", "LSB-D2", "USB-D2", "FM-D2", "AM-D2", "LSB-D3", "USB-D3", "FM-D3", "AM-D3", NULL}; static const char TS990_mode_chr[] = { '1', '2', '3', '4', '5', '6', 'A', '7', '9', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N' }; static const char TS990_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'U', 'U', 'L', 'U', 'U', 'L', 'U', 'U', 'U', 'L', 'U', 'U', 'U', 'L', 'U', 'U', 'U' }; //============================================================================== static const char *TS990_empty[] = { "N/A", NULL }; //============================================================================== // SSB - Width / Shift filters // // BW indicates 0x8000 & (shift << 8) & width // Maximum assignable BW value 0x910C // Default BW value 0x9005 //============================================================================== static const char *TS990_filt_width[] = { "50", "80", "100", "150", "200", "250", "300", "400", "500", "600", "1000", "1500", "2000", "2200", "2400", "2600", "2800", "3000", NULL }; static int TS990_WIDTH_bw_vals[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,WVALS_LIMIT}; static const char *TS990_CAT_filt_width[] = { "00;", "01;", "02;", "03;", "04;", "05;", "06;", "07;", "08;", "09;", "10;", "11;", "12;", "13;", "14;", "15;", "16;", "17;", NULL }; static const char *TS990_filt_width_tooltip = "width"; static const char *TS990_filt_width_label = "W"; static const char *TS990_filt_shift[] = { "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2210", NULL }; static const char *TS990_CAT_filt_shift[] = { "00;", "01;", "02;", "03;", "04;", "05;", "06;", "07;", "08;", "09;", "10;", "11;", "12;", NULL }; static const char *TS990_filt_shift_tooltip = "shift"; static const char *TS990_filt_shift_label = "S"; #define DEFAULT_SH_WI 0x8510 // SHIFT 1500, WIDTH 2800 #define DEFAULT_SH_WI_D1 0x850E // SHIFT 1500, WIDTH 2400 #define DEFAULT_SH_WI_D2 0x850A // SHIFT 1500, WIDTH 1000 #define DEFAULT_SH_WI_D3 0x8508 // SHIFT 1500, WIDTH 500 //============================================================================== // SSB, FM, Other SL/SH cut filters // // BW indicates 0x8000 & (SH << 8) & SL //============================================================================== static const char *TS990_filt_SH[] = { "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3400", "4000", "5000", NULL }; static int TS990_HI_bw_vals[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,WVALS_LIMIT}; static const char *TS990_CAT_filt_SH[] = { "00;", "01;", "02;", "03;", "04;", "05;", "06;", "07;", "08;", "09;", "10;", "11;", "12;", "13;", NULL }; static const char *TS990_filt_SH_tooltip = "hi cut"; static const char *TS990_filt_SH_label = "H"; static const char *TS990_filt_SL[] = { "0", "50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", NULL }; static const char *TS990_CAT_filt_SL[] = { "00;", "01;", "02;", "03;", "04;", "05;", "06;", "07;", "08;", "09;", "10;", "11;", NULL }; static const char *TS990_filt_SL_tooltip = "lo cut"; static const char *TS990_filt_SL_label = "L"; #define DEFAULT_HI_LO 0x8A03 // LO 200, HI 3000 #define DEFAULT_FM 0x8C05 // LO 400, HI 4000 #define DEFAULT_FM_D1 0x8903 // LO 200, HI 2800 #define DEFAULT_FM_D2 0x8707 // LO 600, HI 2400 #define DEFAULT_FM_D3 0x850B // LO 1000, HI 2000 //============================================================================== // CW filters // // BW indicates 0x8000 & (width << 8) & shift // Maximum assignable BW value 0x8D20 // Default BW value 0x8810 --> no shift, bandwidth = 500 Hz //============================================================================== static const char *TS990_CW_width[] = { "50", "80", "100", "150", "200", "250", "300", "400", "500", "600", "1000", "1500", "2000", "2500", NULL }; static int TS990_CW_bw_vals[] = {1,2,3,4,5,6,7,8,9,10,11,12,13,14,WVALS_LIMIT}; static const char *TS990_CAT_CW_width[] = { "00;", "01;", "02;", "03;", "04;", "05;", "06;", "07;", "08;", "09;", "10;", "11;", "12;", "13;", NULL }; static const char *TS990_CW_W_tooltip = "width"; static const char *TS990_CW_W_btn_label = "W"; static const char *TS990_CW_shift[] = { "-800", "-750", "-700", "-650", "-600", "-550", "-500", "-450", "-400", "-350", "-300", "-250", "-200", "-150", "-100", "-50", "0", "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "550", "600", "650", "700", "750", "800", NULL }; static const char *TS990_CAT_CW_shift[] = { "00;", "01;", "02;", "03;", "04;", "05;", "06;", "07;", "08;", "09;", "10;", "11;", "12;", "13;", "14;", "15;", "16;", "17;", "18;", "19;", "20;", "21;", "22;", "23;", "24;", "25;", "26;", "27;", "28;", "29;", "30;", "31;", "32;", NULL }; static const char *TS990_CW_S_tooltip = "shift"; static const char *TS990_CW_S_btn_label = "S"; #define DEFAULT_CW 0x9008 // SHIFT 0, WIDTH 500 //============================================================================== static const char *TS990_AM_SL[] = { "0", "100", "200", "300", NULL }; static const char *TS990_CAT_AM_SL[] = { "00;", "01;", "02;", "03;", NULL}; static const char *TS990_AM_SL_tooltip = "lo cut"; static const char *TS990_AM_btn_SL_label = "L"; static const char *TS990_AM_SH[] = { "2500", "3000", "4000", "5000", NULL }; static int TS990_AM_HI_bw_vals[] = { 1,2,3,4,WVALS_LIMIT}; static const char *TS990_CAT_AM_SH[] = { "00;", "01;", "02;", "03;", NULL}; static const char *TS990_AM_SH_tooltip = "hi cut"; static const char *TS990_AM_btn_SH_label = "H"; #define DEFAULT_AM 0x8102 // LO 100, HI 4000 #define DEFAULT_AM_D1 0x8202 // LO 200, HI 4000 #define DEFAULT_AM_D2 0x8201 // LO 200, HI 3000 #define DEFAULT_AM_D3 0x8200 // LO 200, HI 2500 //============================================================================== static const char *TS990_FSK_filt[] = { "250", "300", "400", "500", "1000", "1500", NULL}; static int TS990_FSK_bw_vals[] = {1,2,3,4,5,6,WVALS_LIMIT}; static const char *TS990_CAT_FSK_filt[] = { "00;", "01;", "02;", "03;", "04;", "05;", NULL }; #define DEFAULT_FSK 0x03 // WIDTH 300 //============================================================================== static const char *TS990_PSK_filt[] = { "50", "80", "100", "150", "200", "250", "300", "400", "500", "600", "1000", "1500", NULL}; static int TS990_PSK_bw_vals[] = {1,2,3,4,5,6,7,8,9,10,11,12,WVALS_LIMIT}; static const char *TS990_CAT_PSK_filt[] = { "00;", "01;", "02;", "03;", "04;", "05;", "06;", "07;", "08;", "09;", "10;", "11;", NULL }; #define DEFAULT_PSK 0x06 // WIDTH 300 //============================================================================== static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)btnNR, 2, 165, 50 }, { (Fl_Widget *)sldrNR, 54, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; static string menu_0001; void RIG_TS990::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; rig_widgets[9].W = btnNR; rig_widgets[10].W = sldrNR; RIG_DEBUG = true; cmd = "AC000;"; sendCommand(cmd); cmd = "EX00100;"; if (wait_char(';', 11, 100, "read ex 00100", ASC) == 11) menu_0001 = replystr; cmd = "EX00100 00"; // turn off beeps sendCommand(cmd); selectA(); get_preamp(); get_attenuator(); read_menu_0607(); read_menu_0608(); set_menu_0607(false); // SSB uses lower/upper cutoff frequencies set_menu_0608(true); // SSB data uses shift/width frequencies A_default_SH_WI = DEFAULT_SH_WI; A_default_SH_WI_D1 = DEFAULT_SH_WI_D1; A_default_SH_WI_D2 = DEFAULT_SH_WI_D2; A_default_SH_WI_D3 = DEFAULT_SH_WI_D3; A_default_HI_LO = DEFAULT_HI_LO; A_default_FM = DEFAULT_FM; A_default_FM_D1 = DEFAULT_FM_D1; A_default_FM_D2 = DEFAULT_FM_D2; A_default_FM_D3 = DEFAULT_FM_D3; A_default_CW = DEFAULT_CW; A_default_AM = DEFAULT_AM; A_default_AM_D1 = DEFAULT_AM_D1; A_default_AM_D2 = DEFAULT_AM_D2; A_default_AM_D3 = DEFAULT_AM_D3; A_default_FSK = DEFAULT_FSK; A_default_PSK = DEFAULT_PSK; B_default_SH_WI = DEFAULT_SH_WI; B_default_SH_WI_D1 = DEFAULT_SH_WI_D1; B_default_SH_WI_D2 = DEFAULT_SH_WI_D2; B_default_SH_WI_D3 = DEFAULT_SH_WI_D3; B_default_HI_LO = DEFAULT_HI_LO; B_default_FM = DEFAULT_FM; B_default_FM_D1 = DEFAULT_FM_D1; B_default_FM_D2 = DEFAULT_FM_D2; B_default_FM_D3 = DEFAULT_FM_D3; B_default_CW = DEFAULT_CW; B_default_AM = DEFAULT_AM; B_default_AM_D1 = DEFAULT_AM_D1; B_default_AM_D2 = DEFAULT_AM_D2; B_default_AM_D3 = DEFAULT_AM_D3; B_default_FSK = DEFAULT_FSK; B_default_PSK = DEFAULT_PSK; } void RIG_TS990::shutdown() { set_menu_0607(save_menu_0607); set_menu_0608(save_menu_0608); cmd = menu_0001; // restore beep level sendCommand(cmd); } //============================================================================== RIG_TS990::RIG_TS990() { name_ = TS990name_; modes_ = TS990modes_; B.freq = A.freq = 14107500; A.imode = USB; A.iBW = A_default_HI_LO; B.imode = USB; B.iBW = B_default_HI_LO; bandwidths_ = TS990_filt_SH; bw_vals_ = TS990_HI_bw_vals; dsp_SL = TS990_filt_SL; SL_tooltip = TS990_filt_SL_tooltip; SL_label = TS990_filt_SL_label; dsp_SH = TS990_filt_SH; SH_tooltip = TS990_filt_SH_label; SH_label = TS990_filt_SH_label; widgets = rig_widgets; comm_baudrate = BR115200; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; can_change_alt_vfo = true; nb_level = 1; has_auto_notch = has_notch_control = has_sql_control = has_swr_control = has_noise_reduction = has_noise_reduction_control = has_alc_control = has_dsp_controls = has_smeter = has_power_out = has_split = has_split_AB = has_noise_control = has_micgain_control = has_rf_control = has_volume_control = has_power_control = has_tune_control = has_attenuator_control = has_preamp_control = has_mode_control = has_bandwidth_control = has_ifshift_control = has_ptt_control = true; rxtxa = true; precision = 1; ndigits = 8; } //============================================================================== void RIG_TS990::selectA() { cmd = "CB0;"; sendCommand(cmd); showresp(INFO, ASC, "Rx A, Tx A", cmd, ""); rxtxa = true; get_attenuator(); get_preamp(); get_smeter(); get_power_out(); get_volume_control(); get_rf_gain(); get_noise_reduction_val(); get_auto_notch(); get_agc(); } void RIG_TS990::selectB() { cmd = "CB1;"; sendCommand(cmd); showresp(INFO, ASC, "Rx B, Tx B", cmd, ""); rxtxa = false; get_attenuator(); get_preamp(); get_smeter(); get_power_out(); get_volume_control(); get_rf_gain(); get_noise_reduction_val(); get_auto_notch(); get_agc(); } //============================================================================== // Get Attenuator // The TS990 actually has 4 attenuator settings. // RA00; = Off, RA01; = 6dB, RA02; = 12dB, RA03; = 18dB //============================================================================== void RIG_TS990::set_attenuator(int val) { if (useB) { if (att_level == 0) { // If attenuator level = 0 (off) att_level = 1; // then turn it on, at 6dB cmd = "RA11;"; // this is the command... atten_label("Att 6", true); // show it in the button... } else if (att_level == 1) { // If attenuator level = 1 (6dB) att_level = 2; // then make it 12dB cmd = "RA12;"; atten_label("Att 12", true); } else if (att_level == 2) { // if it's 12dB att_level = 3; // go to 18dB cmd = "RA13;"; atten_label("Att 18", true); } else if (att_level == 3) { // If it's 18dB att_level = 0; // Loop back to none. cmd = "RA10;"; atten_label("Att", false); } sendCommand(cmd); showresp(INFO, ASC, "set Att B", cmd, ""); } else { if (att_level == 0) { att_level = 1; cmd = "RA01;"; atten_label("Att 6", true); } else if (att_level == 1) { att_level = 2; cmd = "RA02;"; atten_label("Att 12", true); } else if (att_level == 2) { att_level = 3; cmd = "RA03;"; atten_label("Att 18", true); } else if (att_level == 3) { att_level = 0; cmd = "RA00;"; atten_label("Att", false); } sendCommand(cmd); showresp(INFO, ASC, "set Att A", cmd, ""); } } //============================================================================== // Modified to read and show the actual radio setting, in the button. //============================================================================== int RIG_TS990::get_attenuator() { if (useB) { cmd = "RA1;"; if (wait_char(';', 5, 100, "get Att B", ASC) < 5) return att_on; size_t p = replystr.rfind("RA"); if (p == string::npos) return att_on; if (replystr[p + 2] == '1' && replystr[p + 3] == '0') { att_on = 0; // Attenuator is OFF att_level = 0; // remember it... atten_label("Att", false); // show it... } else if (replystr[p + 2] == '1' && replystr[p + 3] == '1') { att_on = 1; // Attenuator is ON, 6dB att_level = 1; // remember the level atten_label("Att 6", true); // show it... } else if (replystr[p + 2] == '1' && replystr[p + 3] == '2') { att_on = 1; // .. still ON, 12dB att_level = 2; // remember this level atten_label("Att 12", true); // show it. } else if (replystr[p + 2] == '1' && replystr[p + 3] == '3') { att_on = 1; // .. still ON 18dB att_level = 3; // remember... atten_label("Att 18", true); // show this too.. } } else { cmd = "RA0;"; if (wait_char(';', 5, 100, "get Att B", ASC) < 5) return att_on; size_t p = replystr.rfind("RA"); if (p == string::npos) return att_on; if (replystr[p + 2] == '0' && replystr[p + 3] == '0') { att_on = 0; att_level = 0; atten_label("Att", false); } else if (replystr[p + 2] == '0' && replystr[p + 3] == '1') { att_on = 1; att_level = 1; atten_label("Att 6", true); } else if (replystr[p + 2] == '0' && replystr[p + 3] == '2') { att_on = 1; att_level = 2; atten_label("Att 12", true); } else if (replystr[p + 2] == '0' && replystr[p + 3] == '3') { att_on = 1; att_level = 3; atten_label("Att 18", true); } } return att_on; } //============================================================================== //Get PreAmp //============================================================================== void RIG_TS990::set_preamp(int val) { if (useB) { preamp_level = val; if (val) cmd = "PA11;"; else cmd = "PA10;"; sendCommand(cmd); } else { preamp_level = val; if (val) cmd = "PA01;"; else cmd = "PA00;"; sendCommand(cmd); } showresp(INFO, ASC, "set preamp", cmd, ""); } int RIG_TS990::get_preamp() { if (useB) { cmd = "PA1;"; if (wait_char(';', 5, 20, "get preamp", ASC) < 5) return 0; size_t p = replystr.rfind("PA"); if (p == string::npos) return 0; if (replystr[p + 3] == '1') preamp_level = 1; else preamp_level = 0; } else { cmd = "PA0;"; if (wait_char(';', 5, 20, "get preamp", ASC) < 5) return 0; size_t p = replystr.rfind("PA"); if (p == string::npos) return 0; if (replystr[p + 3] == '1') preamp_level = 1; else preamp_level = 0; } return preamp_level; } //============================================================================== void RIG_TS990::set_split(bool val) { split = val; if (useB) { if (val) { cmd = "MV10;TB0;"; sendCommand(cmd); showresp(INFO, ASC, "Rx on B, Tx on A", cmd, ""); } else { cmd = "MV10;TB1;"; sendCommand(cmd); showresp(INFO, ASC, "Rx on B, Tx on B", cmd, ""); } } else { if (val) { cmd = "MV00;TB1;"; sendCommand(cmd); showresp(INFO, ASC, "Rx on A, Tx on B", cmd, ""); } else { cmd = "MV00;TB0;"; sendCommand(cmd); showresp(INFO, ASC, "Rx on A, Tx on A", cmd, ""); } } Fl::awake(highlight_vfo, (void *)0); } int RIG_TS990::get_split() { size_t p; int split = 0; char rx = 0, tx = 0; // tx vfo cmd = rsp = "TB"; cmd.append(";"); if (wait_char(';', 4, 20, "get split tx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; tx = replystr[p+2]; } // rx vfo cmd = rsp = "CB"; cmd.append(";"); if (wait_char(';', 4, 20, "get split rx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; rx = replystr[p+2]; //split test split = (tx == '1' ? 2 : 0) + (rx == '1' ? 1 : 0); } return split; } //============================================================================== const char * RIG_TS990::get_bwname_(int n, int md) { static char bwname[20]; if (n > 256) { int SH = (n >> 8) & 0x7F; int SL = n & 0x7F; snprintf(bwname, sizeof(bwname), "%s/%s", (md == LSB || md == USB || md == FM) ? TS990_filt_SL[SL] : (md == AM || md == AMD1 || md == AMD2 || md == AMD3) ? TS990_AM_SL[SL] : (md == CW ||md == CWR) ? TS990_CAT_CW_width [SL]: (md == FSK ||md == FSKR) ? TS990_FSK_filt [SL]: (md == PSK ||md == PSKR) ? TS990_PSK_filt [SL]: TS990_filt_shift[SL], (md == LSB || md == USB || md == FM) ? TS990_filt_SH[SH] : (md == AM || md == AMD1 || md == AMD2 || md == AMD3) ? TS990_AM_SH[SH] : (md == CW ||md == CWR) ? TS990_CAT_CW_shift [SH]: (md == FSK ||md == FSKR) ? TS990_FSK_filt [SH]: (md == PSK ||md == PSKR) ? TS990_PSK_filt [SH]: TS990_filt_width[SH] ); } return bwname; } //============================================================================== // Get/Set VFO for A and B //============================================================================== long RIG_TS990::get_vfoA () { cmd = "FA;"; if (wait_char(';', 14, 20, "get vfoA", ASC) < 14) return A.freq; size_t p = replystr.rfind("FA"); if (p == string::npos) return A.freq; long f = 0L; long mul = 1L; for (size_t n = 12; n > 1; n--) { f += (replystr[p + n] - '0') * mul; mul *= 10; } A.freq = f; return A.freq; } void RIG_TS990::set_vfoA (long freq) { A.freq = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set vfo A", cmd, ""); } long RIG_TS990::get_vfoB () { cmd = "FB;"; if (wait_char(';', 14, 20, "get vfoB", ASC) < 14) return B.freq; size_t p = replystr.rfind("FB"); if (p == string::npos) return B.freq; long f = 0L; long mul = 1L; for (size_t n = 12; n > 1; n--) { f += (replystr[p + n] - '0') * mul; mul *= 10; } B.freq = f; return B.freq; } void RIG_TS990::set_vfoB (long freq) { B.freq = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set vfo B", cmd, ""); } //============================================================================== // Smeter reading //============================================================================== int RIG_TS990::get_smeter() { if (useB) cmd = "SM1;"; else cmd = "SM0;"; int mtr = 0; if (wait_char(';', 8, 20, "get", ASC) < 8) return 0; size_t p = replystr.find("SM"); if (p == string::npos) return 0; mtr = atoi(&replystr[p + 3]); mtr *= 10; mtr /= 7; return mtr; } //============================================================================== // Power out reading //============================================================================== int RIG_TS990::get_power_out() { static int meter[] = { 0, 7, 15, 23, 29, 34, 40, 46, 51, 58 }; static float val[] = { 0, 10, 25, 50, 75, 100, 125, 150, 175, 200 }; if (useB) cmd = "SM1;"; else cmd = "SM0;"; int mtr = 0; if (wait_char(';', 8, 20, "get", ASC) < 8) return 0; size_t p = replystr.find("SM"); if (p == string::npos) return 0; mtr = atoi(&replystr[p + 3]); int i = 0; while (i < 9 && (mtr > meter[i])) i++; float value = val[i] + (val[i+1] - val[i]) * (mtr - meter[i]) / (meter[i+1] - meter[i]); return (int)value; } //============================================================================== // ALC, SWR readings //============================================================================== static bool read_alc = false; static int alc_val = 0; int RIG_TS990::get_swr(void) { int mtr = 0; read_alc = false; cmd = "RM21;"; if (wait_char(';', 8, 20, "get swr", ASC) < 16) return 0; size_t p = replystr.find("RM21"); if (p == string::npos) return 0; mtr = atoi(&replystr[p + 4]); mtr *= 10; mtr /= 7; if (mtr > 100) mtr = 100; return mtr; } int RIG_TS990::get_alc(void) { if (read_alc) { read_alc = false; return alc_val; } cmd = "RM11;"; if (wait_char(';', 8, 20, "get alc", ASC) < 8) return 0; size_t p = replystr.find("RM11"); if (p == string::npos) return 0; alc_val = atoi(&replystr[p + 4]); alc_val *= 10; alc_val /= 7; if (alc_val > 100) alc_val = 100; return alc_val; } //============================================================================== // Transceiver power level //============================================================================== void RIG_TS990::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); } int RIG_TS990::get_power_control() { cmd = "PC;"; if (wait_char(';', 6, 20, "get pwr ctrl", ASC) < 6) return 0; size_t p = replystr.rfind("PC"); if (p == string::npos) return 0; int mtr = 0; replystr[p + 5] = 0; mtr = atoi(&replystr[p + 2]); return mtr; } //============================================================================== // Volume control return 0 ... 100 //============================================================================== int RIG_TS990::get_volume_control() { if (useB) { cmd = "AG1;"; if (wait_char(';', 7, 20, "get vol ctrl", ASC) < 7) return 0; size_t p = replystr.rfind("AG"); if (p == string::npos) return 0; replystr[p + 6] = 0; int val = atoi(&replystr[p + 3]); return (int)(val / 2.55); } else { cmd = "AG0;"; if (wait_char(';', 7, 20, "get vol ctrl", ASC) < 7) return 0; size_t p = replystr.rfind("AG"); if (p == string::npos) return 0; replystr[p + 6] = 0; int val = atoi(&replystr[p + 3]); return (int)(val / 2.55); } } void RIG_TS990::set_volume_control(int val) { if (useB) { int ivol = (int)(val * 2.55); cmd = "AG1000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); } else { int ivol = (int)(val * 2.55); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); } } //============================================================================== // Tranceiver PTT on/off //============================================================================== void RIG_TS990::set_PTT_control(int val) { if (val) { if (data_mode) cmd = "TX1;"; else cmd = "TX0;"; } else cmd = "RX;"; sendCommand(cmd); } //============================================================================== // Transceiver Tune //============================================================================== void RIG_TS990::tune_rig() { cmd = "AC111;"; sendCommand(cmd); } //============================================================================== // Mode A / B //============================================================================== void RIG_TS990::set_modeA(int val) { active_mode = A.imode = val; cmd = "OM0"; cmd += TS990_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(INFO, ASC, "set mode main band", cmd, ""); set_widths(val); get_bwA(); } int RIG_TS990::get_modeA() { int md = A.imode; cmd = "OM0;"; if (wait_char(';', 5, 20, "get mode main band", ASC) < 5) return A.imode; size_t p = replystr.rfind("OM"); if (p == string::npos) return A.imode; // this switch statement can be replaced with // md = replystr[p+3] - 1; // if (md < LSB) md = LSB; // if (md > AMD3) md = AMD3; switch (replystr[p + 3]) { case '1' : md = LSB; break; case '2' : md = USB; break; case '3' : md = CW; break; case '4' : md = FM; break; case '5' : md = AM; break; case '6' : md = FSK; break; case '7' : md = CWR; break; case '9' : md = FSKR; break; case 'A' : md = PSK; break; case 'B' : md = PSKR; break; case 'C' : md = LSBD1; break; case 'D' : md = USBD1; break; case 'E' : md = FMD1; break; case 'F' : md = AMD1; break; case 'G' : md = LSBD2; break; case 'H' : md = USBD2; break; case 'I' : md = FMD2; break; case 'J' : md = AMD2; break; case 'K' : md = LSBD3; break; case 'L' : md = USBD3; break; case 'M' : md = FMD3; break; case 'N' : md = AMD3; break; default : md = A.imode; } if (md != A.imode) { active_mode = A.imode = md; set_widths(md); } get_agc(); return A.imode; } void RIG_TS990::set_modeB(int val) { active_mode = B.imode = val; cmd = "OM1"; cmd += TS990_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(INFO, ASC, "set mode sub band", cmd, ""); set_widths(val); get_bwB(); } int RIG_TS990::get_modeB() { int md = B.imode; cmd = "OM1;"; if (wait_char(';', 5, 20, "get mode sub band", ASC) < 5) return B.imode; size_t p = replystr.rfind("OM"); if (p == string::npos) return B.imode; // this switch statement can be replaced with // md = replystr[p+3] - 1; // if (md < LSB) md = LSB; // if (md > AMD3) md = AMD3; switch (replystr[p + 3]) { case '1' : md = LSB; break; case '2' : md = USB; break; case '3' : md = CW; break; case '4' : md = FM; break; case '5' : md = AM; break; case '6' : md = FSK; break; case '7' : md = CWR; break; case '9' : md = FSKR; break; case 'A' : md = PSK; break; case 'B' : md = PSKR; break; case 'C' : md = LSBD1; break; case 'D' : md = USBD1; break; case 'E' : md = FMD1; break; case 'F' : md = AMD1; break; case 'G' : md = LSBD2; break; case 'H' : md = USBD2; break; case 'I' : md = FMD2; break; case 'J' : md = AMD2; break; case 'K' : md = LSBD3; break; case 'L' : md = USBD3; break; case 'M' : md = FMD3; break; case 'N' : md = AMD3; break; default : md = B.imode; } if (md != B.imode) { active_mode = B.imode = md; set_widths(md); } get_agc(); return B.imode; } //============================================================================== // Microphone gain //============================================================================== void RIG_TS990::set_mic_gain(int val) { cmd = "MG000;"; for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd); } int RIG_TS990::get_mic_gain() { int val = 0; cmd = "MG;"; if (wait_char(';', 6, 20, "get mic ctrl", ASC) >= 6) { size_t p = replystr.rfind("MG"); if (p == string::npos) return val; replystr[p + 5] = 0; val = atoi(&replystr[p + 2]); } return val; } void RIG_TS990::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } //============================================================================== // Read/Write SSB and Data Mode Filter Settings //============================================================================== void RIG_TS990::read_menu_0607() { save_menu_0607 = false; cmd = "EX00607;"; sendCommand(cmd); if (wait_char(';', 12, 20, "Read menu 0607", ASC) >= 12) { size_t p = replystr.rfind("EX00607"); if (p != string::npos) save_menu_0607 = (replystr[p+10] == '1'); } } void RIG_TS990::read_menu_0608() { save_menu_0608 = false; cmd = "EX00608;"; sendCommand(cmd); if (wait_char(';', 12, 20, "Read menu 0608", ASC) >= 12) { size_t p = replystr.rfind("EX00608"); if (p != string::npos) save_menu_0608 = (replystr[p+10] == '1'); } } void RIG_TS990::set_menu_0607(int val) { menu_0607 = val; cmd = "EX00607 00"; cmd += menu_0607 ? "1" : "0"; cmd += ";"; sendCommand(cmd); } void RIG_TS990::set_menu_0608(int val) { menu_0608 = val; cmd = "EX00608 00"; cmd += menu_0608 ? "1" : "0"; cmd += ";"; sendCommand(cmd); } //============================================================================== // Bandpass filter commands //============================================================================== int RIG_TS990::set_widths(int val) { int bw = 0; if (useB) bw = B.iBW; else bw = A.iBW; switch (val) { case LSB: case USB: if (menu_0607) { bandwidths_ = TS990_filt_width; bw_vals_ = TS990_WIDTH_bw_vals; dsp_SL = TS990_filt_width; SL_tooltip = TS990_filt_width_tooltip; SL_label = TS990_filt_width_label; dsp_SH = TS990_filt_shift; SH_tooltip = TS990_filt_shift_tooltip; SH_label = TS990_filt_shift_label; } else { bandwidths_ = TS990_filt_SH; bw_vals_ = TS990_HI_bw_vals; dsp_SL = TS990_filt_SL; SL_tooltip = TS990_filt_SL_tooltip; SL_label = TS990_filt_SL_label; dsp_SH = TS990_filt_SH; SH_tooltip = TS990_filt_SH_tooltip; SH_label = TS990_filt_SH_label; } break; case LSBD1: case LSBD2: case LSBD3: case USBD1: case USBD2: case USBD3: if (menu_0608) { bandwidths_ = TS990_filt_width; bw_vals_ = TS990_WIDTH_bw_vals; dsp_SL = TS990_filt_width; SL_tooltip = TS990_filt_width_tooltip; SL_label = TS990_filt_width_label; dsp_SH = TS990_filt_shift; SH_tooltip = TS990_filt_shift_tooltip; SH_label = TS990_filt_shift_label; } else { bandwidths_ = TS990_filt_SH; bw_vals_ = TS990_HI_bw_vals; dsp_SL = TS990_filt_SL; SL_tooltip = TS990_filt_SL_tooltip; SL_label = TS990_filt_SL_label; dsp_SH = TS990_filt_SH; SH_tooltip = TS990_filt_SH_tooltip; SH_label = TS990_filt_SH_label; } break; case CW: case CWR: bandwidths_ = TS990_CW_width; bw_vals_ = TS990_CW_bw_vals; dsp_SL = TS990_CW_width; SL_tooltip = TS990_CW_W_tooltip; SL_label = TS990_CW_W_btn_label; dsp_SH = TS990_CW_shift; SH_tooltip = TS990_CW_S_tooltip; SH_label = TS990_CW_S_btn_label; break; case FSK: case FSKR: bandwidths_ = TS990_FSK_filt; bw_vals_ = TS990_FSK_bw_vals; dsp_SL = TS990_empty; dsp_SH = TS990_empty; break; case PSK: case PSKR: bandwidths_ = TS990_PSK_filt; bw_vals_ = TS990_PSK_bw_vals; dsp_SL = TS990_empty; dsp_SH = TS990_empty; break; case AM: case AMD1: case AMD2: case AMD3: bandwidths_ = TS990_AM_SH; bw_vals_ = TS990_AM_HI_bw_vals; dsp_SL = TS990_AM_SL; dsp_SH = TS990_AM_SH; SL_tooltip = TS990_AM_SL_tooltip; SL_label = TS990_AM_btn_SL_label; SH_tooltip = TS990_AM_SH_tooltip; SH_label = TS990_AM_btn_SH_label; break; case FM: case FMD1: case FMD2: case FMD3: bandwidths_ = TS990_filt_SH; bw_vals_ = TS990_HI_bw_vals; dsp_SL = TS990_filt_SL; dsp_SH = TS990_filt_SH; SL_tooltip = TS990_filt_SL_tooltip; SL_label = TS990_filt_SL_label; SH_tooltip = TS990_filt_SH_tooltip; SH_label = TS990_filt_SH_label; break; } return bw; } const char **RIG_TS990::bwtable(int m) { const char **filter = TS990_filt_SH; switch (m) { case LSB: case USB: if (menu_0607) filter = TS990_filt_width; else filter = TS990_filt_SH; break; case FM: case FMD1: case FMD2: case FMD3: filter = TS990_filt_SH; break; case LSBD1: case LSBD2: case LSBD3: case USBD1: case USBD2: case USBD3: if (menu_0608) filter = TS990_filt_width; else filter = TS990_filt_SH; break; case AM: case AMD1: case AMD2: case AMD3: filter = TS990_AM_SH; break; case CW: case CWR: filter = TS990_CW_width; break; case FSK: case FSKR: filter = TS990_FSK_filt; break; case PSK: case PSKR: filter = TS990_PSK_filt; break; } return filter; } const char **RIG_TS990::lotable(int m) { const char **filter = TS990_filt_SL; switch (m) { case LSB: case USB: if (menu_0607) filter = TS990_filt_width; else filter = TS990_filt_SL; break; case FM: case FMD1: case FMD2: case FMD3: filter = TS990_filt_SL; break; case LSBD1: case LSBD2: case LSBD3: case USBD1: case USBD2: case USBD3: if (menu_0608) filter = TS990_filt_width; else filter = TS990_filt_SL; break; case CW: case CWR: filter = TS990_CW_width; break; case FSK: case FSKR: filter = NULL;//TS990_FSK_filt; break; case PSK: case PSKR: filter = NULL;//TS990_PSK_filt; break; case AM: case AMD1: case AMD2: case AMD3: filter = TS990_AM_SL; break; } return filter; } const char **RIG_TS990::hitable(int m) { const char **filter = TS990_filt_SH; switch (m) { case LSB: case USB: if (menu_0607) filter = TS990_filt_shift; else filter = TS990_filt_SH; break; case LSBD1: case LSBD2: case LSBD3: case USBD1: case USBD2: case USBD3: if (menu_0608) filter = TS990_filt_shift; else filter = TS990_filt_SH; break; case CW: case CWR: filter = TS990_CW_shift; break; case FM: case FMD1: case FMD2: case FMD3: filter = TS990_filt_SH; break; case FSK: case FSKR: filter = NULL; break; case PSK: case PSKR: filter = NULL; break; case AM: case AMD1: case AMD2: case AMD3: filter = TS990_AM_SH; break; } return filter; } int RIG_TS990::adjust_bandwidth(int val) { int retval = 0; switch (val) { case LSB: case USB: if (useB) retval = menu_0607 ? B_default_SH_WI : B_default_HI_LO; else retval = menu_0607 ? A_default_SH_WI : A_default_HI_LO; break; case LSBD1: case USBD1: if (useB) retval = menu_0608 ? B_default_SH_WI_D1 : B_default_HI_LO; else retval = menu_0608 ? A_default_SH_WI_D1 : A_default_HI_LO; break; case LSBD2: case USBD2: if (useB) retval = menu_0608 ? B_default_SH_WI_D2 : B_default_HI_LO; else retval = menu_0608 ? A_default_SH_WI_D2 : A_default_HI_LO; break; case LSBD3: case USBD3: if (useB) retval = menu_0608 ? B_default_SH_WI_D3 : B_default_HI_LO; else retval = menu_0608 ? A_default_SH_WI_D3 : A_default_HI_LO; break; case FM: retval = (useB ? B_default_FM : A_default_FM); break; case FMD1: retval = (useB ? B_default_FM_D1 : A_default_FM_D1); break; case FMD2: retval = (useB ? B_default_FM_D2 : A_default_FM_D2);; break; case FMD3: retval = (useB ? B_default_FM_D3 : A_default_FM_D3); break; case AM: retval = (useB ? B_default_AM : A_default_AM); break; case AMD1: retval = (useB ? B_default_AM_D1 : A_default_AM_D1); break; case AMD2: retval = (useB ? B_default_AM_D2 : A_default_AM_D2); break; case AMD3: retval = (useB ? B_default_AM_D3 : A_default_AM_D3); break; case CW: case CWR: retval = (useB ? B_default_CW : A_default_CW); break; case FSK: case FSKR: retval = (useB ? B_default_FSK : A_default_FSK); break; case PSK: case PSKR: retval = (useB ? B_default_PSK : A_default_PSK); break; } return retval; } int RIG_TS990::def_bandwidth(int val) { return adjust_bandwidth(val); } void RIG_TS990::set_bwA(int val) { size_t SL = 0, SH = 0; SL = val & 0x7F; SH = (val >> 8) & 0x7F; switch (A.imode) { case LSB: case USB: if (val < 256) break; if (menu_0607) { if (SL >= sizeof(TS990_CAT_filt_width)/sizeof(*TS990_CAT_filt_width) || SH >= sizeof(TS990_CAT_filt_shift)/sizeof(*TS990_CAT_filt_shift) ) A.iBW = A_default_SH_WI; else A.iBW = val; cmd = "SL0"; cmd += TS990_CAT_filt_width[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set width", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_filt_shift[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set filter shift", cmd, ""); } else { if (SH >= sizeof(TS990_CAT_filt_SH)/sizeof(*TS990_CAT_filt_SH) || SL >= sizeof(TS990_CAT_filt_SL)/sizeof(*TS990_CAT_filt_SL) ) A.iBW = A_default_HI_LO; else A.iBW = val; cmd = "SL0"; cmd += TS990_CAT_filt_SL[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set filter lower cutoff", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_filt_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set filter upper cutoff", cmd, ""); } break; case LSBD1: case LSBD2: case LSBD3: case USBD1: case USBD2: case USBD3: if (val < 256) break; if (menu_0608) { if (SL >= sizeof(TS990_CAT_filt_width)/sizeof(*TS990_CAT_filt_width) || SH >= sizeof(TS990_CAT_filt_shift)/sizeof(*TS990_CAT_filt_shift) ) A.iBW = A_default_SH_WI; else A.iBW = val; cmd = "SL0"; cmd += TS990_CAT_filt_width[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set data width", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_filt_shift[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set data shift", cmd, ""); } else { if (SH >= sizeof(TS990_CAT_filt_SH)/sizeof(*TS990_CAT_filt_SH) || SL >= sizeof(TS990_CAT_filt_SL)/sizeof(*TS990_CAT_filt_SL) ) A.iBW = A_default_HI_LO; else A.iBW = val; cmd = "SL0"; cmd += TS990_CAT_filt_SL[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set data lower cutoff", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_filt_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set data upper cutoff", cmd, ""); } break; case AM: case AMD1: case AMD2: case AMD3: if (val < 256) break; if (SH >= sizeof(TS990_CAT_AM_SH) / sizeof(*TS990_CAT_AM_SH) || SL >= sizeof(TS990_CAT_AM_SL) / sizeof(*TS990_CAT_AM_SL) ) A.iBW = A_default_AM; else A.iBW = val; cmd = "SL0"; cmd += TS990_CAT_AM_SL[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set AM lower", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_AM_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set AM upper", cmd, ""); break; case FM: case FMD1: case FMD2: case FMD3: if (val < 256) break; if (SH >= sizeof(TS990_CAT_filt_SH) / sizeof(*TS990_CAT_filt_SH) || SL >= sizeof(TS990_CAT_filt_SL) / sizeof(*TS990_CAT_filt_SL) ) A.iBW = A_default_FM; else A.iBW = val; cmd = "SL0"; cmd += TS990_CAT_filt_SL[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set FM lower", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_filt_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set FM upper", cmd, ""); break; case CW: case CWR: if (val < 256) break; if (SL >= sizeof(TS990_CAT_CW_width) / sizeof(*TS990_CAT_CW_width) || SH >= sizeof(TS990_CAT_CW_shift) / sizeof(*TS990_CAT_CW_shift) ) A.iBW = A_default_CW; else A.iBW = val; cmd = "SL0"; cmd += TS990_CAT_CW_width[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set cw width", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_CW_shift[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set cw shift", cmd, ""); break; case FSK: case FSKR: if (val > 256) break; if (SL >= sizeof(TS990_CAT_FSK_filt) / sizeof(*TS990_CAT_FSK_filt)) A.iBW = A_default_FSK; else A.iBW = val; cmd = "SL0"; cmd += TS990_CAT_FSK_filt[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set FSK bw", cmd, ""); break; case PSK: case PSKR: if (val > 256) break; if (SL >= sizeof(TS990_CAT_PSK_filt) / sizeof(*TS990_CAT_PSK_filt)) A.iBW = A_default_PSK; else A.iBW = val; cmd = "SL0"; cmd += TS990_CAT_PSK_filt[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set PSK bw", cmd, ""); break; } } void RIG_TS990::set_bwB(int val) { size_t SL = 0, SH = 0; SL = val & 0x7F; SH = (val >> 8) & 0x7F; switch (B.imode) { case LSB: case USB: if (val < 256) break; if (menu_0607) { if (SL >= sizeof(TS990_CAT_filt_width)/sizeof(*TS990_CAT_filt_width) || SH >= sizeof(TS990_CAT_filt_shift)/sizeof(*TS990_CAT_filt_shift) ) B.iBW = B_default_SH_WI; else B.iBW = val; cmd = "SL0"; cmd += TS990_CAT_filt_width[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set width", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_filt_shift[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set filter shift", cmd, ""); } else { if (SH >= sizeof(TS990_CAT_filt_SH)/sizeof(*TS990_CAT_filt_SH) || SL >= sizeof(TS990_CAT_filt_SL)/sizeof(*TS990_CAT_filt_SL) ) B.iBW = B_default_HI_LO; else B.iBW = val; cmd = "SL0"; cmd += TS990_CAT_filt_SL[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set filter lower cutoff", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_filt_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set filter upper cutoff", cmd, ""); } break; case LSBD1: case LSBD2: case LSBD3: case USBD1: case USBD2: case USBD3: if (val < 256) break; if (menu_0608) { if (SL >= sizeof(TS990_CAT_filt_width)/sizeof(*TS990_CAT_filt_width) || SH >= sizeof(TS990_CAT_filt_shift)/sizeof(*TS990_CAT_filt_shift) ) B.iBW = B_default_SH_WI; else B.iBW = val; cmd = "SL0"; cmd += TS990_CAT_filt_width[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set data width", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_filt_shift[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set data shift", cmd, ""); } else { if (SH >= sizeof(TS990_CAT_filt_SH)/sizeof(*TS990_CAT_filt_SH) || SL >= sizeof(TS990_CAT_filt_SL)/sizeof(*TS990_CAT_filt_SL) ) B.iBW = B_default_HI_LO; else B.iBW = val; cmd = "SL0"; cmd += TS990_CAT_filt_SL[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set data lower cutoff", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_filt_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set data upper cutoff", cmd, ""); } break; case AM: case AMD1: case AMD2: case AMD3: if (val < 256) break; if (SH >= sizeof(TS990_CAT_AM_SH) / sizeof(*TS990_CAT_AM_SH) || SL >= sizeof(TS990_CAT_AM_SL) / sizeof(*TS990_CAT_AM_SL) ) B.iBW = B_default_AM; else B.iBW = val; cmd = "SL0"; cmd += TS990_CAT_AM_SL[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set AM lower", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_AM_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set AM upper", cmd, ""); break; case FM: case FMD1: case FMD2: case FMD3: if (val < 256) break; if (SH >= sizeof(TS990_CAT_filt_SH) / sizeof(*TS990_CAT_filt_SH) || SL >= sizeof(TS990_CAT_filt_SL) / sizeof(*TS990_CAT_filt_SL) ) B.iBW = B_default_FM; else B.iBW = val; cmd = "SL0"; cmd += TS990_CAT_filt_SL[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set FM lower", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_filt_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set FM upper", cmd, ""); break; case CW: case CWR: if (val < 256) break; if (SL >= sizeof(TS990_CAT_CW_width) / sizeof(*TS990_CAT_CW_width) || SH >= sizeof(TS990_CAT_CW_shift) / sizeof(*TS990_CAT_CW_shift) ) B.iBW = B_default_CW; else B.iBW = val; cmd = "SL0"; cmd += TS990_CAT_CW_width[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set cw width", cmd, ""); cmd = "SH0"; cmd += TS990_CAT_CW_shift[(A.iBW >> 8) & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set cw shift", cmd, ""); break; case FSK: case FSKR: if (val > 256) break; if (SL >= sizeof(TS990_CAT_FSK_filt) / sizeof(*TS990_CAT_FSK_filt)) B.iBW = B_default_FSK; else B.iBW = val; cmd = "SL0"; cmd += TS990_CAT_FSK_filt[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set FSK bw", cmd, ""); break; case PSK: case PSKR: if (val > 256) break; if (SL >= sizeof(TS990_CAT_PSK_filt) / sizeof(*TS990_CAT_PSK_filt)) B.iBW = B_default_PSK; else B.iBW = val; cmd = "SL0"; cmd += TS990_CAT_PSK_filt[A.iBW & 0x7F]; sendCommand(cmd); showresp(INFO, ASC, "set PSK bw", cmd, ""); break; } } int RIG_TS990::get_bwA() { size_t p; int SL = 0, SH = 0; switch (A.imode) { case CW: case CWR: A.iBW = A_default_CW; SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get CW width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get CW shift", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_CW = A.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } break; case FSK: case FSKR: A.iBW = A_default_FSK; SL = A.iBW & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get FSK Width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 A_default_FSK = A.iBW = (SL & 0x7F); } break; case PSK: case PSKR: A.iBW = A_default_PSK; SL = A.iBW & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get PSK Width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 A_default_PSK = A.iBW = (SL & 0x7F); } break; case LSB: case USB: SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; if (menu_0607) { A.iBW = A_default_SH_WI; cmd = "SL0;"; if (wait_char(';', 6, 20, "get width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter shift", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_SH_WI = A.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } else { A.iBW = A_default_HI_LO; cmd = "SL0;"; if (wait_char(';', 6, 20, "get filter lower cutoff", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter upper cutoff", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_HI_LO = A.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } break; case LSBD1: case USBD1: SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; if (menu_0608) { A.iBW = A_default_SH_WI_D1; cmd = "SL0;"; if (wait_char(';', 6, 20, "get width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter shift", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 A_default_SH_WI_D1 = A.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } else { A.iBW = A_default_HI_LO; cmd = "SL0;"; if (wait_char(';', 6, 20, "get filter lower cutoff", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter upper cutoff", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_HI_LO = A.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } break; case LSBD2: case USBD2: SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; if (menu_0608) { A.iBW = A_default_SH_WI_D2; cmd = "SL0;"; if (wait_char(';', 6, 20, "get width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter shift", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 A_default_SH_WI_D2 = A.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } else { A.iBW = A_default_HI_LO; cmd = "SL0;"; if (wait_char(';', 6, 20, "get filter lower cutoff", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter upper cutoff", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_HI_LO = A.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } break; case LSBD3: case USBD3: SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; if (menu_0608) { A.iBW = A_default_SH_WI_D3; cmd = "SL0;"; if (wait_char(';', 6, 20, "get width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter shift", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 A_default_SH_WI_D3 = A.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } else { A.iBW = A_default_HI_LO; cmd = "SL0;"; if (wait_char(';', 6, 20, "get filter lower cutoff", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter upper cutoff", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_HI_LO = A.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } break; case AM: A.iBW = A_default_AM; SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get AM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get AM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_AM = A.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case AMD1: A.iBW = A_default_AM_D1; SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get AM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get AM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_AM_D1 = A.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case AMD2: A.iBW = A_default_AM_D2; SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get AM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get AM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_AM_D2 = A.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case AMD3: A.iBW = A_default_AM_D3; SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get AM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get AM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_AM_D3 = A.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case FM: A.iBW = A_default_FM; SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get FM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get FM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_FM = A.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case FMD1: A.iBW = A_default_FM_D1; SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get FM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get FM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_FM_D1 = A.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case FMD2 : A.iBW = A_default_FM_D2; SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get FM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get FM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_FM_D2 = A.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case FMD3: A.iBW = A_default_FM_D3; SL = A.iBW & 0x7F; SH = (A.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get FM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get FM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 A_default_FM_D3 = A.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } return A.iBW; } return A.iBW; } int RIG_TS990::get_bwB() { size_t p; int SL = 0, SH = 0; switch (B.imode) { case CW: case CWR: B.iBW = B_default_CW; SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get CW width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get CW shift", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_CW = B.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } break; case FSK: case FSKR: B.iBW = B_default_FSK; SL = B.iBW & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get FSK Width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 B_default_FSK = B.iBW = (SL & 0x7F); } break; case PSK: case PSKR: B.iBW = B_default_PSK; SL = B.iBW & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get PSK Width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 B_default_PSK = B.iBW = (SL & 0x7F); } break; case LSB: case USB: SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; if (menu_0607) { B.iBW = B_default_SH_WI; cmd = "SL0;"; if (wait_char(';', 6, 20, "get width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter shift", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_SH_WI = B.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } else { B.iBW = B_default_HI_LO; cmd = "SL0;"; if (wait_char(';', 6, 20, "get filter lower cutoff", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter upper cutoff", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_HI_LO = B.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } break; case LSBD1: case USBD1: SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; if (menu_0608) { B.iBW = B_default_SH_WI_D1; cmd = "SL0;"; if (wait_char(';', 6, 20, "get width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter shift", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 B_default_SH_WI_D1 = B.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } else { B.iBW = B_default_HI_LO; cmd = "SL0;"; if (wait_char(';', 6, 20, "get filter lower cutoff", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter upper cutoff", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_HI_LO = B.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } break; case LSBD2: case USBD2: SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; if (menu_0608) { B.iBW = B_default_SH_WI_D2; cmd = "SL0;"; if (wait_char(';', 6, 20, "get width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter shift", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 B_default_SH_WI_D2 = B.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } else { B.iBW = B_default_HI_LO; cmd = "SL0;"; if (wait_char(';', 6, 20, "get filter lower cutoff", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter upper cutoff", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_HI_LO = B.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } break; case LSBD3: case USBD3: SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; if (menu_0608) { B.iBW = B_default_SH_WI_D3; cmd = "SL0;"; if (wait_char(';', 6, 20, "get width", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter shift", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 B_default_SH_WI_D3 = B.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } else { B.iBW = B_default_HI_LO; cmd = "SL0;"; if (wait_char(';', 6, 20, "get filter lower cutoff", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get filter upper cutoff", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_HI_LO = B.iBW = ((SH << 8) | (SL & 0x7F )) | 0x8000; } } } break; case AM: B.iBW = B_default_AM; SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get AM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get AM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_AM = B.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case AMD1: B.iBW = B_default_AM_D1; SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get AM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get AM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_AM_D1 = B.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case AMD2: B.iBW = B_default_AM_D2; SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get AM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get AM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_AM_D2 = B.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case AMD3: B.iBW = B_default_AM_D3; SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get AM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get AM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_AM_D3 = B.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case FM: B.iBW = B_default_FM; SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get FM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get FM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_FM = B.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case FMD1: B.iBW = B_default_FM_D1; SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get FM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get FM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_FM_D1 = B.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case FMD2 : B.iBW = B_default_FM_D2; SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get FM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get FM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_FM_D2 = B.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } break; case FMD3: B.iBW = B_default_FM_D3; SL = B.iBW & 0x7F; SH = (B.iBW >> 8) & 0x7F; cmd = "SL0;"; if (wait_char(';', 6, 20, "get FM lo", ASC) == 6) { p = replystr.rfind("SL"); if (p == string::npos) break; SL = fm_decimal(&replystr[3], 2); //2 2 cmd = "SH0;"; if (wait_char(';', 6, 20, "get FM hi", ASC) == 6) { p = replystr.rfind("SH"); if (p == string::npos) break; SH = fm_decimal(&replystr[3], 2); //2 2 B_default_FM_D3 = B.iBW = ((SH << 8) | (SL & 0x7F)) | 0x8000; } } return B.iBW; } return B.iBW; } int RIG_TS990::get_modetype(int n) { return TS990_mode_type[n]; } void RIG_TS990::set_noise(bool val) //Now Setting AGC { if (useB) { if (nb_level == 2) { nb_level = 3; nb_label("AGC F", false); cmd = "GC13;"; sendCommand(cmd); } else if (nb_level == 3) { nb_level = 1; nb_label("AGC S", false); cmd = "GC11;"; sendCommand(cmd); } else if (nb_level == 1) { nb_level = 2; nb_label("AGC M", false); cmd = "GC12;"; sendCommand(cmd); } } else { if (nb_level == 2) { nb_level = 3; nb_label("AGC F", false); cmd = "GC03;"; sendCommand(cmd); } else if (nb_level == 3) { nb_level = 1; nb_label("AGC S", false); cmd = "GC01;"; sendCommand(cmd); } else if (nb_level == 1) { nb_level = 2; nb_label("AGC M", false); cmd = "GC02;"; sendCommand(cmd); } } } //---------------------------------------------------------------------- int RIG_TS990::get_agc() { int val = 0; if (useB) { cmd = "GC1;"; if (wait_char(';', 5, 100, "get AGC", ASC) < 5) return val; size_t p = replystr.rfind("GC"); if (p == string::npos) return val; if (replystr[p + 3] == '1' ) { nb_label("AGC S", false); } else if (replystr[p + 3] == '2' ) { nb_label("AGC M", false); } else if (replystr[p + 3] == '3' ) { nb_label("AGC F", false); } } else { cmd = "GC0;"; if (wait_char(';', 5, 100, "get AGC", ASC) < 5) return val; size_t p = replystr.rfind("GC"); if (p == string::npos) return val; if (replystr[p + 3] == '1' ) { nb_label("AGC S", false); } else if (replystr[p + 3] == '2' ) { nb_label("AGC M", false); } else if (replystr[p + 3] == '3' ) { nb_label("AGC F", false); } } return val; } //============================================================================== void RIG_TS990::set_squelch(int val) { if (useB) { cmd = "SQ1"; cmd.append(to_decimal(abs(val),3)).append(";"); sendCommand(cmd); showresp(INFO, ASC, "set squelch", cmd, ""); } else { cmd = "SQ0"; cmd.append(to_decimal(abs(val),3)).append(";"); sendCommand(cmd); showresp(INFO, ASC, "set squelch", cmd, ""); } } int RIG_TS990::get_squelch() { int val = 0; if (useB) { cmd = "SQ1;"; if (wait_char(';', 7, 20, "get squelch", ASC) >= 7) { size_t p = replystr.rfind("SQ1"); if (p == string::npos) return val; replystr[p + 6] = 0; val = atoi(&replystr[p + 3]); } } else { cmd = "SQ0;"; if (wait_char(';', 7, 20, "get squelch", ASC) >= 7) { size_t p = replystr.rfind("SQ0"); if (p == string::npos) return val; replystr[p + 6] = 0; val = atoi(&replystr[p + 3]); } } return val; } void RIG_TS990::get_squelch_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } void RIG_TS990::set_rf_gain(int val) { if (useB) { cmd = "RG1"; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(INFO, ASC, "set rf gain", cmd, ""); } else { cmd = "RG0"; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(INFO, ASC, "set rf gain", cmd, ""); } } int RIG_TS990::get_rf_gain() { int val = progStatus.rfgain; if (useB) { cmd = "RG1;"; if (wait_char(';', 7, 20, "get rf gain", ASC) < 7) return val; size_t p = replystr.rfind("RG"); if (p != string::npos) val = fm_decimal(&replystr[p+3], 3); } else { cmd = "RG0;"; if (wait_char(';', 7, 20, "get rf gain", ASC) < 7) return val; size_t p = replystr.rfind("RG"); if (p != string::npos) val = fm_decimal(&replystr[p+3], 3); } return val; } void RIG_TS990::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } static bool nr_on = false; void RIG_TS990::set_noise_reduction(int val) { if (useB) { cmd.assign("NR1").append(val ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(INFO, ASC, "SET noise reduction", cmd, ""); if (val) nr_on = true; else nr_on = false; } else { cmd.assign("NR0").append(val ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(INFO, ASC, "SET noise reduction", cmd, ""); if (val) nr_on = true; else nr_on = false; } } int RIG_TS990::get_noise_reduction() { int val = 0; if (useB) { cmd = rsp = "NR1"; cmd.append(";"); if (wait_char(';', 5, 20, "GET noise reduction", ASC) < 5) return val; size_t p = replystr.rfind(rsp); if (p == string::npos) return val; val = replystr[p+3] - '0'; if (val == 1) nr_on = true; else nr_on = false; return val; } else { cmd = rsp = "NR0"; cmd.append(";"); if (wait_char(';', 5, 20, "GET noise reduction", ASC) < 5) return val; size_t p = replystr.rfind(rsp); if (p == string::npos) return val; val = replystr[p+3] - '0'; if (val == 1) nr_on = true; else nr_on = false; } return val; } void RIG_TS990::set_noise_reduction_val(int val) { if (useB) { cmd.assign("RL11").append(to_decimal(val, 2)).append(";"); sendCommand(cmd); showresp(INFO, ASC, "SET_noise_reduction_val", cmd, ""); } else { cmd.assign("RL10").append(to_decimal(val, 2)).append(";"); sendCommand(cmd); showresp(INFO, ASC, "SET_noise_reduction_val", cmd, ""); } } int RIG_TS990::get_noise_reduction_val() { int val = 0; if (useB) { if (!nr_on) return val; cmd = rsp = "RL11"; cmd.append(";"); if (wait_char(';', 7, 20, "GET noise reduction val", ASC) < 7) return val; size_t p = replystr.rfind(rsp); if (p == string::npos) return val; val = fm_decimal(&replystr[p+4], 2); } else { if (!nr_on) return val; cmd = rsp = "RL10"; cmd.append(";"); if (wait_char(';', 7, 20, "GET noise reduction val", ASC) < 7) return val; size_t p = replystr.rfind(rsp); if (p == string::npos) return val; val = fm_decimal(&replystr[p+4], 2); } return val; } void RIG_TS990::set_auto_notch(int v) { if (useB) { cmd.assign("NT1").append(v ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(INFO, ASC, "SET Auto Notch", cmd, ""); } else { cmd.assign("NT0").append(v ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(INFO, ASC, "SET Auto Notch", cmd, ""); } } int RIG_TS990::get_auto_notch() { int val = 0; if (useB) { cmd = "NT1;"; if (wait_char(';', 5, 20, "get auto notch", ASC) < 5) return val; size_t p = replystr.rfind("NT"); if (p == string::npos) return val; if (replystr[p+3] == '1') val = 1; } else { cmd = "NT0;"; if (wait_char(';', 5, 20, "get auto notch", ASC) < 5) return val; size_t p = replystr.rfind("NT"); if (p == string::npos) return val; if (replystr[p+3] == '1') val = 1; } return val; } void RIG_TS990::set_notch(bool on, int val) { if (useB) { if (on) { cmd.assign("NT12;"); sendCommand(cmd); showresp(INFO, ASC, "Set notch ON", cmd, ""); int bp = (int)(val * 127.0 / 3000); if (bp == 0) bp = 1; cmd.assign("BP1").append(to_decimal(bp, 3)).append(";"); sendCommand(cmd); showresp(INFO, ASC, "set notch freq", cmd, ""); } else { cmd.assign("NT10;"); sendCommand(cmd); showresp(INFO, ASC, "Set notch OFF", cmd, ""); } } else { if (on) { cmd.assign("NT02;"); sendCommand(cmd); showresp(INFO, ASC, "Set notch ON", cmd, ""); int bp = (int)(val * 127.0 / 3000); if (bp == 0) bp = 1; cmd.assign("BP0").append(to_decimal(bp, 3)).append(";"); sendCommand(cmd); showresp(INFO, ASC, "set notch freq", cmd, ""); } else { cmd.assign("NT00;"); sendCommand(cmd); showresp(INFO, ASC, "Set notch OFF", cmd, ""); } } } bool RIG_TS990::get_notch(int &val) { if (useB) { val = 1500; cmd = "NT1;"; if (wait_char(';', 5, 20, "get notch state", ASC) < 5) return 0; size_t p = replystr.rfind("NT"); if (p == string::npos) return 0; if (replystr[p+3] == '2') { cmd.assign("BP1;"); if (wait_char(';', 7, 20, "get notch freq", ASC) < 7) return 0; size_t p = replystr.rfind("BP1"); if (p != string::npos) val = (int)(atoi(&replystr[p+3]) * 3000 / 127.0); return 1; } return 0; } else { val = 1500; cmd = "NT0;"; if (wait_char(';', 5, 20, "get notch state", ASC) < 5) return 0; size_t p = replystr.rfind("NT"); if (p == string::npos) return 0; if (replystr[p+3] == '2') { cmd.assign("BP0;"); if (wait_char(';', 7, 20, "get notch freq", ASC) < 7) return 0; size_t p = replystr.rfind("BP0"); if (p != string::npos) val = (int)(atoi(&replystr[p+3]) * 3000.0 / 127.0); return 1; } return 0; } return 0; } void RIG_TS990::get_notch_min_max_step(int &min, int &max, int &step) { min = 20; max = 3000; step = 10; } //============================================================================== void RIG_TS990::set_if_shift(int val) //Now doing Monitor { progStatus.shift_val = val; cmd = "ML"; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(INFO, ASC, "set Mon Level", cmd, ""); } bool RIG_TS990::get_if_shift(int &val) { cmd = "ML;"; if (wait_char(';', 6, 20, "get Mon Level", ASC) == 6) { size_t p = replystr.rfind("ML"); if (p != string::npos) { val = fm_decimal(&replystr[p+2], 3); return true; } } val = progStatus.shift_val; return false; } void RIG_TS990::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = 0; if_shift_max = max = 255; if_shift_step = step = 1; if_shift_mid = 10; } flrig-1.3.24/src/rigs/FT817.cxx0000644000175000017500000000616512626450670012675 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT817.h" static const char FT817name_[] = "FT-817"; static const char *FT817modes_[] = { "LSB", "USB", "CW", "CW-R", "AM", "FM", "DIG", "PKT", NULL}; static const int FT817_mode_val[] = { 0, 1, 2, 3, 4, 8, 0x0A, 0x0C }; static const char FT817_mode_type[] = { 'L', 'U', 'U', 'L', 'U', 'U', 'U', 'U' }; RIG_FT817::RIG_FT817() { // base class values name_ = FT817name_; modes_ = FT817modes_; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; has_ptt_control = has_mode_control = true; precision = 10; ndigits = 8; } void RIG_FT817::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; } long RIG_FT817::get_vfoA () { init_cmd(); cmd[4] = 0x03; int ret = waitN(5, 100, "get vfoA", HEX); if (ret < 5) return freqA; freqA = fm_bcd(replybuff, 8) * 10; int mode = replybuff[4]; for (int i = 0; i < 8; i++) if (FT817_mode_val[i] == mode) { modeA = i; break; } return freqA; } void RIG_FT817::set_getACK() { for (int i = 0; i < 5; i++) { sendCommand(cmd, 0); for (int j = 0; j < 10; j++) { if (readResponse() == 1) return; MilliSleep(50); } } } void RIG_FT817::set_vfoA (long freq) { freqA = freq; freq /=10; // 817 does not support 1 Hz resolution cmd = to_bcd(freq, 8); cmd += 0x01; set_getACK(); } int RIG_FT817::get_modeA() { // read by get_vfoA return modeA; } int RIG_FT817::get_modetype(int n) { return FT817_mode_type[n]; } void RIG_FT817::set_modeA(int val) { modeA = val; init_cmd(); cmd[0] = FT817_mode_val[val]; cmd[4] = 0x07; set_getACK(); } // Tranceiver PTT on/off void RIG_FT817::set_PTT_control(int val) { init_cmd(); if (val) cmd[4] = 0x08; else cmd[4] = 0x88; set_getACK(); } int RIG_FT817::get_power_out(void) { init_cmd(); cmd[4] = 0xF7; int ret = waitN(1, 100, "get pwr out", HEX); if (!ret) return 0; int fwdpwr = replybuff[0]; fwdpwr = fwdpwr * 100 / 15; return fwdpwr; } int RIG_FT817::get_smeter(void) { init_cmd(); cmd[4] = 0xE7; int ret = waitN(1, 100, "get smeter", HEX); if (!ret) return 0; int sval = replybuff[0]; sval = (sval-1) * 100 / 15; return sval; } flrig-1.3.24/src/rigs/IC9100.cxx0000644000175000017500000004256412562731647012741 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC9100.h" bool IC9100_DEBUG = true; //============================================================================= // IC-9100 const char IC9100name_[] = "IC-9100"; const char *IC9100modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", "PSK", "PSK-R", "LSB-D1", "LSB-D2", "LSB-D3", "USB-D1", "USB-D2", "USB-D3", NULL}; const char IC9100_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U', 'U', 'L', 'L', 'L', 'L', 'U', 'U', 'U' }; const char IC9100_mode_nbr[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x08, 0x12, 0x13, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01 }; const char *IC9100_ssb_bws[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3100", "3200", "3300", "3400", "3500", "3600", NULL }; static int IC9100_bw_vals_SSB[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41, WVALS_LIMIT}; const char *IC9100_rtty_bws[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", NULL }; static int IC9100_bw_vals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32, WVALS_LIMIT}; const char *IC9100_am_bws[] = { "200", "400", "600", "800", "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", "3800", "4000", "4200", "4400", "4600", "4800", "5000", "5200", "5400", "5600", "5800", "6000", "6200", "6400", "6600", "6800", "7000", "7200", "7400", "9100", "7800", "8000", "8200", "8400", "8600", "8800", "9000", "9200", "9400", "9600", "9800", "10000", NULL }; static int IC9100_bw_vals_AM[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41,42,43,44,45,46,47,48,49,50, WVALS_LIMIT}; const char *IC9100_fm_bws[] = {"FIXED", NULL }; static int IC9100_bw_vals_FM[] = {1, WVALS_LIMIT}; static GUI IC9100_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 54, 165, 156 }, { (Fl_Widget *)btnNR, 2, 185, 50 }, { (Fl_Widget *)sldrNR, 54, 185, 156 }, { (Fl_Widget *)btnIFsh, 214, 125, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 125, 156 }, { (Fl_Widget *)btnNotch, 214, 145, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 165, 156 }, { (Fl_Widget *)sldrPOWER, 266, 185, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC9100::RIG_IC9100() { defaultCIV = 0x7C; name_ = IC9100name_; modes_ = IC9100modes_; bandwidths_ = IC9100_ssb_bws; bw_vals_ = IC9100_bw_vals_SSB; _mode_type = IC9100_mode_type; adjustCIV(defaultCIV); widgets = IC9100_widgets; has_extras = has_cw_wpm = has_cw_spot_tone = has_cw_qsk = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_smeter = has_power_out = has_alc_control = has_swr_control = has_compON = has_compression = has_auto_notch = has_notch_control = has_split = has_micgain_control = has_bandwidth_control = true; precision = 1; ndigits = 9; }; //====================================================================== // IC9100 unique commands //====================================================================== void RIG_IC9100::initialize() { IC9100_widgets[0].W = btnVol; IC9100_widgets[1].W = sldrVOLUME; IC9100_widgets[2].W = sldrRFGAIN; IC9100_widgets[3].W = sldrSQUELCH; IC9100_widgets[4].W = btnNR; IC9100_widgets[5].W = sldrNR; IC9100_widgets[6].W = btnIFsh; IC9100_widgets[7].W = sldrIFSHIFT; IC9100_widgets[8].W = btnNotch; IC9100_widgets[9].W = sldrNOTCH; IC9100_widgets[10].W = sldrMICGAIN; IC9100_widgets[11].W = sldrPOWER; cmd = pre_to; cmd += '\x1A'; cmd += '\x05'; cmd += '\x00'; cmd += '\x58'; cmd += '\x00'; cmd.append(post); sendICcommand(cmd,6); checkresponse(); } void RIG_IC9100::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\xD0'; cmd.append(post); waitFB("select A"); } void RIG_IC9100::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\xD1'; cmd.append(post); waitFB("select B"); } void RIG_IC9100::set_modeA(int val) { A.imode = val; cmd = pre_to; cmd += '\x06'; cmd += IC9100_mode_nbr[val]; cmd.append( post ); if (IC9100_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); waitFB("set mode A"); // digital set / clear if (A.imode >= 10) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; switch (A.imode) { case 10 : case 13 : cmd += '\x01'; cmd += '\x01'; break; case 11 : case 14 : cmd += '\x01'; cmd += '\x02'; break; case 12 : case 15 : cmd += '\x01'; cmd += '\x03'; break; default : cmd += '\x00'; cmd += '\x00'; } cmd.append( post); if (IC9100_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); waitFB("set digital"); } } int RIG_IC9100::get_modeA() { int md = 0; cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get mode A")) { for (md = 0; md < 10; md++) if (replystr[5] == IC9100_mode_nbr[md]) break; if (md >= 10) md = 0; } else { checkresponse(); return A.imode; } if (md == 0 || md == 1) { cmd = pre_to; cmd.append("\x1a\x06"); cmd.append(post); resp = pre_fm; resp.append("\x1a\x06"); if (waitFOR(9, "get digital setting")) { if (replystr[6] == 1 && replystr[7] > 0) md = (md ? 13 : 10) + replystr[7]; } } if (md > 15) md = 0; A.imode = md; return A.imode; } void RIG_IC9100::set_modeB(int val) { B.imode = val; cmd = pre_to; cmd += '\x06'; cmd += IC9100_mode_nbr[val]; cmd.append( post ); if (IC9100_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); waitFB("set mode B"); // digital set / clear if (B.imode >= 10) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; switch (B.imode) { case 10 : case 13 : cmd += '\x01'; cmd += '\x01'; break; case 11 : case 14 : cmd += '\x01'; cmd += '\x02'; break; case 12 : case 15 : cmd += '\x01'; cmd += '\x03'; break; default : cmd += '\x00'; cmd += '\x00'; } cmd.append( post); if (IC9100_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); waitFB("set digital"); } } int RIG_IC9100::get_modeB() { int md = 0; cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get mode A")) { for (md = 0; md < 10; md++) if (replystr[5] == IC9100_mode_nbr[md]) break; if (md >= 10) md = 0; } else { checkresponse(); return B.imode; } if (md == 0 || md == 1) { cmd = pre_to; cmd.append("\x1a\x06"); cmd.append(post); resp = pre_fm; resp.append("\x1a\x06"); if (waitFOR(9, "get digital setting")) { if (replystr[6] == 1 && replystr[7] > 0) md = (md ? 13 : 10) + replystr[7]; } } if (md > 15) md = 0; B.imode = md; return B.imode; } int RIG_IC9100::get_bwA() { if (A.imode == 5) return 0; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(post); string resp = pre_fm; resp.append("\x1a\x03"); if (waitFOR(8, "get bw A")) { size_t p = replystr.rfind(resp); A.iBW = fm_bcd(&replystr[p+6], 2); } return A.iBW; } void RIG_IC9100::set_bwA(int val) { A.iBW = val; if (A.imode == 5) return; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(to_bcd(A.iBW, 2)); cmd.append(post); if (IC9100_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); waitFB("set bw A"); } int RIG_IC9100::get_bwB() { if (B.imode == 5) return 0; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(post); string resp = pre_fm; resp.append("\x1a\x03"); if (waitFOR(8, "get bw A")) { size_t p = replystr.rfind(resp); B.iBW = fm_bcd(&replystr[p+6], 2); } return B.iBW; } void RIG_IC9100::set_bwB(int val) { B.iBW = val; if (B.imode == 5) return; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(to_bcd(A.iBW, 2)); cmd.append(post); if (IC9100_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); waitFB("set bw B"); } int RIG_IC9100::adjust_bandwidth(int m) { int bw = 0; switch (m) { case 2: // AM bandwidths_ = IC9100_am_bws; bw_vals_ = IC9100_bw_vals_AM; bw = 19; break; case 5: // FM bandwidths_ = IC9100_fm_bws; bw_vals_ = IC9100_bw_vals_FM; bw = 0; break; case 4: case 7: // RTTY bandwidths_ = IC9100_rtty_bws; bw_vals_ = IC9100_bw_vals_RTTY; bw = 12; break; case 3: case 6: // CW bandwidths_ = IC9100_ssb_bws; bw_vals_ = IC9100_bw_vals_SSB; bw = 12; break; case 8: case 9: // PKT bandwidths_ = IC9100_ssb_bws; bw_vals_ = IC9100_bw_vals_SSB; bw = 34; break; case 0: case 1: // SSB case 10: case 11 : case 12 : case 13: case 14 : case 15 : default: bandwidths_ = IC9100_ssb_bws; bw_vals_ = IC9100_bw_vals_SSB; bw = 34; } return bw; } int RIG_IC9100::def_bandwidth(int m) { int bw = 0; switch (m) { case 2: // AM bw = 19; break; case 5: // FM bw = 0; break; case 4: case 7: // RTTY bw = 12; break; case 3: case 6: // CW bw = 12; break; case 8: case 9: // PKT bw = 34; break; case 0: case 1: // SSB case 10: case 11 : case 12 : case 13: case 14 : case 15 : default: bw = 34; } return bw; } void RIG_IC9100::set_mic_gain(int v) { ICvol = (int)(v * 255 / 100); if (!progStatus.USBaudio) { cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); } else { cmd = pre_to; cmd += '\x1A'; cmd += '\x05'; cmd += '\x00'; cmd += '\x29'; cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); } waitFB("set mic gain"); if (IC9100_DEBUG) LOG_WARN("%s", str2hex(cmd.data(), cmd.length())); } void RIG_IC9100::set_attenuator(int val) { int cmdval = 0; if (atten_level == 0) { atten_level = 1; atten_label("20 dB", true); cmdval = 0x20; } else { atten_level = 0; atten_label("Att", false); cmdval = 0x00; } cmd = pre_to; cmd += '\x11'; cmd += cmdval; cmd.append( post ); waitFB("set attenuator"); if (IC9100_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); } int RIG_IC9100::get_attenuator() { cmd = pre_to; cmd += '\x11'; cmd.append( post ); string resp = pre_fm; resp += '\x11'; if (waitFOR(7, "get attenuator")) { if (replystr[5] == 0x20) { atten_level = 1; atten_label("20 dB", true); } else { atten_level = 0; atten_label("Att", false); } } return atten_level; } void RIG_IC9100::set_compression() { if (progStatus.compON) { cmd.assign(pre_to).append("\x14\x0E"); cmd.append(to_bcd(progStatus.compression * 255 / 100, 3)); cmd.append( post ); waitFB("set comp"); cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x01'; cmd.append(post); waitFB("set Comp ON"); } else{ cmd.assign(pre_to).append("\x16\x44"); cmd += '\x00'; cmd.append(post); waitFB("set Comp OFF"); } } void RIG_IC9100::set_vox_onoff() { cmd.assign(pre_to).append("\x16\x46"); if (progStatus.vox_onoff) { cmd += '\x01'; cmd.append( post ); waitFB("set vox ON"); } else { cmd += '\x00'; cmd.append( post ); waitFB("set vox OFF"); } } void RIG_IC9100::set_vox_gain() { cmd.assign(pre_to).append("\x1A\x05"); cmd +='\x01'; cmd +='\x25'; cmd.append(to_bcd((int)(progStatus.vox_gain * 2.55), 3)); cmd.append( post ); waitFB("SET vox gain"); } void RIG_IC9100::set_vox_anti() { cmd.assign(pre_to).append("\x1A\x05"); cmd +='\x01'; cmd +='\x26'; cmd.append(to_bcd((int)(progStatus.vox_anti * 2.55), 3)); cmd.append( post ); waitFB("SET anti-vox"); } void RIG_IC9100::set_vox_hang() { cmd.assign(pre_to).append("\x1A\x05"); //values 00-20 = 0.0 - 2.0 sec cmd +='\x01'; cmd +='\x27'; cmd.append(to_bcd((int)(progStatus.vox_hang / 10 ), 2)); cmd.append( post ); waitFB("SET vox hang"); } // these need to be written and tested void RIG_IC9100::get_vox_onoff() { } void RIG_IC9100::get_vox_gain() { } void RIG_IC9100::get_vox_anti() { } void RIG_IC9100::get_vox_hang() { } // CW controls void RIG_IC9100::set_cw_wpm() { cmd.assign(pre_to).append("\x14\x0C"); // values 0-255 cmd.append(to_bcd(round((progStatus.cw_wpm - 6) * 255 / (60 - 6)), 3)); cmd.append( post ); waitFB("SET cw wpm"); } void RIG_IC9100::set_cw_qsk() { int n = round(progStatus.cw_qsk * 10); // values 0-255 cmd.assign(pre_to).append("\x14\x0F"); cmd.append(to_bcd(n, 3)); cmd.append(post); waitFB("Set cw qsk delay"); } void RIG_IC9100::set_cw_spot_tone() { cmd.assign(pre_to).append("\x14\x09"); // values 0=300Hz 255=900Hz int n = round((progStatus.cw_spot_tone - 300) * 255.0 / 600.0); if (n > 255) n = 255; if (n < 0) n = 0; cmd.append(to_bcd(n, 3)); cmd.append( post ); waitFB("SET cw spot tone"); } void RIG_IC9100::set_cw_vol() { cmd.assign(pre_to); cmd.append("\x1A\x05"); cmd += '\x00'; cmd += '\x24'; cmd.append(to_bcd((int)(progStatus.cw_vol * 2.55), 3)); cmd.append( post ); waitFB("SET cw sidetone volume"); } int RIG_IC9100::get_smeter() { string cstr = "\x15\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.40); if (mtr > 100) mtr = 100; } } return mtr; } int RIG_IC9100::get_power_out() { string cstr = "\x15\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get pout")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.15); if (mtr > 100) mtr = 100; } } return mtr; } int RIG_IC9100::get_swr() { string cstr = "\x15\x12"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get SWR")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.40); if (mtr > 100) mtr = 100; } } return mtr; } int RIG_IC9100::get_alc() { string cstr = "\x15\x13"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get alc")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.55); if (mtr > 100) mtr = 100; } } return mtr; } void RIG_IC9100::set_notch(bool on, int val) { int notch = (int)(val * 256.0 / 3000.0); cmd = pre_to; cmd.append("\x16\x48"); cmd += on ? '\x01' : '\x00'; cmd.append(post); waitFB("set notch"); cmd = pre_to; cmd.append("\x14\x0D"); cmd.append(to_bcd(notch,3)); cmd.append(post); waitFB("set notch val"); } bool RIG_IC9100::get_notch(int &val) { bool on = false; val = 0; string cstr = "\x16\x48"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get notch")) { size_t p = replystr.rfind(resp); if (p != string::npos) on = replystr[p + 6]; cmd = pre_to; resp = pre_fm; cstr = "\x14\x0D"; cmd.append(cstr); resp.append(cstr); cmd.append(post); if (waitFOR(9, "notch val")) { size_t p = replystr.rfind(resp); if (p != string::npos) val = (int)ceil(fm_bcd(&replystr[p+6],3) * 3000.0 / 255.0); } } return on; } void RIG_IC9100::get_notch_min_max_step(int &min, int &max, int &step) { min = 0; max = 3000; step = 20; } void RIG_IC9100::set_auto_notch(int val) { cmd = pre_to; cmd += '\x16'; cmd += '\x41'; cmd += val ? 0x01 : 0x00; cmd.append( post ); waitFB("set AN"); } int RIG_IC9100::get_auto_notch() { string cstr = "\x16\x41"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get AN")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { auto_notch_label("AN", true); return true; } else { auto_notch_label("AN", false); return false; } } } return progStatus.auto_notch; } void RIG_IC9100::set_split(bool val) { cmd = pre_to; cmd += 0x0F; cmd += val ? 0x01 : 0x00; cmd.append(post); waitFB("set split"); } int RIG_IC9100::get_split() { LOG_WARN("%s", "get split - not implemented"); return progStatus.split; /* cmd = pre_to; cmd += 0x0F; cmd.append(post); string resp = pre_fm; resp += 0x0F; if (waitFOR(8, "get split")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return 0; */ } flrig-1.3.24/src/rigs/FT990.cxx0000644000175000017500000001602312562731647012676 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT990.h" #include "rig.h" static const char FT990name_[] = "FT-990"; static const char *FT990modes_[] = { "LSB", "USB", "CW2.4", "CW500", "AM6.0", "AM2.4", "FM", "RTTY(L)", "RTTY(U)", "PKT(L)", "PKT(FM)", NULL}; static const int FT990_def_bw[] = { 0, 0, 0, 2, 4, 0, 0, 0, 0, 0, 0 }; static const int FT990_mode_val[] = { 0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11 }; static const char FT990_mode_type[] = { 'L', 'U', 'L', 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U' }; static const char *FT990widths_[] = { "2400", "2000", "500", "250", "6000", NULL}; static int FT990_bw_vals[] = { 1,2,3,4,5,WVALS_LIMIT}; static const int FT990_bw_val[] = { 0, 1, 2, 3, 4 }; RIG_FT990::RIG_FT990() { name_ = FT990name_; modes_ = FT990modes_; bandwidths_ = FT990widths_; bw_vals_ = FT990_bw_vals; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 100; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; afreq = bfreq = A.freq = B.freq = 14070000; amode = bmode = A.imode = B.imode = 1; aBW = bBW = A.iBW = B.iBW = 2; precision = 10; ndigits = 9; has_split = has_split_AB = has_get_info = has_smeter = has_power_out = has_swr_control = has_mode_control = has_bandwidth_control = has_ptt_control = true; } int RIG_FT990::adjust_bandwidth(int m) { if (m == 0 || m == 1 || m == 5) return 2; if (m == 2 || m == 3 ) return 1; if (m == 4 || m == 6 || m == 7) return 3; return 2; } void RIG_FT990::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; replystr.clear(); } void RIG_FT990::initialize() { } void RIG_FT990::selectA() { init_cmd(); cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select A", cmd, replystr); } void RIG_FT990::selectB() { init_cmd(); cmd[3] = 0x01; cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select B", cmd, replystr); } void RIG_FT990::set_split(bool val) { split = val; init_cmd(); cmd[3] = val ? 0x01 : 0x00; cmd[4] = 0x01; sendCommand(cmd); if (val) showresp(WARN, HEX, "set split ON", cmd, replystr); else showresp(WARN, HEX, "set split OFF", cmd, replystr); } bool RIG_FT990::get_info() { bool memmode = false, vfobmode = false; int pfreq, pmode, pbw; init_cmd(); cmd[3] = 0x00; cmd[4] = 0xFA; int ret = waitN(5, 100, "Read flags"); if (ret >= 5) { size_t p = ret - 5; memmode = ((replystr[p+1] & 0x10) == 0x10); vfobmode = ((replystr[p] & 0x02) == 0x02); if (memmode) return false; if (vfobmode && !useB) { useB = true; Fl::awake(highlight_vfo, (void *)0); } else if (!vfobmode && useB) { useB = false; Fl::awake(highlight_vfo, (void *)0); } } init_cmd(); cmd[4] = 0x10; // update info cmd[0] = 0x02; // 1 16 byte sequences for current VFO / MEM ret = waitN(16, 100, "Read info"); if (ret >= 16) { size_t p = ret - 16; // current VFO / MEM pfreq = 0; for (size_t n = 1; n < 5; n++) pfreq = pfreq * 256 + (unsigned char)replystr[p + n]; pfreq = pfreq * 1.25; // 100D resolution is 1.25 Hz / bit for read int rmode = replystr[p + 7] & 0x07; switch (rmode) { case 0 : pmode = 0; break; // LSB case 1 : pmode = 1; break; // USB case 2 : pmode = 2; break; // CW case 3 : pmode = 5; break; // AM case 4 : pmode = 6; break; // FM case 5 : pmode = 8; break; // RTTY case 6 : pmode = 9; break; // PKT default : pmode = 1; break; } int rpbw = replystr[p + 8]; pbw = rpbw & 0x05; if (pbw > 4) pbw = 4; if ((rpbw & 0x80) == 0x80) { if (pmode == 10) pmode = 11; if (pmode == 8) pmode = 9; } if (pmode == 6) pbw = 0; if (useB) { B.freq = pfreq; B.imode = pmode; B.iBW = pbw; } else { A.freq = pfreq; A.imode = pmode; A.iBW = pbw; } LOG_WARN("Vfo %c = %d, BW %s", vfobmode ? 'B' : 'A', pfreq, FT990widths_[pbw]); return true; } return false; } long RIG_FT990::get_vfoA () { return A.freq; } void RIG_FT990::set_vfoA (long freq) { A.freq = freq; freq /=10; // 100D does not support 1 Hz resolution cmd = to_bcd_be(freq, 8); cmd += 0x0A; sendCommand(cmd); showresp(WARN, HEX, "set freq A", cmd, replystr); } int RIG_FT990::get_modeA() { return A.imode; } void RIG_FT990::set_modeA(int val) { A.imode = val; init_cmd(); cmd[3] = FT990_mode_val[val]; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode A", cmd, replystr); } void RIG_FT990::set_bwA (int val) { A.iBW = val; init_cmd(); cmd[3] = FT990_bw_val[val]; cmd[4] = 0x8C; sendCommand(cmd); showresp(WARN, HEX, "set BW A", cmd, replystr); } int RIG_FT990::get_bwA() { return A.iBW; } long RIG_FT990::get_vfoB() { return B.freq; } void RIG_FT990::set_vfoB(long freq) { B.freq = freq; freq /=10; cmd = to_bcd_be(freq, 8); cmd += 0x0A; sendCommand(cmd); showresp(WARN, HEX, "set freq B", cmd, replystr); } void RIG_FT990::set_modeB(int val) { B.imode = val; init_cmd(); cmd[3] = FT990_mode_val[val]; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode B", cmd, replystr); } int RIG_FT990::get_modeB() { return B.imode; } void RIG_FT990::set_bwB(int val) { B.iBW = val; init_cmd(); cmd[3] = FT990_bw_val[val]; cmd[4] = 0x8C; sendCommand(cmd); showresp(WARN, HEX, "set bw B", cmd, replystr); } int RIG_FT990::get_bwB() { return B.iBW; } int RIG_FT990::def_bandwidth(int m) { return FT990_def_bw[m]; } // Tranceiver PTT on/off void RIG_FT990::set_PTT_control(int val) { init_cmd(); if (val) cmd[3] = 1; cmd[4] = 0x0F; sendCommand(cmd); if (val) showresp(WARN, HEX, "set PTT ON", cmd, replystr); else showresp(WARN, HEX, "set PTT OFF", cmd, replystr); } int RIG_FT990::get_smeter() { init_cmd(); cmd[4] = 0xF7; int ret = waitN(5, 100, "S-meter"); if (ret < 5) return 0; int sval = (unsigned char)replybuff[0]; if (sval < 90) sval = 90; if (sval > 200) sval = 200; if (sval < 120) sval = 250 - 5 * sval / 3; else sval = 125 - 5 * sval / 8; return sval; } int RIG_FT990::get_swr() { return 0; } int RIG_FT990::get_power_out() { init_cmd(); cmd[4] = 0xF7; int ret = waitN(5, 100, "Power out"); if (ret < 5) return 0; int sval = (unsigned char)replybuff[0]; if (sval < 90) sval = 90; if (sval > 200) sval = 200; if (sval < 120) sval = 250 - 5 * sval / 3; else sval = 125 - 5 * sval / 8; return sval; } flrig-1.3.24/src/rigs/TS590SG.cxx0000644000175000017500000010044512567712375013145 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "config.h" #include "TS590SG.h" #include "support.h" static const char TS590SGname_[] = "TS-590SG"; static const char *TS590SGmodes_[] = { "LSB", "USB", "CW", "FM", "AM", "FSK", "CW-R", "FSK-R", "LSB-D", "USB-D", "FM-D", NULL}; static const char TS590SG_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '9', '1', '2', '4' }; static const char TS590SG_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'U', 'L', 'U', 'U' }; //---------------------------------------------------------------------- static const char *TS590SG_empty[] = { "N/A", NULL }; //---------------------------------------------------------------------- static int DEF_SL_SH = 0x8A03; static const char *TS590SG_SSB_SL[] = { "0", "50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", NULL }; static const char *TS590SG_CAT_ssb_SL[] = { "SL00;", "SL01;", "SL02;", "SL03;", "SL04;", "SL05;", "SL06;", "SL07;", "SL08;", "SL09;", "SL10;", "SL11;", NULL }; static const char *TS590SG_SSB_SL_tooltip = "lo cut"; static const char *TS590SG_SSB_btn_SL_label = "L"; static const char *TS590SG_SSB_SH[] = { "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3400", "4000", "5000", NULL }; static const char *TS590SG_CAT_ssb_SH[] = { "SH00;", "SH01;", "SH02;", "SH03;", "SH04;", "SH05;", "SH06;", "SH07;", "SH08;", "SH09;", "SH10;", "SH11;", "SH12;", "SH13;", NULL }; static const char *TS590SG_SSB_SH_tooltip = "hi cut"; static const char *TS590SG_SSB_btn_SH_label = "H"; //---------------------------------------------------------------------- static int DEF_width_shift = 0x8D05; static const char *TS590SG_DATA_width[] = { "50", "80", "100", "150", "200", "250", "300", "400", "500", "600", "1000", "1500", "2000", "2500", NULL }; static const char *TS590SG_CAT_data_width[] = { "SL00;", "SL01;", "SL02;", "SL03;", "SL04;", "SL05;", "SL06;", "SL07;", "SL08;", "SL09;", "SL10;", "SL11;", "SL12;", "SL13;", NULL }; static const char *TS590SG_DATA_W_tooltip = "width"; static const char *TS590SG_DATA_W_btn_label = "W"; static const char *TS590SG_DATA_shift[] = { "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2210", NULL }; static const char *TS590SG_CAT_data_shift[] = { "SH00;", "SH01;", "SH02;", "SH03;", "SH04;", "SH05;", "SH06;", "SH07;", "SH08;", "SH09;", "SH10;", "SH11;", "SH12;", NULL }; static const char *TS590SG_DATA_S_tooltip = "shift"; static const char *TS590SG_DATA_S_btn_label = "S"; //---------------------------------------------------------------------- static int DEF_am = 0x8201; static const char *TS590SG_AM_SL[] = { "10", "100", "200", "500", NULL }; static const char *TS590SG_CAT_am_SL[] = { "SL00;", "SL01;", "SL02;", "SL03;", NULL}; static const char *TS590SG_AM_SL_tooltip = "lo cut"; static const char *TS590SG_AM_btn_SL_label = "L"; static const char *TS590SG_AM_SH[] = { "2500", "3000", "4000", "5000", NULL }; static const char *TS590SG_CAT_am_SH[] = { "SH00;", "SH01;", "SH02;", "SH03;", NULL}; static const char *TS590SG_AM_SH_tooltip = "hi cut"; static const char *TS590SG_AM_btn_SH_label = "H"; //---------------------------------------------------------------------- static int DEF_cw = 7; static const char *TS590SG_CWwidths[] = { "50", "80", "100", "150", "200", "250", "300", "400", "500", "600", "1000", "1500", "2000", "2500", NULL}; static const char *TS590SG_CWbw[] = { "FW0050;", "FW0080;", "FW0100;", "FW0150;", "FW0200;", "FW0250;", "FW0300;", "FW0400;", "FW0500;", "FW0600;", "FW1000;", "FW1500;", "FW2000;", "FW2500;", NULL}; //---------------------------------------------------------------------- static int DEF_fsk = 1; static const char *TS590SG_FSKwidths[] = { "250", "500", "1000", "1500", NULL}; static const char *TS590SG_FSKbw[] = { "FW0250;", "FW0500;", "FW1000;", "FW1500;", NULL }; //---------------------------------------------------------------------- static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)btnNR, 2, 165, 50 }, { (Fl_Widget *)sldrNR, 54, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; static string menu005; void RIG_TS590SG::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; rig_widgets[9].W = btnNR; rig_widgets[10].W = sldrNR; // cmd = "EX0050000;"; // if (wait_char(';', 11, 100, "read ex 003", ASC) == 11) // menu005 = replystr; // cmd = "EX005000000;"; // sendCommand(cmd); RIG_DEBUG = true; cmd = "AC000;"; sendCommand(cmd); selectA(); get_preamp(); get_attenuator(); } void RIG_TS590SG::shutdown() { // restore state of xcvr beeps // cmd = menu005; // sendCommand(cmd); } RIG_TS590SG::RIG_TS590SG() { name_ = TS590SGname_; modes_ = TS590SGmodes_; bandwidths_ = TS590SG_SSB_SH; dsp_SL = TS590SG_SSB_SL; SL_tooltip = TS590SG_SSB_SL_tooltip; SL_label = TS590SG_SSB_btn_SL_label; dsp_SH = TS590SG_SSB_SH; SH_tooltip = TS590SG_SSB_SH_tooltip; SH_label = TS590SG_SSB_btn_SH_label; widgets = rig_widgets; comm_baudrate = BR115200; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; B.imode = A.imode = USB; B.iBW = A.iBW = DEF_SL_SH; B.freq = A.freq = 14070000; can_change_alt_vfo = true; nb_level = 2; has_micgain_control = has_ifshift_control = false; has_auto_notch = has_notch_control = has_sql_control = has_swr_control = has_noise_reduction = has_noise_reduction_control = has_alc_control = has_dsp_controls = has_smeter = has_power_out = has_split = has_split_AB = has_noise_control = has_micgain_control = has_rf_control = has_volume_control = has_power_control = has_tune_control = has_attenuator_control = has_preamp_control = has_mode_control = has_bandwidth_control = has_ifshift_control = has_ptt_control = true; rxtxa = true; precision = 1; ndigits = 8; att_level = 0; preamp_level = 0; noise_reduction_level = 0; } const char * RIG_TS590SG::get_bwname_(int n, int md) { static char bwname[20]; if (n > 256) { int hi = (n >> 8) & 0x7F; int lo = n & 0xFF; snprintf(bwname, sizeof(bwname), "%s/%s", (md == LSB || md == USB || md == FM) ? TS590SG_SSB_SL[lo] : (md == AM) ? TS590SG_AM_SL[lo] : TS590SG_DATA_width[lo], (md == LSB || md == USB || md == FM) ? TS590SG_SSB_SH[hi] : (md == AM) ? TS590SG_AM_SH[hi] : TS590SG_DATA_shift[hi] ); } else { snprintf(bwname, sizeof(bwname), "%s", (md == CW || md == CWR) ? TS590SG_CWwidths[n] : TS590SG_FSKwidths[n]); } return bwname; } void RIG_TS590SG::selectA() { cmd = "FR0;"; sendCommand(cmd, 0); showresp(WARN, ASC, "Rx A", cmd, ""); cmd = "FT0;"; sendCommand(cmd, 0); showresp(WARN, ASC, "Tx A", cmd, ""); rxtxa = true; } void RIG_TS590SG::selectB() { cmd = "FR1;"; sendCommand(cmd, 0); showresp(WARN, ASC, "Rx B", cmd, ""); cmd = "FT1;"; sendCommand(cmd, 0); showresp(WARN, ASC, "Tx B", cmd, ""); rxtxa = false; } void RIG_TS590SG::set_split(bool val) { split = val; if (useB) { if (val) { cmd = "FR1;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on A", cmd, ""); } else { cmd = "FR1;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, ""); } } else { if (val) { cmd = "FR0;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on B", cmd, ""); } else { cmd = "FR0;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, ""); } } Fl::awake(highlight_vfo, (void *)0); } int RIG_TS590SG::get_split() { size_t p; int split = 0; char rx = 0, tx = 0; // tx vfo cmd = rsp = "FT"; cmd.append(";"); if (wait_char(';', 4, 100, "get split tx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; tx = replystr[p+2]; } // rx vfo cmd = rsp = "FR"; cmd.append(";"); if (wait_char(';', 4, 100, "get split rx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; rx = replystr[p+2]; // split test split = (tx == '1' ? 2 : 0) + (rx == '1' ? 1 : 0); } return split; } long RIG_TS590SG::get_vfoA () { cmd = "FA;"; if (wait_char(';', 14, 100, "get vfoA", ASC) < 14) return A.freq; size_t p = replystr.rfind("FA"); if (p == string::npos) return A.freq; long f = 0L; long mul = 1L; for (size_t n = 12; n > 1; n--) { f += (replystr[p + n] - '0') * mul; mul *= 10; } A.freq = f; return A.freq; } void RIG_TS590SG::set_vfoA (long freq) { A.freq = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd, 0); showresp(WARN, ASC, "set vfo A", cmd, ""); } long RIG_TS590SG::get_vfoB () { cmd = "FB;"; if (wait_char(';', 14, 100, "get vfoB", ASC) < 14) return B.freq; size_t p = replystr.rfind("FB"); if (p == string::npos) return B.freq; long f = 0L; long mul = 1L; for (size_t n = 12; n > 1; n--) { f += (replystr[p + n] - '0') * mul; mul *= 10; } B.freq = f; return B.freq; } void RIG_TS590SG::set_vfoB (long freq) { B.freq = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd, 0); showresp(WARN, ASC, "set vfo B", cmd, ""); } int RIG_TS590SG::get_smeter() { int mtr = 0; cmd = "SM0;"; if (wait_char(';', 8, 100, "get", ASC) < 8) return 0; size_t p = replystr.find("SM0"); if (p == string::npos) return 0; replystr[p + 7] = 0; mtr = atoi(&replystr[p + 3]); mtr *= 50; mtr /= 15; if (mtr > 100) mtr = 100; return mtr; } int RIG_TS590SG::get_power_out() { int mtr = 0; cmd = "SM0;"; if (wait_char(';', 8, 100, "get power", ASC) < 8) return mtr; size_t p = replystr.rfind("SM0"); if (p == string::npos) return mtr; mtr = atoi(&replystr[p + 3]); mtr *= 50; mtr /= 18; if (mtr > 100) mtr = 100; return mtr; } static bool read_alc = false; static int alc_val = 0; int RIG_TS590SG::get_swr(void) { int mtr = 0; read_alc = false; cmd = "RM;"; if (wait_char(';', 8, 100, "get swr/alc", ASC) < 8) return 0; size_t p = replystr.find("RM3"); if (p != string::npos) { replystr[p + 7] = 0; alc_val = atoi(&replystr[p + 3]); alc_val *= 100; alc_val /= 15; if (alc_val > 100) alc_val = 100; read_alc = true; } p = replystr.find("RM1"); if (p == string::npos) return 0; replystr[p + 7] = 0; mtr = atoi(&replystr[p + 3]); mtr *= 50; mtr /= 15; if (mtr > 100) mtr = 100; return mtr; } int RIG_TS590SG::get_alc(void) { if (read_alc) { read_alc = false; return alc_val; } cmd = "RM;"; if (wait_char(';', 8, 100, "get alc", ASC) < 8) return 0; size_t p = replystr.find("RM3"); if (p == string::npos) return 0; replystr[p + 7] = 0; alc_val = atoi(&replystr[p + 3]); alc_val *= 100; alc_val /= 15; if (alc_val > 100) alc_val = 100; return alc_val; } // Transceiver power level void RIG_TS590SG::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd, 0); } int RIG_TS590SG::get_power_control() { cmd = "PC;"; if (wait_char(';', 6, 100, "get pwr ctrl", ASC) < 6) return 0; size_t p = replystr.rfind("PC"); if (p == string::npos) return 0; int mtr = 0; replystr[p + 5] = 0; mtr = atoi(&replystr[p + 2]); return mtr; } // Volume control return 0 ... 100 int RIG_TS590SG::get_volume_control() { cmd = "AG0;"; if (wait_char(';', 7, 100, "get vol ctrl", ASC) < 7) return 0; size_t p = replystr.rfind("AG"); if (p == string::npos) return 0; replystr[p + 6] = 0; int val = atoi(&replystr[p + 3]); return (int)(val / 2.55); } void RIG_TS590SG::set_volume_control(int val) { int ivol = (int)(val * 2.55); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd, 0); } // Tranceiver PTT on/off void RIG_TS590SG::set_PTT_control(int val) { if (val) { if (data_mode) cmd = "TX1;"; else cmd = "TX0;"; } else cmd = "RX;"; sendCommand(cmd, 0); } void RIG_TS590SG::tune_rig() { cmd = "AC111;"; sendCommand(cmd, 0); } void RIG_TS590SG::set_attenuator(int val) { att_level = val; if (val) cmd = "RA01;"; else cmd = "RA00;"; sendCommand(cmd, 0); } int RIG_TS590SG::get_attenuator() { cmd = "RA;"; if (wait_char(';', 7, 100, "get att", ASC) < 7) return 0; size_t p = replystr.rfind("RA"); if (p == string::npos) return 0; if (replystr[p + 2] == '0' && replystr[p + 3] == '0') att_level = 0; else att_level = 1; return att_level; } void RIG_TS590SG::set_preamp(int val) { preamp_level = val; if (val) cmd = "PA1;"; else cmd = "PA0;"; sendCommand(cmd, 0); } int RIG_TS590SG::get_preamp() { cmd = "PA;"; if (wait_char(';', 5, 100, "get preamp", ASC) < 5) return 0; size_t p = replystr.rfind("PA"); if (p == string::npos) return 0; if (replystr[p + 2] == '1') preamp_level = 1; else preamp_level = 0; return preamp_level; } //====================================================================== // mode commands //====================================================================== void RIG_TS590SG::set_modeA(int val) { active_mode = A.imode = val; cmd = "MD"; cmd += TS590SG_mode_chr[val]; cmd += ';'; sendCommand(cmd, 0); showresp(ERR, ASC, "set mode A", cmd, ""); if ( val == LSBD || val == USBD || val == FMD) { data_mode = true; cmd = "DA1;"; sendCommand(cmd, 0); showresp(WARN, ASC, "set data A", cmd, ""); } else if (val == LSB || val == USB || val == FM) { data_mode = false; cmd = "DA0;"; sendCommand(cmd, 0); showresp(WARN, ASC, "set data A", cmd, ""); } set_widths(val); } int RIG_TS590SG::get_modeA() { int md = A.imode; cmd = "MD;"; if (wait_char(';', 4, 100, "get mode A", ASC) < 4) return A.imode; size_t p = replystr.rfind("MD"); if (p == string::npos) return A.imode; switch (replystr[p + 2]) { case '1' : md = LSB; break; case '2' : md = USB; break; case '3' : md = CW; break; case '4' : md = FM; break; case '5' : md = AM; break; case '6' : md = FSK; break; case '7' : md = CWR; break; case '9' : md = FSKR; break; default : md = A.imode; } if (md == LSB || md == USB || md == FM) { cmd = "DA;"; if (wait_char(';', 4, 100, "get data A", ASC) < 4) return A.imode; p = replystr.rfind("DA"); if (p == string::npos) return A.imode; if (replystr[p + 2] == '1') { data_mode = true; if (md == LSB) md = LSBD; else if (md == USB) md = USBD; else if (md == FM) md = FMD; } } if (md != A.imode) { active_mode = A.imode = md; set_widths(md); } return A.imode; } void RIG_TS590SG::set_modeB(int val) { active_mode = B.imode = val; cmd = "MD"; cmd += TS590SG_mode_chr[val]; cmd += ';'; sendCommand(cmd, 0); showresp(WARN, ASC, "set mode B", cmd, ""); if ( val == LSBD || val == USBD || val == FMD) { data_mode = true; cmd = "DA1;"; sendCommand(cmd, 0); showresp(WARN, ASC, "set data B", cmd, ""); } else if (val == LSB || val == USB || val == FM) { cmd = "DA0;"; sendCommand(cmd, 0); showresp(WARN, ASC, "set data B", cmd, ""); } set_widths(val); } int RIG_TS590SG::get_modeB() { int md = B.imode; cmd = "MD;"; if (wait_char(';', 4, 100, "get mode B", ASC) < 4) return B.imode; size_t p = replystr.rfind("MD"); if (p == string::npos) return B.imode; switch (replystr[p + 2]) { case '1' : md = LSB; break; case '2' : md = USB; break; case '3' : md = CW; break; case '4' : md = FM; break; case '5' : md = AM; break; case '6' : md = FSK; break; case '7' : md = CWR; break; case '9' : md = FSKR; break; default : md = B.imode; } if (md == LSB || md == USB || md == FM) { cmd = "DA;"; if (wait_char(';', 4, 100, "get dat B", ASC) < 4) return B.imode; p = replystr.rfind("DA"); if (p == string::npos) return B.imode; if (replystr[p + 2] == '1') { data_mode = true; if (md == LSB) md = LSBD; else if (md == USB) md = USBD; else if (md == FM) md = FMD; } } if (md != B.imode) { active_mode = B.imode = md; set_widths(md); } return B.imode; } //====================================================================== // Bandpass filter commands //====================================================================== int RIG_TS590SG::set_widths(int val) { int bw = 0; if (val == LSB || val == USB || val == FM || val == FMD) { bandwidths_ = TS590SG_SSB_SH; dsp_SL = TS590SG_SSB_SL; dsp_SH = TS590SG_SSB_SH; SL_tooltip = TS590SG_SSB_SL_tooltip; SL_label = TS590SG_SSB_btn_SL_label; SH_tooltip = TS590SG_SSB_SH_tooltip; SH_label = TS590SG_SSB_btn_SH_label; bw = DEF_SL_SH; // 200 lower, 3000 upper } else if (val == CW || val == CWR) { bandwidths_ = TS590SG_CWwidths; dsp_SL = TS590SG_empty; dsp_SH = TS590SG_empty; bw = DEF_cw; } else if (val == FSK || val == FSKR) { bandwidths_ = TS590SG_FSKwidths; dsp_SL = TS590SG_empty; dsp_SH = TS590SG_empty; bw = 1; } else if (val == AM) { // val == 4 ==> AM bandwidths_ = TS590SG_AM_SH; dsp_SL = TS590SG_AM_SL; dsp_SH = TS590SG_AM_SH; SL_tooltip = TS590SG_AM_SL_tooltip; SL_label = TS590SG_AM_btn_SL_label; SH_tooltip = TS590SG_AM_SH_tooltip; SH_label = TS590SG_AM_btn_SH_label; bw = DEF_am; } else if (val == LSBD || val == USBD) { bandwidths_ = TS590SG_DATA_width; dsp_SL = TS590SG_DATA_shift; SL_tooltip = TS590SG_DATA_S_tooltip; SL_label = TS590SG_DATA_S_btn_label; dsp_SH = TS590SG_DATA_width; SH_tooltip = TS590SG_DATA_W_tooltip; SH_label = TS590SG_DATA_W_btn_label; bw = DEF_width_shift; } return bw; } const char **RIG_TS590SG::bwtable(int m) { if (m == LSB || m == USB || m == FM || m == FMD) return TS590SG_SSB_SH; else if (m == CW || m == CWR) return TS590SG_CWwidths; else if (m == FSK || m == FSKR) return TS590SG_FSKwidths; else if (m == AM) return TS590SG_AM_SH; else return TS590SG_DATA_width; } const char **RIG_TS590SG::lotable(int m) { if (m == LSB || m == USB || m == FM || m == FMD) return TS590SG_SSB_SL; else if (m == AM) return TS590SG_AM_SL; else if (m == LSBD || m == USBD) return TS590SG_DATA_shift; // CW CWR FSK FSKR return NULL; } const char **RIG_TS590SG::hitable(int m) { if (m == LSB || m == USB || m == FM || m == FMD) return TS590SG_SSB_SH; else if (m == AM) return TS590SG_AM_SH; else if (m == LSBD || m == USBD) return TS590SG_DATA_width; // CW CWR FSK FSKR return NULL; } int RIG_TS590SG::adjust_bandwidth(int val) { if (val == LSB || val == USB || val == FM || val == FMD) return DEF_SL_SH; else if (val == LSBD || val == USBD) return DEF_width_shift; else if (val == CW || val == CWR) return DEF_cw; else if (val == FSK || val == FSKR) return DEF_fsk; // else if (val == AM) return DEF_am; } int RIG_TS590SG::def_bandwidth(int val) { return adjust_bandwidth(val); } void RIG_TS590SG::set_bwA(int val) { // LSB, USB, FM, FM-D if (A.imode == LSB || A.imode == USB || A.imode == FM || A.imode == FMD) { if (val < 256) return; A.iBW = val; cmd = TS590SG_CAT_ssb_SL[A.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS590SG_CAT_ssb_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } // LSB-D, USB-D if (A.imode == LSBD || A.imode == USBD) { if (val < 256) return; A.iBW = val; cmd = TS590SG_CAT_data_shift[A.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set shift", cmd, ""); cmd = TS590SG_CAT_data_width[(A.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set width", cmd, ""); return; } // AM if (A.imode == AM) { if (val < 256) return; A.iBW = val; cmd = TS590SG_CAT_am_SL[A.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS590SG_CAT_am_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } if (val > 256) return; // CW if (A.imode == CW || A.imode == CWR) { A.iBW = val; cmd = TS590SG_CWbw[A.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set CW bw", cmd, ""); return; } // FSK if (A.imode == FSK || A.imode == FSKR) { A.iBW = val; cmd = TS590SG_FSKbw[A.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set FSK bw", cmd, ""); return; } } void RIG_TS590SG::set_bwB(int val) { if (B.imode == LSB || B.imode == USB || B.imode == FM || B.imode == FMD) { if (val < 256) return; B.iBW = val; cmd = TS590SG_CAT_ssb_SL[B.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS590SG_CAT_ssb_SH[(B.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } if (B.imode == LSBD || B.imode == USBD) { // SSB data mode if (val < 256) return; B.iBW = val; cmd = TS590SG_CAT_data_shift[B.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set shift", cmd, ""); cmd = TS590SG_CAT_data_width[(B.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set width", cmd, ""); return; } if (B.imode == AM) { if (val < 256) return; B.iBW = val; cmd = TS590SG_AM_SL[B.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS590SG_AM_SH[(B.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } if (val > 256) return; if (B.imode == CW || B.imode == CWR) { B.iBW = val; cmd = TS590SG_CWbw[B.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set CW bw", cmd, ""); return; } if (B.imode == FSK || B.imode == FSKR) { B.iBW = val; cmd = TS590SG_FSKbw[B.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set FSK bw", cmd, ""); return; } } int RIG_TS590SG::get_bwA() { int i = 0, lo = 0, hi = 0; size_t p; switch (A.imode) { case CW: case CWR: A.iBW = DEF_cw; cmd = "FW;"; if (wait_char(';', 7, 100, "get CW width", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 14; i++) if (replystr.find(TS590SG_CWbw[i]) == p) break; if (i == 14) i = 13; A.iBW = i; } } break; case FSK: case FSKR: A.iBW = DEF_fsk; cmd = "FW;"; if (wait_char(';', 7, 100, "get FSK width", ASC) == 7 ) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 4; i++) if (replystr.find(TS590SG_FSKbw[i]) == p) break; if (i == 4) i = 3; A.iBW = i; } } break; case LSB: case USB: case FM: A.iBW = DEF_SL_SH; lo = A.iBW & 0x7F; hi = (A.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get lower", ASC) == 5) { p = replystr.rfind("SL"); if (p == string::npos) break; lo = fm_decimal(&replystr[2], 2); cmd = "SH;"; if (wait_char(';', 5, 100, "get upper", ASC) == 5) { p = replystr.rfind("SH"); if (p == string::npos) break; hi = fm_decimal(&replystr[2], 2); A.iBW = ((hi << 8) | (lo & 0x7F)) | 0x8000; } } break; case LSBD: case USBD: case FMD: A.iBW = DEF_width_shift; lo = A.iBW & 0x7F; hi = (A.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get width", ASC) == 5) { p = replystr.rfind("SL"); if (p == string::npos) break; hi = fm_decimal(&replystr[2], 2); cmd = "SH;"; if (wait_char(';', 5, 100, "get shift", ASC) == 5) { p = replystr.rfind("SH"); if (p == string::npos) break; lo = fm_decimal(&replystr[2], 2); A.iBW = ((hi << 8) | (lo & 0x7F)) | 0x8000; } } break; } return A.iBW; } int RIG_TS590SG::get_bwB() { int i = 0, lo = 0, hi = 0; size_t p; switch (B.imode) { case CW: case CWR: B.iBW = DEF_cw; cmd = "FW;"; if (wait_char(';', 7, 100, "get CW width", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 14; i++) if (replystr.find(TS590SG_CWbw[i]) == p) break; if (i == 14) i = 13; B.iBW = i; } } break; case FSK: case FSKR: B.iBW = DEF_fsk; cmd = "FW;"; if (wait_char(';', 7, 100, "get FSK width", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 4; i++) if (replystr.find(TS590SG_FSKbw[i]) == p) break; if (i == 4) i = 3; B.iBW = i; } } break; case LSB: case USB: case FM: B.iBW = DEF_SL_SH; lo = B.iBW & 0xFF; hi = (B.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get lower", ASC) == 5) { p = replystr.rfind("SL"); if (p == string::npos) break; lo = fm_decimal(&replystr[2], 2); cmd = "SH;"; if (wait_char(';', 5, 100, "get upper", ASC) == 5) { p = replystr.rfind("SH"); if (p == string::npos) break; hi = fm_decimal(&replystr[2], 2); B.iBW = ((hi << 8) | (lo & 0x7F)) | 0x8000; } } break; case LSBD: case USBD: case FMD: B.iBW = DEF_width_shift; lo = B.iBW & 0x7F; hi = (B.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get width", ASC) == 5) { p = replystr.rfind("SL"); if (p == string::npos) break; hi = fm_decimal(&replystr[2], 2); cmd = "SH;"; if (wait_char(';', 5, 100, "get shift", ASC) == 5 ) { p = replystr.rfind("SH"); if (p == string::npos) break; lo = fm_decimal(&replystr[2], 2); B.iBW = ((hi << 8) | (lo & 0xFF)) | 0x8000; } } break; } return B.iBW; } int RIG_TS590SG::get_modetype(int n) { return TS590SG_mode_type[n]; } // val 0 .. 100 void RIG_TS590SG::set_mic_gain(int val) { cmd = "MG000;"; for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd, 0); } int RIG_TS590SG::get_mic_gain() { int val = 0; cmd = "MG;"; if (wait_char(';', 6, 100, "get mic ctrl", ASC) >= 6) { size_t p = replystr.rfind("MG"); if (p == string::npos) return val; replystr[p + 5] = 0; val = atoi(&replystr[p + 2]); } return val; } void RIG_TS590SG::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_TS590SG::set_noise(bool val) { if (nb_level == 0) { nb_level = 1; nb_label("NB 1", true); } else if (nb_level == 1) { nb_level = 2; nb_label("NB 2", true); } else if (nb_level == 2) { nb_level = 0; nb_label("NB", false); } cmd = "NB0;"; cmd[2] += nb_level; LOG_INFO("%s", cmd.c_str()); sendCommand(cmd, 0); } //====================================================================== // IF shift command only available if the transceiver is in the CW mode // step size is 50 Hz //====================================================================== void RIG_TS590SG::set_if_shift(int val) { if (active_mode == CW || active_mode == CWR) { // cw modes progStatus.shift_val = val; cmd = "IS "; cmd.append(to_decimal(abs(val),4)).append(";"); sendCommand(cmd,0); showresp(WARN, ASC, "set IF shift", cmd, ""); } } bool RIG_TS590SG::get_if_shift(int &val) { if (active_mode == CW || active_mode == CWR) { // cw modes cmd = "IS;"; if (wait_char(';', 8, 100, "get IF shift", ASC) == 8) { size_t p = replystr.rfind("IS"); if (p != string::npos) { val = fm_decimal(&replystr[p+3], 4); } else val = progStatus.shift_val; return true; } } val = progStatus.shift_val; return false; } void RIG_TS590SG::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = 300; if_shift_max = max = 1000; if_shift_step = step = 50; if_shift_mid = 800; } void RIG_TS590SG::set_squelch(int val) { cmd = "SQ0"; cmd.append(to_decimal(abs(val),3)).append(";"); sendCommand(cmd,0); showresp(WARN, ASC, "set squelch", cmd, ""); } int RIG_TS590SG::get_squelch() { int val = 0; cmd = "SQ0;"; if (wait_char(';', 7, 100, "get squelch", ASC) >= 7) { size_t p = replystr.rfind("SQ0"); if (p == string::npos) return val; replystr[p + 6] = 0; val = atoi(&replystr[p + 3]); } return val; } void RIG_TS590SG::get_squelch_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } void RIG_TS590SG::set_rf_gain(int val) { cmd = "RG000;"; int rfval = 255 - val; for (int i = 4; i > 1; i--) { cmd[i] = rfval % 10 + '0'; rfval /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET rfgain", cmd, ""); } int RIG_TS590SG::get_rf_gain() { int rfval = 0; cmd = rsp = "RG"; cmd += ';'; if (wait_char(';', 6, 100, "get rfgain", ASC) == 6) { size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.rfgain; for (int i = 2; i < 5; i++) { rfval *= 10; rfval += replystr[p+i] - '0'; } } return 255 - rfval; } void RIG_TS590SG::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } void RIG_TS590SG::set_noise_reduction(int val) { if (val == -1) { if (noise_reduction_level == 1) { nr_label("NR1", true); } else if (noise_reduction_level == 2) { nr_label("NR2", true); } return; } if (noise_reduction_level == 0) { noise_reduction_level = 1; nr_label("NR1", true); } else if (noise_reduction_level == 1) { noise_reduction_level = 2; nr_label("NR2", true); } else if (noise_reduction_level == 2) { noise_reduction_level = 0; nr_label("NR", false); } cmd.assign("NR"); cmd += '0' + noise_reduction_level; sendCommand (cmd); showresp(WARN, ASC, "SET noise reduction", cmd, ""); } int RIG_TS590SG::get_noise_reduction() { cmd = rsp = "NR"; cmd.append(";"); if (wait_char(';', 4, 100, "GET noise reduction", ASC) == 4 ) { size_t p = replystr.rfind(rsp); if (p == string::npos) return noise_reduction_level; noise_reduction_level = replystr[p+2] - '0'; if (noise_reduction_level == 1) { nr_label("NR1", true); } else if (noise_reduction_level == 2) { nr_label("NR2", true); } else { nr_label("NR", false); } } return noise_reduction_level; } void RIG_TS590SG::set_noise_reduction_val(int val) { cmd.assign("RL").append(to_decimal(val, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET_noise_reduction_val", cmd, ""); } int RIG_TS590SG::get_noise_reduction_val() { if (noise_reduction_level == 0) return 0; int val = 1; cmd = rsp = "RL"; cmd.append(";"); if (wait_char(';', 5, 100, "GET noise reduction val", ASC) == 5) { size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.noise_reduction_val; val = atoi(&replystr[p+2]); } return val; } void RIG_TS590SG::set_auto_notch(int v) { cmd.assign("NT").append(v ? "1" : "0" ).append("0;"); sendCommand(cmd); showresp(WARN, ASC, "SET Auto Notch", cmd, ""); } int RIG_TS590SG::get_auto_notch() { cmd = "NT;"; if (wait_char(';', 5, 100, "get auto notch", ASC) == 5) { size_t p = replystr.rfind("NT"); if (p == string::npos) return 0; if (replystr[p+2] == '1') return 1; } return 0; } void RIG_TS590SG::set_notch(bool on, int val) { if (on) { cmd.assign("NT20;"); sendCommand(cmd); showresp(WARN, ASC, "Set notch ON", cmd, ""); int bp = (int)((val - 300.0) * 128.0 / 2700.0); cmd.assign("BP").append(to_decimal(bp, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set notch freq", cmd, ""); } else { cmd.assign("NT00;"); sendCommand(cmd); showresp(WARN, ASC, "Set notch OFF", cmd, ""); } } bool RIG_TS590SG::get_notch(int &val) { val = 300; cmd = "NT;"; if (wait_char(';', 5, 100, "get notch state", ASC) == 5) { size_t p = replystr.rfind("NT"); if (p == string::npos) return 0; if (replystr[p+2] == '2') { cmd.assign("BP;"); if (wait_char(';', 6, 100, "get notch freq", ASC) == 6) { size_t p = replystr.rfind("BP"); if (p != string::npos) val = (int)((atoi(&replystr[p+2]) * 2700.0 / 128.0) + 300.0); return 1; } } } return 0; } void RIG_TS590SG::get_notch_min_max_step(int &min, int &max, int &step) { min = 300; max = 3000; step = 20; } flrig-1.3.24/src/rigs/FT5000.cxx0000644000175000017500000006224512646444222012741 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT5000.h" #include "debug.h" #include "support.h" enum mFTdx5000 { mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mPKT_L, mRTTY_U, mPKT_FM, mFM_N, mPKT_U }; // mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mPKT_L, mRTTY_U, mPKT_FM, mFM_N, mPKT_U // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 // mode index // 19, 19, 9, 0, 0, 10, 9, 15, 10, 0, 0, 15 // FTdx5000_def_bw static const char FT5000name_[] = "FTdx5000"; static const char *FT5000modes_[] = { "LSB", "USB", "CW", "FM", "AM", "RTTY-L", "CW-R", "PSK-L", "RTTY-U", "PKT-FM", "FM-N", "PSK-U", NULL}; static const int FT5000_def_bw[] = { 19, 19, 9, 0, 0, 10, 9, 15, 10, 0, 0, 15 }; static const char FT5000_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C' }; static const char FT5000_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'L', 'U', 'U', 'U', 'U' }; static const char *FT5000_widths_SSB[] = { "200", "400", "600", "850", "1100", "1350", "1500", // NA = 1 widths "1650", "1800", "1950", "2100", "2250", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3200", "3400", "3600", "3800", "4000", // NA = 0 widths NULL }; static int FT5000_wvals_SSB[] = { 1,2,3,4,5,6,7, 8,9,10,11,12,13, 15,16,17,18,19,20, 21,22,23,24,25, WVALS_LIMIT}; static const char *FT5000_widths_CW[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", // NA1 "800", "1200", "1400", "1700", "2000", "2400", // NA0 NULL }; static int FT5000_wvals_CW[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, WVALS_LIMIT }; static const char *FT5000_widths_RTTY[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", // NA1 "800", "1200", "1400", "1700", "2000", "2400", // NA0 NULL }; static int FT5000_wvals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, WVALS_LIMIT }; static const char *FT5000_widths_PSK[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", // NA1 "800", "1200", "1400", "1700", "2000", "2400", // NA0 NULL }; static int FT5000_wvals_PSK[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, WVALS_LIMIT }; static const int FT5000_wvals_AMFM[] = { 0, WVALS_LIMIT }; static const char *FT5000_widths_AMwide[] = { "AM-bw", NULL }; static const char *FT5000_widths_FMnar[] = { "FM-nar", NULL }; static const char *FT5000_widths_FMwide[] = { "FM-wid", NULL }; static const char *FT5000_widths_FMpkt[] = { "FM-pkt", NULL }; static const char *FT5000_US_60m[] = {NULL, "126", "127", "128", "130", NULL}; // US has 5 60M presets. Using dummy numbers for all. // First NULL means skip 60m sets in set_band_selection(). // Maybe someone can do a cat command MC; on all 5 presets and add returned numbers above. // To send cat commands in flrig goto menu Config->Xcvr select->Send Cmd. // // UK has 7 60M presets. Using dummy numbers for all. If you want support, // Maybe someone can do a cat command MC; on all 7 presets and add returned numbers below. // static const char *FT5000_UK_60m[] = {NULL, "126", "127", "128", "130", "131", "132", NULL}; static const char **Channels_60m = FT5000_US_60m; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 54, 165, 368 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; void RIG_FT5000::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; cmd = "AI0;"; sendCommand(cmd); showresp(WARN, ASC, "Auto Info OFF", cmd, replystr); } RIG_FT5000::RIG_FT5000() { // base class values name_ = FT5000name_; modes_ = FT5000modes_; bandwidths_ = FT5000_widths_SSB; bw_vals_ = FT5000_wvals_SSB; widgets = rig_widgets; comm_baudrate = BR38400; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; A.imode = B.imode = modeB = modeA = def_mode = 1; A.iBW = B.iBW = bwA = bwB = def_bw = 19; A.freq = B.freq = freqA = freqB = def_freq = 14070000; notch_on = false; has_band_selection = has_extras = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_vox_on_dataport = has_cw_wpm = has_cw_keyer = // has_cw_vol = has_cw_spot = // has_cw_spot_tone = // does not exist??? has_cw_qsk = has_cw_weight = has_split_AB = can_change_alt_vfo = has_smeter = has_swr_control = has_power_out = has_power_control = has_volume_control = has_rf_control = has_micgain_control = has_mode_control = has_noise_control = has_bandwidth_control = has_notch_control = has_auto_notch = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = true; // derived specific atten_level = 0; preamp_level = 0; notch_on = false; m_60m_indx = 0; precision = 1; ndigits = 8; } void RIG_FT5000::set_band_selection(int v) { int inc_60m = false; cmd = "IF;"; waitN(27, 100, "get vfo mode in set_band_selection", ASC); size_t p = replystr.rfind("IF"); if (p == string::npos) return; if (replystr[p+21] != '0') { // vfo 60M memory mode inc_60m = true; } if (v == 12) { // 5MHz 60m presets if (Channels_60m[0] == NULL) return; // no 60m Channels so skip if (inc_60m) { if (Channels_60m[++m_60m_indx] == NULL) m_60m_indx = 0; } cmd.assign("MC").append(Channels_60m[m_60m_indx]).append(";"); } else { // v == 1..11 band selection OR return to vfo mode == 0 if (inc_60m) cmd = "VM;"; else { if (v < 3) v = v - 1; cmd.assign("BS").append(to_decimal(v, 2)).append(";"); } } sendCommand(cmd); showresp(WARN, ASC, "Select Band Stacks", cmd, replystr); } long RIG_FT5000::get_vfoA () { cmd = rsp = "FA"; cmd += ';'; waitN(11, 100, "get vfo A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqA; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqA = f; return freqA; } void RIG_FT5000::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo A", cmd, replystr); } long RIG_FT5000::get_vfoB () { cmd = rsp = "FB"; cmd += ';'; waitN(11, 100, "get vfo B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqB; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqB = f; return freqB; } void RIG_FT5000::set_vfoB (long freq) { freqB = freq; cmd = "FB00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo B", cmd, replystr); } bool RIG_FT5000::twovfos() { return true; } void RIG_FT5000::selectA() { cmd = "FR0;FT2;"; sendCommand(cmd); showresp(WARN, ASC, "select A", cmd, replystr); } void RIG_FT5000::selectB() { cmd = "FR4;FT3;"; sendCommand(cmd); showresp(WARN, ASC, "select B", cmd, replystr); } void RIG_FT5000::A2B() { cmd = "AB;"; sendCommand(cmd); showresp(WARN, ASC, "vfo A --> B", cmd, replystr); } bool RIG_FT5000::can_split() { return true; } void RIG_FT5000::set_split(bool val) { split = val; if (val) { useB = false; cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A", cmd, replystr); cmd = "FT3;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on B", cmd, replystr); } else { cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A", cmd, replystr); cmd = "FT2;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on A", cmd, replystr); } Fl::awake(highlight_vfo, (void *)0); } int RIG_FT5000::get_split() { return split; } int RIG_FT5000::get_smeter() { cmd = rsp = "SM0"; cmd += ';'; waitN(7, 100, "get smeter", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); mtr = mtr * 100.0 / 256.0; return mtr; } int RIG_FT5000::get_swr() { cmd = rsp = "RM6"; cmd += ';'; waitN(7, 100, "get swr", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return mtr / 2.56; } int RIG_FT5000::get_power_out() { cmd = rsp = "RM5"; sendCommand(cmd.append(";")); waitN(7, 100, "get pout", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; double mtr = (double)(atoi(&replystr[p+3])); // mtr = -6.6263535 + .11813178 * mtr + .0013607405 * mtr * mtr; mtr = 0.116 * mtr + 0.0011 * mtr * mtr; return (int)mtr; } // Transceiver power level int RIG_FT5000::get_power_control() { cmd = rsp = "PC"; cmd += ';'; waitN(6, 100, "get power", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.power_level; if (p + 5 >= replystr.length()) return progStatus.power_level; int mtr = atoi(&replystr[p+2]); return mtr; } void RIG_FT5000::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET power", cmd, replystr); } // Volume control return 0 ... 100 int RIG_FT5000::get_volume_control() { cmd = rsp = "AG0"; cmd += ';'; waitN(7, 100, "get vol", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.volume; if (p + 6 >= replystr.length()) return progStatus.volume; int val = atoi(&replystr[p+3]) * 100 / 250; if (val > 100) val = 100; return val; } void RIG_FT5000::set_volume_control(int val) { int ivol = (int)(val * 250 / 100); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vol", cmd, replystr); } // Tranceiver PTT on/off void RIG_FT5000::set_PTT_control(int val) { cmd = val ? "TX1;" : "TX0;"; sendCommand(cmd); showresp(WARN, ASC, "SET PTT", cmd, replystr); } void RIG_FT5000::tune_rig() { cmd = "AC002;"; sendCommand(cmd); showresp(WARN, ASC, "tune rig", cmd, replystr); } void RIG_FT5000::set_attenuator(int val) { if (atten_level == 0) { atten_level = 1; atten_label("6 dB", true); } else if (atten_level == 1) { atten_level = 2; atten_label("12 dB", true); } else if (atten_level == 2) { atten_level = 3; atten_label("18 dB", true); } else if (atten_level == 3) { atten_level = 0; atten_label("Att", false); } cmd = "RA00;"; cmd[3] += atten_level; sendCommand(cmd); showresp(WARN, ASC, "SET att", cmd, replystr); } int RIG_FT5000::get_attenuator() { cmd = rsp = "RA0"; cmd += ';'; waitN(5, 100, "get att", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.attenuator; if (p + 3 >= replystr.length()) return progStatus.attenuator; atten_level = replystr[p+3] - '0'; if (atten_level == 1) { atten_label("6 dB", true); } else if (atten_level == 2) { atten_label("12 dB", true); } else if (atten_level == 3) { atten_label("18 dB", true); } else { atten_level = 0; atten_label("Att", false); } return atten_level; } void RIG_FT5000::set_preamp(int val) { cmd = "PA00;"; if (preamp_level == 0) { preamp_level = 1; preamp_label("Amp 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Amp 2", true); } else if (preamp_level == 2) { preamp_level = 3; preamp_label("IPO2", true); } else if (preamp_level == 3) { preamp_level = 0; preamp_label("IPO1", false); } cmd[3] = '0' + preamp_level; sendCommand (cmd); showresp(WARN, ASC, "SET preamp", cmd, replystr); } int RIG_FT5000::get_preamp() { cmd = rsp = "PA0"; cmd += ';'; waitN(5, 100, "get pre", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) preamp_level = replystr[p+3] - '0'; if (preamp_level == 1) { preamp_label("Amp 1", true); } else if (preamp_level == 2) { preamp_label("Amp 2", true); } else if (preamp_level == 3) { preamp_label("IPO2", true); } else { preamp_label("IPO1", false); preamp_level = 0; } return preamp_level; } int RIG_FT5000::adjust_bandwidth(int val) { int bw = 0; if (val == mCW || val == mCW_R) { bandwidths_ = FT5000_widths_CW; bw_vals_ = FT5000_wvals_CW; } else if (val == mFM || val == mAM || val == mFM_N || val == mPKT_FM) { if (val == mFM) bandwidths_ = FT5000_widths_FMwide; else if (val == mAM) bandwidths_ = FT5000_widths_AMwide; else if (val == mFM_N) bandwidths_ = FT5000_widths_FMnar; else if (val == mPKT_FM) bandwidths_ = FT5000_widths_FMpkt; bw_vals_ = FT5000_wvals_AMFM; } else if (val == mRTTY_L || val == mRTTY_U) { // RTTY bandwidths_ = FT5000_widths_RTTY; bw_vals_ = FT5000_wvals_RTTY; } else if (val == mPKT_L || val == mPKT_U) { // PSK bandwidths_ = FT5000_widths_PSK; bw_vals_ = FT5000_wvals_PSK; } else { bandwidths_ = FT5000_widths_SSB; bw_vals_ = FT5000_wvals_SSB; } bw = FT5000_def_bw[val]; return bw; } int RIG_FT5000::def_bandwidth(int val) { return FT5000_def_bw[val]; } const char ** RIG_FT5000::bwtable(int n) { switch (n) { case mCW: case mCW_R: return FT5000_widths_CW; case mFM: return FT5000_widths_FMwide; case mAM: return FT5000_widths_AMwide; case mRTTY_L: case mRTTY_U: return FT5000_widths_RTTY; case mPKT_L: case mPKT_U: return FT5000_widths_PSK; case mFM_N: return FT5000_widths_FMnar; case mPKT_FM: return FT5000_widths_FMpkt; default: ; } return FT5000_widths_SSB; } void RIG_FT5000::set_modeA(int val) { modeA = val; cmd = "MD0"; cmd += FT5000_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode A", cmd, replystr); adjust_bandwidth(modeA); if (val == mCW || val == mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FT5000::get_modeA() { cmd = rsp = "MD0"; cmd += ';'; waitN(5, 100, "get mode A", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'A'; modeA = md; } } adjust_bandwidth(modeA); return modeA; } void RIG_FT5000::set_modeB(int val) { modeB = val; cmd = "MD0"; cmd += FT5000_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode B", cmd, replystr); adjust_bandwidth(modeA); if (val == mCW || val == mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FT5000::get_modeB() { cmd = rsp = "MD0"; cmd += ';'; waitN(5, 100, "get mode B", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'A'; modeB = md; } } adjust_bandwidth(modeB); return modeB; } void RIG_FT5000::set_bwA(int val) { int bw_indx = bw_vals_[val]; bwA = val; if (modeA == mFM || modeA == mAM || modeA == mFM_N || modeA == mPKT_FM ) { return; } if ((((modeA == mLSB || modeA == mUSB) && val < 8)) || ((modeA == mCW || modeA == mCW_R) && val < 11) || ((modeA == mRTTY_L || modeA == mRTTY_U) && val < 11) || ((modeA == mPKT_L || modeA == mPKT_U) && val < 11)) cmd = "NA01;"; else cmd = "NA00;"; cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw A", cmd, replystr); } int RIG_FT5000::get_bwA() { if (modeA == mFM || modeA == mAM || modeA == mFM_N || modeA == mPKT_FM) { bwA = 0; return bwA; } cmd = rsp = "SH0"; cmd += ';'; waitN(6, 100, "get bw A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return bwA; if (p + 5 >= replystr.length()) return bwA; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwA = i; return bwA; } void RIG_FT5000::set_bwB(int val) { int bw_indx = bw_vals_[val]; bwB = val; if (modeB == mFM || modeB == mAM || modeB == mFM_N || modeB == mPKT_FM) { return; } if ((((modeB == mLSB || modeB == mUSB) && val < 8)) || ((modeB == mCW || modeB == mCW_R) && val < 11) || ((modeB == mRTTY_L || modeB == mRTTY_U) && val < 11) || ((modeB == mPKT_L || modeB == mPKT_U) && val < 11)) cmd = "NA01;"; else cmd = "NA00;"; cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw B", cmd, replystr); } int RIG_FT5000::get_bwB() { if (modeB == mFM || modeB == mAM || modeB == mFM_N || modeB == mPKT_FM) { bwB = 0; return bwB; } cmd = rsp = "SH0"; cmd += ';'; waitN(6, 100, "get bw B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return bwB; if (p + 5 >= replystr.length()) return bwB; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwB = i; return bwB; } int RIG_FT5000::get_modetype(int n) { return FT5000_mode_type[n]; } void RIG_FT5000::set_if_shift(int val) { cmd = "IS0+0000;"; if (val != 0) progStatus.shift = true; else progStatus.shift = false; if (val < 0) cmd[3] = '-'; val = abs(val); for (int i = 4; i > 0; i--) { cmd[3+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET if shift", cmd, replystr); } bool RIG_FT5000::get_if_shift(int &val) { cmd = rsp = "IS0"; cmd += ';'; waitN(9, 100, "get if shift", ASC); size_t p = replystr.rfind(rsp); val = progStatus.shift_val; if (p == string::npos) return progStatus.shift; val = atoi(&replystr[p+4]); if (replystr[p+3] == '-') val = -val; return (val != 0); } void RIG_FT5000::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = -1000; if_shift_max = max = 1000; if_shift_step = step = 50; if_shift_mid = 0; } void RIG_FT5000::set_notch(bool on, int val) { if (on && !notch_on) { notch_on = true; cmd = "BP00001;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch on", cmd, replystr); } else if (!on && notch_on) { notch_on = false; cmd = "BP00000;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch off", cmd, replystr); return; } cmd = "BP01"; val /= 10; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET notch val", cmd, replystr); } bool RIG_FT5000::get_notch(int &val) { bool ison = false; cmd = rsp = "BP00"; cmd += ';'; waitN(8, 100, "get notch on/off", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return ison; if (replystr[p+6] == '1') // manual notch enabled ison = true; val = progStatus.notch_val; cmd = rsp = "BP01"; cmd += ';'; waitN(8, 100, "get notch val", ASC); p = replystr.rfind(rsp); if (p == string::npos) val = 10; else val = fm_decimal(&replystr[p+4],3) * 10; return (notch_on = ison); } void RIG_FT5000::get_notch_min_max_step(int &min, int &max, int &step) { min = 10; max = 3000; step = 10; } void RIG_FT5000::set_auto_notch(int v) { cmd = "BC00;"; if (v) cmd[3] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET auto notch", cmd, replystr); } int RIG_FT5000::get_auto_notch() { cmd = "BC0;"; waitN(5, 100, "get auto notch", ASC); size_t p = replystr.rfind("BC0"); if (p == string::npos) return 0; if (replystr[p+3] == '1') return 1; return 0; } int FT5000_blanker_level = 0; void RIG_FT5000::set_noise(bool b) { cmd = "NB00;"; if (FT5000_blanker_level == 0) { FT5000_blanker_level = 1; nb_label("NB 1", true); } else if (FT5000_blanker_level == 1) { FT5000_blanker_level = 2; nb_label("NB 2", true); } else if (FT5000_blanker_level == 2) { FT5000_blanker_level = 0; nb_label("NB", false); } cmd[3] = '0' + FT5000_blanker_level; sendCommand (cmd); showresp(WARN, ASC, "SET NB", cmd, replystr); } int RIG_FT5000::get_noise() { cmd = rsp = "NB0"; cmd += ';'; waitN(5, 100, "get NB", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return FT5000_blanker_level; FT5000_blanker_level = replystr[p+3] - '0'; if (FT5000_blanker_level == 1) { nb_label("NB 1", true); } else if (FT5000_blanker_level == 2) { nb_label("NB 2", true); } else { nb_label("NB", false); FT5000_blanker_level = 0; } return FT5000_blanker_level; } // val 0 .. 100 void RIG_FT5000::set_mic_gain(int val) { cmd = "MG000;"; val = (int)(val * 255 / 100); // convert to 0 .. 255 for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET mic", cmd, replystr); } int RIG_FT5000::get_mic_gain() { cmd = rsp = "MG"; cmd += ';'; waitN(6, 100, "get mic", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.mic_gain; int val = atoi(&replystr[p+2]); return val * 100 / 255; } void RIG_FT5000::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FT5000::set_rf_gain(int val) { cmd = "RG0000;"; int rfval = val * 250 / 100; for (int i = 5; i > 2; i--) { cmd[i] = rfval % 10 + '0'; rfval /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET rfgain", cmd, replystr); } int RIG_FT5000::get_rf_gain() { int rfval = 0; cmd = rsp = "RG0"; cmd += ';'; waitN(7, 100, "get rfgain", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.rfgain; for (int i = 3; i < 6; i++) { rfval *= 10; rfval += replystr[p+i] - '0'; } rfval = rfval * 100 / 250; if (rfval > 100) rfval = 100; return rfval; } void RIG_FT5000::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FT5000::set_vox_onoff() { cmd = "VX0;"; if (progStatus.vox_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox", cmd, replystr); } void RIG_FT5000::set_vox_gain() { cmd = "VG"; cmd.append(to_decimal(progStatus.vox_gain, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox gain", cmd, replystr); } void RIG_FT5000::set_vox_anti() { cmd = "EX175"; cmd.append(to_decimal(progStatus.vox_anti, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET anti-vox", cmd, replystr); } void RIG_FT5000::set_vox_hang() { cmd = "VD"; cmd.append(to_decimal(progStatus.vox_hang, 4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox delay", cmd, replystr); } void RIG_FT5000::set_vox_on_dataport() { cmd = "EX1140;"; if (progStatus.vox_on_dataport) cmd[5] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox on data port", cmd, replystr); } void RIG_FT5000::set_cw_wpm() { cmd = "KS"; if (progStatus.cw_wpm > 60) progStatus.cw_wpm = 60; if (progStatus.cw_wpm < 4) progStatus.cw_wpm = 4; cmd.append(to_decimal(progStatus.cw_wpm, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw wpm", cmd, replystr); } void RIG_FT5000::enable_keyer() { cmd = "KR0;"; if (progStatus.enable_keyer) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET keyer on/off", cmd, replystr); } bool RIG_FT5000::set_cw_spot() { if (vfo.imode == 2 || vfo.imode == 6) { cmd = "CS0;"; if (progStatus.spot_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET spot on/off", cmd, replystr); return true; } else return false; } void RIG_FT5000::set_cw_weight() { int n = round(progStatus.cw_weight * 10); cmd.assign("EX065").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw weight", cmd, replystr); } void RIG_FT5000::set_cw_qsk() { int n = progStatus.cw_qsk / 5 - 3; cmd.assign("EX068").append(to_decimal(n, 1)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw qsk", cmd, replystr); } /* void RIG_FT5000::set_cw_spot_tone() { int n = (progStatus.cw_spot_tone - 300) / 50; cmd = "EX045"; cmd.append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw tone", cmd, replystr); } void RIG_FT5000::set_cw_vol() { } */ flrig-1.3.24/src/rigs/K2.cxx0000644000175000017500000002627212562731647012406 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- // Additions by Kent Haase, VE4KEH //----------------------------------------------------------------------------- #include "K2.h" #include "support.h" #include "status.h" const char K2name_[] = "K2"; const char *K2modes_[] = { "LSB", "USB", "CW", "FM", "AM", "RTTY-L", "CW-R", "USER-L", "RTTY-U", NULL}; static const char K2_mode_type[] = {'L', 'U', 'U', 'U', 'U', 'L', 'L', 'L', 'U', 'U'}; const char *K2_widths[] = {"FL1", "FL2", "FL3", "FL4", NULL}; static int K2_bw_vals[] = { 1, 2, 3, 4, WVALS_LIMIT}; static GUI k2_widgets[]= { { (Fl_Widget *)sldrPOWER, 266, 105, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_K2::RIG_K2() { // base class values name_ = K2name_; modes_ = K2modes_; bandwidths_ = K2_widths; bw_vals_ = K2_bw_vals; widgets = k2_widgets; comm_baudrate = BR4800; stopbits = 2; comm_retries = 3; comm_wait = 50; comm_timeout = 200; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeB = modeA = 1; bwB = bwA = 0; freqB = freqA = 14070000; has_split_AB = has_get_info = has_attenuator_control = has_preamp_control = has_power_control = has_mode_control = has_bandwidth_control = has_ptt_control = has_split = has_smeter = has_power_out = has_tune_control = true; K2split = has_micgain_control = has_notch_control = has_ifshift_control = has_volume_control = has_swr_control = false; hipower = false; precision = 10; ndigits = 7; } int RIG_K2::adjust_bandwidth(int m) { return 0; } void RIG_K2::initialize() { k2_widgets[0].W = sldrPOWER; //enable extended command mode sendCommand("K22;", 0); //disable auto reporting of info sendCommand("AI0;", 0); //ensure K2 is in VFO A get_power_control(); } /* * IF (Transceiver Information; GET only) * * RSP format: IF[f]*****+yyyyrx*00tmvspb01*; where the fields are defined as follows: * * 0 1 2 3 * 0123456789012345678901234567890123456789 * IFfffffffffff*****+yyyyrx*00tmvspb01*; * 0..1 IF * 2..12 [f] operating frequency, excluding any RIT/XIT offset (11 digits; see FA command) * 13..17 * represents a space (BLANK, or ASCII 0x20) * 18 + either "+" or "-" (sign of RIT/XIT offset) * 19..22 yyyy RIT/XIT offset in Hz (range is -9990 to +9990 Hz when computer-controlled) * 23 r 1 if RIT is on, 0 if off * 24 x 1 if XIT is on, 0 if off * 25..27 fill * 28 t 1 if the K2 is in transmit mode, 0 if receive * 29 m operating mode (see MD command) * 30 v receive-mode VFO selection, 0 for VFO A, 1 for VFO B * 31 s 1 if scan is in progress, 0 otherwise * 32 p 1 if the transeiver is in split mode, 0 otherwise * 33 b basic RSP format: always 0 * extended RSP format: * 1 if the present IF response is due to a K2 band change and * 0 otherwise * 34..35 fill * 37 ; terminator * The fixed-value fields (space, 0, and 1) are provided for syntactic compatibility with existing software. */ // set replystr to teststr to test for various control bytes //const char *teststr = "IFfffffffffff*****+yyyyrx*000m0s1b01*;"; static void do_selectA(void *) { cb_selectA(); } static void do_selectB(void *) { cb_selectB(); } bool RIG_K2::get_info() { rsp = cmd = "IF"; cmd += ';'; int ret = waitN(38, 100, "get info", ASC); if (ret < 38) return false; size_t p = replystr.find(rsp); if (PTT && (replystr[p+28]=='0')) Fl::awake(setPTT, (void*)0); if (!PTT && (replystr[p+28]=='1')) Fl::awake(setPTT, (void*)1); if (useB && (replystr[p+30]=='0')) Fl::awake(do_selectA, (void*)0); else if(!useB && (replystr[p+30]=='1')) Fl::awake(do_selectB, (void*)0); K2split = replystr[p+32]-'0'; return true; } void RIG_K2::selectA() { cmd = "FR0;FT0"; sendCommand(cmd); K2split = false; showresp(WARN, ASC, "select A", cmd, replystr); } void RIG_K2::selectB() { cmd = "FR1;FT1"; sendCommand(cmd); K2split = false; showresp(WARN, ASC, "select B", cmd, replystr); } bool RIG_K2::can_split() { return true; } void RIG_K2::set_split(bool val) { if (val) { if (useB) cmd = "FR1;FT0;"; else cmd = "FR0;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "set split ON", cmd, replystr); } else { if (useB) cmd = "FR1;FT1;"; else cmd = "FR0;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "set split OFF", cmd, replystr); } } int RIG_K2::get_split() { return K2split; } long RIG_K2::get_vfoA () { rsp = cmd = "FA"; cmd += ';'; int ret = waitN(14, 100, "get vfo A", ASC); if (ret < 14) return freqA; size_t p = replystr.rfind(rsp); if (p == string::npos) return freqA; long f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p + n] - '0'; freqA = f; return freqA; } void RIG_K2::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo A", cmd, replystr); } long RIG_K2::get_vfoB() { rsp = cmd = "FB"; cmd += ';'; int ret = waitN(14, 100, "get vfo B", ASC); if (ret < 14) return freqB; size_t p = replystr.rfind(rsp); if (p == string::npos) return freqB; long f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p + n] - '0'; freqB = f; return freqB; } void RIG_K2::set_vfoB(long freq) { freqB = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo B", cmd, replystr); } void RIG_K2::set_modeA(int val) { modeA = val; val++; cmd = "MD0;"; cmd[2] += val; sendCommand(cmd); showresp(WARN, ASC, "SET mode A", cmd, replystr); } int RIG_K2::get_modeA() { rsp = cmd = "MD"; cmd += ';'; int ret = waitN(4, 100, "get mode A", ASC); if (ret < 4) return 0; size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; modeA = replystr[p + 2] - '1'; return modeA; } void RIG_K2::set_modeB(int val) { modeB = val; val++; cmd = "MD0;"; cmd[2] += val; sendCommand(cmd); showresp(WARN, ASC, "SET mode B", cmd, replystr); } int RIG_K2::get_modeB() { rsp = cmd = "MD"; cmd += ';'; int ret = waitN(4, 100, "get mode B", ASC); if (ret < 4) return 0; size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; modeB = replystr[p + 2] - '1'; return modeB; } int RIG_K2::get_modetype(int n) { return K2_mode_type[n]; } void RIG_K2::set_bwA(int val) { bwA = val; switch (val) { case 0 : cmd = "FW00001;"; break; case 1 : cmd = "FW00002;"; break; case 2 : cmd = "FW00003;"; break; case 3 : cmd = "FW00004;"; break; default: cmd = "FW00001;"; } sendCommand(cmd); showresp(WARN, ASC, "set bwA", cmd, replystr); } int RIG_K2::get_bwA() { rsp = cmd = "FW"; cmd += ';'; int ret = waitN(9, 100, "get bw A", ASC); if (ret < 9) return 0; size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; bwA = replystr[p + 6] - '1'; return bwA; } void RIG_K2::set_bwB(int val) { bwB = val; switch (val) { case 0 : cmd = "FW00001;"; break; case 1 : cmd = "FW00002;"; break; case 2 : cmd = "FW00003;"; break; case 3 : cmd = "FW00004;"; break; default: cmd = "FW00001;"; } sendCommand(cmd); showresp(WARN, ASC, "set bwA", cmd, replystr); } int RIG_K2::get_bwB() { rsp = cmd = "FW"; cmd += ';'; int ret = waitN(9, 100, "get bw B", ASC); if (ret < 9) return 0; size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; bwB = replystr[p + 6] - '1'; return bwB; } void RIG_K2::tune_rig() { cmd = "SW20;"; sendCommand(cmd); showresp(WARN, ASC, "tune", cmd, replystr); } int RIG_K2::get_smeter() { rsp = cmd = "BG"; cmd += ';'; int ret = waitN(5, 100, "get smeter", ASC); if (ret < 5) return 0; size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; int mtr = 10 * (replystr[p + 2] - '0') + replystr[p + 3] - '0'; //assemble two chars into 2 digit int if (mtr > 10) { //if int greater than 10 (bar mode) mtr -= 12; //shift down to 0 thru 10 } mtr *= 10; //normalize to 0 thru 100 return mtr; } int RIG_K2::get_power_out() { rsp = cmd = "BG"; cmd += ';'; int ret = waitN(5, 100, "get power", ASC); if (ret < 5) return 0; size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; int mtr = 10 * (replystr[p + 2] - '0') + replystr[p + 3] - '0'; //assemble two chars into 2 digit int if (mtr > 10) { //if int greater than 10 (bar mode) mtr -= 12; //shift down to 0 thru 10 } mtr *= 10; //normalize to 0 thru 100 return mtr; } int RIG_K2::get_power_control() { rsp = cmd = "PC;"; // extended mode for get power cmd += ';'; int ret = waitN(7, 100, "get pwr cont", ASC); if (ret < 7) return progStatus.power_level; size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; hipower = (replystr[p+5] == '1'); int mtr = fm_decimal(&replystr[p+4], 3); if (!hipower) mtr /= 10; return mtr; } void RIG_K2::set_power_control(double val) { int ival = (int)val; cmd = "PC"; //init the cmd string if (val > 15) { hipower = true; cmd[5] = '1'; cmd.append(to_decimal(ival,3)).append("1;"); } else { hipower = false; cmd.append(to_decimal((int)(val*10),3)).append("0;"); } sendCommand(cmd); showresp(WARN, ASC, "SET pwr", cmd, replystr); } void RIG_K2::get_pc_min_max_step(double &min, double &max, double &step) { if (hipower) { min = 1.0; max_power = max = 110.0; step = 1.0; } else { min = 0.1; max_power = max = 20; step = 0.1; } } void RIG_K2::set_PTT_control(int val) { if (val) cmd = "TX;"; else cmd = "RX;"; sendCommand(cmd); showresp(WARN, ASC, "SET ptt", cmd, replystr); } void RIG_K2::set_attenuator(int val) { if (val) cmd = "RA01;"; else cmd = "RA00;"; sendCommand(cmd); showresp(WARN, ASC, "SET att", cmd, replystr); } int RIG_K2::get_attenuator() { rsp = cmd = "RA"; cmd += ';'; int ret = waitN(5, 100, "get att", ASC); if (ret < 5) return 0; size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; return (replystr[p + 3] == '1' ? 1 : 0); } void RIG_K2::set_preamp(int val) { if (val) cmd = "PA1;"; else cmd = "PA0;"; sendCommand(cmd); showresp(WARN, ASC, "SET pre", cmd, replystr); } int RIG_K2::get_preamp() { rsp = cmd = "PA"; cmd += ';'; int ret = waitN(4, 100, "get pre", ASC); if (ret < 4) return 0; size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; return (replystr[p + 2] == '1' ? 1 : 0); } flrig-1.3.24/src/rigs/FT100D.cxx0000644000175000017500000001475112562731647012767 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT100D.h" #include "rig.h" static const char FT100Dname_[] = "FT-100D"; static const char *FT100Dmodes_[] = { "LSB", "USB", "CW", "CW-R", "AM", "DIG", "FM", "W-FM", NULL}; static const int FT100D_def_bw[] = { 2, 2, 1, 1, 3, 1, 2, 3 }; static const int FT100D_mode_val[] = { 0, 1, 2, 3, 4, 5, 6, 7 }; static const char FT100D_mode_type[] = { 'L', 'U', 'U', 'L', 'U', 'U', 'U', 'U' }; static const char *FT100Dwidths_[] = { "300", "500", "2400", "6000", NULL}; static const int FT100D_bw_val[] = { 0, 1, 2, 3 }; RIG_FT100D::RIG_FT100D() { name_ = FT100Dname_; modes_ = FT100Dmodes_; bandwidths_ = FT100Dwidths_; bw_vals_ = FT100D_bw_val; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 100; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; afreq = bfreq = A.freq = B.freq = 14070000; amode = bmode = A.imode = B.imode = 1; aBW = bBW = A.iBW = B.iBW = 2; precision = 10; ndigits = 9; has_split = has_split_AB = has_get_info = has_smeter = has_power_out = has_swr_control = has_mode_control = has_bandwidth_control = has_ptt_control = true; } int RIG_FT100D::adjust_bandwidth(int m) { if (m == 0 || m == 1 || m == 5) return 2; if (m == 2 || m == 3 ) return 1; if (m == 4 || m == 6 || m == 7) return 3; return 2; } void RIG_FT100D::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; replystr.clear(); } void RIG_FT100D::initialize() { } void RIG_FT100D::selectA() { init_cmd(); cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select A", cmd, replystr); } void RIG_FT100D::selectB() { init_cmd(); cmd[3] = 0x01; cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select B", cmd, replystr); } void RIG_FT100D::set_split(bool val) { split = val; init_cmd(); cmd[3] = val ? 0x01 : 0x00; cmd[4] = 0x01; sendCommand(cmd); if (val) showresp(WARN, HEX, "set split ON", cmd, replystr); else showresp(WARN, HEX, "set split OFF", cmd, replystr); } bool RIG_FT100D::get_info() { bool memmode = false, vfobmode = false; int pfreq, pmode, pbw; init_cmd(); cmd[3] = 0x01; cmd[4] = 0xFA; int ret = waitN(8, 100, "status"); if (ret >= 8) { size_t p = ret - 8; memmode = ((replystr[p+1] & 0x40) == 0x40); vfobmode = ((replystr[p+1] & 0x24) == 0x24); if (memmode) return false; if (vfobmode && !useB) { useB = true; Fl::awake(highlight_vfo, (void *)0); } else if (!vfobmode && useB) { useB = false; Fl::awake(highlight_vfo, (void *)0); } } init_cmd(); cmd[4] = 0x10; ret = waitN(32, 100, "info"); if (ret >= 32) { size_t p = ret - 32; // primary pfreq = 0; for (size_t n = 1; n < 5; n++) pfreq = pfreq * 256 + (unsigned char)replystr[p + n]; pfreq = pfreq * 1.25; // 100D resolution is 1.25 Hz / bit for read pmode = replystr[p + 5] & 0x07; if (pmode > 7) pmode = 7; pbw = (replystr[p + 5] >> 4) & 0x03; pbw = 3 - pbw; LOG_WARN("Vfo %c = %d", vfobmode ? 'B' : 'A', pfreq); if (useB) { B.freq = pfreq; B.imode = pmode; B.iBW = pbw; } else { A.freq = pfreq; A.imode = pmode; A.iBW = pbw; } return true; } return false; } long RIG_FT100D::get_vfoA () { return A.freq; } void RIG_FT100D::set_vfoA (long freq) { A.freq = freq; freq /=10; // 100D does not support 1 Hz resolution cmd = to_bcd_be(freq, 8); cmd += 0x0A; sendCommand(cmd); showresp(WARN, HEX, "set freq A", cmd, replystr); } int RIG_FT100D::get_modeA() { return A.imode; } void RIG_FT100D::set_modeA(int val) { A.imode = val; init_cmd(); cmd[3] = FT100D_mode_val[val]; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode A", cmd, replystr); } void RIG_FT100D::set_bwA (int val) { A.iBW = val; init_cmd(); cmd[3] = FT100D_bw_val[val]; cmd[4] = 0x8C; sendCommand(cmd); showresp(WARN, HEX, "set BW A", cmd, replystr); } int RIG_FT100D::get_bwA() { return A.iBW; } long RIG_FT100D::get_vfoB() { return B.freq; } void RIG_FT100D::set_vfoB(long freq) { B.freq = freq; freq /=10; // 100D does not support 1 Hz resolution cmd = to_bcd_be(freq, 8); cmd += 0x0A; sendCommand(cmd); showresp(WARN, HEX, "set freq B", cmd, replystr); } void RIG_FT100D::set_modeB(int val) { B.imode = val; init_cmd(); cmd[3] = FT100D_mode_val[val]; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode B", cmd, replystr); } int RIG_FT100D::get_modeB() { return B.imode; } void RIG_FT100D::set_bwB(int val) { B.iBW = val; init_cmd(); cmd[3] = FT100D_bw_val[val]; cmd[4] = 0x8C; sendCommand(cmd); showresp(WARN, HEX, "set bw B", cmd, replystr); } int RIG_FT100D::get_bwB() { return B.iBW; } int RIG_FT100D::def_bandwidth(int m) { return FT100D_def_bw[m]; } // Tranceiver PTT on/off void RIG_FT100D::set_PTT_control(int val) { init_cmd(); if (val) cmd[3] = 1; cmd[4] = 0x0F; sendCommand(cmd); if (val) showresp(WARN, HEX, "set PTT ON", cmd, replystr); else showresp(WARN, HEX, "set PTT OFF", cmd, replystr); } int RIG_FT100D::get_smeter() { init_cmd(); cmd[4] = 0xF7; int ret = waitN(9, 100, "S-meter"); if (ret < 9) return 0; int sval = (unsigned char)replybuff[ret - 6]; if (sval < 90) sval = 90; if (sval > 200) sval = 200; if (sval < 120) sval = 250 - 5 * sval / 3; else sval = 125 - 5 * sval / 8; return sval; } int RIG_FT100D::get_swr() { double swr = (fwdpwr + refpwr) / (fwdpwr - refpwr + .0001); swr -= 1.0; swr *= 25.0; if (swr < 0) swr = 0; if (swr > 100) swr = 100; return (int) swr; } int RIG_FT100D::get_power_out() { init_cmd(); cmd[4] = 0xF7; int ret = waitN(9, 100, "P-out"); if (ret < 9) return 0; fwdpwr = replystr[ret - 9 + 1] / 2.56; refpwr = replystr[ret - 9 + 2] / 2.56; return (int) fwdpwr; } flrig-1.3.24/src/rigs/FT990a.cxx0000644000175000017500000001257512562731647013047 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT990a.h" #include "rig.h" static const char FT990Aname_[] = "FT-990A"; static const char *FT990Amodes_[] = { "LSB", "USB", "CW2.4", "CW500", "AM2.4", "FM", "RTTY(L)", "RTTY(U)", "PKT(L)", "PKT(FM)", NULL}; static const int FT990A_def_bw[] = { 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 }; static const int FT990A_mode_val[] = { 0, 1, 2, 3, 4, 5, 6, 8, 9, 10, 11 }; static const char FT990A_mode_type[] = { 'L', 'U', 'L', 'L', 'U', 'U', 'L', 'U', 'L', 'U' }; static const char *FT990Awidths_[] = { "2400", "2000", "500", "250", NULL}; static int FT990A_bw_vals[] = { 1,2,3,4,WVALS_LIMIT}; static const int FT990A_bw_val[] = { 0, 1, 2, 3 }; RIG_FT990A::RIG_FT990A() { name_ = FT990Aname_; modes_ = FT990Amodes_; bandwidths_ = FT990Awidths_; bw_vals_ = FT990A_bw_vals; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 100; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; afreq = bfreq = A.freq = B.freq = 14070000; amode = bmode = A.imode = B.imode = 1; aBW = bBW = A.iBW = B.iBW = 2; precision = 10; ndigits = 9; has_get_info = false; has_split = has_split_AB = has_smeter = has_power_out = has_swr_control = has_mode_control = has_bandwidth_control = has_ptt_control = true; } int RIG_FT990A::adjust_bandwidth(int m) { if (m == 0 || m == 1 || m == 5) return 2; if (m == 2 || m == 3 ) return 1; if (m == 4 || m == 6 || m == 7) return 3; return 2; } void RIG_FT990A::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; replystr.clear(); } void RIG_FT990A::initialize() { init_cmd(); cmd[4] = 0x0E; sendCommand(cmd); } void RIG_FT990A::selectA() { init_cmd(); cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select A", cmd, ""); } void RIG_FT990A::selectB() { init_cmd(); cmd[3] = 0x01; cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select B", cmd, ""); } void RIG_FT990A::set_split(bool val) { split = val; init_cmd(); cmd[3] = val ? 0x01 : 0x00; cmd[4] = 0x01; sendCommand(cmd); if (val) showresp(WARN, HEX, "set split ON", cmd, ""); else showresp(WARN, HEX, "set split OFF", cmd, ""); } bool RIG_FT990A::get_info() { return false; } long RIG_FT990A::get_vfoA () { return A.freq; } void RIG_FT990A::set_vfoA (long freq) { A.freq = freq; freq /=10; cmd = to_bcd_be(freq, 8); cmd += 0x0A; sendCommand(cmd); showresp(WARN, HEX, "set freq A", cmd, ""); } int RIG_FT990A::get_modeA() { return A.imode; } void RIG_FT990A::set_modeA(int val) { A.imode = val; init_cmd(); cmd[3] = FT990A_mode_val[val]; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode A", cmd, ""); } void RIG_FT990A::set_bwA (int val) { A.iBW = val; init_cmd(); cmd[3] = FT990A_bw_val[val]; cmd[4] = 0x8C; sendCommand(cmd); showresp(WARN, HEX, "set BW A", cmd, ""); } int RIG_FT990A::get_bwA() { return A.iBW; } long RIG_FT990A::get_vfoB() { return B.freq; } void RIG_FT990A::set_vfoB(long freq) { B.freq = freq; freq /=10; cmd = to_bcd_be(freq, 8); cmd += 0x0A; sendCommand(cmd); showresp(WARN, HEX, "set freq B", cmd, ""); } void RIG_FT990A::set_modeB(int val) { B.imode = val; init_cmd(); cmd[3] = FT990A_mode_val[val]; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode B", cmd, ""); } int RIG_FT990A::get_modeB() { return B.imode; } void RIG_FT990A::set_bwB(int val) { B.iBW = val; init_cmd(); cmd[3] = FT990A_bw_val[val]; cmd[4] = 0x8C; sendCommand(cmd); showresp(WARN, HEX, "set bw B", cmd, ""); } int RIG_FT990A::get_bwB() { return B.iBW; } int RIG_FT990A::def_bandwidth(int m) { return FT990A_def_bw[m]; } // Tranceiver PTT on/off void RIG_FT990A::set_PTT_control(int val) { init_cmd(); if (val) cmd[3] = 1; cmd[4] = 0x0F; sendCommand(cmd); if (val) showresp(WARN, HEX, "set PTT ON", cmd, ""); else showresp(WARN, HEX, "set PTT OFF", cmd, ""); } int RIG_FT990A::get_smeter() { init_cmd(); cmd[4] = 0xF7; int ret = waitN(5, 100, "S-meter"); if (ret < 5) return 0; int sval = (unsigned char)replybuff[0]; if (sval < 90) sval = 90; if (sval > 200) sval = 200; if (sval < 120) sval = 250 - 5 * sval / 3; else sval = 125 - 5 * sval / 8; return sval; } int RIG_FT990A::get_swr() { return 0; } int RIG_FT990A::get_power_out() { init_cmd(); cmd[4] = 0xF7; int ret = waitN(5, 100, "Power out"); if (ret < 5) return 0; int sval = (unsigned char)replybuff[0]; if (sval < 90) sval = 90; if (sval > 200) sval = 200; if (sval < 120) sval = 250 - 5 * sval / 3; else sval = 125 - 5 * sval / 8; return sval; } flrig-1.3.24/src/rigs/FT2000.cxx0000644000175000017500000003405412562731651012735 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT2000.h" #include "debug.h" #include "support.h" static const char FT2000name_[] = "FT-2000"; static const char *FT2000modes_[] = { "LSB", "USB", "CW", "FM", "AM", "RTTY-L", "CW-R", "PKT-L", "RTTY-U", "PKT-FM", "FM-N", "PKT-U", NULL}; static const char FT2000_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C' }; static const char FT2000_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'L', 'U', 'U', 'U', 'U' }; static const char *FT2000_SSBwidths[] = { "NORM", "200", "400", "600", "850", "1100", "1350", "1500", "1650", "1800", "1950", "2100", "2250", NULL}; static int FT2000_wvals_SSBwidths[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13, WVALS_LIMIT}; static const char *FT2000_CWwidths[] = { "NORM", "50", "100", "200", "300", "400", "500", "800", "1200", "1400", "1700", "2000", NULL}; static int FT2000_wvals_CWwidths[] = { 1,2,3,4,5,6,7,8,9,10,11,12, WVALS_LIMIT}; static const char *FT2000_PKT_RTTYwidths[] = { "NORM", "25", "50", "100", "200", "300", "400", NULL}; static int FT2000_wvals_PKT_RTTYwidths[] = { 1,2,3,4,5,6,7, WVALS_LIMIT}; static const char *FT2000_AMFMwidths[] = { "NORM", "NARR", NULL}; static int FT2000_wvals_AMFMwidths[] = { 1,2, WVALS_LIMIT}; static const char *FT2000_US_60m[] = {NULL, "126", "127", "128", "130", NULL}; // US has 5 60M presets. Using dummy numbers for all. // First NULL means skip 60m sets in set_band_selection(). // Maybe someone can do a cat command MC; on all 5 presets and add returned numbers above. // To send cat commands in flrig goto menu Config->Xcvr select->Send Cmd. static const char **Channels_60m = FT2000_US_60m; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; void RIG_FT2000::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = btnIFsh; rig_widgets[3].W = sldrIFSHIFT; rig_widgets[4].W = btnNotch; rig_widgets[5].W = sldrNOTCH; rig_widgets[6].W = sldrMICGAIN; rig_widgets[7].W = sldrPOWER; } RIG_FT2000::RIG_FT2000() { // base class values name_ = FT2000name_; modes_ = FT2000modes_; bandwidths_ = FT2000_SSBwidths; bw_vals_ = FT2000_wvals_SSBwidths; widgets = rig_widgets; comm_baudrate = BR4800; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 2; def_mode = 1; def_bw = 2; def_freq = 14070000; has_band_selection = has_extras = has_smeter = has_power_out = has_power_control = has_volume_control = has_mode_control = has_noise_control = has_bandwidth_control = has_micgain_control = has_notch_control = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = has_swr_control = true; // derived specific notch_on = false; atten_level = 0; preamp_level = 0; m_60m_indx = 0; precision = 10; ndigits = 7; } void RIG_FT2000::set_band_selection(int v) { int inc_60m = false; cmd = "IF;"; waitN(27, 100, "get vfo mode in set_band_selection", ASC); size_t p = replystr.rfind("IF"); if (p == string::npos) return; if (replystr[p+21] != '0') { // vfo 60M memory mode inc_60m = true; } if (v == 12) { // 5MHz 60m presets if (Channels_60m[0] == NULL) return; // no 60m Channels so skip if (inc_60m) { if (Channels_60m[++m_60m_indx] == NULL) m_60m_indx = 0; } cmd.assign("MC").append(Channels_60m[m_60m_indx]).append(";"); } else { // v == 1..11 band selection OR return to vfo mode == 0 if (inc_60m) cmd = "VM;"; else { if (v < 3) v = v - 1; cmd.assign("BS").append(to_decimal(v, 2)).append(";"); } } sendCommand(cmd); showresp(WARN, ASC, "Select Band Stacks", cmd, replystr); } long RIG_FT2000::get_vfoA () { cmd = "FA;"; int ret = waitN(11, 100, "get vfoA", ASC); if (ret < 11) return freqA; size_t p = replystr.rfind("FA"); if (p == string::npos) return freqA; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p + n] - '0'; freqA = f; return freqA; } void RIG_FT2000::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd, 0); } int RIG_FT2000::get_smeter() { cmd = "SM0;"; int ret = waitN(7, 100, "get smeter", ASC); if (ret < 7) return 0; size_t p = replystr.rfind("SM"); if (p == string::npos) return 0; replystr[p + 6] = 0; int mtr = atoi(&replystr[p + 3]); mtr = mtr * 100.0 / 256.0; return mtr; } int RIG_FT2000::get_swr() { cmd = "RM6;"; int ret = waitN(7, 100, "get swr", ASC); if (ret < 7) return 0; size_t p = replystr.rfind("RM"); if (p == string::npos) return 0; replystr[p + 6] = 0; int mtr = atoi(&replystr[p + 3]); return mtr / 2.56; } int RIG_FT2000::get_power_out() { cmd = "RM5;"; int ret = waitN(7, 100, "get pwr out", ASC); if (ret < 7) return 0; size_t p = replystr.rfind("RM"); if (p == string::npos) return 0; replystr[p + 6] = 0; double mtr = (double)(atoi(&replystr[p + 3])); mtr = -6.6263535 + .11813178 * mtr + .0013607405 * mtr * mtr; return (int)mtr; } int RIG_FT2000::get_power_control() { cmd = "PC;"; int ret = waitN(6, 100, "get pwr ctl", ASC); if (ret < 6) return 0; size_t p = replystr.rfind("PC"); if (p == string::npos) return 0; replystr[p + 5] = 0; int mtr = atoi(&replystr[p + 2]); return mtr; } // Volume control return 0 ... 100 int RIG_FT2000::get_volume_control() { cmd = "AG0;"; int ret = waitN(7, 100, "get vol", ASC); if (ret < 7) return 0; size_t p = replystr.rfind("AG"); if (p == string::npos) return 0; replystr[p + 6] = 0; int val = atoi(&replystr[p + 3]); return (int)(val / 2.55); } void RIG_FT2000::set_volume_control(int val) { int ivol = (int)(val * 2.55); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd, 0); } // Transceiver power level void RIG_FT2000::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd, 0); } // Tranceiver PTT on/off void RIG_FT2000::set_PTT_control(int val) { if (val) sendCommand("TX1;", 0); else sendCommand("TX0;", 0); } void RIG_FT2000::tune_rig() { sendCommand("AC002;",0); } void RIG_FT2000::set_attenuator(int val) { switch (atten_level) { case 0 : atten_level = 1; atten_label("6 dB", true); cmd = "RA01;"; break; case 1 : atten_level = 2; atten_label("12 dB", true); cmd = "RA02;"; break; case 2 : atten_level = 3; atten_label("18 dB", true); cmd = "RA03;"; break; case 3 : default : atten_level = 0; atten_label("Att", false); cmd = "RA00;"; } sendCommand(cmd, 0); } int RIG_FT2000::get_attenuator() { cmd = "RA0;"; int ret = waitN(5, 100, "get att", ASC); if (ret < 5) { atten_label("Att", false); return 0; } size_t p = replystr.rfind("RA"); if (p == string::npos) { atten_label("Att", false); return 0; } int reply = replystr[p + 3]; switch (reply) { case '1' : atten_label("6 dB", true); atten_level = 1; break; case '2' : atten_label("12 dB", true); atten_level = 2; break; case '3' : atten_label("18 dB", true); atten_level = 3; break; default : atten_label("Att", false); atten_level = 0; break; } return atten_level; } void RIG_FT2000::set_preamp(int val) { switch (preamp_level) { case 0 : preamp_level = 1; preamp_label("Pre 1", true); cmd = "PA01;"; break; case 1 : preamp_level = 2; preamp_label("Pre 2", true); cmd = "PA02;"; break; case 2 : default : preamp_level = 0; preamp_label("Pre", false); cmd = "PA00;"; } sendCommand(cmd, 0); } int RIG_FT2000::get_preamp() { cmd = "PA0;"; int ret = waitN(5, 100, "get pre", ASC); if (ret < 5) { preamp_label("Pre", false); return 0; } size_t p = replystr.rfind("PA"); if (p == string::npos) { preamp_label("Pre", false); return 0; } int reply = replystr[p + 3]; switch (reply) { case '1' : preamp_level = 1; preamp_label("Pre 1", true); break; case '2' : preamp_level = 2; preamp_label("Pre 2", true); break; case '0' : default : preamp_level = 0; preamp_label("Pre", false); } return preamp_level; } void RIG_FT2000::set_modeA(int val) { modeA = val; cmd = "MD0"; cmd += FT2000_mode_chr[val]; cmd += ';'; sendCommand(cmd, 0); } int RIG_FT2000::get_modeA() { cmd = "MD0;"; int ret = waitN(5, 100, "get modeA", ASC); if (ret < 5) return modeA; size_t p = replystr.rfind("MD"); if (p == string::npos) return modeA; modeA = replystr[p + 3] - '1'; return modeA; } int RIG_FT2000::adjust_bandwidth(int m) { switch (m) { case 0 : case 1 : bandwidths_ = FT2000_SSBwidths; bw_vals_ = FT2000_wvals_SSBwidths; bwA = 0; break; case 2 : case 6 : bandwidths_ = FT2000_CWwidths; bw_vals_ = FT2000_wvals_CWwidths; bwA = 0; break; case 5 : case 7 : case 8 : case 11 : bandwidths_ = FT2000_PKT_RTTYwidths; bw_vals_ = FT2000_wvals_PKT_RTTYwidths; bwA = 0; break; case 3 : case 4 : case 9 : case 10 : bandwidths_ = FT2000_AMFMwidths; bw_vals_ = FT2000_wvals_AMFMwidths; bwA = 0; break; } return bwA; } int RIG_FT2000::def_bandwidth(int m) { return 0; } const char **RIG_FT2000::bwtable(int m) { switch (m) { case 0 : case 1 : return FT2000_SSBwidths; break; case 2 : case 6 : return FT2000_CWwidths; break; case 5 : case 7 : case 8 : case 11 : return FT2000_PKT_RTTYwidths; break; case 3 : case 4 : case 9 : case 10 : return FT2000_AMFMwidths; break; } return FT2000_SSBwidths; } void RIG_FT2000::set_bwA(int val) { bwA = val; if (val == 0) { sendCommand("NA00;", 0); return; } val--; switch (modeA) { //SSB case 0 : case 1 : cmd = "EX106"; if (val > 9) cmd += '1'; else cmd += '0'; val %= 10; cmd += val + '0'; cmd += ';'; sendCommand(cmd, 0); break; //CW case 2 : case 6 : cmd = "EX097"; if (val > 9) cmd += '1'; else cmd += '0'; val %= 10; cmd += val + '0'; cmd += ';'; sendCommand(cmd, 0); break; //PKT-RTTY case 5 : case 7 : case 8 : case 11 : cmd = "EX1030"; cmd += val + '0'; cmd += ';'; sendCommand(cmd, 0); break; //AM-FM case 3 : case 4 : case 9 : case 10 : break; } sendCommand("NA10;", 0); } int RIG_FT2000::get_bwA() { return bwA; } int RIG_FT2000::get_modetype(int n) { return FT2000_mode_type[n]; } void RIG_FT2000::set_if_shift(int val) { cmd = "IS0+0000;"; if (val < 0) cmd[3] = '-'; val = abs(val); for (int i = 4; i > 0; i--) { cmd[3+i] += val % 10; val /= 10; } sendCommand(cmd, 0); } bool RIG_FT2000::get_if_shift(int &val) { static int oldval = 0; cmd = "IS0;"; int ret = waitN(9, 100, "get if shift", ASC); if (ret < 9) return false; size_t p = replystr.rfind("IS"); if (p == string::npos) return false; replystr[p + 8] = 0; val = atoi(&replystr[p + 3]); if (val != 0 || oldval != val) { oldval = val; return true; } oldval = val; return false; } void RIG_FT2000::get_if_min_max_step(int &min, int &max, int &step) { min = -1000; max = 1000; step = 100; } void RIG_FT2000::set_notch(bool on, int val) { cmd = "BP00000;"; if (on == false) { sendCommand(cmd, 0); notch_on = false; return; } if (!notch_on) { cmd[6] = '1'; // notch ON sendCommand(cmd, 0); cmd[6] = '0'; notch_on = true; } cmd[3] = '1'; // manual NOTCH position // set notch value offset by 200, ie: 001 -> 400 val = (-val / 9) + 200; if (val < 1) val = 1; if (val > 400) val = 400; for (int i = 3; i > 0; i--) { cmd[3 + i] += val % 10; val /=10; } sendCommand(cmd, 0); } bool RIG_FT2000::get_notch(int &val) { bool ison = false; cmd = "BP00;"; int ret = waitN(8, 100, "get notch", ASC); if (ret < 8) return ison; size_t p = replystr.rfind("BP"); if (p == string::npos) return ison; if (replystr[p + 6] == '1') { ison = true; cmd = "BP01;"; ret = waitN(8, 100, "get notch freq", ASC); if (ret < 8) return ison; p = replystr.rfind("BP"); if (p == string::npos) return ison; replystr[p + 7] = 0; val = atoi(&replystr[p + 4]); val -= 200; val *= -9; } return ison; } void RIG_FT2000::get_notch_min_max_step(int &min, int &max, int &step) { min = -1143; max = +1143; step = 9; } void RIG_FT2000::set_noise(bool b) { if (b) cmd = "NB01;"; else cmd = "NB00;"; sendCommand(cmd, 0); } // val 0 .. 100 void RIG_FT2000::set_mic_gain(int val) { cmd = "MG000;"; val = (int)(val * 2.50); for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET mic", cmd, replystr); } int RIG_FT2000::get_mic_gain() { cmd = rsp = "MG"; cmd += ';'; waitN(6, 100, "get mic", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.mic_gain; int val = atoi(&replystr[p+2]); val = (int)(val / 2.50); if (val > 100) val = 100; return ceil(val); } void RIG_FT2000::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } flrig-1.3.24/src/rigs/IC756PRO3.cxx0000644000175000017500000005234112562731651013322 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC756PRO3.h" #include "debug.h" #include "support.h" //============================================================================= // 756PRO-III const char IC756PRO3name_[] = "IC-756PRO-III"; const char *IC756PRO3modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", "D-LSB", "D-USB", "D-FM", NULL}; const char IC756PRO3_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U', 'L', 'U', 'U' }; const char *IC756PRO3_SSBwidths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3100", "3200", "3300", "3400", "3500", "3600", NULL}; static int IC756PRO3_bw_vals_SSB[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41, WVALS_LIMIT}; const char *IC756PRO3_RTTYwidths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", NULL}; static int IC756PRO3_bw_vals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32, WVALS_LIMIT}; const char *IC756PRO3_AMFMwidths[] = { "FILT-1", "FILT-2", "FILT-3", NULL }; static int IC756PRO3_bw_vals_AMFM[] = { 1,2,3, WVALS_LIMIT}; static GUI ic756pro3_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 54, 165, 156 }, { (Fl_Widget *)btnNR, 214, 125, 50 }, { (Fl_Widget *)sldrNR, 266, 125, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC756PRO3::RIG_IC756PRO3() { defaultCIV = 0x6E; name_ = IC756PRO3name_; modes_ = IC756PRO3modes_; bandwidths_ = IC756PRO3_SSBwidths; bw_vals_ = IC756PRO3_bw_vals_SSB; _mode_type = IC756PRO3_mode_type; atten_level = 3; // will force initializing to 0 dB preamp_level = 2; // will force initializaing to 0 dB widgets = ic756pro3_widgets; def_freq = freqA = freqB = A.freq = 14070000; def_mode = modeA = modeB = B.imode = 1; def_bw = bwA = bwB = A.iBW = B.iBW = 32; has_a2b = has_split = has_split_AB = has_bandwidth_control = has_ifshift_control = has_tune_control = has_swr_control = has_alc_control = has_smeter = has_power_out = has_power_control = has_volume_control = has_mode_control = has_micgain_control = has_auto_notch = has_attenuator_control = has_preamp_control = has_ptt_control = has_noise_reduction = has_noise_reduction_control = has_noise_control = has_sql_control = has_rf_control = true; adjustCIV(defaultCIV); precision = 1; ndigits = 9; }; void RIG_IC756PRO3::initialize() { ic756pro3_widgets[0].W = btnVol; ic756pro3_widgets[1].W = sldrVOLUME; ic756pro3_widgets[2].W = sldrRFGAIN; ic756pro3_widgets[3].W = sldrSQUELCH; ic756pro3_widgets[4].W = btnNR; ic756pro3_widgets[5].W = sldrNR; ic756pro3_widgets[6].W = btnIFsh; ic756pro3_widgets[7].W = sldrIFSHIFT; ic756pro3_widgets[8].W = sldrMICGAIN; ic756pro3_widgets[9].W = sldrPOWER; } void RIG_IC756PRO3::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\xB0'; cmd.append(post); waitFB("sel A"); } void RIG_IC756PRO3::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\xB1'; cmd.append(post); waitFB("sel B"); } void RIG_IC756PRO3::A2B() { cmd = pre_to; cmd += '\x07'; cmd += '\xB1'; cmd.append(post); waitFB("A->B"); } long RIG_IC756PRO3::get_vfoA () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(11, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.freq = fm_bcd_be(&replystr[p+5], 10); } return A.freq; } void RIG_IC756PRO3::set_vfoA (long freq) { A.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo A"); } long RIG_IC756PRO3::get_vfoB () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(11, "get vfo B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.freq = fm_bcd_be(&replystr[p+5], 10); } return B.freq; } void RIG_IC756PRO3::set_vfoB (long freq) { B.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo B"); } int RIG_IC756PRO3::get_smeter() { string cstr = "\x15\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return 0; } int RIG_IC756PRO3::get_power_out() { string cstr = "\x15\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get pout")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return 0; } int RIG_IC756PRO3::get_alc() { string cstr = "\x15\x13"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get alc")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return 0; } int RIG_IC756PRO3::get_swr() { string cstr = "\x15\x12"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get swr")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return 0; } // Volume control val 0 ... 100 void RIG_IC756PRO3::set_volume_control(int val) { ICvol = (int)(val * 2.55); cmd = pre_to; cmd.append("\x14\x01"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); waitFB("set vol"); } int RIG_IC756PRO3::get_volume_control() { string cstr = "\x14\x01"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get vol")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return 0; } void RIG_IC756PRO3::get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } // Tranceiver PTT on/off void RIG_IC756PRO3::set_PTT_control(int val) { cmd = pre_to; cmd += '\x1c'; cmd += '\x00'; cmd += (unsigned char) val; cmd.append( post ); waitFB("set PTT"); } // changed noise blanker to noise reduction void RIG_IC756PRO3::set_noise(bool val) { cmd = pre_to; cmd.append("\x16\x22"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set noise"); } int RIG_IC756PRO3::get_noise() { string cstr = "\x16\x22"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get noise")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return progStatus.noise; } void RIG_IC756PRO3::set_noise_reduction(int val) { cmd = pre_to; cmd.append("\x16\x40"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set NR"); } int RIG_IC756PRO3::get_noise_reduction() { string cstr = "\x16\x40"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get NR")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return progStatus.noise_reduction; } // 0 < val < 100 void RIG_IC756PRO3::set_noise_reduction_val(int val) { cmd = pre_to; cmd.append("\x14\x06"); cmd.append(to_bcd(val * 2.55, 3)); cmd.append(post); waitFB("set NR val"); } int RIG_IC756PRO3::get_noise_reduction_val() { string cstr = "\x14\x06"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get NR val")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return progStatus.noise_reduction_val; } int RIG_IC756PRO3::get_modetype(int n) { return _mode_type[n]; } int RIG_IC756PRO3::get_mic_gain() { string cstr = "\x14\x0B"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get mic")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return 0; } void RIG_IC756PRO3::set_mic_gain(int val) { val = (int)(val * 2.55); cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(val,3)); cmd.append(post); waitFB("set mic"); } void RIG_IC756PRO3::get_mic_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_IC756PRO3::set_if_shift(int val) { int shift = (int)(val * 128.0 / 825.0 + 128); cmd = pre_to; cmd.append("\x14\x07"); cmd.append(to_bcd(shift, 3)); cmd.append(post); waitFB("set if-shift"); } bool RIG_IC756PRO3::get_if_shift(int &val) { string cstr = "\x14\x07"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); val = progStatus.shift_val; if (waitFOR(9, "get if-shift")) { size_t p = replystr.rfind(resp); if (p != string::npos) val = (int)((fm_bcd(&replystr[p+6], 3) - 128) * 825.0 / 128.0); } return (progStatus.shift = (val != 0)); } void RIG_IC756PRO3::get_if_min_max_step(int &min, int &max, int &step) { min = -825; max = +825; step = 25; } void RIG_IC756PRO3::set_squelch(int val) { int IC756PRO3sql = (int)(val * 2.55); cmd = pre_to; cmd.append("\x14\x03"); cmd.append(to_bcd(IC756PRO3sql, 3)); cmd.append( post ); waitFB("set sql"); } int RIG_IC756PRO3::get_squelch() { string cstr = "\x14\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get sql")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return progStatus.squelch; } void RIG_IC756PRO3::set_rf_gain(int val) { int IC756PRO3rfg = (int)(val * 2.55); cmd = pre_to; cmd.append("\x14\x02"); cmd.append(to_bcd(IC756PRO3rfg, 3)); cmd.append( post ); waitFB("set rf gain"); } int RIG_IC756PRO3::get_rf_gain() { string cstr = "\x14\x02"; string resp = pre_fm; cmd = pre_to; cmd.append(cstr).append(post); resp.append(cstr); if (waitFOR(9, "get rfgain")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55); } return progStatus.rfgain; } void RIG_IC756PRO3::set_power_control(double val) { cmd = pre_to; cmd.append("\x14\x0A"); cmd.append(to_bcd((int)(val * 2.55), 3)); cmd.append( post ); waitFB("set power"); } int RIG_IC756PRO3::get_power_control() { string cstr = "\x14\x0A"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr).append(post); if (waitFOR(9, "get power")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55); } return progStatus.power_level; } void RIG_IC756PRO3::set_split(bool val) { cmd = pre_to; cmd += 0x0F; cmd += val ? 0x01 : 0x00; cmd.append(post); waitFB("set split"); } int RIG_IC756PRO3::get_split() { LOG_WARN("%s", "get split - not implemented"); return progStatus.split; } int RIG_IC756PRO3::adjust_bandwidth(int m) { if (m == 0 || m == 1 || m == 8 || m == 9) { //SSB bandwidths_ = IC756PRO3_SSBwidths; bw_vals_ = IC756PRO3_bw_vals_SSB; return (32); } if (m == 3 || m == 6) { //CW bandwidths_ = IC756PRO3_SSBwidths; bw_vals_ = IC756PRO3_bw_vals_SSB; return (14); } if (m == 4 || m == 7) { //RTTY bandwidths_ = IC756PRO3_RTTYwidths; bw_vals_ = IC756PRO3_bw_vals_RTTY; return (28); } bandwidths_ = IC756PRO3_AMFMwidths; bw_vals_ = IC756PRO3_bw_vals_AMFM; return (0); } int RIG_IC756PRO3::def_bandwidth(int m) { if (m == 0 || m == 1 || m == 8 || m == 9) { //SSB return (32); } if (m == 3 || m == 6) { //CW return (14); } if (m == 4 || m == 7) { //RTTY return (28); } bandwidths_ = IC756PRO3_AMFMwidths; return (0); } const char **RIG_IC756PRO3::bwtable(int m) { if (m == 0 || m == 1 || m == 8 || m == 9) //SSB return IC756PRO3_SSBwidths; if (m == 3 || m == 6) //CW return IC756PRO3_SSBwidths; if (m == 4 || m == 7) //RTTY return IC756PRO3_RTTYwidths; return IC756PRO3_AMFMwidths; } void RIG_IC756PRO3::tune_rig() { cmd = pre_to; cmd.append("\x1c\x01\x02"); cmd.append( post ); waitFB("tune"); } void RIG_IC756PRO3::set_bwA(int val) { if (bandwidths_ == IC756PRO3_AMFMwidths) { A.iBW = val + 1; set_modeA(A.imode); return; } A.iBW = val; cmd = pre_to; cmd.append("\x1A\x03"); cmd.append(to_bcd(A.iBW,2)); cmd.append( post ); waitFB("set bw A"); } int RIG_IC756PRO3::get_bwA() { if (bandwidths_ == IC756PRO3_AMFMwidths) { return A.iBW - 1; } string cstr = "\x1A\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get bw A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.iBW = (int)(fm_bcd(&replystr[p + 6], 2)); } return A.iBW; } void RIG_IC756PRO3::set_bwB(int val) { if (bandwidths_ == IC756PRO3_AMFMwidths) { B.iBW = val + 1; set_modeB(B.imode); return; } B.iBW = val; cmd = pre_to; cmd.append("\x1A\x03"); cmd.append(to_bcd(B.iBW,2)); cmd.append( post ); waitFB("set bw B"); } int RIG_IC756PRO3::get_bwB() { if (bandwidths_ == IC756PRO3_AMFMwidths) { return B.iBW - 1; } string cstr = "\x1A\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get bw B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.iBW = (int)(fm_bcd(&replystr[p + 6], 2)); } return B.iBW; } bool IC756PRO3_notchon = false; void RIG_IC756PRO3::set_notch(bool on, int val) { int notch = (int)(val/20.0 + 128); if (notch > 256) notch = 255; if (on != IC756PRO3_notchon) { cmd = pre_to; cmd.append("\x16\x48"); cmd += on ? '\x01' : '\x00'; cmd.append(post); waitFB("set notch"); IC756PRO3_notchon = on; } if (on) { cmd = pre_to; cmd.append("\x14\x0D"); cmd.append(to_bcd(notch,3)); cmd.append(post); waitFB("set notch val"); } } bool RIG_IC756PRO3::get_notch(int &val) { bool on = false; val = 0; string cstr = "\x16\x48"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get notch")) { size_t p = replystr.rfind(resp); if (p != string::npos) on = replystr[p + 6] ? 1 : 0; cmd = pre_to; resp = pre_fm; cstr = "\x14\x0D"; cmd.append(cstr); resp.append(cstr); cmd.append(post); if (waitFOR(9, "get notch val")) { size_t p = replystr.rfind(resp); if (p != string::npos) val = 20*ceil(fm_bcd(&replystr[p + 6],3) - 128); } } return on; } void RIG_IC756PRO3::get_notch_min_max_step(int &min, int &max, int &step) { min = -1280; max = 1280; step = 20; } void RIG_IC756PRO3::set_attenuator(int val) { int cmdval = 0; if (atten_level == 0) { atten_level = 1; atten_label("6 dB", true); cmdval = 0x06; } else if (atten_level == 1) { atten_level = 2; atten_label("12 dB", true); cmdval = 0x12; } else if (atten_level == 2) { atten_level = 3; atten_label("18 dB", true); cmdval = 0x18; } else if (atten_level == 3) { atten_level = 0; atten_label("Att", false); cmdval = 0x00; } cmd = pre_to; cmd += '\x11'; cmd += cmdval; cmd.append( post ); waitFB("set att"); } int RIG_IC756PRO3::get_attenuator() { string cstr = "\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(7, "get att")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+5] == 0x06) { atten_level = 1; atten_label("6 dB", true); } else if (replystr[p+5] == 0x12) { atten_level = 2; atten_label("12 dB", true); } else if (replystr[p+5] == 0x18) { atten_level = 3; atten_label("18 dB", true); } else if (replystr[p+5] == 0x00) { atten_level = 0; atten_label("Att", false); } } } return atten_level; } void RIG_IC756PRO3::set_preamp(int val) { if (preamp_level == 0) { preamp_level = 1; preamp_label("Pre 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Pre 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("Pre", false); } cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd += (unsigned char) preamp_level; cmd.append( post ); waitFB("set preamp"); } int RIG_IC756PRO3::get_preamp() { string cstr = "\x16\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get preamp")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { preamp_label("Pre 1", true); preamp_level = 1; } else if (replystr[p+6] == 0x02) { preamp_label("Pre 2", true); preamp_level = 2; } else { preamp_label("Pre", false); preamp_level = 0; } } } return preamp_level; } void RIG_IC756PRO3::set_modeA(int val) { A.imode = val; bool datamode = false; switch (val) { case 10 : val = 5; datamode = true; break; case 9 : val = 1; datamode = true; break; case 8 : val = 0; datamode = true; break; case 7 : val = 8; break; case 6 : val = 7; break; default: break; } cmd = pre_to; cmd += '\x06'; cmd += val; cmd.append( post ); waitFB("set mode A"); if (datamode) { // LSB / USB ==> use DATA mode cmd = pre_to; cmd.append("\x1A\x06\x01"); cmd.append(post); waitFB("data mode"); } } int RIG_IC756PRO3::get_modeA() { int md = 0; string cstr = "\x04"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md--; A.iBW = replystr[p+6]; cstr = "\x1A\x06"; resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "data mode?")) { p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6]) { switch (md) { case 0 : md = 8; break; case 1 : md = 9; break; case 5 : md = 10; break; default : break; } } } } A.imode = md; } } return A.imode; } void RIG_IC756PRO3::set_modeB(int val) { B.imode = val; bool datamode = false; switch (val) { case 10 : val = 5; datamode = true; break; case 9 : val = 1; datamode = true; break; case 8 : val = 0; datamode = true; break; case 7 : val = 8; break; case 6 : val = 7; break; default: break; } cmd = pre_to; cmd += '\x06'; cmd += val; cmd.append( post ); waitFB("set mode B"); if (datamode) { // LSB / USB ==> use DATA mode cmd = pre_to; cmd.append("\x1A\x06\x01"); cmd.append(post); waitFB("data mode"); } } int RIG_IC756PRO3::get_modeB() { int md = 0; string cstr = "\x04"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get mode B")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md--; B.iBW = replystr[p+6]; cstr = "\x1A\x06"; resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "data mode?")) { p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6]) { switch (md) { case 0 : md = 8; break; case 1 : md = 9; break; case 5 : md = 10; break; default : break; } } } } B.imode = md; } } return B.imode; } void RIG_IC756PRO3::set_auto_notch(int val) { cmd = pre_to; cmd += '\x16'; cmd += '\x41'; cmd += val ? 0x01 : 0x00; cmd.append( post ); waitFB("set AN"); } int RIG_IC756PRO3::get_auto_notch() { string cstr = "\x16\x41"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get AN")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { auto_notch_label("AN", true); return true; } else { auto_notch_label("AN", false); return false; } } } return progStatus.auto_notch; } flrig-1.3.24/src/rigs/IC7410.cxx0000644000175000017500000002760112562731647012736 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC7410.h" bool IC7410_DEBUG = true; //============================================================================= // IC-7410 /* */ const char IC7410name_[] = "IC-7410"; const char *IC7410modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", "LSB-D", "USB-D", "FM-D", NULL}; enum { LSB7410, USB7410, AM7410, CW7410, RTTY7410, FM7410, CWR7410, RTTYR7410, LSBD7410, USBD7410, FMD7410 }; const char IC7410_mode_type[] = { 'L', 'U', 'U', 'L', 'L', 'U', 'L', 'U', 'L', 'U', 'U' }; const char IC7410_mode_nbr[] = { 0x00, // Select the LSB mode 0x01, // Select the USB mode 0x02, // Select the AM mode 0x03, // Select the CW mode 0x04, // Select the RTTY mode 0x05, // Select the FM mode 0x07, // Select the CW-R mode 0x08, // Select the RTTY-R mode 0x00, // select lsb-data mode 0x01, // select usb-data mode 0x05, // select fm-data mode }; const char *IC7410_ssb_bws[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3100", "3200", "3300", "3400", "3500", "3600", NULL }; const char *IC7410_rtty_bws[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", NULL }; const char *IC7410_am_bws[] = { "200", "400", "600", "800", "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", "3800", "4000", "4200", "4400", "4600", "4800", "5000", "5200", "5400", "5600", "5800", "6000", "6200", "6400", "6600", "6800", "7000", "7200", "7400", "7410", "7800", "8000", "8200", "8400", "8600", "8800", "9000", "9200", "9400", "9600", "9800", "10000", NULL }; const char *IC7410_fm_bws[] = { "FIXED", NULL }; static GUI IC7410_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 54, 165, 156 }, { (Fl_Widget *)btnNR, 2, 185, 50 }, { (Fl_Widget *)sldrNR, 54, 185, 156 }, { (Fl_Widget *)btnIFsh, 214, 125, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 125, 156 }, { (Fl_Widget *)btnNotch, 214, 145, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 165, 156 }, { (Fl_Widget *)sldrPOWER, 266, 185, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC7410::RIG_IC7410() { defaultCIV = 0x80; name_ = IC7410name_; modes_ = IC7410modes_; bandwidths_ = IC7410_ssb_bws; _mode_type = IC7410_mode_type; adjustCIV(defaultCIV); comm_retries = 2; comm_wait = 20; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; widgets = IC7410_widgets; has_extras = has_cw_wpm = has_cw_spot_tone = has_cw_qsk = has_cw_vol = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_compON = has_compression = has_micgain_control = has_bandwidth_control = true; precision = 1; ndigits = 9; }; //====================================================================== // IC7410 unique commands //====================================================================== void RIG_IC7410::initialize() { IC7410_widgets[0].W = btnVol; IC7410_widgets[1].W = sldrVOLUME; IC7410_widgets[2].W = sldrRFGAIN; IC7410_widgets[3].W = sldrSQUELCH; IC7410_widgets[4].W = btnNR; IC7410_widgets[5].W = sldrNR; IC7410_widgets[6].W = btnIFsh; IC7410_widgets[7].W = sldrIFSHIFT; IC7410_widgets[8].W = btnNotch; IC7410_widgets[9].W = sldrNOTCH; IC7410_widgets[10].W = sldrMICGAIN; IC7410_widgets[11].W = sldrPOWER; } void RIG_IC7410::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\x00'; cmd.append(post); waitFB("select A"); } void RIG_IC7410::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\x01'; cmd.append(post); waitFB("select B"); } void RIG_IC7410::set_modeA(int val) { A.imode = val; cmd = pre_to; cmd += '\x06'; cmd += IC7410_mode_nbr[val]; cmd.append( post ); waitFB("set mode A"); // digital set / clear if (val == LSBD7410 || val == USBD7410 || val == FMD7410) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; cmd += '\x01'; cmd += '\x01'; cmd.append( post); waitFB("set digital"); } } int RIG_IC7410::get_modeA() { int md = 0; cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); for (md = LSB7410; md <= RTTYR7410; md++) if (replystr[p+6] == IC7410_mode_nbr[md]) break; if (md == LSB7410 || md == USB7410 || md == FM7410) { cmd = pre_to; cmd.append("\x1a\x06"); cmd.append(post); resp = pre_fm; resp.append("\x1a\x06"); if (waitFOR(9, "get digital setting")) { size_t p = replystr.rfind(resp); if (replystr[p+6] == 0x01) { if (md == LSB7410) md = LSBD7410; else if (md == USB7410) md = USBD7410; else if (md == FM7410) md = FMD7410; } } } A.imode = md; } return A.imode; } void RIG_IC7410::set_modeB(int val) { B.imode = val; cmd = pre_to; cmd += '\x06'; cmd += IC7410_mode_nbr[val]; cmd.append( post ); waitFB("set mode B"); if (val == LSBD7410 || val == USBD7410 || val == FMD7410) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; cmd += '\x01'; cmd += '\x01'; cmd.append( post); waitFB("set digital"); } } int RIG_IC7410::get_modeB() { int md = 0; cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get mode B")) { size_t p = replystr.rfind(resp); for (md = LSB7410; md <= RTTYR7410; md++) if (replystr[p+6] == IC7410_mode_nbr[md]) break; if (md == USB7410 || md == AM7410 || md == FM7410) { cmd = pre_to; cmd.append("\x1a\x06"); cmd.append(post); resp = pre_fm; resp.append("\x1a\x06"); if (waitFOR(9, "get digital")) { size_t p = replystr.rfind(resp); if (replystr[p+6] == 0x01) { if (md == LSB7410) md = LSBD7410; else if (md == USB7410) md = USBD7410; else if (md == FM7410) md = FMD7410; } } } B.imode = md; } return B.imode; } int RIG_IC7410::get_bwA() { cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(post); string resp = pre_fm; resp.append("\x1a\x03"); if (waitFOR(8, "get bw A")) { size_t p = replystr.rfind(resp); A.iBW = fm_bcd(&replystr[p+6], 2); } return A.iBW; } void RIG_IC7410::set_bwA(int val) { if (A.imode == FM7410 || A.imode == FMD7410) return; A.iBW = val; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(to_bcd(A.iBW, 2)); cmd.append(post); waitFB("set bw A"); } int RIG_IC7410::get_bwB() { cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(post); string resp = pre_fm; resp.append("\x1a\x03"); if (waitFOR(8, "get bw B")) { size_t p = replystr.rfind(resp); B.iBW = fm_bcd(&replystr[p+6], 2); } return B.iBW; } void RIG_IC7410::set_bwB(int val) { if (B.imode == FM7410 || B.imode == FMD7410) return; B.iBW = val; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(to_bcd(B.iBW, 2)); cmd.append(post); waitFB("set bw A"); } int RIG_IC7410::adjust_bandwidth(int m) { switch (m) { case USB7410: case LSB7410: case LSBD7410 : case USBD7410: bandwidths_ = IC7410_ssb_bws; return 34; case AM7410: bandwidths_ = IC7410_am_bws; return 29; break; case FM7410: case FMD7410: bandwidths_ = IC7410_fm_bws; return 0; break; case RTTY7410: case RTTYR7410: bandwidths_ = IC7410_rtty_bws; return 12; break; case CW7410: case CWR7410: bandwidths_ = IC7410_ssb_bws; return 10; break; default: bandwidths_ = IC7410_ssb_bws; return 34; } return 0; } int RIG_IC7410::def_bandwidth(int m) { return adjust_bandwidth(m); } void RIG_IC7410::set_mic_gain(int v) { ICvol = (int)(v * 255 / 100); cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); waitFB("set mic gain"); } void RIG_IC7410::set_attenuator(int val) { int cmdval = 0; if (atten_level == 0) { atten_level = 1; atten_label("20 dB", true); cmdval = 0x20; } else if (atten_level == 1) { atten_level = 0; atten_label("Att", false); cmdval = 0x00; } cmd = pre_to; cmd += '\x11'; cmd += cmdval; cmd.append( post ); waitFB("set attenuator"); } int RIG_IC7410::get_attenuator() { cmd = pre_to; cmd += '\x11'; cmd.append( post ); string resp = pre_fm; resp += '\x11'; if (waitFOR(7, "get attenuator")) { size_t p = replystr.rfind(resp); if (replystr[p+6] == 0x20) { atten_level = 1; atten_label("20 dB", true); } else { atten_level = 0; atten_label("Att", false); } } return atten_level; } void RIG_IC7410::set_compression() { if (progStatus.compON) { cmd.assign(pre_to).append("\x14\x0E"); cmd.append(to_bcd(progStatus.compression * 255 / 100, 3)); cmd.append( post ); waitFB("set comp"); cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x01'; cmd.append(post); waitFB("set Comp ON"); } else{ cmd.assign(pre_to).append("\x16\x44"); cmd += '\x00'; cmd.append(post); waitFB("set Comp OFF"); } } void RIG_IC7410::set_vox_onoff() { if (progStatus.vox_onoff) { cmd.assign(pre_to).append("\x16\x46\x01"); cmd.append( post ); waitFB("set vox ON"); } else { cmd.assign(pre_to).append("\x16\x46"); cmd += '\x00'; cmd.append( post ); waitFB("set vox OFF"); } } void RIG_IC7410::set_vox_gain() { cmd.assign(pre_to).append("\x1A\x05"); // values 0-255 = 0 - 100% cmd +='\x00'; cmd +='\x87'; cmd.append(to_bcd((int)(progStatus.vox_gain * 2.55), 3)); cmd.append( post ); waitFB("SET vox gain"); } void RIG_IC7410::set_vox_anti() { cmd.assign(pre_to).append("\x1A\x05"); // values 0-255 = 0 - 100% cmd +='\x00'; cmd +='\x88'; cmd.append(to_bcd((int)(progStatus.vox_anti * 2.55), 3)); cmd.append( post ); waitFB("SET anti-vox"); } void RIG_IC7410::set_vox_hang() { cmd.assign(pre_to).append("\x1A\x05"); // values 00-20 = 0.0 - 2.0 sec cmd +='\x00'; cmd +='\x89'; cmd.append(to_bcd((int)(progStatus.vox_hang / 10 ), 2)); cmd.append( post ); waitFB("SET vox hang"); } // CW controls void RIG_IC7410::set_cw_wpm() { cmd.assign(pre_to).append("\x14\x0C"); // values 0-255 = 6 to 48 WPM cmd.append(to_bcd(round((progStatus.cw_wpm - 6) * 255 / (48 - 6)), 3)); cmd.append( post ); waitFB("SET cw wpm"); } void RIG_IC7410::set_cw_qsk() { int n = round(progStatus.cw_qsk * 10); // values 0-255 cmd.assign(pre_to).append("\x14\x0F"); cmd.append(to_bcd(n, 3)); cmd.append(post); waitFB("Set cw qsk delay"); } void RIG_IC7410::set_cw_spot_tone() { cmd.assign(pre_to).append("\x14\x09"); // values 0=300Hz 255=900Hz int n = round((progStatus.cw_spot_tone - 300) * 255.0 / 600.0); if (n > 255) n = 255; if (n < 0) n = 0; cmd.append(to_bcd(n, 3)); cmd.append( post ); waitFB("SET cw spot tone"); } void RIG_IC7410::set_cw_vol() { cmd.assign(pre_to); cmd.append("\x14\x15"); cmd.append(to_bcd((int)(progStatus.cw_vol * 2.55), 3)); cmd.append( post ); waitFB("SET cw sidetone volume"); } flrig-1.3.24/src/rigs/TT516.cxx0000644000175000017500000002563612562731647012720 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- /* * Note for anyone wishing to expand on the command set. * * The Argo V always sends a response and ends the response with a "G\r" to * indicate that the command was accepted. A rejected command is responded to by a * two character sequence "Z\r". You should always expect a maximum response equal * to the number of data bytes plus two. * * For example: * A request for the present receiver filter bandwidth is the the string: * "?W\r" which is 3 bytes in length * The response from the Argonaut V will be: * "Wn\rG\r" which is 5 bytes in length, where n is an unsigned char (byte) * If the transceiver failed to receive the command correctly it will respond: * "Z\r" ----> you need to check for that condition * */ #include "TT516.h" #include "support.h" static const char TT516name_[] = "TT-516"; static const char *TT516modes_[] = { "AM", "USB", "LSB", "CW", "FM", NULL}; static int TT516_def_bw[] = { 26, 36, 36, 12, 36 }; static const char TT516mode_chr[] = { '0', '1', '2', '3', '4' }; static const char TT516mode_type[] = { 'U', 'U', 'L', 'U', 'U' }; static const char *TT516_widths[] = { "200", "250", "300", "350", "400", "450", "500", "550", "600", "650", "700", "750", "800", "850", "900", "950", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", NULL}; static int TT516_WIDTH_bw_vals[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37, WVALS_LIMIT}; static const char *TT516_AM_widths[] = { "400", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1350", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", "3800", "4000", "4200", "4400", "4600", "4800", "5000", "5200", "5400", "5600", "5800", "6000", NULL}; static int TT516_AM_bw_vals[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37, WVALS_LIMIT}; static char TT516setBW[] = "*Wx\r"; static char TT516setPBT[] = "*Pxx\r"; static char TT516setMODE[] = "*Mnn\r"; static char TT516setFREQA[] = "*Annnn\r"; static char TT516setFREQB[] = "*Bnnnn\r"; static char TT516setNB[] = "*Kn\r"; static char TT516setXMT[] = "#1\r"; static char TT516setRCV[] = "#0\r"; static char TT516setSPLIT[] = "*On\r"; static char TT516setATT[] = "*Jn\r"; static char TT516getFREQA[] = "?A\r"; static char TT516getFREQB[] = "?B\r"; static char TT516getFWDPWR[] = "?F\r"; static char TT516getATT[] = "?J\r"; static char TT516getMODE[] = "?M\r"; //static char TT516getPBT[] = "?P\r"; static char TT516getREFPWR[] = "?R\r"; static char TT516getSMETER[] = "?S\r"; static char TT516getBW[] = "?W\r"; static char TT516setVfo[] = "*EVx\r"; static GUI rig_widgets[]= { { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_TT516::RIG_TT516() { // base class values name_ = TT516name_; modes_ = TT516modes_; bandwidths_ = TT516_widths; bw_vals_ = TT516_WIDTH_bw_vals; widgets = rig_widgets; comm_baudrate = BR1200; stopbits = 1; comm_retries = 2; comm_wait = 20; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; serloop_timing = 200; def_mode = modeB = modeA = B.imode = A.imode = 1; def_bw = bwB = bwA = B.iBW = A.iBW = 34; def_freq = freqB = freqA = B.freq = A.freq = 14070000; max_power = 25; can_change_alt_vfo = true; has_power_control = has_volume_control = has_micgain_control = has_notch_control = has_preamp_control = has_tune_control = has_swr_control = false; has_smeter = has_power_out = has_swr_control = has_split = has_noise_control = has_attenuator_control = has_ifshift_control = has_ptt_control = has_bandwidth_control = has_mode_control = true; precision = 10; ndigits = 7; } void RIG_TT516::initialize() { rig_widgets[0].W = btnIFsh; rig_widgets[1].W = sldrIFSHIFT; } long RIG_TT516::get_vfoA () { cmd = TT516getFREQA; int ret = waitN(8, 150, "get vfo A", HEX); if (ret != 8) return A.freq; if (replystr[0] != 'A') return A.freq; if (replystr[6] != 'G') return A.freq; int f = 0; for (size_t n = 1; n < 5; n++) { f = f*256 + ((unsigned char)replystr[n] & 0xFF) ; A.freq = f; } return A.freq; } void RIG_TT516::set_vfoA (long freq) { A.freq = freq; cmd = TT516setFREQA; cmd[5] = freq & 0xff; freq = freq >> 8; cmd[4] = freq & 0xff; freq = freq >> 8; cmd[3] = freq & 0xff; freq = freq >> 8; cmd[2] = freq & 0xff; LOG_INFO(" %c%c %02X %02X %02X %02X %02X", cmd[0], cmd[1], cmd[2] & 0xFF, cmd[3] & 0xFF, cmd[4] & 0xFF, cmd[5] & 0xFF, cmd[6]); sendCommand(cmd); return; } long RIG_TT516::get_vfoB () { cmd = TT516getFREQB; int ret = waitN(8, 150, "get vfo B", HEX); if (ret != 8) return B.freq; if (replystr[0] != 'B') return B.freq; if (replystr[6] != 'G') return B.freq; int f = 0; for (size_t n = 1; n < 5; n++) { f = f*256 + ((unsigned char)replystr[n] & 0xFF) ; B.freq = f; } return B.freq; } void RIG_TT516::set_vfoB (long freq) { B.freq = freq; cmd = TT516setFREQB; cmd[5] = freq & 0xff; freq = freq >> 8; cmd[4] = freq & 0xff; freq = freq >> 8; cmd[3] = freq & 0xff; freq = freq >> 8; cmd[2] = freq & 0xff; LOG_INFO(" %c%c %02X %02X %02X %02X %02X", cmd[0], cmd[1], cmd[2] & 0xFF, cmd[3] & 0xFF, cmd[4] & 0xFF, cmd[5] & 0xFF, cmd[6]); sendCommand(cmd); return; } void RIG_TT516::selectA() { cmd = TT516setVfo; cmd[3] = 'A'; sendCommand(cmd); inuse = onA; set_bwA(A.iBW); return; } void RIG_TT516::selectB() { cmd = TT516setVfo; cmd[3] = 'B'; sendCommand(cmd); inuse = onB; set_bwB(B.iBW); return; } void RIG_TT516::set_split(bool val) { cmd = TT516setSPLIT; cmd[2] = val ? '\x01' : '\x00'; sendCommand(cmd); return; } // Tranceiver PTT on/off void RIG_TT516::set_PTT_control(int val) { if (val) sendCommand(TT516setXMT); else sendCommand(TT516setRCV); } int RIG_TT516::get_modetype(int n) { return TT516mode_type[n]; } const char **RIG_TT516::bwtable(int m) { if (m == 0) { bandwidths_ = TT516_AM_widths; bw_vals_ = TT516_AM_bw_vals; return TT516_AM_widths; } bandwidths_ = TT516_widths; bw_vals_ = TT516_WIDTH_bw_vals; return TT516_widths; } int RIG_TT516::def_bandwidth(int m) { return TT516_def_bw[m]; } int RIG_TT516::adjust_bandwidth(int m) { bwtable(m); return def_bandwidth(m); } void RIG_TT516::set_modeA(int val) { A.imode = val; cmd = TT516setMODE; cmd[2] = TT516mode_chr[A.imode]; cmd[3] = TT516mode_chr[B.imode]; sendCommand(cmd); } int RIG_TT516::get_modeA() { cmd = TT516getMODE; int ret = waitN(6, 150, "get mode A", HEX); if (ret < 6) return A.imode; if (replystr[ret - 2] != 'G') return A.imode; size_t p = replystr.rfind("M"); if (p == string::npos) return A.imode; A.imode = replystr[p+1] - '0'; return A.imode; } void RIG_TT516::set_modeB(int val) { B.imode = val; cmd = TT516setMODE; cmd[2] = TT516mode_chr[A.imode]; cmd[3] = TT516mode_chr[B.imode]; sendCommand(cmd); } int RIG_TT516::get_modeB() { cmd = TT516getMODE; int ret = waitN(6, 150, "get mode B", HEX); if (ret < 6) return B.imode; if (replystr[ret - 2] != 'G') return B.imode; size_t p = replystr.rfind("M"); if (p == string::npos) return B.imode; B.imode = replystr[p+2] - '0'; return B.imode; } int RIG_TT516::get_bwA() { if (inuse == onA) { cmd = TT516getBW; int ret = waitN(5, 150, "get bw A", HEX); if (ret < 5) return A.iBW; if (replystr[ret - 2] != 'G') return A.iBW; size_t p = replystr.rfind("W"); if (p == string::npos) return A.iBW; A.iBW = (unsigned char)replystr[p+1]; } return A.iBW; } void RIG_TT516::set_bwA(int val) { A.iBW = val; if (inuse == onA) { cmd = TT516setBW; cmd[2] = val; sendCommand(cmd); } } int RIG_TT516::get_bwB() { if (inuse == onB) { cmd = TT516getBW; int ret = waitN(5, 150, "get bw B", HEX); if (ret < 5) return B.iBW; if (replystr[ret - 2] != 'G') return B.iBW; size_t p = replystr.rfind("W"); if (p == string::npos) return B.iBW; B.iBW = (unsigned char)replystr[p+1]; } return B.iBW; } void RIG_TT516::set_bwB(int val) { B.iBW = val; if (inuse == onB) { cmd = TT516setBW; cmd[2] = val; sendCommand(cmd); } } void RIG_TT516::set_if_shift(int val) { cmd = TT516setPBT; short int si = val; cmd[2] = (si & 0xff00) >> 8; cmd[3] = (si & 0xff); sendCommand(cmd); } bool RIG_TT516::get_if_shift(int &val) { val = 0; return false; } void RIG_TT516::get_if_min_max_step(int &min, int &max, int &step) { min = -2900; max = 2900; step = 100; } void RIG_TT516::set_attenuator(int val) { cmd = TT516setATT; if (val) cmd[2] = '1'; else cmd[2] = '0'; sendCommand(cmd); } int RIG_TT516::get_attenuator() { cmd = TT516getATT; int ret = sendCommand(cmd); if (ret < 5) return 0; size_t p = replystr.rfind("J"); if (p == string::npos) return 0; if (replystr[p+1] == '1') return 1; return 0; } void RIG_TT516::set_noise(bool b) { cmd = TT516setNB; if (b) cmd[2] = '4'; else cmd[2] = '0'; sendCommand(cmd); } int RIG_TT516::get_smeter() { double sig = 0.0; cmd = TT516getSMETER; int ret = sendCommand(cmd); if (ret < 6) return 0; size_t p = replystr.rfind("S"); if (p == string::npos) return 0; sig = (50.0 / 9.0) * ((unsigned char)replystr[p+1] + (unsigned char)replystr[p+2] / 256.0); return (int)sig; } int RIG_TT516::get_swr() { double swr = (fwdv + refv) / (fwdv - refv + .0001); swr -= 1.0; swr *= 25.0; if (swr < 0) swr = 0; if (swr > 100) swr = 100; return (int)swr; } int RIG_TT516::get_power_out() { fwdpwr = refpwr = fwdv = refv = 0; cmd = TT516getFWDPWR; int ret = sendCommand(cmd); if (ret < 5) return fwdpwr; size_t p = replystr.rfind("F"); if (p == string::npos) return fwdpwr; fwdv = 1.0 * (unsigned char)replystr[p+1]; cmd = TT516getREFPWR; ret = sendCommand(cmd); if (ret < 5) return fwdpwr; p = replystr.rfind("R"); if (p == string::npos) return fwdpwr; refv = 1.0 * (unsigned char)replystr[p+1]; fwdpwr = 30.0 * (fwdv * fwdv) / (256 * 256); refpwr = 30.0 * (refv * refv) / (256 * 256); return fwdpwr; } flrig-1.3.24/src/rigs/FT991.cxx0000644000175000017500000007632612646444222012704 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2015 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT991.h" #include "debug.h" #include "support.h" #define FL991_WAIT_TIME 200 enum mFT991 { mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mPKT_L, mRTTY_U, mPKT_FM, mFM_N, mPKT_U, mAM_N, mC4FM }; // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 // mode index static const char FT991name_[] = "FT-991"; static const char *FT991modes_[] = { "LSB", "USB", "CW-U", "FM", "AM", "RTTY-L", "CW-L", "DATA-L", "RTTY-U", "DATA-FM", "FM-N", "DATA-U", "AM-N", "C4FM", NULL}; static const char FT991_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E' }; static const char FT991_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'L', 'U', 'U', 'U', 'U', 'U', 'U' }; static const int FT991_def_bw[] = { 17, 17, 5, 0, 0, 10, 5, 16, 10, 0, 0, 16, 0, 0 }; // mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mPKT_L, mRTTY_U, mPKT_FM, mFM_N, mPKT_U, mAM_N, mC4FM static const char *FT991_widths_SSB[] = { "200", "400", "600", "850", "1100", "1350", "1500", "1650", "1800", "1950", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3200", NULL }; static int FT991_wvals_SSB[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, WVALS_LIMIT}; static const char *FT991_widths_SSBD[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "800", "1200", "1400", "1700", "2000", "2400", "3000", NULL }; static int FT991_wvals_SSBD[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, WVALS_LIMIT}; static const char *FT991_widths_CW[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "800", "1200", "1400", "1700", "2000", "2400", "3000", NULL }; static int FT991_wvals_CW[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, WVALS_LIMIT}; // Single bandwidth modes static const char *FT991_widths_AMFMnar[] = { "NARR", NULL }; static const char *FT991_widths_AMFMnorm[] = { "NORM", NULL }; static const int FT991_wvals_AMFM[] = { 0, WVALS_LIMIT }; // mPKT_FM Multi bandwidth mode static const char *FT991_widths_NN[] = {"NORM", "NARR", NULL }; static const int FT991_wvals_NN[] = {0, 1, WVALS_LIMIT}; // US 60M 5-USB, 5-CW static const char *US_60m_chan[] = {"000","125","126","127","128","130","141","142","143","144","146",NULL}; static const char *US_60m_label[] = {"VFO","U51","U52","U53","U54","U55","U56","U57","U58","U59","U50",NULL}; // UK 60m channel numbers by Brian, G8SEZ static const char *UK_60m_chan[] = {"000","118","120","121","127","128","129","130",NULL}; static const char *UK_60m_label[] = {"VFO","U51","U52","U53","U54","U55","U56","U57",NULL}; static const char **Channels_60m = US_60m_chan; static const char **label_60m = US_60m_label; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)btnNR, 2, 165, 50 }, { (Fl_Widget *)sldrNR, 54, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_FT991::RIG_FT991() { // base class values name_ = FT991name_; modes_ = FT991modes_; bandwidths_ = FT991_widths_SSB; bw_vals_ = FT991_wvals_SSB; widgets = rig_widgets; comm_baudrate = BR38400; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; A.imode = B.imode = modeB = modeA = def_mode = 1; A.iBW = B.iBW = bwA = bwB = def_bw = 12; A.freq = B.freq = freqA = freqB = def_freq = 14070000; has_compON = has_compression = has_a2b = has_ext_tuner = has_xcvr_auto_on_off = has_split = has_split_AB = has_band_selection = has_noise_reduction = has_noise_reduction_control = has_extras = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_vox_on_dataport = has_vfo_adj = has_cw_wpm = has_cw_keyer = // has_cw_vol = has_cw_spot = has_cw_spot_tone = has_cw_qsk = has_cw_weight = can_change_alt_vfo = has_smeter = has_alc_control = has_swr_control = has_power_out = has_power_control = has_volume_control = has_rf_control = has_micgain_control = has_mode_control = has_noise_control = has_bandwidth_control = has_notch_control = has_auto_notch = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = true; // derived specific atten_level = 3; preamp_level = 2; notch_on = false; m_60m_indx = 0; precision = 1; ndigits = 9; } void RIG_FT991::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; rig_widgets[9].W = btnNR; rig_widgets[10].W = sldrNR; // set progStatus defaults if (progStatus.notch_val < 10) progStatus.notch_val = 1500; if (progStatus.noise_reduction_val < 1) progStatus.noise_reduction_val = 1; if (progStatus.power_level < 5) progStatus.power_level = 5; // first-time-thru, or reset if (progStatus.cw_qsk < 15) { progStatus.cw_qsk = 15; progStatus.cw_spot_tone = 700; progStatus.cw_weight = 3.0; progStatus.cw_wpm = 18; progStatus.vox_on_dataport = false; progStatus.vox_gain = 50; progStatus.vox_anti = 50; progStatus.vox_hang = 500; } // Disable Auto Information mode sendCommand("AI0;"); // "MRnnn;" if valid, returns last channel used, "mrlll...;", along with channel nnn info. cmd = "MR118;"; wait_char(';', 27, FL991_WAIT_TIME, "Read UK 60m Channel Mem", ASC); size_t p = replystr.rfind("MR"); if (p == string::npos) { Channels_60m = US_60m_chan; label_60m = US_60m_label; opSelect60->clear(); char **p = (char **)US_60m_label; while (*p) opSelect60->add(*p++); } else { Channels_60m = UK_60m_chan; label_60m = UK_60m_label; opSelect60->clear(); char **p = (char **)UK_60m_label; while (*p) opSelect60->add(*p++); } opSelect60->index(m_60m_indx); } void RIG_FT991::post_initialize() { enable_bandselect_btn(12, false); enable_bandselect_btn(13, true); } long RIG_FT991::get_vfoA () { cmd = rsp = "FA"; cmd += ';'; wait_char(';',12, FL991_WAIT_TIME, "get vfo A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqA; p += 2; int f = 0; for (int n = 0; n < ndigits; n++) f = f * 10 + replystr[p + n] - '0'; freqA = f; return freqA; } void RIG_FT991::set_vfoA (long freq) { freqA = freq; cmd = "FA000000000;"; for (int i = 0; i < ndigits; i++) { cmd[ndigits + 1 - i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo A", cmd, replystr); } long RIG_FT991::get_vfoB () { cmd = rsp = "FB"; cmd += ';'; wait_char(';',12, FL991_WAIT_TIME, "get vfo B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqB; p += 2; int f = 0; for (int n = 0; n < ndigits; n++) f = f * 10 + replystr[p + n] - '0'; freqB = f; return freqB; } void RIG_FT991::set_vfoB (long freq) { freqB = freq; cmd = "FB000000000;"; for (int i = 0; i < ndigits; i++) { cmd[ndigits + 1 - i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo B", cmd, replystr); } void RIG_FT991::selectA() { cmd = "FT2;"; sendCommand(cmd); showresp(WARN, ASC, "select A", cmd, replystr); } void RIG_FT991::selectB() { cmd = "FT3;"; sendCommand(cmd); showresp(WARN, ASC, "select B", cmd, replystr); } void RIG_FT991::A2B() { cmd = "AB;"; sendCommand(cmd); showresp(WARN, ASC, "vfo A->B", cmd, replystr); } void RIG_FT991::B2A() { cmd = "BA;"; sendCommand(cmd); showresp(WARN, ASC, "vfo B->A", cmd, replystr); } void RIG_FT991::swapAB() { cmd = "SV;"; sendCommand(cmd); showresp(WARN, ASC, "vfo A<>B", cmd, replystr); } bool RIG_FT991::can_split() { return true; } void RIG_FT991::set_split(bool val) { split = val; if (useB) { if (val) { cmd = "FT2;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on A", cmd, replystr); } else { cmd = "FT3;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, replystr); } } else { if (val) { cmd = "FT3;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on B", cmd, replystr); } else { cmd = "FT2;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, replystr); } } Fl::awake(highlight_vfo, (void *)0); } int RIG_FT991::get_split() { size_t p; int split = 0; char rx, tx; // tx vfo cmd = rsp = "FT"; cmd.append(";"); wait_char(';',4, FL991_WAIT_TIME, "get split tx vfo", ASC); p = replystr.rfind(rsp); if (p == string::npos) return false; tx = replystr[p+2] - '0'; // rx vfo cmd = rsp = "FR"; cmd.append(";"); wait_char(';',4, FL991_WAIT_TIME, "get split rx vfo", ASC); p = replystr.rfind(rsp); if (p == string::npos) return false; rx = replystr[p+2] - '0'; split = (tx == 1 ? 2 : 0) + (rx >= 4 ? 1 : 0); return split; } int RIG_FT991::get_smeter() { cmd = rsp = "SM0"; cmd += ';'; wait_char(';',7, FL991_WAIT_TIME, "get smeter", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); mtr = mtr * 100.0 / 256.0; return mtr; } int RIG_FT991::get_swr() { cmd = rsp = "RM6"; cmd += ';'; wait_char(';',7, FL991_WAIT_TIME, "get swr", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return (int)ceil(mtr / 2.56); } int RIG_FT991::get_alc() { cmd = rsp = "RM4"; cmd += ';'; wait_char(';',7, FL991_WAIT_TIME, "get alc", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return (int)ceil(mtr / 2.56); } int RIG_FT991::get_power_out() { cmd = rsp = "RM5"; sendCommand(cmd.append(";")); wait_char(';',7, FL991_WAIT_TIME, "get pout", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; double mtr = (double)(atoi(&replystr[p+3])); // following conversion iaw data measured by Terry, KJ4EED mtr = (.06 * mtr) + (.002 * mtr * mtr); return (int)ceil(mtr); } // Transceiver power level int RIG_FT991::get_power_control() { cmd = rsp = "PC"; cmd += ';'; wait_char(';',6, FL991_WAIT_TIME, "get power", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.power_level; if (p + 5 >= replystr.length()) return progStatus.power_level; int mtr = atoi(&replystr[p+2]); return mtr; } void RIG_FT991::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET power", cmd, replystr); } // Volume control return 0 ... 100 int RIG_FT991::get_volume_control() { cmd = rsp = "AG0"; cmd += ';'; wait_char(';',7, FL991_WAIT_TIME, "get vol", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.volume; if (p + 6 >= replystr.length()) return progStatus.volume; int val = round(atoi(&replystr[p+3]) / 2.55); if (val > 100) val = 100; return ceil(val); } void RIG_FT991::set_volume_control(int val) { int ivol = (int)(val * 2.55); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vol", cmd, replystr); } // Tranceiver PTT on/off void RIG_FT991::set_PTT_control(int val) { cmd = val ? "TX1;" : "TX0;"; sendCommand(cmd); showresp(WARN, ASC, "SET PTT", cmd, replystr); } // internal or external tune mode void RIG_FT991::tune_rig() { cmd = "AC;"; wait_char(';',6, FL991_WAIT_TIME, "is Int. Tuner Enabled", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return; if ((p + 5) >= replystr.length()) return; if (replystr[p+4] == '0') { return; } cmd = "AC002;"; sendCommand(cmd); showresp(WARN, ASC, "tune rig", cmd, replystr); } void RIG_FT991::set_attenuator(int val) { if (atten_level == 0) { atten_level = 1; atten_label("6 dB", true); } else if (atten_level == 1) { atten_level = 2; atten_label("12 dB", true); } else if (atten_level == 2) { atten_level = 3; atten_label("18 dB", true); } else if (atten_level == 3) { atten_level = 0; atten_label("Att", false); } cmd = "RA00;"; cmd[3] += atten_level; sendCommand(cmd); showresp(WARN, ASC, "SET att", cmd, replystr); } int RIG_FT991::get_attenuator() { cmd = rsp = "RA0"; cmd += ';'; wait_char(';',5, FL991_WAIT_TIME, "get att", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.attenuator; if (p + 3 >= replystr.length()) return progStatus.attenuator; atten_level = replystr[p+3] - '0'; if (atten_level == 1) { atten_label("6 dB", true); } else if (atten_level == 2) { atten_label("12 dB", true); } else if (atten_level == 3) { atten_label("18 dB", true); } else { atten_level = 0; atten_label("Att", false); } return atten_level; } void RIG_FT991::set_preamp(int val) { cmd = "PA00;"; if (preamp_level == 0) { preamp_level = 1; preamp_label("Amp 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Amp 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("IPO", false); } cmd[3] = '0' + preamp_level; sendCommand (cmd); showresp(WARN, ASC, "SET preamp", cmd, replystr); } int RIG_FT991::get_preamp() { cmd = rsp = "PA0"; cmd += ';'; wait_char(';',5, FL991_WAIT_TIME, "get pre", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) preamp_level = replystr[p+3] - '0'; if (preamp_level == 1) { preamp_label("Amp 1", true); } else if (preamp_level == 2) { preamp_label("Amp 2", true); } else { preamp_label("IPO", false); preamp_level = 0; } return preamp_level; } int RIG_FT991::adjust_bandwidth(int val) { switch (val) { case mCW : case mCW_R : case mRTTY_L : case mRTTY_U : bandwidths_ = FT991_widths_CW; bw_vals_ = FT991_wvals_CW; break; case mFM : case mAM : bandwidths_ = FT991_widths_AMFMnorm; bw_vals_ = FT991_wvals_AMFM; break; case mFM_N : case mAM_N : bandwidths_ = FT991_widths_AMFMnar; bw_vals_ = FT991_wvals_AMFM; break; case mPKT_FM : bandwidths_ = FT991_widths_NN; bw_vals_ = FT991_wvals_NN; break; case mPKT_L : case mPKT_U : bandwidths_ = FT991_widths_SSBD; bw_vals_ = FT991_wvals_SSBD; break; default: bandwidths_ = FT991_widths_SSB; bw_vals_ = FT991_wvals_SSB; } return FT991_def_bw[val]; } int RIG_FT991::def_bandwidth(int val) { return FT991_def_bw[val]; } const char ** RIG_FT991::bwtable(int n) { switch (n) { case mPKT_FM : return FT991_widths_NN; case mFM : case mAM : return FT991_widths_AMFMnorm; case mFM_N : case mAM_N : return FT991_widths_AMFMnar; case mCW : case mCW_R : case mRTTY_L : case mRTTY_U : return FT991_widths_CW; case mPKT_L : case mPKT_U : return FT991_widths_SSBD; default : break; } return FT991_widths_SSB; } void RIG_FT991::set_modeA(int val) { modeA = val; cmd = "MD0"; cmd += FT991_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode A", cmd, replystr); adjust_bandwidth(modeA); if (val == mCW || val == mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FT991::get_modeA() { cmd = rsp = "MD0"; cmd += ';'; wait_char(';',5, FL991_WAIT_TIME, "get mode A", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'A'; modeA = md; } } adjust_bandwidth(modeA); return modeA; } void RIG_FT991::set_modeB(int val) { modeB = val; cmd = "MD0"; cmd += FT991_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode B", cmd, replystr); adjust_bandwidth(modeB); if (val == mCW || val == mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FT991::get_modeB() { cmd = rsp = "MD0"; cmd += ';'; wait_char(';',5, FL991_WAIT_TIME, "get mode B", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'A'; modeB = md; } } adjust_bandwidth(modeB); return modeB; } void RIG_FT991::set_bwA(int val) { int bw_indx = bw_vals_[val]; bwA = val; if (modeA == mFM || modeA == mAM || modeA == mFM_N || modeA == mAM_N) return; if (modeA == mPKT_FM) { if (val == 1) cmd = "NA01;"; else cmd = "NA00;"; sendCommand(cmd); showresp(WARN, ASC, "SET bw A", cmd, replystr); return; } if ((((modeA == mLSB || modeA == mUSB) && val < 8)) || ((modeA == mCW || modeA == mCW_R || modeA == mRTTY_L || modeA == mRTTY_U || modeA == mPKT_L || modeA == mPKT_U) && val < 4) ) cmd = "NA01;"; else cmd = "NA00;"; cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw A", cmd, replystr); } int RIG_FT991::get_bwA() { size_t p; if (modeA == mFM || modeA == mAM || modeA == mFM_N || modeA == mAM_N) { bwA = 0; return bwA; } if (modeA == mPKT_FM) { cmd = rsp = "NA0"; cmd += ';'; wait_char(';',5, FL991_WAIT_TIME, "get bw A narrow", ASC); p = replystr.rfind(rsp); if (p == string::npos) { bwA = 0; return bwA; } if (p + 4 >= replystr.length()) { bwA = 0; return bwA; } if (replystr[p+3] == '1') bwA = 1; // narrow on else bwA = 0; return bwA; } cmd = rsp = "SH0"; cmd += ';'; wait_char(';',6, FL991_WAIT_TIME, "get bw A", ASC); p = replystr.rfind(rsp); if (p == string::npos) return bwA; if (p + 5 >= replystr.length()) return bwA; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwA = i; return bwA; } void RIG_FT991::set_bwB(int val) { int bw_indx = bw_vals_[val]; bwB = val; if (modeB == mFM || modeB == mAM || modeB == mFM_N || modeB == mAM_N) return; if (modeB == mPKT_FM) { if (val == 1) cmd = "NA01;"; else cmd = "NA00;"; sendCommand(cmd); showresp(WARN, ASC, "SET bw B", cmd, replystr); return; } if ((((modeB == mLSB || modeB == mUSB) && val < 8)) || ((modeB == mCW || modeB == mCW_R || modeB == mRTTY_L || modeB == mRTTY_U || modeB == mPKT_L || modeB == mPKT_U) && val < 4) ) cmd = "NA01;"; else cmd = "NA00;"; cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw B", cmd, replystr); } int RIG_FT991::get_bwB() { size_t p; if (modeB == mFM || modeB == mAM || modeB == mFM_N || modeB == mAM_N) { bwB = 0; return bwB; } if (modeB == mPKT_FM) { cmd = rsp = "NA0"; cmd += ';'; wait_char(';',5, FL991_WAIT_TIME, "get bw B narrow", ASC); p = replystr.rfind(rsp); if (p == string::npos) { bwB = 0; return bwB; } if (p + 4 >= replystr.length()) { bwB = 0; return bwB; } if (replystr[p+3] == '1') bwB = 1; // narrow on else bwB = 0; return bwB; } cmd = rsp = "SH0"; cmd += ';'; wait_char(';',6, FL991_WAIT_TIME, "get bw B", ASC); p = replystr.rfind(rsp); if (p == string::npos) return bwB; if (p + 5 >= replystr.length()) return bwB; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwB = i; return bwB; } int RIG_FT991::get_modetype(int n) { return FT991_mode_type[n]; } void RIG_FT991::set_if_shift(int val) { cmd = "IS0+0000;"; if (val < 0) cmd[3] = '-'; val = abs(val); for (int i = 4; i > 0; i--) { cmd[3+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET if shift", cmd, replystr); } bool RIG_FT991::get_if_shift(int &val) { cmd = rsp = "IS0"; cmd += ';'; wait_char(';',9, FL991_WAIT_TIME, "get if shift", ASC); size_t p = replystr.rfind(rsp); val = progStatus.shift_val; if (p == string::npos) return progStatus.shift; val = atoi(&replystr[p+4]); if (replystr[p+3] == '-') val = -val; return (val != 0); } void RIG_FT991::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = -1000; if_shift_max = max = 1000; if_shift_step = step = 20; if_shift_mid = 0; } void RIG_FT991::set_notch(bool on, int val) { // set notch frequency if (on) { cmd = "BP00001;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch on", cmd, replystr); cmd = "BP01000;"; if (val % 10 >= 5) val += 10; val /= 10; for (int i = 3; i > 0; i--) { cmd[3 + i] += val % 10; val /=10; } sendCommand(cmd); showresp(WARN, ASC, "SET notch val", cmd, replystr); return; } // set notch off cmd = "BP00000;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch off", cmd, replystr); } bool RIG_FT991::get_notch(int &val) { bool ison = false; cmd = rsp = "BP00"; cmd += ';'; wait_char(';',8, FL991_WAIT_TIME, "get notch on/off", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return ison; if (replystr[p+6] == '1') { // manual notch enabled ison = true; val = progStatus.notch_val; cmd = rsp = "BP01"; cmd += ';'; wait_char(';',8, FL991_WAIT_TIME, "get notch val", ASC); p = replystr.rfind(rsp); if (p == string::npos) val = 10; else val = fm_decimal(&replystr[p+4],3) * 10; } return ison; } void RIG_FT991::get_notch_min_max_step(int &min, int &max, int &step) { min = 10; max = 3000; step = 10; } void RIG_FT991::set_auto_notch(int v) { cmd.assign("BC0").append(v ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET DNF Auto Notch Filter", cmd, replystr); } int RIG_FT991::get_auto_notch() { cmd = "BC0;"; wait_char(';',5, FL991_WAIT_TIME, "get auto notch", ASC); size_t p = replystr.rfind("BC0"); if (p == string::npos) return 0; if (replystr[p+3] == '1') return 1; return 0; } int FT991_blanker_level = 2; void RIG_FT991::set_noise(bool b) { cmd = "NB00;"; if (FT991_blanker_level == 0) { FT991_blanker_level = 1; nb_label("NB 1", true); } else if (FT991_blanker_level == 1) { FT991_blanker_level = 2; nb_label("NB 2", true); } else if (FT991_blanker_level == 2) { FT991_blanker_level = 0; nb_label("NB", false); } cmd[3] = '0' + FT991_blanker_level; sendCommand (cmd); showresp(WARN, ASC, "SET NB", cmd, replystr); } int RIG_FT991::get_noise() { cmd = rsp = "NB0"; cmd += ';'; wait_char(';',5, FL991_WAIT_TIME, "get NB", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return FT991_blanker_level; FT991_blanker_level = replystr[p+3] - '0'; if (FT991_blanker_level == 1) { nb_label("NB 1", true); } else if (FT991_blanker_level == 2) { nb_label("NB 2", true); } else { nb_label("NB", false); FT991_blanker_level = 0; } return FT991_blanker_level; } // val 0 .. 100 void RIG_FT991::set_mic_gain(int val) { cmd = "MG000;"; val = (int)(val * 2.50); for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET mic", cmd, replystr); } int RIG_FT991::get_mic_gain() { cmd = rsp = "MG"; cmd += ';'; wait_char(';',6, FL991_WAIT_TIME, "get mic", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.mic_gain; int val = atoi(&replystr[p+2]); val = (int)(val / 2.50); if (val > 100) val = 100; return ceil(val); } void RIG_FT991::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FT991::set_rf_gain(int val) { cmd = "RG0000;"; int rfval = (int)(val * 2.50); for (int i = 5; i > 2; i--) { cmd[i] = rfval % 10 + '0'; rfval /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET rfgain", cmd, replystr); } int RIG_FT991::get_rf_gain() { int rfval = 0; cmd = rsp = "RG0"; cmd += ';'; wait_char(';',7, FL991_WAIT_TIME, "get rfgain", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.rfgain; for (int i = 3; i < 6; i++) { rfval *= 10; rfval += replystr[p+i] - '0'; } rfval = (int)(rfval / 2.50); if (rfval > 100) rfval = 100; return ceil(rfval); } void RIG_FT991::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FT991::set_vox_onoff() { cmd = "VX0;"; if (progStatus.vox_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox", cmd, replystr); } void RIG_FT991::set_vox_gain() { cmd = "VG"; cmd.append(to_decimal(progStatus.vox_gain, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox gain", cmd, replystr); } void RIG_FT991::set_vox_anti() { cmd = "EX117"; cmd.append(to_decimal(progStatus.vox_anti, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET anti-vox", cmd, replystr); } void RIG_FT991::set_vox_hang() { cmd = "VD"; cmd.append(to_decimal(progStatus.vox_hang, 4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox delay", cmd, replystr); } void RIG_FT991::set_vox_on_dataport() { cmd = "EX1140;"; if (progStatus.vox_on_dataport) cmd[5] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox on data port", cmd, replystr); } void RIG_FT991::set_cw_wpm() { cmd = "KS"; if (progStatus.cw_wpm > 60) progStatus.cw_wpm = 60; if (progStatus.cw_wpm < 4) progStatus.cw_wpm = 4; cmd.append(to_decimal(progStatus.cw_wpm, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw wpm", cmd, replystr); } void RIG_FT991::enable_keyer() { cmd = "KR0;"; if (progStatus.enable_keyer) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET keyer on/off", cmd, replystr); } bool RIG_FT991::set_cw_spot() { if (vfo.imode == mCW || vfo.imode == mCW_R) { cmd = "CS0;"; if (progStatus.spot_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET spot on/off", cmd, replystr); return true; } else return false; } void RIG_FT991::set_cw_weight() { int n = round(progStatus.cw_weight * 10); cmd.assign("EX014").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw weight", cmd, replystr); } void RIG_FT991::set_cw_qsk() { int n = progStatus.cw_qsk / 5 - 3; cmd.assign("EX056").append(to_decimal(n, 1)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw qsk", cmd, replystr); } void RIG_FT991::set_cw_spot_tone() { int n = (progStatus.cw_spot_tone - 300) / 50; cmd.assign("EX059").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw tone", cmd, replystr); } /* void RIG_FT991::set_cw_vol() { } */ /* void RIG_FT991::set_band_selection(int v) { int chan_mem_on = false; cmd = "IF;"; wait_char(';',28, FL991_WAIT_TIME, "get vfo mode in set_band_selection", ASC); size_t p = replystr.rfind("IF"); if (p == string::npos) return; if ((p + 27) >= replystr.length()) return; if (replystr[p+21] != '0') { // vfo 60M memory mode chan_mem_on = true; } if (v == 13) { m_60m_indx = opSelect60->index(); if (m_60m_indx) cmd.assign("MC").append(Channels_60m[m_60m_indx]).append(";"); else if (chan_mem_on) cmd = "VM;"; } else { // v == 1..11 band selection OR return to vfo mode == 0 if (chan_mem_on) { cmd = "VM;"; opSelect60->index(m_60m_indx = 0); } else { if (v < 3) v = v - 1; cmd.assign("BS").append(to_decimal(v, 2)).append(";"); } } sendCommand(cmd); showresp(WARN, ASC, "Select Band Stacks", cmd, replystr); } */ // DNR void RIG_FT991::set_noise_reduction_val(int val) { cmd.assign("RL0").append(to_decimal(val, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET_noise_reduction_val", cmd, replystr); } int RIG_FT991::get_noise_reduction_val() { int val = 1; cmd = rsp = "RL0"; cmd.append(";"); wait_char(';',6, FL991_WAIT_TIME, "GET noise reduction val", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return val; val = atoi(&replystr[p+3]); return val; } // DNR void RIG_FT991::set_noise_reduction(int val) { cmd.assign("NR0").append(val ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET noise reduction", cmd, replystr); } int RIG_FT991::get_noise_reduction() { int val; cmd = rsp = "NR0"; cmd.append(";"); wait_char(';',5, FL991_WAIT_TIME, "GET noise reduction", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; val = replystr[p+3] - '0'; return val; } void RIG_FT991::set_xcvr_auto_on() { if (!progStatus.xcvr_auto_on) return; cmd = rsp = "PS"; cmd.append(";"); wait_char(';',4, FL991_WAIT_TIME, "Test: Is Rig ON", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) { // rig is off, power on cmd = "PS1;"; sendCommand(cmd); MilliSleep(1500); // 1.0 < T < 2.0 seconds sendCommand(cmd); MilliSleep(3000); // Wait for rig startup? Maybe not needed. } } void RIG_FT991::set_xcvr_auto_off() { if (!progStatus.xcvr_auto_off) return; cmd = "PS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET xcvr auto on/off", cmd, replystr); } void RIG_FT991::set_compression() { if (progStatus.compON) { if (progStatus.compression == 0) { cmd.assign("PR2;"); // mic eq on sendCommand(cmd); showresp(WARN, ASC, "set Comp EQ on", cmd, replystr); } else { cmd.assign("PR1;PL").append(to_decimal(progStatus.compression, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set Comp on", cmd, replystr); } } else{ cmd.assign("PR0;"); sendCommand(cmd); showresp(WARN, ASC, "set Comp off", cmd, replystr); } } void RIG_FT991::setVfoAdj(double v) { char cmdstr[20]; int iv = fabs(v); snprintf(cmdstr, sizeof(cmdstr), "%02d", iv); cmd = "EX039"; if (v < 0) cmd += '-'; else cmd += '+'; cmd.append(cmdstr); cmd.append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vfo adjust", cmd, replystr); } double RIG_FT991::getVfoAdj() { cmd = rsp = "EX039"; sendCommand(cmd.append(";")); wait_char(';',9, FL991_WAIT_TIME, "get Vfo Adjust", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; return (double)(atoi(&replystr[p+5])); } void RIG_FT991::get_vfoadj_min_max_step(int &min, int &max, int &step) { min = -25; max = 25; step = 1; } flrig-1.3.24/src/rigs/FTdx3000.cxx0000644000175000017500000006256212646444222013275 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FTdx3000.h" #include "debug.h" #include "support.h" enum mFTdx3000 { mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mPKT_L, mRTTY_U, mPKT_FM, mFM_N, mPKT_U, mAM_N }; // mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mPKT_L, mRTTY_U, mPKT_FM, mFM_N, mPKT_U, mAM_N // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 // mode index // 19, 19, 9, 0, 0, 10, 9, 15, 10, 0, 0, 15, 0 // FTdx3000_def_bw static const char FTdx3000name_[] = "FTdx3000"; static const char *FTdx3000modes_[] = { "LSB", "USB", "CW", "FM", "AM", "RTTY-L", "CW-R", "PSK-L", "RTTY-U", "PKT-FM", "FM-N", "PSK-U", "AM-N", NULL}; static const int FTdx3000_def_bw[] = { 20, 20, 9, 0, 0, 10, 9, 15, 10, 0, 0, 15, 0 }; static const char FTdx3000_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D' }; static const char FTdx3000_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'L', 'U', 'U', 'U', 'U', 'U' }; static const char *FTdx3000_widths_SSB[] = { "200", "400", "600", "850", "1100", "1350", "1500", "1650", "1800", "1950", "2100", "2250", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3200", "3400", "3600", "3800", "4000", NULL }; static int FTdx3000_wvals_SSB[] = { 1,2,3,4,5,6,7, 8,9,10,11,12,13, 15,16,17,18,19,20, 21,22,23,24,25, WVALS_LIMIT}; static const char *FTdx3000_widths_CW[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "800", "1200", "1400", "1700", "2000", "2400", NULL }; static int FTdx3000_wvals_CW[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, WVALS_LIMIT }; static const char *FTdx3000_widths_RTTY[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "800", "1200", "1400", "1700", "2000", "2400", NULL }; static int FTdx3000_wvals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, WVALS_LIMIT }; static const char *FTdx3000_widths_PSK[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "800", "1200", "1400", "1700", "2000", "2400", NULL }; static int FTdx3000_wvals_PSK[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, WVALS_LIMIT }; static const int FTdx3000_wvals_AMFM[] = { 0, WVALS_LIMIT }; static const char *FTdx3000_widths_AMwide[] = { "AM-bw", NULL }; static const char *FTdx3000_widths_AMnar[] = { "AM-nar", NULL }; static const char *FTdx3000_widths_FMnar[] = { "FM-nar", NULL }; static const char *FTdx3000_widths_FMwide[] = { "FM-wid", NULL }; static const char *FTdx3000_widths_FMpkt[] = { "FM-pkt", NULL }; static const char *FTdx3000_US_60m[] = {NULL, "126", "127", "128", "130", NULL}; // US has 5 60M presets. Using dummy numbers for all. // First NULL means skip 60m sets in set_band_selection(). // Maybe someone can do a cat command MC; on all 5 presets and add returned numbers above. // To send cat commands in flrig goto menu Config->Xcvr select->Send Cmd. // // UK has 7 60M presets. Using dummy numbers for all. If you want support, // Maybe someone can do a cat command MC; on all 7 presets and add returned numbers below. // static const char *FTdx3000_UK_60m[] = {NULL, "126", "127", "128", "130", "131", "132", NULL}; static const char **Channels_60m = FTdx3000_US_60m; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 54, 165, 368 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; void RIG_FTdx3000::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; cmd = "AI0;"; sendCommand(cmd); showresp(WARN, ASC, "Auto Info OFF", cmd, replystr); } RIG_FTdx3000::RIG_FTdx3000() { // base class values name_ = FTdx3000name_; modes_ = FTdx3000modes_; bandwidths_ = FTdx3000_widths_SSB; bw_vals_ = FTdx3000_wvals_SSB; widgets = rig_widgets; comm_baudrate = BR38400; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; A.imode = B.imode = modeB = modeA = def_mode = 1; A.iBW = B.iBW = bwA = bwB = def_bw = 19; A.freq = B.freq = freqA = freqB = def_freq = 14070000; notch_on = false; has_band_selection = has_extras = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_vox_on_dataport = has_cw_wpm = has_cw_keyer = // has_cw_vol = has_cw_spot = // has_cw_spot_tone = // does not exist??? has_cw_qsk = has_cw_weight = has_split_AB = can_change_alt_vfo = has_smeter = has_swr_control = has_power_out = has_power_control = has_volume_control = has_rf_control = has_micgain_control = has_mode_control = has_noise_control = has_bandwidth_control = has_notch_control = has_auto_notch = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = true; // derived specific atten_level = 0; preamp_level = 0; notch_on = false; m_60m_indx = 0; precision = 1; ndigits = 8; } void RIG_FTdx3000::set_band_selection(int v) { int inc_60m = false; cmd = "IF;"; waitN(27, 100, "get vfo mode in set_band_selection", ASC); size_t p = replystr.rfind("IF"); if (p == string::npos) return; if (replystr[p+21] != '0') { // vfo 60M memory mode inc_60m = true; } if (v == 12) { // 5MHz 60m presets if (Channels_60m[0] == NULL) return; // no 60m Channels so skip if (inc_60m) { if (Channels_60m[++m_60m_indx] == NULL) m_60m_indx = 0; } cmd.assign("MC").append(Channels_60m[m_60m_indx]).append(";"); } else { // v == 1..11 band selection OR return to vfo mode == 0 if (inc_60m) cmd = "VM;"; else { if (v < 3) v = v - 1; cmd.assign("BS").append(to_decimal(v, 2)).append(";"); } } sendCommand(cmd); showresp(WARN, ASC, "Select Band Stacks", cmd, replystr); } long RIG_FTdx3000::get_vfoA () { cmd = rsp = "FA"; cmd += ';'; waitN(11, 100, "get vfo A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqA; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqA = f; return freqA; } void RIG_FTdx3000::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo A", cmd, replystr); } long RIG_FTdx3000::get_vfoB () { cmd = rsp = "FB"; cmd += ';'; waitN(11, 100, "get vfo B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqB; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqB = f; return freqB; } void RIG_FTdx3000::set_vfoB (long freq) { freqB = freq; cmd = "FB00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo B", cmd, replystr); } bool RIG_FTdx3000::twovfos() { return true; } void RIG_FTdx3000::selectA() { cmd = "FR0;FT2;"; sendCommand(cmd); showresp(WARN, ASC, "select A", cmd, replystr); } void RIG_FTdx3000::selectB() { cmd = "FR4;FT3;"; sendCommand(cmd); showresp(WARN, ASC, "select B", cmd, replystr); } void RIG_FTdx3000::A2B() { cmd = "AB;"; sendCommand(cmd); showresp(WARN, ASC, "vfo A --> B", cmd, replystr); } bool RIG_FTdx3000::can_split() { return true; } void RIG_FTdx3000::set_split(bool val) { split = val; if (val) { useB = false; cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A", cmd, replystr); cmd = "FT3;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on B", cmd, replystr); } else { cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A", cmd, replystr); cmd = "FT2;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on A", cmd, replystr); } Fl::awake(highlight_vfo, (void *)0); } int RIG_FTdx3000::get_split() { return split; } int RIG_FTdx3000::get_smeter() { cmd = rsp = "SM0"; cmd += ';'; waitN(7, 100, "get smeter", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); mtr = mtr * 100.0 / 256.0; return mtr; } int RIG_FTdx3000::get_swr() { cmd = rsp = "RM6"; cmd += ';'; waitN(7, 100, "get swr", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return mtr / 2.56; } int RIG_FTdx3000::get_power_out() { cmd = rsp = "RM5"; sendCommand(cmd.append(";")); waitN(7, 100, "get pout", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; double mtr = (double)(atoi(&replystr[p+3])); // mtr = -6.6263535 + .11813178 * mtr + .0013607405 * mtr * mtr; mtr = 0.116 * mtr + 0.0011 * mtr * mtr; return (int)mtr; } // Transceiver power level int RIG_FTdx3000::get_power_control() { cmd = rsp = "PC"; cmd += ';'; waitN(6, 100, "get power", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.power_level; if (p + 5 >= replystr.length()) return progStatus.power_level; int mtr = atoi(&replystr[p+2]); return mtr; } void RIG_FTdx3000::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET power", cmd, replystr); } // Volume control return 0 ... 100 int RIG_FTdx3000::get_volume_control() { cmd = rsp = "AG0"; cmd += ';'; waitN(7, 100, "get vol", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.volume; if (p + 6 >= replystr.length()) return progStatus.volume; int val = atoi(&replystr[p+3]) * 100 / 250; if (val > 100) val = 100; return val; } void RIG_FTdx3000::set_volume_control(int val) { int ivol = (int)(val * 250 / 100); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vol", cmd, replystr); } // Tranceiver PTT on/off void RIG_FTdx3000::set_PTT_control(int val) { cmd = val ? "TX1;" : "TX0;"; sendCommand(cmd); showresp(WARN, ASC, "SET PTT", cmd, replystr); } void RIG_FTdx3000::tune_rig() { cmd = "AC002;"; sendCommand(cmd); showresp(WARN, ASC, "tune rig", cmd, replystr); } void RIG_FTdx3000::set_attenuator(int val) { if (atten_level == 0) { atten_level = 1; atten_label("6 dB", true); } else if (atten_level == 1) { atten_level = 2; atten_label("12 dB", true); } else if (atten_level == 2) { atten_level = 3; atten_label("18 dB", true); } else if (atten_level == 3) { atten_level = 0; atten_label("Att", false); } cmd = "RA00;"; cmd[3] += atten_level; sendCommand(cmd); showresp(WARN, ASC, "SET att", cmd, replystr); } int RIG_FTdx3000::get_attenuator() { cmd = rsp = "RA0"; cmd += ';'; waitN(5, 100, "get att", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.attenuator; if (p + 3 >= replystr.length()) return progStatus.attenuator; atten_level = replystr[p+3] - '0'; if (atten_level == 1) { atten_label("6 dB", true); } else if (atten_level == 2) { atten_label("12 dB", true); } else if (atten_level == 3) { atten_label("18 dB", true); } else { atten_level = 0; atten_label("Att", false); } return atten_level; } void RIG_FTdx3000::set_preamp(int val) { cmd = "PA00;"; if (preamp_level == 0) { preamp_level = 1; preamp_label("Amp 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Amp 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("IPO", false); } cmd[3] = '0' + preamp_level; sendCommand (cmd); showresp(WARN, ASC, "SET preamp", cmd, replystr); } int RIG_FTdx3000::get_preamp() { cmd = rsp = "PA0"; cmd += ';'; waitN(5, 100, "get pre", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) preamp_level = replystr[p+3] - '0'; if (preamp_level == 1) { preamp_label("Amp 1", true); } else if (preamp_level == 2) { preamp_label("Amp 2", true); } else { preamp_label("IPO", false); preamp_level = 0; } return preamp_level; } int RIG_FTdx3000::adjust_bandwidth(int val) { int bw = 0; if (val == mCW || val == mCW_R) { bandwidths_ = FTdx3000_widths_CW; bw_vals_ = FTdx3000_wvals_CW; } else if (val == mFM || val == mAM || val == mFM_N || val == mPKT_FM || val == mAM_N) { if (val == mFM) bandwidths_ = FTdx3000_widths_FMwide; else if (val == mAM) bandwidths_ = FTdx3000_widths_AMwide; else if (val == mAM_N) bandwidths_ = FTdx3000_widths_AMnar; else if (val == mFM_N) bandwidths_ = FTdx3000_widths_FMnar; else if (val == mPKT_FM) bandwidths_ = FTdx3000_widths_FMpkt; bw_vals_ = FTdx3000_wvals_AMFM; } else if (val == mRTTY_L || val == mRTTY_U) { // RTTY bandwidths_ = FTdx3000_widths_RTTY; bw_vals_ = FTdx3000_wvals_RTTY; } else if (val == mPKT_L || val == mPKT_U) { // PSK bandwidths_ = FTdx3000_widths_PSK; bw_vals_ = FTdx3000_wvals_PSK; } else { bandwidths_ = FTdx3000_widths_SSB; bw_vals_ = FTdx3000_wvals_SSB; } bw = FTdx3000_def_bw[val]; return bw; } int RIG_FTdx3000::def_bandwidth(int val) { return FTdx3000_def_bw[val]; } const char ** RIG_FTdx3000::bwtable(int n) { switch (n) { case mCW: case mCW_R: return FTdx3000_widths_CW; case mFM: return FTdx3000_widths_FMwide; case mAM: return FTdx3000_widths_AMwide; case mAM_N : return FTdx3000_widths_AMnar; case mRTTY_L: case mRTTY_U: return FTdx3000_widths_RTTY; case mPKT_L: case mPKT_U: return FTdx3000_widths_PSK; case mFM_N: return FTdx3000_widths_FMnar; case mPKT_FM: return FTdx3000_widths_FMpkt; default: ; } return FTdx3000_widths_SSB; } void RIG_FTdx3000::set_modeA(int val) { modeA = val; cmd = "MD0"; cmd += FTdx3000_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode A", cmd, replystr); adjust_bandwidth(modeA); if (val == mCW || val == mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FTdx3000::get_modeA() { cmd = rsp = "MD0"; cmd += ';'; waitN(5, 100, "get mode A", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'A'; modeA = md; } } adjust_bandwidth(modeA); return modeA; } void RIG_FTdx3000::set_modeB(int val) { modeB = val; cmd = "MD0"; cmd += FTdx3000_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode B", cmd, replystr); adjust_bandwidth(modeA); if (val == mCW || val == mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FTdx3000::get_modeB() { cmd = rsp = "MD0"; cmd += ';'; waitN(5, 100, "get mode B", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'A'; modeB = md; } } adjust_bandwidth(modeB); return modeB; } void RIG_FTdx3000::set_bwA(int val) { int bw_indx = bw_vals_[val]; bwA = val; if (modeA == mFM || modeA == mAM || modeA == mFM_N || modeA == mPKT_FM ) { return; } if ((((modeA == mLSB || modeA == mUSB) && val < 8)) || ((modeA == mCW || modeA == mCW_R) && val < 11) || ((modeA == mRTTY_L || modeA == mRTTY_U) && val < 11) || ((modeA == mPKT_L || modeA == mPKT_U) && val < 11)) cmd = "NA01;"; else cmd = "NA00;"; cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw A", cmd, replystr); } int RIG_FTdx3000::get_bwA() { if (modeA == mFM || modeA == mAM || modeA == mFM_N || modeA == mPKT_FM) { bwA = 0; return bwA; } cmd = rsp = "SH0"; cmd += ';'; waitN(6, 100, "get bw A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return bwA; if (p + 5 >= replystr.length()) return bwA; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwA = i; return bwA; } void RIG_FTdx3000::set_bwB(int val) { int bw_indx = bw_vals_[val]; bwB = val; if (modeB == mFM || modeB == mAM || modeB == mFM_N || modeB == mPKT_FM) { return; } if ((((modeB == mLSB || modeB == mUSB) && val < 8)) || ((modeB == mCW || modeB == mCW_R) && val < 11) || ((modeB == mRTTY_L || modeB == mRTTY_U) && val < 11) || ((modeB == mPKT_L || modeB == mPKT_U) && val < 11)) cmd = "NA01;"; else cmd = "NA00;"; cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw B", cmd, replystr); } int RIG_FTdx3000::get_bwB() { if (modeB == mFM || modeB == mAM || modeB == mFM_N || modeB == mPKT_FM) { bwB = 0; return bwB; } cmd = rsp = "SH0"; cmd += ';'; waitN(6, 100, "get bw B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return bwB; if (p + 5 >= replystr.length()) return bwB; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwB = i; return bwB; } int RIG_FTdx3000::get_modetype(int n) { return FTdx3000_mode_type[n]; } void RIG_FTdx3000::set_if_shift(int val) { cmd = "IS0+0000;"; if (val != 0) progStatus.shift = true; else progStatus.shift = false; if (val < 0) cmd[3] = '-'; val = abs(val); for (int i = 4; i > 0; i--) { cmd[3+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET if shift", cmd, replystr); } bool RIG_FTdx3000::get_if_shift(int &val) { cmd = rsp = "IS0"; cmd += ';'; waitN(9, 100, "get if shift", ASC); size_t p = replystr.rfind(rsp); val = progStatus.shift_val; if (p == string::npos) return progStatus.shift; val = atoi(&replystr[p+4]); if (replystr[p+3] == '-') val = -val; return (val != 0); } void RIG_FTdx3000::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = -1000; if_shift_max = max = 1000; if_shift_step = step = 50; if_shift_mid = 0; } void RIG_FTdx3000::set_notch(bool on, int val) { if (on && !notch_on) { notch_on = true; cmd = "BP00001;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch on", cmd, replystr); } else if (!on && notch_on) { notch_on = false; cmd = "BP00000;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch off", cmd, replystr); return; } cmd = "BP01"; val /= 10; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET notch val", cmd, replystr); } bool RIG_FTdx3000::get_notch(int &val) { bool ison = false; cmd = rsp = "BP00"; cmd += ';'; waitN(8, 100, "get notch on/off", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return ison; if (replystr[p+6] == '1') // manual notch enabled ison = true; val = progStatus.notch_val; cmd = rsp = "BP01"; cmd += ';'; waitN(8, 100, "get notch val", ASC); p = replystr.rfind(rsp); if (p == string::npos) val = 10; else val = fm_decimal(&replystr[p+4],3) * 10; return (notch_on = ison); } void RIG_FTdx3000::get_notch_min_max_step(int &min, int &max, int &step) { min = 10; max = 3000; step = 10; } void RIG_FTdx3000::set_auto_notch(int v) { cmd = "BC00;"; if (v) cmd[3] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET auto notch", cmd, replystr); } int RIG_FTdx3000::get_auto_notch() { cmd = "BC0;"; waitN(5, 100, "get auto notch", ASC); size_t p = replystr.rfind("BC0"); if (p == string::npos) return 0; if (replystr[p+3] == '1') return 1; return 0; } int FTdx3000_blanker_level = 0; void RIG_FTdx3000::set_noise(bool b) { cmd = "NB00;"; if (FTdx3000_blanker_level == 0) { FTdx3000_blanker_level = 1; nb_label("NB 1", true); } else if (FTdx3000_blanker_level == 1) { FTdx3000_blanker_level = 2; nb_label("NB 2", true); } else if (FTdx3000_blanker_level == 2) { FTdx3000_blanker_level = 0; nb_label("NB", false); } cmd[3] = '0' + FTdx3000_blanker_level; sendCommand (cmd); showresp(WARN, ASC, "SET NB", cmd, replystr); } int RIG_FTdx3000::get_noise() { cmd = rsp = "NB0"; cmd += ';'; waitN(5, 100, "get NB", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return FTdx3000_blanker_level; FTdx3000_blanker_level = replystr[p+3] - '0'; if (FTdx3000_blanker_level == 1) { nb_label("NB 1", true); } else if (FTdx3000_blanker_level == 2) { nb_label("NB 2", true); } else { nb_label("NB", false); FTdx3000_blanker_level = 0; } return FTdx3000_blanker_level; } // val 0 .. 100 void RIG_FTdx3000::set_mic_gain(int val) { cmd = "MG000;"; val = (int)(val * 255 / 100); // convert to 0 .. 255 for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET mic", cmd, replystr); } int RIG_FTdx3000::get_mic_gain() { cmd = rsp = "MG"; cmd += ';'; waitN(6, 100, "get mic", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.mic_gain; int val = atoi(&replystr[p+2]); return val * 100 / 255; } void RIG_FTdx3000::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FTdx3000::set_rf_gain(int val) { cmd = "RG0000;"; int rfval = val * 250 / 100; for (int i = 5; i > 2; i--) { cmd[i] = rfval % 10 + '0'; rfval /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET rfgain", cmd, replystr); } int RIG_FTdx3000::get_rf_gain() { int rfval = 0; cmd = rsp = "RG0"; cmd += ';'; waitN(7, 100, "get rfgain", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.rfgain; for (int i = 3; i < 6; i++) { rfval *= 10; rfval += replystr[p+i] - '0'; } rfval = rfval * 100 / 250; if (rfval > 100) rfval = 100; return rfval; } void RIG_FTdx3000::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FTdx3000::set_vox_onoff() { cmd = "VX0;"; if (progStatus.vox_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox", cmd, replystr); } void RIG_FTdx3000::set_vox_gain() { cmd = "VG"; cmd.append(to_decimal(progStatus.vox_gain, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox gain", cmd, replystr); } void RIG_FTdx3000::set_vox_anti() { cmd = "EX175"; cmd.append(to_decimal(progStatus.vox_anti, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET anti-vox", cmd, replystr); } void RIG_FTdx3000::set_vox_hang() { cmd = "VD"; cmd.append(to_decimal(progStatus.vox_hang, 4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox delay", cmd, replystr); } void RIG_FTdx3000::set_vox_on_dataport() { cmd = "EX1140;"; if (progStatus.vox_on_dataport) cmd[5] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox on data port", cmd, replystr); } void RIG_FTdx3000::set_cw_wpm() { cmd = "KS"; if (progStatus.cw_wpm > 60) progStatus.cw_wpm = 60; if (progStatus.cw_wpm < 4) progStatus.cw_wpm = 4; cmd.append(to_decimal(progStatus.cw_wpm, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw wpm", cmd, replystr); } void RIG_FTdx3000::enable_keyer() { cmd = "KR0;"; if (progStatus.enable_keyer) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET keyer on/off", cmd, replystr); } bool RIG_FTdx3000::set_cw_spot() { if (vfo.imode == 2 || vfo.imode == 6) { cmd = "CS0;"; if (progStatus.spot_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET spot on/off", cmd, replystr); return true; } else return false; } void RIG_FTdx3000::set_cw_weight() { int n = round(progStatus.cw_weight * 10); cmd.assign("EX065").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw weight", cmd, replystr); } void RIG_FTdx3000::set_cw_qsk() { int n = progStatus.cw_qsk / 5 - 3; cmd.assign("EX068").append(to_decimal(n, 1)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw qsk", cmd, replystr); } /* void RIG_FTdx3000::set_cw_spot_tone() { int n = (progStatus.cw_spot_tone - 300) / 50; cmd = "EX045"; cmd.append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw tone", cmd, replystr); } void RIG_FTdx3000::set_cw_vol() { } */ flrig-1.3.24/src/rigs/FT890.cxx0000644000175000017500000001267412562731647012705 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT890.h" const char FT890name_[] = "FT-890"; const char *FT890modes_[] = { "LSB", "USB", "CW", "CW-N", "AM", "AM-N", "FM", NULL}; static const int FT890_mode_val[] = { 0, 1, 2, 3, 4, 5, 6 }; static const char FT890_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'U', 'U' }; static const char *FT890widths_[] = { "wide", "narr", NULL}; static const int FT890_bw_val[] = { 0, 1 }; RIG_FT890::RIG_FT890() { name_ = FT890name_; modes_ = FT890modes_; bandwidths_ = FT890widths_; bw_vals_ = FT890_bw_val; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; afreq = bfreq = A.freq = B.freq = 14070000; amode = bmode = A.imode = B.imode = 1; aBW = bBW = A.iBW = B.iBW = 0; precision = 10; has_smeter = has_power_out = has_get_info = has_ptt_control = has_mode_control = true; precision = 10; ndigits = 7; } void RIG_FT890::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; } void RIG_FT890::initialize() { } void RIG_FT890::selectA() { init_cmd(); cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select A", cmd, replystr); } void RIG_FT890::selectB() { init_cmd(); cmd[3] = 0x01; cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select B", cmd, replystr); } void RIG_FT890::set_split(bool val) { split = val; init_cmd(); cmd[3] = val ? 0x01 : 0x00; cmd[4] = 0x01; sendCommand(cmd); if (val) showresp(INFO, HEX, "set split ON", cmd, replystr); else showresp(INFO, HEX, "set split OFF", cmd, replystr); } bool RIG_FT890::get_info() { init_cmd(); cmd[3] = 0x03; cmd[4] = 0x10; int ret = waitN(28, 100, "get info", HEX); if (ret >= 28) { size_t p = ret - 28; afreq = 0; bfreq = 0; for (size_t n = 1; n < 5; n++) { afreq = afreq * 256 + (unsigned char)replybuff[p + n]; bfreq = bfreq * 256 + (unsigned char)replybuff[p + 14 + n]; } afreq = afreq * 1.25; bfreq = bfreq * 1.25; int md = replybuff[p+5]; switch (md) { case 0 : amode = (md & 0x40) ? 1 : 0; break; case 1 : amode = (md & 0x40) ? 2 : 3; break; case 2 : amode = 4; break; case 3 : amode = (md & 0x80) ? 7 : 6; break; case 4 : amode = (md & 0x40) ? 8 : 10; break; case 6 : amode = 11; break; default : amode = 1; } aBW = (md & 0x80) ? 0 : 1; md = replybuff[p + 19]; switch (md) { case 0 : bmode = (md & 0x40) ? 1 : 0; break; case 1 : bmode = (md & 0x40) ? 2 : 3; break; case 2 : bmode = 4; break; case 3 : bmode = (md & 0x80) ? 7 : 6; break; case 4 : bmode = (md & 0x40) ? 8 : 10; break; case 6 : bmode = 11; break; default : bmode = 1; } bBW = (md & 0x80) ? 0 : 1; A.freq = afreq; A.imode = amode; A.iBW = aBW; B.freq = bfreq; B.imode = bmode; B.iBW = bBW; return true; } return false; } long RIG_FT890::get_vfoA () { return A.freq; } void RIG_FT890::set_vfoA (long freq) { A.freq = freq; freq /=10; // 890 does not support 1 Hz resolution cmd = to_bcd_be(freq, 8); cmd += 0x0A; sendCommand(cmd); showresp(WARN, HEX, "set vfo A", cmd, replystr); } int RIG_FT890::get_modeA() { return A.imode; } void RIG_FT890::set_modeA(int val) { A.imode = val; init_cmd(); cmd[3] = FT890_mode_val[val]; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode A", cmd, replystr); } long RIG_FT890::get_vfoB() { return B.freq; } void RIG_FT890::set_vfoB(long freq) { B.freq = freq; freq /=10; // 890 does not support 1 Hz resolution cmd = to_bcd_be(freq, 8); cmd += 0x8A; sendCommand(cmd); showresp(WARN, HEX, "set vfo B", cmd, replystr); } void RIG_FT890::set_modeB(int val) { B.imode = val; init_cmd(); cmd[3] = FT890_mode_val[val] | 0x80; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode B", cmd, replystr); } int RIG_FT890::get_modeB() { return B.imode; } // Tranceiver PTT on/off void RIG_FT890::set_PTT_control(int val) { init_cmd(); if (val) cmd[3] = 1; else cmd[3] = 0; cmd[4] = 0x0F; sendCommand(cmd, 0); LOG_INFO("%s", str2hex(cmd.c_str(), 5)); } int RIG_FT890::get_smeter() { init_cmd(); cmd[4] = 0xF7; int ret = waitN(5, 100, "get smeter", HEX); if (ret < 5) return 0; int sval = (unsigned char)(replybuff[ret - 2]); sval = sval * 100 / 255; return sval; } int RIG_FT890::get_power_out() { init_cmd(); cmd[4] = 0xF7; int ret = waitN(5, 100, "get pwr out", HEX); if (ret < 5) return 0; int sval = (unsigned char)(replybuff[ret - 2]); sval = sval * 100 / 255; return sval; } flrig-1.3.24/src/rigs/FT450.cxx0000644000175000017500000004511412562731647012670 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT450.h" #include "rig.h" static const char FT450name_[] = "FT-450"; static const char *FT450modes_[] = { "LSB", "USB", "CW", "FM", "AM", "RTTY-L", "CW-R", "USER-L", "RTTY-U", "FM-N", "USER-U", NULL}; static const char mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'B', 'C' }; static const char mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'L', 'U', 'U', 'U' }; static const char *FT450_widths[] = {"NARR", "NORM", "WIDE", NULL}; static int FT450_wvals_widths[] = {1, 2, 3, WVALS_LIMIT}; static const char *FT450_US_60m[] = {NULL, "126", "127", "128", "130", NULL}; // US has 5 60M presets. Using dummy numbers for all. // First NULL means skip 60m sets in set_band_selection(). // Maybe someone can do a cat command MC; on all 5 presets and add returned numbers above. // To send cat commands in flrig goto menu Config->Xcvr select->Send Cmd. static const char **Channels_60m = FT450_US_60m; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrPOWER, 54, 165, 368 }, { (Fl_Widget *)btnNR, 214, 145, 50 }, { (Fl_Widget *)sldrNR, 266, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_FT450::RIG_FT450() { // base class values name_ = FT450name_; modes_ = FT450modes_; bandwidths_ = FT450_widths; bw_vals_ = FT450_wvals_widths; widgets = rig_widgets; comm_baudrate = BR38400; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 2; def_mode = 10; def_bw = 2; def_freq = 14070000; precision = 10; ndigits = 8; has_a2b = can_change_alt_vfo = has_xcvr_auto_on_off = has_noise_reduction = has_noise_reduction_control = has_band_selection = has_extras = has_vox_onoff = has_vox_gain = has_vox_hang = has_cw_wpm = has_cw_keyer = // has_cw_vol = has_cw_spot = has_cw_spot_tone = has_cw_qsk = has_cw_weight = has_split = has_smeter = has_swr_control = has_power_out = has_power_control = has_volume_control = has_mode_control = has_noise_control = has_bandwidth_control = has_micgain_control = has_notch_control = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = true; // derived specific notch_on = false; m_60m_indx = 0; precision = 1; ndigits = 8; } void RIG_FT450::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = btnIFsh; rig_widgets[3].W = sldrIFSHIFT; rig_widgets[4].W = btnNotch; rig_widgets[5].W = sldrNOTCH; rig_widgets[6].W = sldrMICGAIN; rig_widgets[7].W = sldrPOWER; rig_widgets[8].W = btnNR; rig_widgets[9].W = sldrNR; // set progStatus defaults if (progStatus.noise_reduction_val < 1) progStatus.noise_reduction_val = 1; // first-time-thru, or reset if (progStatus.cw_qsk < 15) { progStatus.cw_qsk = 15; progStatus.cw_spot_tone = 700; progStatus.cw_weight = 3.0; progStatus.cw_wpm = 18; progStatus.vox_gain = 50; progStatus.vox_hang = 500; } // turn off auto information mode sendCommand("AI0;"); selectA(); } void RIG_FT450::set_band_selection(int v) { int inc_60m = false; cmd = "IF;"; waitN(27, 100, "get vfo mode in set_band_selection", ASC); size_t p = replystr.rfind("IF"); if (p == string::npos) return; if (replystr[p+21] != '0') { // vfo 60M memory mode inc_60m = true; } if (v == 12) { // 5MHz 60m presets if (Channels_60m[0] == NULL) return; // no 60m Channels so skip if (inc_60m) { if (Channels_60m[++m_60m_indx] == NULL) m_60m_indx = 0; } cmd.assign("MC").append(Channels_60m[m_60m_indx]).append(";"); } else { // v == 1..11 band selection OR return to vfo mode == 0 if (inc_60m) cmd = "VM;"; else { if (v < 3) v = v - 1; cmd.assign("BS").append(to_decimal(v, 2)).append(";"); } } sendCommand(cmd); showresp(WARN, ASC, "Select Band Stacks", cmd, replystr); } int RIG_FT450::adjust_bandwidth(int m) { return 1; } void RIG_FT450::selectA() { cmd = "VS0;"; sendCommand(cmd, 0); } void RIG_FT450::selectB() { cmd = "VS1;"; sendCommand(cmd, 0); } void RIG_FT450::A2B() { cmd = "VV;"; sendCommand(cmd); showresp(WARN, ASC, "vfo A --> B", cmd, replystr); } long RIG_FT450::get_vfoA () { cmd = rsp = "FA"; cmd += ';'; waitN(11, 100, "get vfo A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqA; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqA = f; return freqA; } void RIG_FT450::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo A", cmd, replystr); } long RIG_FT450::get_vfoB () { cmd = rsp = "FB"; cmd += ';'; waitN(11, 100, "get vfo B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqB; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqB = f; return freqB; } void RIG_FT450::set_vfoB (long freq) { freqB = freq; cmd = "FB00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo B", cmd, replystr); } void RIG_FT450::set_split(bool on) { if (on) cmd = "FT1;"; else cmd = "FT0;"; sendCommand(cmd); showresp(WARN, ASC, "SET split", cmd, replystr); } int RIG_FT450::get_split() { size_t p; int split = 0; char rx, tx; // tx vfo cmd = rsp = "FT"; cmd.append(";"); waitN(4, 100, "get split tx vfo", ASC); p = replystr.rfind(rsp); if (p == string::npos) return false; tx = replystr[p+2] - '0'; // rx vfo cmd = rsp = "FR"; cmd.append(";"); waitN(4, 100, "get split rx vfo", ASC); p = replystr.rfind(rsp); if (p == string::npos) return false; rx = replystr[p+2] - '0'; split = (tx == 1 ? 2 : 0) + (rx >= 4 ? 1 : 0); return split; } int RIG_FT450::get_smeter() { cmd = rsp = "SM0"; cmd += ';'; waitN(7, 100, "get smeter", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; replystr[p+6] = 0; int mtr = atoi(&replystr[p+3]); mtr = mtr * 100.0 / 256.0; return mtr; } // measured by W3NR // SWR..... mtr ... display // 6:1..... 255 ... 100 // 3:1..... 132 ... 50 // 2:1..... 066 ... 26 // 2.5:1... 099 ... 39 // 1.5:1... 033 ... 13 // 1.1:1... 008 ... 3 int RIG_FT450::get_swr() { cmd = rsp = "RM6"; cmd += ';'; waitN(7, 100, "get swr", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; replystr[p+6] = 0; int mtr = atoi(&replystr[p+3]); return mtr / 2.55; } int RIG_FT450::get_power_out() { cmd = rsp = "RM5"; sendCommand(cmd.append(";")); waitN(7, 100, "get pout", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; replystr[p+6] = 0; double mtr = (double)(atoi(&replystr[p+3])); mtr = -6.6263535 + .11813178 * mtr + .0013607405 * mtr * mtr; return (int)mtr; } int RIG_FT450::get_power_control() { cmd = rsp = "PC"; cmd += ';'; waitN(6, 100, "get power", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; replystr[p+5] = 0; int mtr = atoi(&replystr[p+2]); return mtr; } void RIG_FT450::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET power", cmd, replystr); } // Volume control return 0 ... 100 int RIG_FT450::get_volume_control() { cmd = rsp = "AG0"; cmd += ';'; waitN(7, 100, "get vol", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.volume; if (p + 6 >= replystr.length()) return progStatus.volume; int val = atoi(&replystr[p+3]) * 100 / 250; if (val > 100) val = 100; return val; } void RIG_FT450::set_volume_control(int val) { int ivol = (int)(val * 250 / 100); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vol", cmd, replystr); } void RIG_FT450::get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } // Tranceiver PTT on/off void RIG_FT450::set_PTT_control(int val) { cmd = val ? "TX1;" : "TX0;"; sendCommand(cmd); showresp(WARN, ASC, "SET PTT", cmd, replystr); } void RIG_FT450::tune_rig() { cmd = "AC002;"; sendCommand(cmd); showresp(WARN, ASC, "tune rig", cmd, replystr); } void RIG_FT450::set_attenuator(int val) { if (val) cmd = "RA01;"; else cmd = "RA00;"; sendCommand(cmd); showresp(WARN, ASC, "get att", cmd, replystr); } int RIG_FT450::get_attenuator() { cmd = rsp = "RA0"; cmd += ';'; waitN(5, 100, "get att", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; return (replystr[p+3] == '1' ? 1 : 0); } void RIG_FT450::set_preamp(int val) { if (val) cmd = "PA00;"; else cmd = "PA01;"; sendCommand(cmd); showresp(WARN, ASC, "set preamp", cmd, replystr); } int RIG_FT450::get_preamp() { cmd = rsp = "PA0"; cmd += ';'; waitN(5, 100, "get pre", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; return (replystr[p+3] == '1' ? 0 : 1); } void RIG_FT450::set_modeA(int val) { modeA = val; cmd = "MD0"; cmd += mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode A", cmd, replystr); if (val == 2 || val == 6) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FT450::get_modeA() { cmd = rsp = "MD0"; cmd += ';'; waitN(5, 100, "get mode A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return modeA; int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'B'; modeA = md; return modeA; } void RIG_FT450::set_bwA(int val) { bwA = val; switch (val) { case 0 : cmd = "SH000;"; break; case 1 : cmd = "SH016;"; break; case 2 : cmd = "SH031;"; break; default: cmd = "SH031;"; } sendCommand(cmd); showresp(WARN, ASC, "SET bwA", cmd, replystr); } int RIG_FT450::get_bwA() { cmd = rsp = "SH0"; cmd += ';'; waitN(6, 100, "get bw A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return bwA; string bws = replystr.substr(p+3,2); if (bws == "00") bwA = 0; else if (bws == "16") bwA = 1; else if (bws == "31") bwA = 2; return bwA; } void RIG_FT450::set_modeB(int val) { modeB = val; cmd = "MD0"; cmd += mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode B", cmd, replystr); if (val == 2 || val == 6) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FT450::get_modeB() { cmd = rsp = "MD0"; cmd += ';'; waitN(5, 100, "get mode B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return modeB; int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'B'; modeB = md; return modeB; } void RIG_FT450::set_bwB(int val) { bwB = val; switch (val) { case 0 : cmd = "SH000;"; break; case 1 : cmd = "SH016;"; break; case 2 : cmd = "SH031;"; break; default: cmd = "SH031;"; } sendCommand(cmd); showresp(WARN, ASC, "SET bwB", cmd, replystr); } int RIG_FT450::get_bwB() { cmd = rsp = "SH0"; cmd += ';'; waitN(6, 100, "get bw B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return bwB; string bws = replystr.substr(p+3,2); if (bws == "00") bwB = 0; else if (bws == "16") bwB = 1; else if (bws == "31") bwB = 2; return bwB; } int RIG_FT450::get_modetype(int n) { return mode_type[n]; } void RIG_FT450::set_if_shift(int val) { cmd = "IS0+0000;"; if (val < 0) cmd[3] = '-'; val = abs(val); for (int i = 4; i > 0; i--) { cmd[3+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET ifshift", cmd, replystr); } bool RIG_FT450::get_if_shift(int &val) { cmd = rsp = "IS0"; cmd += ';'; waitN(9, 100, "get if shift", ASC); size_t p = replystr.rfind(rsp); val = progStatus.shift_val; if (p == string::npos) return progStatus.shift; val = atoi(&replystr[p+4]); if (replystr[p+3] == '-') val = -val; return (val != 0); } void RIG_FT450::get_if_min_max_step(int &min, int &max, int &step) { min = -1000; max = 1000; step = 100; } void RIG_FT450::set_notch(bool on, int val) { cmd = "BP00000;"; if (on == false) { sendCommand(cmd); showresp(WARN, ASC, "SET notch off", cmd, replystr); notch_on = false; return; } cmd[6] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET notch on", cmd, replystr); notch_on = true; cmd[3] = '1'; // manual NOTCH position cmd[6] = '0'; val = val / 10 + 200; for (int i = 3; i > 0; i--) { cmd[3 + i] += val % 10; val /=10; } sendCommand(cmd); showresp(WARN, ASC, "SET notch val", cmd, replystr); } bool RIG_FT450::get_notch(int &val) { bool ison = false; cmd = rsp = "BP00"; cmd += ';'; waitN(8, 100, "get notch on/off", ASC); size_t p = replystr.rfind(rsp); val = progStatus.notch_val = 0; // disabled default slider position if (p == string::npos) return ison; if (replystr[p+6] == '1') { // manual notch enabled ison = true; val = progStatus.notch_val; cmd = rsp = "BP01"; cmd += ';'; waitN(8, 100, "get notch val", ASC); p = replystr.rfind(rsp); if (p == string::npos) return ison; val = atoi(&replystr[p+4]); val = (val - 200) * 10; } return ison; } void RIG_FT450::get_notch_min_max_step(int &min, int &max, int &step) { min = -1990; max = +2000; step = 100; } void RIG_FT450::set_noise(bool b) { if (b) cmd = "NB01;"; else cmd = "NB00;"; sendCommand (cmd); showresp(WARN, ASC, "SET NB", cmd, replystr); } void RIG_FT450::set_xcvr_auto_on() { if (!progStatus.xcvr_auto_on) return; cmd = rsp = "PS"; cmd.append(";"); waitN(4, 100, "Test: Is Rig ON", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) { // rig is off, power on cmd = "PS1;"; sendCommand(cmd); MilliSleep(1500); // 1.0 < T < 2.0 seconds sendCommand(cmd); MilliSleep(3000); // Wait for rig startup? Maybe not needed. } } void RIG_FT450::set_xcvr_auto_off() { if (!progStatus.xcvr_auto_off) return; cmd = "PS0;"; sendCommand(cmd); } // val 0 .. 100 void RIG_FT450::set_mic_gain(int val) { cmd = "MG000;"; val = (int)(val * 2.55); // convert to 0 .. 255 for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET mic", cmd, replystr); } int RIG_FT450::get_mic_gain() { cmd = rsp = "MG"; cmd += ';'; waitN(6, 100, "get mic", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; replystr[p+5] = 0; return atoi(&replystr[p+2]);; } void RIG_FT450::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FT450::set_special(int v) { if (v) cmd = "VR1;"; else cmd = "VR0;"; sendCommand(cmd); showresp(WARN, ASC, "Set special", cmd, replystr); } void RIG_FT450::set_vox_onoff() { cmd = "VX0;"; if (progStatus.vox_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox on/off", cmd, replystr); } void RIG_FT450::set_vox_gain() { cmd = "VG"; cmd.append(to_decimal(progStatus.vox_gain, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox gain", cmd, replystr); } void RIG_FT450::set_vox_hang() { cmd = "VD"; cmd.append(to_decimal(progStatus.vox_hang, 4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox delay", cmd, replystr); } void RIG_FT450::set_cw_wpm() { cmd = "KS"; if (progStatus.cw_wpm > 60) progStatus.cw_wpm = 60; if (progStatus.cw_wpm < 4) progStatus.cw_wpm = 4; cmd.append(to_decimal(progStatus.cw_wpm, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw wpm", cmd, replystr); } void RIG_FT450::enable_keyer() { cmd = "KR0;"; if (progStatus.enable_keyer) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET keyer on/off", cmd, replystr); } bool RIG_FT450::set_cw_spot() { if (vfo.imode == 2 || vfo.imode == 6) { cmd = "CS0;"; if (progStatus.spot_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET spot on/off", cmd, replystr); return true; } else return false; } void RIG_FT450::set_cw_weight() { int n = round(progStatus.cw_weight * 10); cmd.assign("EX024").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw weight", cmd, replystr); } void RIG_FT450::set_cw_qsk() { int n = progStatus.cw_qsk / 5 - 3; cmd.assign("EX018").append(to_decimal(n, 1)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw qsk", cmd, replystr); } void RIG_FT450::set_cw_spot_tone() { int n = (progStatus.cw_spot_tone - 400) / 50 + 1; cmd = "EX020"; cmd.append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw tone", cmd, replystr); } // DNR void RIG_FT450::set_noise_reduction_val(int val) { cmd.assign("RL0").append(to_decimal(val, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET_noise_reduction_val", cmd, replystr); } int RIG_FT450::get_noise_reduction_val() { int val = 1; cmd = rsp = "RL0"; cmd.append(";"); waitN(6, 100, "GET noise reduction val", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return val; val = atoi(&replystr[p+3]); return val; } // DNR void RIG_FT450::set_noise_reduction(int val) { cmd.assign("NR0").append(val ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET noise reduction", cmd, replystr); } int RIG_FT450::get_noise_reduction() { int val; cmd = rsp = "NR0"; cmd.append(";"); waitN(5, 100, "GET noise reduction", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; val = replystr[p+3] - '0'; return val; } flrig-1.3.24/src/rigs/FT1000MP.cxx0000644000175000017500000003257312562731647013202 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT1000MP.h" #include #include static const char FT1000MPname_[] = "FT-1000MP"; static const char *FT1000MP_modes[] = { "LSB", // 0 "USB", // 1 "CW-U", "CW-L", // 2, 2+ "AM", "AM-syn", // 3, 3+ "FM", // 4 "RTTY-L", "RTTY-U", // 5, 5+ "PKT-L", "PKT-FM", // 6, 6+ NULL}; static const int FT1000MP_def_bw[] = { 6, 6, 18, 18, 0, 0, 0, 18, 18, 6, 6 }; static const char FT1000MP_mode_type[] = { 'L', 'U', 'U', 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U' }; static const char FT1000MP_mode[] = { 0, 1, 2, 2, 3, 3, 4, 5, 5, 6, 6 }; static const char FT1000MP_alt_mode[] = { 0, // 0 0, // 1 0, 1, // 2 0, 1, // 3 0, // 4 0, 1, // 5 0, 1 }; // 6 static const char *FT1000MP_widths[] = { "---/6.0", "---/2.4", "---/2.0", "---/500", "---/250", "2.4/6.0", "2.4/2.4", "2.4/2.0", "2.4/500", "2.4/250", "2.0/6.0", "2.0/2.4", "2.0/2.0", "2.0/500", "2.0/250", "500/6.0", "500/2.4", "500/2.0", "500/500", "500/250", "250/6.0", "250/2.4", "250/2.0", "250/500", "250/250", NULL }; static int FT1000MP_bw_vals[] = { 1,2,3,4,5,6,7,8,9,0,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25, WVALS_LIMIT}; RIG_FT1000MP::RIG_FT1000MP() { // base class values name_ = FT1000MPname_; modes_ = FT1000MP_modes; bandwidths_ = FT1000MP_widths; bw_vals_ = FT1000MP_bw_vals; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; serloop_timing = 200; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; A.freq = 14070000; A.imode = 1; A.iBW = 1; B.freq = 3580000; B.imode = 1; B.iBW = 1; precision = 10; max_power = 200; tuner_on = false; has_smeter = has_power_out = has_swr_control = has_alc_control = has_mode_control = has_bandwidth_control = has_ptt_control = has_tune_control = has_split = has_get_info = true; has_auto_notch = true; precision = 10; ndigits = 7; }; void RIG_FT1000MP::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; } void RIG_FT1000MP::initialize() { init_cmd(); cmd[4] = 0x81; // switch antenna tuner on sendCommand(cmd,0); LOG_INFO("%s", str2hex(cmd.c_str(), 5)); // selectA(); } /* returns 32 bytes first 16 for vfo-A 0 - band selection 1,2,3,4 operating frequency 5,6 clarifier offset 7 operating mode 8 if filter selection 9 vfo/mem operating flags a,b,c,d,e,f NOT used repeated for vfo-B Data captured by AF2M, Mitch Mode changes bytes 7 / 8; counting from 0 ---------------------||-||--------------------------------------------------------------------- LSB : 08 00 57 71 00 00 00 00 11 00 11 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 USB : 08 00 57 71 00 00 00 01 11 00 11 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 CW-L : 08 00 57 75 10 00 00 02 01 00 11 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 CW-U : 08 00 57 75 10 00 00 02 11 00 11 91 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 LSB : 08 00 57 71 00 00 00 00 11 00 11 11 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 RTTY-L : 08 00 57 63 B8 00 00 05 11 00 11 11 11 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 RTTY-U : 08 00 57 7E 48 00 00 05 91 00 11 11 91 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 Bandwidth changes (in LSB MODE) 8.215 filter is in thru mode Only changing 455 filter, cycling thru from 6k, 2.4k, 2.0k,500, 250. ------------------------||--------------------------------------------------------------------- 6k : 08 00 57 71 00 00 00 00 00 00 00 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 2.4k : 08 00 57 71 00 00 00 00 01 00 00 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 2.0k : 08 00 57 71 00 00 00 00 02 00 00 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 500 : 08 00 57 71 00 00 00 00 03 00 00 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 250 : 08 00 57 71 00 00 00 00 04 00 00 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 8.215 filter is in 500 hz mode. ------------------------||--------------------------------------------------------------------- 6k : 08 00 57 71 00 00 00 00 40 00 00 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 2.4k : 08 00 57 71 00 00 00 00 41 00 00 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 2.0k : 08 00 57 71 00 00 00 00 42 00 00 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 500 : 08 00 57 71 00 00 00 00 43 00 00 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 250 : 08 00 57 71 00 00 00 00 44 00 00 01 81 81 11 0A 08 00 57 72 60 00 00 00 30 00 30 91 11 11 11 48 Mode changes bytes 7 / 8; counting from 0 |byte 7| |byte 8| LSB : 00000000 00010001 USB : 00000001 00010001 CW-L : 00000010 00000001 CW-U : 00000010 00010001 LSB : 00000000 00010001 RTTY-L : 00000101 00010001 RTTY-U : 00000101 10010001 |byte 8| 6k : 00000000 2.4k : 00000001 2.0k : 00000010 500 : 00000011 250 : 00000100 8.215 filter is in 500 hz mode. |byte 8| 6k : 01000000 2.4k : 01000001 2.0k : 01000010 500 : 01000011 250 : 01000100 */ const unsigned char data1[] = { 0x08, 0x00, 0x57, 0x71, 0x00, 0x00, 0x00, 0x00, 0x43, 0x00, 0x00, 0x01, 0x81, 0x81, 0x11, 0x0A, 0x08, 0x00, 0x57, 0x72, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x91, 0x11, 0x11, 0x11, 0x48 }; const unsigned char data2[] = { 0x08, 0x00, 0x57, 0x71, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x01, 0x81, 0x81, 0x11, 0x0A, 0x08, 0x00, 0x57, 0x72, 0x60, 0x00, 0x00, 0x00, 0x30, 0x00, 0x30, 0x91, 0x11, 0x11, 0x11, 0x48 }; const unsigned char data3[] = { 0x08, 0x00, 0x57, 0x71, 0x00, 0x00, 0x00, 0x00, 0x33, 0x00, 0x00, 0x01, 0x81, 0x81, 0x11, 0x0A, 0x08, 0x00, 0x57, 0x72, 0x60, 0x00, 0x00, 0x03, 0xB0, 0x00, 0x30, 0x91, 0x11, 0x11, 0x11, 0x48 }; const unsigned char amsync[] = { 0x08, 0x00, 0x57, 0x67, 0x01, 0x00, 0x00, 0x03, 0x80, 0x00, 0x11, 0x11, 0x91, 0x91, 0x11, 0x08, 0x08, 0x00, 0x57, 0x67, 0x02, 0x00, 0x00, 0x01, 0x11, 0x00, 0x11, 0x91, 0x11, 0x11, 0x11, 0xFA }; bool RIG_FT1000MP::get_info(void) { unsigned char *p = 0; int ret = 0; int alt = 0; int md = 0; int i; init_cmd(); cmd[3] = 0x03; // read both vfo's cmd[4] = 0x10; ret = waitN(32, 100, "get info", ASC); p = (unsigned char *)replybuff; if (ret >= 32) { if (ret > 32) p += (ret - 32); // vfo A data string A.freq = ((((((p[1]<<8) + p[2])<<8) + p[3])<<8) + p[4])*10/16; md = p[7] & 0x07; alt = p[8] & 0x80; for (i = 0; i < 11; i++) if (FT1000MP_mode[i] == md) break; if (i == 11) i = 0; A.imode = i + ((alt == 128) ? 1 : 0); A.iBW = 5*((p[8] & 0x70) >> 4) + (p[8] & 0x07); if (A.iBW > 24) A.iBW = 24; p += 16; // vfo B data string B.freq = ((((((p[1]<<8) + p[2])<<8) + p[3])<<8) + p[4])*10/16; md = p[7] & 0x07; alt = p[8] & 0x80; for (i = 0; i < 11; i++) if (FT1000MP_mode[i] == md) break; if (i == 11) i = 0; B.imode = i + ((alt == 128) ? 1 : 0); B.iBW = 5*((p[8] & 0x70) >> 4) + (p[8] & 0x07); if (B.iBW > 24) B.iBW = 24; return true; } return false; } long RIG_FT1000MP::get_vfoA () { return A.freq; } long RIG_FT1000MP::get_vfoB () { return B.freq; } void RIG_FT1000MP::set_vfoA (long freq) { A.freq = freq; init_cmd(); freq /=10; // 1000MP does not support 1 Hz resolution for (int i = 0; i < 4; i++) { cmd[i] = (unsigned char)(freq % 10); freq /= 10; cmd[i] |= (unsigned char)((freq % 10) * 16); freq /= 10; } cmd[4] = 0x0A; sendCommand(cmd, 0); LOG_INFO("%s", str2hex(cmd.c_str(), cmd.length())); } void RIG_FT1000MP::set_vfoB (long freq) { B.freq = freq; init_cmd(); freq /=10; // 1000MP does not support 1 Hz resolution for (int i = 0; i < 4; i++) { cmd[i] = (unsigned char)(freq % 10); freq /= 10; cmd[i] |= (unsigned char)((freq % 10) * 16); freq /= 10; } cmd[4] = 0x8A; sendCommand(cmd, 0); LOG_INFO("%s", str2hex(cmd.c_str(), cmd.length())); } int RIG_FT1000MP::get_modeA() { return A.imode; } int RIG_FT1000MP::get_modeB() { return B.imode; } void RIG_FT1000MP::set_modeA(int val) { A.imode = val; init_cmd(); cmd[3] = val; if (val > 6) cmd[3]++; cmd[4] = 0x0C; sendCommand(cmd, 0); LOG_INFO("%s, %s", FT1000MP_modes[A.imode], str2hex(cmd.c_str(),5)); get_info(); } void RIG_FT1000MP::set_modeB(int val) { B.imode = val; init_cmd(); cmd[3] = val; if (val > 6) cmd[3]++; cmd[4] = 0x0C; sendCommand(cmd, 0); LOG_INFO("%s, %s", FT1000MP_modes[B.imode], str2hex(cmd.c_str(),5)); get_info(); } int RIG_FT1000MP::get_modetype(int n) { return FT1000MP_mode_type[n]; } int RIG_FT1000MP::get_bwA() { return A.iBW; } void RIG_FT1000MP::set_bwA(int val) { int first_if = val / 5; int second_if = val % 5; if (!first_if) first_if += 5; --first_if; if (!second_if) second_if += 5; --second_if; A.iBW = val; init_cmd(); cmd[0] = 0x01; // 1st IF cmd[3] = first_if; cmd[4] = 0x8C; sendCommand(cmd, 0); LOG_INFO("%s, %s", FT1000MP_widths[A.iBW], str2hex(cmd.c_str(), 5)); cmd[0] = 0x02; // 2nd IF cmd[3] = second_if; sendCommand(cmd, 0); LOG_INFO("%s, %s", FT1000MP_widths[A.iBW], str2hex(cmd.c_str(), 5)); } int RIG_FT1000MP::get_bwB() { return B.iBW; } void RIG_FT1000MP::set_bwB(int val) { B.iBW = val; int first_if = val / 5; int second_if = val % 5; if (!first_if) first_if += 5; --first_if; first_if += 0x80; // vfo-B if (!second_if) second_if += 5; --second_if; second_if += 0x80; // vfo-B init_cmd(); cmd[0] = 0x01; // 1st IF cmd[3] = first_if; cmd[4] = 0x8C; sendCommand(cmd, 0); LOG_INFO("%s, %s", FT1000MP_widths[B.iBW], str2hex(cmd.c_str(), 5)); cmd[0] = 0x02; // 2nd IF cmd[3] = second_if; sendCommand(cmd, 0); LOG_INFO("%s, %s", FT1000MP_widths[B.iBW], str2hex(cmd.c_str(), 5)); } int RIG_FT1000MP::def_bandwidth(int m) { return FT1000MP_def_bw[m]; } int RIG_FT1000MP::adjust_bandwidth(int m) { return FT1000MP_def_bw[m]; } void RIG_FT1000MP::selectA() { init_cmd(); cmd[4] = 0x05; sendCommand(cmd, 0); LOG_INFO("%s", str2hex(cmd.c_str(), 5)); } void RIG_FT1000MP::selectB() { init_cmd(); cmd[3] = 0x01; cmd[4] = 0x05; sendCommand(cmd, 0); LOG_INFO("%s", str2hex(cmd.c_str(), 5)); } void RIG_FT1000MP::set_split(bool val) { split = val; init_cmd(); cmd[3] = val ? 0x01 : 0x00; cmd[4] = 0x01; sendCommand(cmd, 0); LOG_INFO("%s", str2hex(cmd.c_str(), 5)); } // Tranceiver PTT on/off void RIG_FT1000MP::set_PTT_control(int val) { init_cmd(); if (val) cmd[3] = 1; else cmd[3] = 0; cmd[4] = 0x0F; sendCommand(cmd, 0); LOG_INFO("%s", str2hex(cmd.c_str(), 5)); } void RIG_FT1000MP::tune_rig() { init_cmd(); cmd[4] = 0x82; // initiate tuner cycle sendCommand(cmd,0); LOG_INFO("%s", str2hex(cmd.c_str(), 5)); } // used to turn tuner ON/OFF void RIG_FT1000MP::set_auto_notch(int v) { tuner_on = v; init_cmd(); cmd[3] = v ? 0x01 : 0x00; cmd[4] = 0x81; // start antenna tuner sendCommand(cmd,0); LOG_INFO("%s", str2hex(cmd.c_str(), 5)); } int RIG_FT1000MP::get_auto_notch() { return tuner_on; } int RIG_FT1000MP::get_power_out(void) { float pwr; init_cmd(); cmd[0] = 0x80; cmd[4] = 0xF7; int ret = sendCommand(cmd); if (ret < 5) return 0; pwr = (unsigned char)(replybuff[ret - 5]); if (pwr <=53) {pwr /= 53; pwr = 10 * pwr * pwr; } else if (pwr <= 77) {pwr /= 77; pwr = 20 * pwr * pwr; } else if (pwr <= 98) {pwr /= 98; pwr = 30 * pwr * pwr; } else if (pwr <= 114) {pwr /= 114; pwr = 40 * pwr * pwr; } else if (pwr <= 130) {pwr /= 130; pwr = 50 * pwr * pwr; } else {pwr /= 177; pwr = 100 * pwr * pwr; } LOG_INFO("%s => %d",str2hex(replybuff,1), (int)pwr); return (int)pwr; } int RIG_FT1000MP::get_smeter(void) { float val = 0; init_cmd(); cmd[0] = 0x00; cmd[4] = 0xF7; int ret = waitN(5, 100, "get smeter", HEX); if (ret < 5) return 0; val = (unsigned char)(replybuff[ret-5]); if (val <= 15) val = 5; else if (val <=154) val = 5 + 45 * (val - 15) / (154 - 15); else val = 50 + 50 * (val - 154.0) / (255.0 - 154.0); LOG_INFO("%s => %d",str2hex(replybuff,1), (int)val); return (int)val; } int RIG_FT1000MP::get_swr(void) { float val = 0; init_cmd(); cmd[0] = 0x85; cmd[4] = 0xF7; int ret = waitN(5, 100, "get swr", HEX); if (ret < 5) return 0; val = (unsigned char)(replybuff[ret-5]) - 10; val *= (50.0 / 122.0); if (val < 0) val = 0; if (val > 100) val = 100; LOG_INFO("%s => %d",str2hex(replybuff,1), (int)val); return (int)val; } int RIG_FT1000MP::get_alc(void) { unsigned char val = 0; init_cmd(); cmd[0] = 0x81; cmd[4] = 0xF7; int ret = waitN(5, 100, "get alc", HEX); if (ret < 5) return 0; val = (unsigned char)(replybuff[ret-5]); LOG_INFO("%s => %d",str2hex(replybuff,1), val); return val * 100 / 255; } flrig-1.3.24/src/rigs/IC7600.cxx0000644000175000017500000003463212562731647012741 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC7600.h" bool IC7600_DEBUG = true; //============================================================================= // IC-7600 const char IC7600name_[] = "IC-7600"; const char *IC7600modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", "PSK", "PSK-R", "LSB-D1", "LSB-D2", "LSB-D3", "USB-D1", "USB-D2", "USB-D3", NULL}; const char IC7600_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U', 'U', 'L', 'L', 'L', 'L', 'U', 'U', 'U' }; const char IC7600_mode_nbr[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x08, 0x12, 0x13, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01 }; const char *IC7600_ssb_bws[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3100", "3200", "3300", "3400", "3500", "3600", NULL }; static int IC7600_bw_vals_SSB[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41, WVALS_LIMIT}; const char *IC7600_rtty_bws[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", NULL }; static int IC7600_bw_vals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32, WVALS_LIMIT}; const char *IC7600_am_bws[] = { "200", "400", "600", "800", "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", "3800", "4000", "4200", "4400", "4600", "4800", "5000", "5200", "5400", "5600", "5800", "6000", "6200", "6400", "6600", "6800", "7000", "7200", "7400", "7600", "7800", "8000", "8200", "8400", "8600", "8800", "9000", "9200", "9400", "9600", "9800", "10000", NULL }; static int IC7600_bw_vals_AM[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41,42,43,44,45,46,47,48,49,50, WVALS_LIMIT}; const char *IC7600_fm_bws[] = { "FIXED", NULL }; static int IC7600_bw_vals_FM[] = { 1, WVALS_LIMIT}; static GUI IC7600_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 54, 165, 156 }, { (Fl_Widget *)btnNR, 2, 185, 50 }, { (Fl_Widget *)sldrNR, 54, 185, 156 }, { (Fl_Widget *)btnIFsh, 214, 125, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 125, 156 }, { (Fl_Widget *)btnNotch, 214, 145, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 165, 156 }, { (Fl_Widget *)sldrPOWER, 266, 185, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC7600::RIG_IC7600() { defaultCIV = 0x7A; name_ = IC7600name_; modes_ = IC7600modes_; bandwidths_ = IC7600_ssb_bws; bw_vals_ = IC7600_bw_vals_SSB; _mode_type = IC7600_mode_type; adjustCIV(defaultCIV); widgets = IC7600_widgets; has_extras = has_cw_wpm = has_cw_spot_tone = has_cw_qsk = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_compON = has_compression = has_split = has_split_AB = has_micgain_control = has_bandwidth_control = true; precision = 1; ndigits = 8; }; //====================================================================== // IC7600 unique commands //====================================================================== void RIG_IC7600::initialize() { IC7600_widgets[0].W = btnVol; IC7600_widgets[1].W = sldrVOLUME; IC7600_widgets[2].W = sldrRFGAIN; IC7600_widgets[3].W = sldrSQUELCH; IC7600_widgets[4].W = btnNR; IC7600_widgets[5].W = sldrNR; IC7600_widgets[6].W = btnIFsh; IC7600_widgets[7].W = sldrIFSHIFT; IC7600_widgets[8].W = btnNotch; IC7600_widgets[9].W = sldrNOTCH; IC7600_widgets[10].W = sldrMICGAIN; IC7600_widgets[11].W = sldrPOWER; } void RIG_IC7600::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\xD0'; cmd.append(post); sendICcommand(cmd, 6); checkresponse(); } void RIG_IC7600::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\xD1'; cmd.append(post); sendICcommand(cmd, 6); checkresponse(); } bool RIG_IC7600::can_split() { return true; } void RIG_IC7600::set_split(bool val) { split = val; if (val) { cmd.assign(pre_to); cmd.append("\x0F"); cmd += '\x01'; cmd.append( post ); waitFB("Split ON"); } else { cmd.assign(pre_to); cmd.append("\x0F"); cmd += '\x00'; cmd.append( post ); waitFB("Split OFF"); } } int RIG_IC7600::get_split() { int split = 0; cmd.assign(pre_to); cmd.append("\x0F"); cmd.append( post ); if (sendICcommand (cmd, 7)) split = replystr[5]; return split; } void RIG_IC7600::swapvfos() { cmd = pre_to; cmd += 0x07; cmd += 0xB0; cmd.append(post); if (IC7600_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); } void RIG_IC7600::set_modeA(int val) { A.imode = val; cmd = pre_to; cmd += '\x06'; cmd += IC7600_mode_nbr[val]; cmd.append( post ); if (IC7600_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); // digital set / clear if (A.imode >= 10) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; switch (A.imode) { case 10 : case 13 : cmd += '\x01'; cmd += '\x01';break; case 11 : case 14 : cmd += '\x02'; cmd += '\x01';break; case 12 : case 15 : cmd += '\x03'; cmd += '\x01';break; default : cmd += '\x00'; cmd += '\x00'; } cmd.append( post); if (IC7600_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); } } int RIG_IC7600::get_modeA() { int md = 0; cmd = pre_to; cmd += '\x04'; cmd.append(post); if (sendICcommand (cmd, 8 )) { for (md = 0; md < 10; md++) if (replystr[5] == IC7600_mode_nbr[md]) break; if (md == 10) md = 0; A.imode = md; } else checkresponse(); if (md == 0 || md == 1) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; cmd.append(post); if (sendICcommand(cmd, 9)) { if (replystr[6] > 0 && A.imode < 2) { if (replystr[6] < 4) A.imode = 9 + A.imode * 3 + replystr[6]; } } } return A.imode; } void RIG_IC7600::set_modeB(int val) { B.imode = val; cmd = pre_to; cmd += '\x06'; cmd += IC7600_mode_nbr[val]; cmd.append( post ); if (IC7600_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); // digital set / clear if (B.imode >= 10) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; switch (B.imode) { case 10 : case 13 : cmd += '\x01'; cmd += '\x01';break; case 11 : case 14 : cmd += '\x02'; cmd += '\x01';break; case 12 : case 15 : cmd += '\x03'; cmd += '\x01';break; default : cmd += '\x00'; cmd += '\x00'; } cmd.append( post); if (IC7600_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); } } int RIG_IC7600::get_modeB() { int md = 0; cmd = pre_to; cmd += '\x04'; cmd.append(post); if (sendICcommand (cmd, 8 )) { for (md = 0; md < 10; md++) if (replystr[5] == IC7600_mode_nbr[md]) break; if (md == 10) md = 0; B.imode = md; } else checkresponse(); if (md == 0 || md == 1) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; cmd.append(post); if (sendICcommand(cmd, 9)) { if (replystr[6] > 0 && B.imode < 2) { if (replystr[6] < 4) B.imode = 9 + B.imode * 3 + replystr[6]; } } } return B.imode; } int RIG_IC7600::get_bwA() { if (A.imode == 5) return 0; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(post); if (sendICcommand (cmd, 8)) { A.iBW = fm_bcd(&replystr[6], 2); } return A.iBW; } void RIG_IC7600::set_bwA(int val) { A.iBW = val; if (A.imode == 5) return; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(to_bcd(A.iBW, 2)); cmd.append(post); if (IC7600_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); } int RIG_IC7600::get_bwB() { if (B.imode == 5) return 0; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(post); if (sendICcommand (cmd, 8)) { B.iBW = fm_bcd(&replystr[6], 2); } return B.iBW; } void RIG_IC7600::set_bwB(int val) { B.iBW = val; if (B.imode == 5) return; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(to_bcd(A.iBW, 2)); cmd.append(post); if (IC7600_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); } int RIG_IC7600::adjust_bandwidth(int m) { int bw = 0; switch (m) { case 2: // AM bandwidths_ = IC7600_am_bws; bw_vals_ = IC7600_bw_vals_AM; bw = 19; break; case 5: // FM bandwidths_ = IC7600_fm_bws; bw_vals_ = IC7600_bw_vals_FM; bw = 0; break; case 4: case 7: // RTTY bandwidths_ = IC7600_rtty_bws; bw_vals_ = IC7600_bw_vals_RTTY; bw = 12; break; case 3: case 6: // CW bandwidths_ = IC7600_ssb_bws; bw_vals_ = IC7600_bw_vals_SSB; bw = 12; break; case 8: case 9: // PKT bandwidths_ = IC7600_ssb_bws; bw_vals_ = IC7600_bw_vals_SSB; bw = 34; break; case 0: case 1: // SSB case 10: case 11 : case 12 : case 13: case 14 : case 15 : default: bandwidths_ = IC7600_ssb_bws; bw_vals_ = IC7600_bw_vals_SSB; bw = 34; } return bw; } int RIG_IC7600::def_bandwidth(int m) { int bw = 0; switch (m) { case 2: // AM bw = 19; break; case 5: // FM bw = 0; break; case 4: case 7: // RTTY bw = 12; break; case 3: case 6: // CW bw = 12; break; case 8: case 9: // PKT bw = 34; break; case 0: case 1: // SSB case 10: case 11 : case 12 : case 13: case 14 : case 15 : default: bw = 34; } return bw; } void RIG_IC7600::set_mic_gain(int v) { ICvol = (int)(v * 255 / 100); if (!progStatus.USBaudio) { cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); } else { cmd = pre_to; cmd += '\x1A'; cmd += '\x05'; cmd += '\x00'; cmd += '\x29'; cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); } sendICcommand (cmd, 6); checkresponse(); if (RIG_DEBUG) LOG_WARN("%s", str2hex(cmd.data(), cmd.length())); } // alh added ++++++++++++++++++++++++++++ void RIG_IC7600::set_attenuator(int val) { int cmdval = 0; if (atten_level == 0) { atten_level = 1; atten_label("6 dB", true); cmdval = 0x06; } else if (atten_level == 1) { atten_level = 2; atten_label("12 dB", true); cmdval = 0x12; } else if (atten_level == 2) { atten_level = 3; atten_label("18 dB", true); cmdval = 0x18; } else if (atten_level == 3) { atten_level = 0; atten_label("Att", false); cmdval = 0x00; } cmd = pre_to; cmd += '\x11'; cmd += cmdval; cmd.append( post ); sendICcommand(cmd,6); checkresponse(); if (RIG_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); } int RIG_IC7600::get_attenuator() { cmd = pre_to; cmd += '\x11'; cmd.append( post ); if (sendICcommand(cmd,7)) { if (replystr[5] == 0x06) { atten_level = 1; atten_label("6 dB", true); } else if (replystr[6] == 0x12) { atten_level = 2; atten_label("12 dB", true); } else if (replystr[6] == 0x18) { atten_level = 3; atten_label("18 dB", true); } else if (replystr[6] == 0x00) { atten_level = 0; atten_label("Att", false); } } return atten_level; } void RIG_IC7600::set_compression() { if (progStatus.compON) { cmd.assign(pre_to).append("\x14\x0E"); cmd.append(to_bcd(progStatus.compression * 255 / 100, 3)); cmd.append( post ); waitFB("set comp"); cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x01'; cmd.append(post); waitFB("set Comp ON"); } else{ cmd.assign(pre_to).append("\x16\x44"); cmd += '\x00'; cmd.append(post); waitFB("set Comp OFF"); } } void RIG_IC7600::set_vox_onoff() { if (progStatus.vox_onoff) { cmd.assign(pre_to).append("\x16\x46\x01"); cmd.append( post ); waitFB("set vox ON"); } else { cmd.assign(pre_to).append("\x16\x46"); cmd += '\x00'; // ALH cmd.append( post ); waitFB("set vox OFF"); } } void RIG_IC7600::set_vox_gain() { cmd.assign(pre_to).append("\x1A\x05"); // ALH values 0-255 cmd +='\x01'; cmd +='\x65'; cmd.append(to_bcd((int)(progStatus.vox_gain * 2.55), 3)); cmd.append( post ); waitFB("SET vox gain"); } void RIG_IC7600::set_vox_anti() { cmd.assign(pre_to).append("\x1A\x05"); //ALH values 0-255 cmd +='\x01'; cmd +='\x66'; cmd.append(to_bcd((int)(progStatus.vox_anti * 2.55), 3)); cmd.append( post ); waitFB("SET anti-vox"); } void RIG_IC7600::set_vox_hang() { cmd.assign(pre_to).append("\x1A\x05"); //ALH values 00-20 = 0.0 - 2.0 sec cmd +='\x01'; // ALH cmd +='\x67'; // ALH cmd.append(to_bcd((int)(progStatus.vox_hang / 10 ), 2)); cmd.append( post ); waitFB("SET vox hang"); } // CW controls void RIG_IC7600::set_cw_wpm() { cmd.assign(pre_to).append("\x14\x0C"); // values 0-255 cmd.append(to_bcd(round((progStatus.cw_wpm - 6) * 255 / (60 - 6)), 3)); cmd.append( post ); waitFB("SET cw wpm"); } void RIG_IC7600::set_cw_qsk() { int n = round(progStatus.cw_qsk * 10); // values 0-255 cmd.assign(pre_to).append("\x14\x0F"); cmd.append(to_bcd(n, 3)); cmd.append(post); waitFB("Set cw qsk delay"); } void RIG_IC7600::set_cw_spot_tone() { cmd.assign(pre_to).append("\x14\x09"); // values 0=300Hz 255=900Hz int n = round((progStatus.cw_spot_tone - 300) * 255.0 / 600.0); if (n > 255) n = 255; if (n < 0) n = 0; cmd.append(to_bcd(n, 3)); cmd.append( post ); waitFB("SET cw spot tone"); } void RIG_IC7600::set_cw_vol() { cmd.assign(pre_to); cmd.append("\x1A\x05"); cmd += '\x00'; cmd += '\x24'; // ALH / DF cmd.append(to_bcd((int)(progStatus.cw_vol * 2.55), 3)); cmd.append( post ); waitFB("SET cw sidetone volume"); } flrig-1.3.24/src/rigs/IC7200.cxx0000644000175000017500000004344312630326156012724 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC7200.h" bool DEBUG_7200 = true; //============================================================================= // IC-7200 const char IC7200name_[] = "IC-7200"; const char *IC7200modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "CW-R", "RTTY-R", "LSB-D", "USB-D", NULL}; const char IC7200_mode_type[] = { 'L', 'U', 'U', 'L', 'L', 'U', 'U', 'L', 'U' }; const char *IC7200_SSBwidths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3100", "3200", "3300", "3400", "3500", "3600", NULL}; static int IC7200_bw_vals_SSB[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41, WVALS_LIMIT}; const char *IC7200_RTTYwidths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", NULL}; static int IC7200_bw_vals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32, WVALS_LIMIT}; const char *IC7200_AMwidths[] = { "200", "400", "600", "800", "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", "3800", "4000", "4200", "4400", "4600", "4800", "5000", "5200", "5400", "5600", "5800", "5000", "6200", "6400", "6600", "6800", "6000", "6200", "6400", "6600", "6800", "6000", NULL}; static int IC7200_bw_vals_AM[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, WVALS_LIMIT}; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 54, 165, 156 }, { (Fl_Widget *)sldrSQUELCH, 266, 125, 156 }, { (Fl_Widget *)btnNR, 214, 145, 50 }, { (Fl_Widget *)sldrNR, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; //====================================================================== // IC7200 unique commands //====================================================================== RIG_IC7200::RIG_IC7200() { name_ = IC7200name_; modes_ = IC7200modes_; _mode_type = IC7200_mode_type; bandwidths_ = IC7200_SSBwidths; bw_vals_ = IC7200_bw_vals_SSB; widgets = rig_widgets; comm_baudrate = BR9600; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; A.freq = 14070000; A.imode = 1; A.iBW = 32; B.freq = 7015000; B.imode = 3; B.iBW = 12; has_extras = has_smeter = has_power_out = has_swr_control = has_alc_control = has_sql_control = true; has_power_control = true; has_volume_control = true; has_mode_control = true; has_bandwidth_control = true; has_micgain_control = true; has_attenuator_control = true; has_preamp_control = true; has_noise_control = true; has_noise_reduction = true; has_noise_reduction_control = true; has_auto_notch = true; has_rf_control = true; has_compON = true; has_vox_onoff = true; has_ptt_control = true; has_tune_control = true; defaultCIV = 0x76; adjustCIV(defaultCIV); precision = 1; ndigits = 8; }; void RIG_IC7200::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = sldrMICGAIN; rig_widgets[4].W = sldrSQUELCH; rig_widgets[5].W = btnNR; rig_widgets[6].W = sldrNR; rig_widgets[7].W = sldrPOWER; } //============================================================================= void RIG_IC7200::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\x00'; cmd.append(post); waitFB("select A"); } void RIG_IC7200::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\x01'; cmd.append(post); waitFB("select B"); } long RIG_IC7200::get_vfoA () { string resp = pre_fm; resp += '\x03'; cmd = pre_to; cmd += '\x03'; cmd.append( post ); if (waitFOR(11, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.freq = fm_bcd_be(&replystr[p+5], 10); } return A.freq; } void RIG_IC7200::set_vfoA (long freq) { A.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo A"); } long RIG_IC7200::get_vfoB () { string resp = pre_fm; resp += '\x03'; cmd = pre_to; cmd += '\x03'; cmd.append( post ); if (waitFOR(11, "get vfo B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.freq = fm_bcd_be(&replystr[p+5], 10); } return B.freq; } void RIG_IC7200::set_vfoB (long freq) { selectB(); B.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo B"); } void RIG_IC7200::set_split(bool b) { cmd = pre_to; cmd += '\x0F'; cmd += b ? '\x01' : '\x00'; cmd.append( post ); waitFB("set split"); } // Tranceiver PTT on/off void RIG_IC7200::set_PTT_control(int val) { cmd = pre_to; cmd += '\x1c'; cmd += '\x00'; cmd += (unsigned char) val; cmd.append( post ); waitFB("set ptt"); } // Volume control val 0 ... 100 void RIG_IC7200::set_volume_control(int val) { int ICvol = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x01"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); waitFB("set vol"); } int RIG_IC7200::get_volume_control() { string cstr = "\x14\x01"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(9, "get vol")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) * 100 / 255); } return progStatus.volume; } void RIG_IC7200::get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } int RIG_IC7200::get_smeter() { string cstr = "\x15\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.55); if (mtr > 100) mtr = 100; } } return mtr; } int RIG_IC7200::get_power_out(void) { string cstr = "\x15\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get power out")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.55); if (mtr > 100) mtr = 100; } } return mtr; } int RIG_IC7200::get_swr(void) { string cstr = "\x15\x12"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get swr")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.55); if (mtr > 100) mtr = 100; } } return mtr; } int RIG_IC7200::get_alc(void) { string cstr = "\x15\x13"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get alc")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.55); if (mtr > 100) mtr = 100; } } return mtr; } void RIG_IC7200::set_attenuator(int val) { cmd = pre_to; cmd += '\x11'; cmd += val ? '\x20' : '\x00'; cmd.append( post ); waitFB("set att"); } void RIG_IC7200::set_noise(bool val) { cmd = pre_to; cmd.append("\x16\x22"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set noise"); } int RIG_IC7200::get_noise() { string cstr = "\x16\x22"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get noise")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return progStatus.noise; } void RIG_IC7200::set_noise_reduction(int val) { cmd = pre_to; cmd.append("\x16\x40"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set NR"); } int RIG_IC7200::get_noise_reduction() { string cstr = "\x16\x40"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get NR")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return progStatus.noise_reduction; } // 0 < val < 100 void RIG_IC7200::set_noise_reduction_val(int val) { cmd = pre_to; cmd.append("\x14\x06"); cmd.append(to_bcd(val * 255 / 100, 3)); cmd.append(post); waitFB("set NRval"); } int RIG_IC7200::get_noise_reduction_val() { string cstr = "\x14\x06"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get NRval")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) * 100 / 255); } return progStatus.noise_reduction_val; } void RIG_IC7200::set_preamp(int val) { cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd += (unsigned char)val; cmd.append( post ); waitFB("set Pre"); } int RIG_IC7200::get_preamp() { string cstr = "\x16\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get Pre")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { preamp_label("Pre", true); return true; } else { preamp_label("Pre", false); return false; } } } return progStatus.preamp; } void RIG_IC7200::set_rf_gain(int val) { int ICrfg = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x02"); cmd.append(to_bcd(ICrfg, 3)); cmd.append( post ); waitFB("set RF"); } int RIG_IC7200::get_rf_gain() { string cstr = "\x14\x02"; string resp = pre_fm; cmd = pre_to; cmd.append(cstr).append(post); resp.append(cstr); if (waitFOR(9, "get RF")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) * 100 / 255); } return progStatus.rfgain; } void RIG_IC7200::set_squelch(int val) { int ICsql = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x03"); cmd.append(to_bcd(ICsql, 3)); cmd.append( post ); waitFB("set Sqlch"); } int RIG_IC7200::get_squelch() { string cstr = "\x14\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get squelch")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) * 100 / 255); } return progStatus.squelch; } void RIG_IC7200::set_power_control(double val) { cmd = pre_to; cmd.append("\x14\x0A"); cmd.append(to_bcd((int)(val * 255 / 100), 3)); cmd.append( post ); waitFB("set power"); } int RIG_IC7200::get_power_control() { string cstr = "\x14\x0A"; string resp = pre_fm; cmd = pre_to; cmd.append(cstr).append(post); resp.append(cstr); if (waitFOR(9, "get power")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) * 100 / 255); } return progStatus.power_level; } void RIG_IC7200::get_mic_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } int RIG_IC7200::get_mic_gain() { string cstr = "\x14\x0B"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get mic")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return 0; } void RIG_IC7200::set_mic_gain(int val) { val = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(val,3)); cmd.append(post); waitFB("set mic"); } int RIG_IC7200::get_modeA() { int md = A.imode; string resp = pre_fm; resp += '\x04'; cmd = pre_to; cmd += '\x04'; cmd.append(post); if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p + 5]; if (md > 6) md -= 2; A.iBW = replystr[p + 6]; } } cmd = pre_to; cmd += "\x1A\04"; cmd.append(post); resp = pre_fm; resp += "\x1A\04"; if (waitFOR(9, "data mode?")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if ((replystr[p+6] & 0x01) == 0x01) { if (md == 0) md = 7; if (md == 1) md = 8; } } } return (A.imode = md); } void RIG_IC7200::set_modeA(int val) { A.imode = val; if (val > 6) val -= 7; cmd = pre_to; cmd += '\x06'; cmd += val > 4 ? val + 2 : val; cmd.append( post ); waitFB("set mode A"); cmd = pre_to; cmd += '\x1A'; cmd += '\x04'; if (A.imode > 6) cmd += '\x01'; else cmd += '\x00'; cmd.append( post); waitFB("data mode"); } int RIG_IC7200::get_modeB() { int md = B.imode; cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get mode B")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md -= 2; B.iBW = replystr[p+6]; } } cmd = pre_to; cmd += "x1A\04"; cmd.append(post); resp = pre_fm; resp += "x1A\04"; if (waitFOR(9, "get data B")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if ((replystr[p+6] & 0x01) == 0x01) { if (md == 0) md = 7; if (md == 1) md = 8; } } } return (B.imode = md); } void RIG_IC7200::set_modeB(int val) { B.imode = val; if (val > 6) val -= 7; cmd = pre_to; cmd += '\x06'; cmd += val > 4 ? val + 2 : val; cmd.append( post ); waitFB("set mode B"); cmd = pre_to; cmd += '\x1A'; cmd += '\x04'; if (B.imode > 6) cmd += '\x01'; else cmd += '\x00'; cmd.append( post); waitFB("data mode"); } int RIG_IC7200::get_modetype(int n) { return _mode_type[n]; } int RIG_IC7200::adjust_bandwidth(int m) { switch (m) { case 2: // AM bandwidths_ = IC7200_AMwidths; bw_vals_ = IC7200_bw_vals_AM; bwA = 30; break; case 3: case 5: // CW bandwidths_ = IC7200_SSBwidths; bw_vals_ = IC7200_bw_vals_SSB; bwA = 14; break; case 4: case 6: // RTTY bandwidths_ = IC7200_RTTYwidths; bw_vals_ = IC7200_bw_vals_RTTY; bwA = 28; break; case 0: case 1: case 7: case 8: default: // SSB bandwidths_ = IC7200_SSBwidths; bw_vals_ = IC7200_bw_vals_SSB; bwA = 32; } return bwA; } int RIG_IC7200::def_bandwidth(int m) { return adjust_bandwidth(m); } const char ** RIG_IC7200::bwtable(int m) { switch (m) { case 2: // AM return IC7200_AMwidths; break; case 3: case 5: // CW return IC7200_SSBwidths; break; case 4: case 6: // RTTY return IC7200_RTTYwidths; break; case 0: case 1: case 7: case 8: default: // SSB return IC7200_SSBwidths; } return IC7200_SSBwidths; } void RIG_IC7200::set_bwA(int val) { A.iBW = val; cmd = pre_to; cmd.append("\x1A\x02"); cmd.append(to_bcd(val, 2)); cmd.append( post ); waitFB("set BW A"); } int RIG_IC7200::get_bwA() { cmd = pre_to; cmd += "\x1A\x02"; cmd.append( post ); string resp = pre_fm; resp += "\x1A\x02"; if (waitFOR(8, "get BW A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.iBW = (fm_bcd(&replystr[p+6],2)); } return A.iBW; } void RIG_IC7200::set_bwB(int val) { B.iBW = val; cmd = pre_to; cmd.append("\x1A\x02"); cmd.append(to_bcd(val, 2)); cmd.append( post ); waitFB("set BW B"); } int RIG_IC7200::get_bwB() { cmd = pre_to; cmd += "\x1A\x02"; cmd.append( post ); string resp = pre_fm; resp += "\x1A\x02"; if (waitFOR(8, "get BW B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.iBW = (fm_bcd(&replystr[p+6],2)); } return B.iBW; } void RIG_IC7200::set_auto_notch(int val) { cmd = pre_to; cmd += '\x16'; cmd += '\x41'; cmd += (unsigned char)val; cmd.append( post ); waitFB("set AN"); } int RIG_IC7200::get_auto_notch() { string cstr = "\x16\x41"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get AN")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { auto_notch_label("AN", true); return true; } else { auto_notch_label("AN", false); return false; } } } return progStatus.auto_notch; } void RIG_IC7200::set_compression() { if (progStatus.compON) { cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x01'; cmd.append(post); waitFB("set Comp ON"); } else { cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x00'; cmd.append(post); waitFB("set Comp OFF"); } } void RIG_IC7200::set_vox_onoff() { if (progStatus.vox_onoff) { cmd = pre_to; cmd.append("\x16\x46"); cmd += '\x01'; cmd.append(post); waitFB("set Vox ON"); } else { cmd = pre_to; cmd.append("\x16\x46"); cmd += '\x00'; cmd.append(post); waitFB("set Vox OFF"); } } void RIG_IC7200::tune_rig() { cmd = pre_to; cmd.append("\x1c\x01\x02"); cmd.append( post ); waitFB("tune rig"); } flrig-1.3.24/src/rigs/IC7800.cxx0000644000175000017500000003325412562731651012735 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC7800.h" bool IC7800_DEBUG = true; //============================================================================= // IC-7800 const char IC7800name_[] = "IC-7800"; const char *IC7800modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", "PSK", "PSK-R", NULL}; const char IC7800_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U', 'U', 'L'}; const char IC7800_mode_nbr[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x07, 0x08, 0x12, 0x13 }; const char *IC7800_ssb_bws[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3100", "3200", "3300", "3400", "3500", "3600", NULL }; static int IC7800_bw_vals_SSB[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41, WVALS_LIMIT}; const char *IC7800_rtty_bws[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", NULL }; static int IC7800_bw_vals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32, WVALS_LIMIT}; const char *IC7800_am_bws[] = { "200", "400", "600", "800", "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", "3800", "4000", "4200", "4400", "4600", "4800", "5000", "5200", "5400", "5600", "5800", "6000", "6200", "6400", "6600", "6800", "7000", "7200", "7400", "7800", "7800", "8000", "8200", "8400", "8600", "8800", "9000", "9200", "9400", "9600", "9800", "10000", NULL }; static int IC7800_bw_vals_AM[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41,42,43,44,45,46,47,48,49,50, WVALS_LIMIT}; const char *IC7800_fm_bws[] = { "FIXED", NULL }; static int IC7800_bw_vals_FM[] = { 1, WVALS_LIMIT}; static GUI IC7800_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 54, 165, 156 }, { (Fl_Widget *)btnNR, 2, 185, 50 }, { (Fl_Widget *)sldrNR, 54, 185, 156 }, { (Fl_Widget *)btnIFsh, 214, 125, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 125, 156 }, { (Fl_Widget *)btnNotch, 214, 145, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 165, 156 }, { (Fl_Widget *)sldrPOWER, 266, 185, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC7800::RIG_IC7800() { defaultCIV = 0x6A; name_ = IC7800name_; modes_ = IC7800modes_; bandwidths_ = IC7800_ssb_bws; bw_vals_ = IC7800_bw_vals_SSB; _mode_type = IC7800_mode_type; adjustCIV(defaultCIV); widgets = IC7800_widgets; has_extras = has_cw_wpm = has_cw_spot_tone = has_cw_qsk = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_compON = has_compression = has_micgain_control = has_bandwidth_control = has_smeter = has_power_control = has_volume_control = has_mode_control = has_notch_control = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = has_noise_control = has_noise_reduction = has_noise_reduction_control = has_rf_control = has_sql_control = has_split_AB = has_split = true; precision = 1; ndigits = 8; }; //====================================================================== // IC7800 unique commands //====================================================================== void RIG_IC7800::initialize() { IC7800_widgets[0].W = btnVol; IC7800_widgets[1].W = sldrVOLUME; IC7800_widgets[2].W = sldrRFGAIN; IC7800_widgets[3].W = sldrSQUELCH; IC7800_widgets[4].W = btnNR; IC7800_widgets[5].W = sldrNR; IC7800_widgets[6].W = btnIFsh; IC7800_widgets[7].W = sldrIFSHIFT; IC7800_widgets[8].W = btnNotch; IC7800_widgets[9].W = sldrNOTCH; IC7800_widgets[10].W = sldrMICGAIN; IC7800_widgets[11].W = sldrPOWER; } void RIG_IC7800::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\xD0'; cmd.append(post); sendICcommand(cmd, 6); checkresponse(); } void RIG_IC7800::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\xD1'; cmd.append(post); sendICcommand(cmd, 6); checkresponse(); } bool RIG_IC7800::can_split() { return true; } void RIG_IC7800::set_split(bool val) { split = val; if (val) { cmd.assign(pre_to); cmd.append("\x0F"); cmd += '\x01'; cmd.append( post ); waitFB("Split ON"); } else { cmd.assign(pre_to); cmd.append("\x0F"); cmd += '\x00'; cmd.append( post ); waitFB("Split OFF"); } } int RIG_IC7800::get_split() { int split = 0; cmd.assign(pre_to); cmd.append("\x0F"); cmd.append( post ); if (sendICcommand (cmd, 7)) split = replystr[5]; return split; } void RIG_IC7800::swapvfos() { cmd = pre_to; cmd += 0x07; cmd += 0xB0; cmd.append(post); if (IC7800_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); } void RIG_IC7800::set_modeA(int val) { A.imode = val; cmd = pre_to; cmd += '\x06'; cmd += IC7800_mode_nbr[val]; cmd.append( post ); if (IC7800_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); // digital set / clear if (A.imode >= 10) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; switch (A.imode) { case 12 : cmd += '\x01'; cmd += '\x01';break; case 13 : cmd += '\x01'; cmd += '\x01';break; default : cmd += '\x00'; cmd += '\x00'; } cmd.append( post); if (IC7800_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); } } int RIG_IC7800::get_modeA() { int md = 0; cmd = pre_to; cmd += '\x04'; cmd.append(post); if (sendICcommand (cmd, 8 )) { for (md = 0; md < 10; md++) if (replystr[5] == IC7800_mode_nbr[md]) break; if (md == 10) md = 0; A.imode = md; } else checkresponse(); if (md == 0 || md == 1) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; cmd.append(post); if (sendICcommand(cmd, 9)) { if (replystr[6] == 0x01 && A.imode == 0x01) { A.imode = 9 + A.imode * 3 + replystr[6]; } } } return A.imode; } void RIG_IC7800::set_modeB(int val) { B.imode = val; cmd = pre_to; cmd += '\x06'; cmd += IC7800_mode_nbr[val]; cmd.append( post ); if (IC7800_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); // digital set / clear if (B.imode >= 12) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; switch (B.imode) { case 12 : cmd += '\x01'; cmd += '\x01';break; case 13 : cmd += '\x01'; cmd += '\x01';break; default : cmd += '\x00'; cmd += '\x00'; } cmd.append( post); if (IC7800_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); } } int RIG_IC7800::get_modeB() { int md = 0; cmd = pre_to; cmd += '\x04'; cmd.append(post); if (sendICcommand (cmd, 8 )) { for (md = 0; md < 10; md++) if (replystr[5] == IC7800_mode_nbr[md]) break; if (md == 10) md = 0; B.imode = md; } else checkresponse(); if (md == 0 || md == 1) { cmd = pre_to; cmd += '\x1A'; cmd += '\x06'; cmd.append(post); if (sendICcommand(cmd, 9)) { if (replystr[6] == 0x01 && A.imode == 0x01) { A.imode = 9 + A.imode * 3 + replystr[6]; } } } return B.imode; } int RIG_IC7800::get_bwA() { if (A.imode == 5) return 0; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(post); if (sendICcommand (cmd, 8)) { A.iBW = fm_bcd(&replystr[6], 2); } return A.iBW; } void RIG_IC7800::set_bwA(int val) { A.iBW = val; if (A.imode == 5) return; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(to_bcd(A.iBW, 2)); cmd.append(post); if (IC7800_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); } int RIG_IC7800::get_bwB() { if (B.imode == 5) return 0; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(post); if (sendICcommand (cmd, 8)) { B.iBW = fm_bcd(&replystr[6], 2); } return B.iBW; } void RIG_IC7800::set_bwB(int val) { B.iBW = val; if (B.imode == 5) return; cmd = pre_to; cmd.append("\x1a\x03"); cmd.append(to_bcd(A.iBW, 2)); cmd.append(post); if (IC7800_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); sendICcommand (cmd, 6); checkresponse(); } int RIG_IC7800::adjust_bandwidth(int m) { int bw = 0; switch (m) { case 2: // AM bandwidths_ = IC7800_am_bws; bw_vals_ = IC7800_bw_vals_AM; bw = 19; break; case 5: // FM bandwidths_ = IC7800_fm_bws; bw_vals_ = IC7800_bw_vals_FM; bw = 0; break; case 4: case 8: // RTTY bandwidths_ = IC7800_rtty_bws; bw_vals_ = IC7800_bw_vals_RTTY; bw = 12; break; case 3: case 7: // CW bandwidths_ = IC7800_ssb_bws; bw_vals_ = IC7800_bw_vals_SSB; bw = 12; break; case 0: case 1: // SSB case 12: case 13: // PKT default: bandwidths_ = IC7800_ssb_bws; bw_vals_ = IC7800_bw_vals_SSB; bw = 34; break; } return bw; } int RIG_IC7800::def_bandwidth(int m) { int bw = 0; switch (m) { case 2: // AM bw = 19; break; case 5: // FM bw = 0; break; case 4: case 8: // RTTY bw = 12; break; case 3: case 7: // CW bw = 12; break; case 0: case 1: // SSB case 12: case 13: // PKT default: bw = 34; } return bw; } void RIG_IC7800::set_mic_gain(int v) { ICvol = (int)(v * 255 / 100); if (!progStatus.USBaudio) { cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); } else { cmd = pre_to; cmd += '\x1A'; cmd += '\x05'; cmd += '\x00'; cmd += '\x29'; cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); } sendICcommand (cmd, 6); checkresponse(); if (RIG_DEBUG) LOG_WARN("%s", str2hex(cmd.data(), cmd.length())); } static const char *atten_labels[] = { "OFF", "3 dB", "6 dB", "9 dB", "12 dB", "15 dB", "18 dB", "7 dB"}; void RIG_IC7800::set_attenuator(int val) { int cmdval = 0; atten_level++; if (atten_level >= 7) atten_level = 0; cmdval = atten_level; atten_label(atten_labels[atten_level], true); cmd = pre_to; cmd += '\x11'; cmd += cmdval; cmd.append( post ); sendICcommand(cmd,6); checkresponse(); if (RIG_DEBUG) LOG_INFO("%s", str2hex(cmd.data(), cmd.length())); } int RIG_IC7800::get_attenuator() { cmd = pre_to; cmd += '\x11'; cmd.append( post ); if (sendICcommand(cmd,7)) { if (replystr[4] == 0x06) { atten_level = replystr[5]; if (atten_level >= 0 && atten_level <= 7) atten_label(atten_labels[atten_level], true); } } return atten_level; } void RIG_IC7800::set_compression() { if (progStatus.compON) { cmd.assign(pre_to).append("\x14\x0E"); cmd.append(to_bcd(progStatus.compression * 255 / 100, 3)); cmd.append( post ); waitFB("set comp"); cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x01'; cmd.append(post); waitFB("set Comp ON"); } else{ cmd.assign(pre_to).append("\x16\x44"); cmd += '\x00'; cmd.append(post); waitFB("set Comp OFF"); } } void RIG_IC7800::set_vox_onoff() { if (progStatus.vox_onoff) { cmd.assign(pre_to).append("\x16\x46\x01"); cmd.append( post ); waitFB("set vox ON"); } else { cmd.assign(pre_to).append("\x16\x46"); cmd += '\x00'; // ALH cmd.append( post ); waitFB("set vox OFF"); } } void RIG_IC7800::set_vox_gain() { cmd.assign(pre_to).append("\x14\x16"); // ALH values 0-255 cmd.append(to_bcd((int)(progStatus.vox_gain * 2.55), 3)); cmd.append( post ); waitFB("SET vox gain"); } void RIG_IC7800::set_vox_anti() { cmd.assign(pre_to).append("\x14\x17"); //ALH values 0-255 cmd.append(to_bcd((int)(progStatus.vox_anti * 2.55), 3)); cmd.append( post ); waitFB("SET anti-vox"); } void RIG_IC7800::set_vox_hang() { cmd.assign(pre_to).append("\x1A\x05\0x01\0x83"); //ALH values 00-20 = 0.0 - 2.0 sec cmd.append(to_bcd((int)(progStatus.vox_hang / 10 ), 2)); cmd.append( post ); waitFB("SET vox hang"); } // CW controls void RIG_IC7800::set_cw_wpm() { cmd.assign(pre_to).append("\x14\x0C"); // values 0-255 cmd.append(to_bcd(round((progStatus.cw_wpm - 6) * 255 / (60 - 6)), 3)); cmd.append( post ); waitFB("SET cw wpm"); } void RIG_IC7800::set_cw_qsk() { int n = round(progStatus.cw_qsk * 10); // values 0-255 cmd.assign(pre_to).append("\x14\x0F"); cmd.append(to_bcd(n, 3)); cmd.append(post); waitFB("Set cw qsk delay"); } void RIG_IC7800::set_cw_spot_tone() { cmd.assign(pre_to).append("\x14\x09"); // values 0=300Hz 255=900Hz int n = round((progStatus.cw_spot_tone - 300) * 255.0 / 600.0); if (n > 255) n = 255; if (n < 0) n = 0; cmd.append(to_bcd(n, 3)); cmd.append( post ); waitFB("SET cw spot tone"); } void RIG_IC7800::set_cw_vol() { cmd.assign(pre_to); cmd.append("\x14\x15"); cmd.append(to_bcd((int)(progStatus.cw_vol * 2.55), 3)); cmd.append( post ); waitFB("SET cw sidetone volume"); } flrig-1.3.24/src/rigs/TS570.cxx0000644000175000017500000004125112562731647012706 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "TS570.h" #include "support.h" static const char TS570name_[] = "TS-570"; static const char *TS570modes_[] = { "LSB", "USB", "CW", "FM", "AM", "FSK", "CW-R", "FSK-R", NULL}; static const char TS570_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '9' }; static const char TS570_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'U' }; static const char *TS570_SSBwidths[] = { // same for AM and FM "NARR", "WIDE", NULL}; static int TS570_SSB_bw_vals[] = { 1,2, WVALS_LIMIT}; static const char *TS570_SSBbw[] = { "FW0000;", "FW0001;", NULL}; static const char *TS570_CWwidths[] = { "50", "100", "200", "300", "400", "600", "1000", "2000", NULL}; static int TS570_CW_bw_vals[] = { 1,2,3,4,5,6,7,8, WVALS_LIMIT}; static const char *TS570_CWbw[] = { "FW0050;", "FW0100;", "FW0200;", "FW0300;", "FW0400;", "FW0600;", "FW1000;", "FW2000;", NULL}; static const char *TS570_FSKwidths[] = { "250", "500", "1000", "1500", NULL}; static int TS570_FSK_bw_vals[] = { 1,2,3,4, WVALS_LIMIT}; static const char *TS570_FSKbw[] = { "FW0250;", "FW0500;", "FW1000;", "FW1500;", NULL}; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 54, 165, 368 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)sldrSQUELCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 54, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; void RIG_TS570::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = sldrPOWER; rig_widgets[4].W = btnIFsh; rig_widgets[5].W = sldrIFSHIFT; rig_widgets[6].W = sldrSQUELCH; rig_widgets[7].W = sldrMICGAIN; cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A", cmd, ""); cmd = "AC001;"; sendCommand(cmd); showresp(WARN, ASC, "Thru - tune ON", cmd, ""); get_preamp(); get_attenuator(); is_TS570S = get_ts570id(); } RIG_TS570::RIG_TS570() { // base class values name_ = TS570name_; modes_ = TS570modes_; bandwidths_ = TS570_SSBwidths; bw_vals_ = TS570_SSB_bw_vals; widgets = rig_widgets; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; A.freq = 14070000; A.imode = 1; A.iBW = 1; B.freq = 7035000; B.imode = 1; B.iBW = 1; can_change_alt_vfo = true; has_notch_control = false; has_smeter = has_power_out = has_split = has_split_AB = has_swr_control = has_ifshift_control = has_noise_control = has_micgain_control = has_volume_control = has_power_control = has_tune_control = has_attenuator_control = has_preamp_control = has_mode_control = has_bandwidth_control = has_rf_control = has_sql_control = has_ptt_control = true; precision = 1; ndigits = 8; } bool RIG_TS570::get_ts570id() { cmd = "ID;"; if (wait_char(';', 6, 100, "get ID", ASC) < 6) return false; size_t p = replystr.rfind("ID"); if (p == string::npos) return false; if (replystr[p + 3] == '1' && replystr[p + 4] == '8') return true; return false; } void RIG_TS570::selectA() { cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "select A", cmd, ""); } void RIG_TS570::selectB() { cmd = "FR1;"; sendCommand(cmd); showresp(WARN, ASC, "select B", cmd, ""); } void RIG_TS570::set_split(bool val) { split = val; if (useB) { if (val) { cmd = "FR1;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on A", cmd, ""); } else { cmd = "FR1;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, ""); } } else { if (val) { cmd = "FR0;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on B", cmd, ""); } else { cmd = "FR0;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, ""); } } Fl::awake(highlight_vfo, (void *)0); } int RIG_TS570::get_split() { cmd = "IF;"; if (wait_char(';', 38, 100, "get IF", ASC) < 38) return split; size_t p = replystr.rfind("IF"); if (p == string::npos) return split; split = replystr[p+32] ? true : false; return split; } long RIG_TS570::get_vfoA () { cmd = "FA;"; if (wait_char(';', 14, 100, "get vfoA", ASC) < 14) return A.freq; size_t p = replystr.rfind("FA"); if (p == string::npos) return A.freq; int f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p + n] - '0'; A.freq = f; return A.freq; } void RIG_TS570::set_vfoA (long freq) { A.freq = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfoA", cmd, ""); } long RIG_TS570::get_vfoB () { cmd = "FB;"; if (wait_char(';', 14, 100, "get vfoB", ASC) < 14) return freqB; size_t p = replystr.rfind("FB"); if (p == string::npos) return freqB; int f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p + n] - '0'; freqB = f; return freqB; } void RIG_TS570::set_vfoB (long freq) { freqB = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfoB", cmd, ""); } // SM cmd 0 ... 100 (rig values 0 ... 15) int RIG_TS570::get_smeter() { cmd = "SM;"; if (wait_char(';', 7, 100, "get smeter", ASC) < 7) return 0; size_t p = replystr.rfind("SM"); if (p == string::npos) return -1; replystr[p + 6] = 0; int mtr = atoi(&replystr[p + 2]); mtr = (mtr * 100) / 15; return mtr; } // RM cmd 0 ... 100 (rig values 0 ... 8) int RIG_TS570::get_swr() { sendCommand("RM1;"); // select measurement #1 cmd = "RM;"; // select measurement '1' (swr) and read meter if (wait_char(';', 8, 100, "get swr", ASC) < 8) return 0; size_t p = replystr.rfind("RM1"); if (p == string::npos) return 0; replystr[p + 7] = 0; int mtr = atoi(&replystr[p + 3]); mtr = (mtr * 100) / 15; return mtr; } // power output measurement 0 ... 15 int RIG_TS570::get_power_out() { cmd = "SM;"; if (wait_char(';', 7, 100, "get pwr out", ASC) < 7) return 0; size_t p = replystr.rfind("SM"); if (p == string::npos) return 0; replystr[p + 6] = 0; int mtr = atoi(&replystr[p + 2]); mtr = (int)(0.34 + (((0.035*mtr - 0.407)*mtr + 5.074)*mtr)); if (mtr < 1) mtr = 0; if (mtr > 100) mtr = 100; return mtr; } // (xcvr power level is in 5W increments) void RIG_TS570::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set pwr", cmd, ""); } int RIG_TS570::get_power_control() { cmd = "PC;"; if (wait_char(';', 6, 100, "get pwr ctl", ASC) < 6) return 0; size_t p = replystr.rfind("PC"); if (p == string::npos) return 0; replystr[p + 5] = 0; int mtr = atoi(&replystr[p + 2]); return mtr; } // Volume control return 0 ... 100 (rig values 0 ... 255) int RIG_TS570::get_volume_control() { cmd = "AG;"; if (wait_char(';', 6, 100, "get vol", ASC) < 6) return 0; size_t p = replystr.rfind("AG"); if (p == string::npos) return 0; replystr[p + 5] = 0; int val = atoi(&replystr[p + 2]); return (int)(val / 2.55); } void RIG_TS570::set_volume_control(int val) { int ivol = (int)(val * 2.55); showresp(WARN, ASC, "set vol", cmd, ""); cmd = "AG000;"; for (int i = 4; i > 1; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); } // Tranceiver PTT on/off void RIG_TS570::set_PTT_control(int val) { if (val) cmd = "TX;"; else cmd = "RX;"; sendCommand(cmd); showresp(WARN, ASC, "PTT", cmd, ""); } void RIG_TS570::tune_rig() { cmd = "AC 11;"; sendCommand(cmd); showresp(WARN, ASC, "TUNE", cmd, ""); } void RIG_TS570::set_attenuator(int val) { att_on = val; if (val) cmd = "RA01;"; else cmd = "RA00;"; sendCommand(cmd); showresp(WARN, ASC, "set Att", cmd, ""); } int RIG_TS570::get_attenuator() { cmd = "RA;"; if (wait_char(';', 5, 100, "get att", ASC) < 5) return att_on; size_t p = replystr.rfind("RA"); if (p == string::npos) return att_on; if (replystr[p + 2] == '0' && replystr[p + 3] == '0') att_on = 0; else att_on = 1; return att_on; } void RIG_TS570::set_preamp(int val) { preamp_on = val; if (val) cmd = "PA1;"; else cmd = "PA0;"; sendCommand(cmd); showresp(WARN, ASC, "set pre", cmd, ""); } int RIG_TS570::get_preamp() { cmd = "PA;"; if (wait_char(';', 4, 100, "get pre", ASC) < 4 ) return preamp_on; size_t p = replystr.rfind("PA"); if (p == string::npos) return preamp_on; if (replystr[p + 2] == '1') preamp_on = 1; else preamp_on = 0; return preamp_on; } void RIG_TS570::set_widths() { switch (A.imode) { case 0: case 1: case 3: case 4: bandwidths_ = TS570_SSBwidths; bw_vals_ = TS570_SSB_bw_vals; A.iBW = 1; break; case 2: case 6: bandwidths_ = TS570_CWwidths; bw_vals_ = TS570_CW_bw_vals; A.iBW = 5; break; case 5: case 7: bandwidths_ = TS570_FSKwidths; bw_vals_ = TS570_FSK_bw_vals; A.iBW = 2; break; default: break; } } const char **RIG_TS570::bwtable(int m) { switch (m) { case 0: case 1: case 3: case 4: return TS570_SSBwidths; break; case 2: case 6: return TS570_CWwidths; break; case 5: case 7: return TS570_FSKwidths; break; } return TS570_SSBwidths; } void RIG_TS570::set_modeA(int val) { A.imode = val; cmd = "MD"; cmd += TS570_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set modeA", cmd, ""); set_widths(); } int RIG_TS570::get_modeA() { cmd = "MD;"; if (wait_char(';', 4, 100, "get modeA", ASC) < 4) return A.imode; size_t p = replystr.rfind("MD"); if (p == string::npos) return A.imode; int md = replystr[p + 2]; md = md - '1'; if (md == 8) md = 7; A.imode = md; set_widths(); return A.imode; } void RIG_TS570::set_modeB(int val) { B.imode = val; cmd = "MD"; cmd += TS570_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set modeB", cmd, ""); set_widths(); } int RIG_TS570::get_modeB() { cmd = "MD;"; if (wait_char(';', 4, 100, "get modeB", ASC) < 4) return B.imode; size_t p = replystr.rfind("MD"); if (p == string::npos) return B.imode; int md = replystr[p + 2]; md = md - '1'; if (md == 8) md = 7; B.imode = md; set_widths(); return B.imode; } int RIG_TS570::adjust_bandwidth(int val) { switch (val) { case 0: case 1: case 3: case 4: bandwidths_ = TS570_SSBwidths; bw_vals_ = TS570_SSB_bw_vals; return 1; case 2: case 6: bandwidths_ = TS570_CWwidths; bw_vals_ = TS570_CW_bw_vals; return 5; case 5: case 7: bandwidths_ = TS570_FSKwidths; bw_vals_ = TS570_FSK_bw_vals; return 2; } return 1; } int RIG_TS570::def_bandwidth(int val) { switch (val) { case 0: case 1: case 3: case 4: return 1; case 2: case 6: return 5; case 5: case 7: return 2; } return 2; } void RIG_TS570::set_bwA(int val) { A.iBW = val; switch (A.imode) { case 0: case 1: case 3: case 4: cmd = TS570_SSBbw[A.iBW]; sendCommand(cmd, 0); break; case 2: case 6: cmd = TS570_CWbw[A.iBW]; sendCommand(cmd, 0); break; case 5: case 7: cmd = TS570_FSKbw[A.iBW]; sendCommand(cmd, 0); break; default: break; } showresp(WARN, ASC, "set bwA", cmd, ""); } int RIG_TS570::get_bwA() { int i; cmd = "FW;"; if (wait_char(';', 7, 100, "get bwA", ASC) < 7) return A.iBW; size_t p = replystr.rfind("FW"); if (p == string::npos) return A.iBW; string test = replystr.substr(p, 7); switch (A.imode) { case 0: case 1: case 3: case 4: for (i = 0; TS570_SSBbw[i] != NULL; i++) if (test == TS570_SSBbw[i]) break; if (TS570_SSBbw[i] != NULL) A.iBW = i; else A.iBW = 1; break; case 2: case 6: for (i = 0; TS570_CWbw[i] != NULL; i++) if (test == TS570_CWbw[i]) break; if (TS570_CWbw[i] != NULL) A.iBW = i; else A.iBW = 1; break; case 5: case 7: for (i = 0; TS570_FSKbw[i] != NULL; i++) if (test == TS570_FSKbw[i]) break; if (TS570_FSKbw[i] != NULL) A.iBW = i; else A.iBW = 1; break; default: break; } return A.iBW; } void RIG_TS570::set_bwB(int val) { B.iBW = val; switch (B.imode) { case 0: case 1: case 3: case 4: cmd = TS570_SSBbw[B.iBW]; sendCommand(cmd, 0); break; case 2: case 6: cmd = TS570_CWbw[B.iBW]; sendCommand(cmd, 0); break; case 5: case 7: cmd = TS570_FSKbw[B.iBW]; sendCommand(cmd, 0); break; default: break; } showresp(WARN, ASC, "set bwB", cmd, ""); } int RIG_TS570::get_bwB() { int i; cmd = "FW;"; if (wait_char(';', 7, 100, "get bwB", ASC) < 7) return B.iBW; size_t p = replystr.rfind("FW"); if (p == string::npos) return B.iBW; string test = replystr.substr(p,7); switch (B.imode) { case 0: case 1: case 3: case 4: for (i = 0; TS570_SSBbw[i] != NULL; i++) if (test == TS570_SSBbw[i]) break; if (TS570_SSBbw[i] != NULL) B.iBW = i; else B.iBW = 1; break; case 2: case 6: for (i = 0; TS570_CWbw[i] != NULL; i++) if (test == TS570_CWbw[i]) break; if (TS570_CWbw[i] != NULL) B.iBW = i; else B.iBW = 1; break; case 5: case 7: for (i = 0; TS570_FSKbw[i] != NULL; i++) if (test == TS570_FSKbw[i]) break; if (TS570_FSKbw[i] != NULL) B.iBW = i; else B.iBW = 1; break; default: break; } return B.iBW; } int RIG_TS570::get_modetype(int n) { return TS570_mode_type[n]; } // val 0 .. 100 void RIG_TS570::set_mic_gain(int val) { cmd = "MG000;"; for (int i = 4; i > 1; i--) { cmd[i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set mic", cmd, ""); } int RIG_TS570::get_mic_gain() { cmd = "MG;"; if (wait_char(';', 6, 100, "get mic", ASC) < 6) return 0; size_t p = replystr.rfind("MG"); if (p == string::npos) return 0; replystr[p + 5] = 0; int val = atoi(&replystr[p + 2]); return val; } void RIG_TS570::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_TS570::set_noise(bool b) { if (b) cmd = "NB1;"; else cmd = "NB0;"; sendCommand(cmd); showresp(WARN, ASC, "set NB", cmd, ""); } int RIG_TS570::get_noise() { cmd = "NB;"; if (wait_char(';', 4, 100, "get NB", ASC) < 4) return 0; size_t p = replystr.rfind("NB"); if (p == string::npos) return 0; return (replystr[p + 2] == '1'); } //====================================================================== // IF shift command // step size is 100 Hz //====================================================================== void RIG_TS570::set_if_shift(int val) { cmd = "IS+0000;"; if (val < 0) cmd[2] = '-'; val = abs(val); for (int i = 6; i > 2; i--) { cmd[i] += val % 10; val /= 10; } sendCommand(cmd, 0); showresp(WARN, ASC, "set IF shift", cmd, ""); } bool RIG_TS570::get_if_shift(int &val) { size_t p = 0; cmd = "IS;"; if (wait_char(';', 8, 100, "get IFsh", ASC) >= 8) { p = replystr.rfind("IS"); if (p == string::npos) return false; replystr[p + 7] = 0; val = atoi(&replystr[p + 3]); if (replystr[p+2] == '-') val = -val; return true; } val = 0; return false; } void RIG_TS570::get_if_min_max_step(int &min, int &max, int &step) { min = -1000; max = 1000; step = 100; } void RIG_TS570::set_rf_gain(int val) { cmd = "RG"; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd,0); showresp(WARN, ASC, "set rf gain", cmd, ""); } int RIG_TS570::get_rf_gain() { int val = progStatus.rfgain; cmd = "RG;"; if (wait_char(';', 6, 100, "get rf gain", ASC) < 6) return val; size_t p = replystr.rfind("RG"); if (p != string::npos) val = fm_decimal(&replystr[p+2], 3); return val; } void RIG_TS570::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } void RIG_TS570::set_squelch(int val) { cmd = "SQ"; cmd.append(to_decimal(abs(val),3)).append(";"); sendCommand(cmd,0); showresp(WARN, ASC, "set squelch", cmd, ""); } int RIG_TS570::get_squelch() { cmd = "SQ;"; if (wait_char(';', 6, 100, "get squelch", ASC) < 6) return 0; size_t p = replystr.rfind("SQ"); if (p == string::npos) return 0; replystr[p + 5] = 0; return atoi(&replystr[p + 2]); } void RIG_TS570::get_squelch_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } flrig-1.3.24/src/rigs/TS450S.cxx0000644000175000017500000001671012562731647013030 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "TS450S.h" #include "support.h" static const char TS450Sname_[] = "TS-450S"; static const char *TS450Smodes_[] = { "LSB", "USB", "CW", "FM", "AM", "FSK", "CW-R", "FSK-R", NULL}; static const char TS450S_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '9' }; static const char TS450S_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'U' }; static const char *TS450S_widths[] = { "NONE", "FM-W", "FM-N", "AM", "SSB", "CW", NULL}; static int TS450S_bw_vals[] = { 1,2,3,4,5,6, WVALS_LIMIT}; static const char *TS450S_filters[] = { "000", "002", "003", "005", "007", "009", NULL}; RIG_TS450S::RIG_TS450S() { // base class values name_ = TS450Sname_; modes_ = TS450Smodes_; _mode_type = TS450S_mode_type; bandwidths_ = TS450S_widths; bw_vals_ = TS450S_bw_vals; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeB = modeA = def_mode = 1; bwB = bwA = def_bw = 1; freqB = freqA = def_freq = 14070000; can_change_alt_vfo = true; has_noise_control = has_micgain_control = has_volume_control = has_power_control = has_tune_control = has_attenuator_control = has_preamp_control = has_notch_control = has_ifshift_control = has_swr_control = false; has_smeter = has_swr_control = has_mode_control = has_bandwidth_control = has_ptt_control = true; precision = 10; ndigits = 7; } void RIG_TS450S::initialize() { cmd = "RM1;"; // select measurement '1' (swr) sendCommand(cmd); } long RIG_TS450S::get_vfoA () { cmd = "FA;"; int ret = wait_char(';', 14, 100, "get vfo A", ASC); if (ret < 14) return freqA; size_t p = replystr.rfind("FA"); if (p == string::npos) return freqA; int f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p + n] - '0'; freqA = f; return freqA; } void RIG_TS450S::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfo A", cmd, ""); } long RIG_TS450S::get_vfoB () { cmd = "FB;"; int ret = wait_char(';', 14, 100, "get vfo B", ASC); if (ret < 14) return freqB; size_t p = replystr.rfind("FB"); if (p == string::npos) return freqB; int f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p + n] - '0'; freqB = f; return freqB; } void RIG_TS450S::set_vfoB (long freq) { freqB = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfo B", cmd, ""); } // SM cmd 0 ... 100 (rig values 0 ... 15) int RIG_TS450S::get_smeter() { cmd = "SM;"; int ret = wait_char(';', 7, 100, "get smeter", ASC); if (ret < 7) return 0; size_t p = replystr.rfind("SM"); if (p == string::npos) return 0; replystr[p + 6] = 0; int mtr = atoi(&replystr[p + 2]); mtr = (mtr * 100) / 30; return mtr; } // RM cmd 0 ... 100 (rig values 0 ... 8) int RIG_TS450S::get_swr() { cmd = "RM;"; int ret = wait_char(';', 8, 100, "get swr", ASC); if (ret < 8) return 0; size_t p = replystr.rfind("RM"); if (p == string::npos) return 0; replystr[p + 7] = 0; int mtr = atoi(&replystr[p + 3]); mtr = (mtr * 50) / 30; return mtr; } // Tranceiver PTT on/off void RIG_TS450S::set_PTT_control(int val) { showresp(WARN, ASC, "PTT", val ? "on" : "off", ""); if (val) cmd = "TX;"; else cmd = "RX;"; sendCommand(cmd); } void RIG_TS450S::set_modeA(int val) { showresp(WARN, ASC, "set mode A", "", ""); modeA = val; cmd = "MD"; cmd += TS450S_mode_chr[val]; cmd += ';'; sendCommand(cmd); } int RIG_TS450S::get_modeA() { cmd = "IF;"; int ret = wait_char(';', 38, 100, "get modeA", ASC); if (ret < 38) return split; size_t p = replystr.rfind("IF"); if (p == string::npos) return modeA; modeA = replystr[p+29] - '1'; // 0 - 6, 8 if (modeA == 8) modeA = 7; return modeA; } void RIG_TS450S::set_modeB(int val) { showresp(WARN, ASC, "set mode B", "", ""); modeB = val; cmd = "MD"; cmd += TS450S_mode_chr[val]; cmd += ';'; sendCommand(cmd); } int RIG_TS450S::get_modeB() { cmd = "IF;"; int ret = wait_char(';', 38, 100, "get mode B", ASC); if (ret < 38) return split; size_t p = replystr.rfind("IF"); if (p == string::npos) return modeA; modeB = replystr[p+29] - '1'; // 0 - 6, 8 if (modeB == 8) modeB = 7; return modeB; } int RIG_TS450S::get_modetype(int n) { return _mode_type[n]; } static string bw_str = "FL001001;"; void RIG_TS450S::set_bwA(int val) { get_bwA(); showresp(WARN, ASC, "set bw A", "", ""); bwA = val; cmd = bw_str.substr(0, 5); cmd.append(TS450S_filters[val]).append(";"); sendCommand(cmd); } int RIG_TS450S::get_bwA() { cmd = "FL;"; int ret = wait_char(';', 9, 100, "get bwA", ASC); if (ret < 9) return bwA; bw_str = replystr; size_t p = replystr.rfind("FL"); if (p == string::npos) return bwA; replystr[p + 8] = 0; int bw = 0; while (TS450S_filters[bw]) { if (strcmp(&replystr[p + 5], TS450S_filters[bw]) == 0) return bwA = bw; bw++; } return bwA; } void RIG_TS450S::set_bwB(int val) { get_bwB(); showresp(WARN, ASC, "set bw B", "", ""); bwB = val; cmd = bw_str.substr(0, 5); cmd.append(TS450S_filters[val]).append(";"); sendCommand(cmd); } int RIG_TS450S::get_bwB() { cmd = "FL;"; int ret = wait_char(';', 9, 100, "get bwB", ASC); if (ret < 9) return bwB; bw_str = replystr; size_t p = replystr.rfind("FL"); if (p == string::npos) return bwB; replystr[p + 8] = 0; int bw = 0; while (TS450S_filters[bw]) { if (strcmp(&replystr[p + 5], TS450S_filters[bw]) == 0) return bwB = bw; bw++; } return bwB; } int RIG_TS450S::def_bandwidth(int val) { if (val == 0 || val == 1) return 4; else if (val == 2 || val == 6) return 5; else if (val == 3) return 1; else if (val == 4) return 3; else if (val == 5 || val == 7) return 2; return 4; } void RIG_TS450S::selectA() { showresp(WARN, ASC, "select A", "", ""); cmd = "FR0;"; sendCommand(cmd); cmd = "FT0;"; sendCommand(cmd); } void RIG_TS450S::selectB() { showresp(WARN, ASC, "select B", "", ""); cmd = "FR1;"; sendCommand(cmd); cmd = "FT1;"; sendCommand(cmd); } bool RIG_TS450S::can_split() { return true; } void RIG_TS450S::set_split(bool val) { if (val) { cmd = "FR0;"; sendCommand(cmd); cmd = "FT1;"; sendCommand(cmd); } else { cmd = "FR0;"; sendCommand(cmd); cmd = "FT0;"; sendCommand(cmd); } } int RIG_TS450S::get_split() { cmd = "IF;"; int ret = wait_char(';', 38, 100, "get split", ASC); if (ret < 38) return split; size_t p = replystr.rfind("IF"); if (p == string::npos) return split; split = replystr[p+32] ? true : false; return split; } flrig-1.3.24/src/rigs/IC7700.cxx0000644000175000017500000000223012562731647012727 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC7700.h" #include "debug.h" #include "support.h" //============================================================================= // IC-7700 const char IC7700name_[] = "IC-7700"; RIG_IC7700::RIG_IC7700() { defaultCIV = 0x74; name_ = IC7700name_; adjustCIV(defaultCIV); }; flrig-1.3.24/src/rigs/ICbase.cxx0000644000175000017500000001136712562731651013252 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "ICbase.h" #include "debug.h" #include "support.h" //============================================================================= void RIG_ICOM::adjustCIV(uchar adr) { CIV = adr; pre_to[2] = ok[3] = bad[3] = pre_fm[3] = CIV; } void RIG_ICOM::checkresponse() { if (!progStatus.use_tcpip && !RigSerial.IsOpen()) return; if (replystr.rfind(ok) != string::npos) return; string s1 = str2hex(cmd.c_str(), cmd.length()); string s2 = str2hex(replystr.c_str(), replystr.length()); LOG_ERROR("\nsent %s\nreply %s", s1.c_str(), s2.c_str()); } bool RIG_ICOM::sendICcommand(string cmd, int nbr) { int ret = sendCommand(cmd); if (!progStatus.use_tcpip && !RigSerial.IsOpen()) return false; if (ret < nbr) { LOG_ERROR("Expected %d received %d", nbr, ret); return false; } if (ret > nbr) replystr.erase(0, ret - nbr); // look for preamble at beginning if (replystr.rfind(pre_fm) == string::npos) { LOG_ERROR("preamble: %s not in %s", pre_fm.c_str(), cmd.c_str()); return false; } // look for postamble if (replystr.rfind(post) == string::npos) { LOG_ERROR("postample: %s not at end of %s", post.c_str(), cmd.c_str()); return false; } return true; } void RIG_ICOM::delayCommand(string cmd, int wait) { int oldwait = progStatus.comm_wait; progStatus.comm_wait += wait; sendCommand(cmd); progStatus.comm_wait = oldwait; } bool RIG_ICOM::waitFB(const char *sz) { char sztemp[50]; string returned = ""; string tosend = cmd; if (!progStatus.use_tcpip && !RigSerial.IsOpen()) { replystr = returned; snprintf(sztemp, sizeof(sztemp), "%s TEST", sz); showresp(INFO, HEX, sztemp, tosend, returned); return false; } int cnt = 0, repeat = 0, num = cmd.length() + ok.length(); int wait_msec = (int)(num*11000.0/RigSerial.Baud() + progStatus.use_tcpip ? progStatus.tcpip_ping_delay : 0) / 10; for (repeat = 0; repeat < progStatus.comm_retries; repeat++) { sendCommand(cmd, 0); returned = ""; for ( cnt = 0; cnt < wait_msec; cnt++) { readResponse(); returned.append(replystr); if (returned.find(ok) != string::npos) { replystr = returned; waited = 10 * (repeat * wait_msec + cnt); snprintf(sztemp, sizeof(sztemp), "%s ans in %d ms, OK", sz, waited); showresp(INFO, HEX, sztemp, tosend, returned); return true; } if (returned.find(bad) != string::npos) { replystr = returned; waited = 10 * (repeat * wait_msec + cnt); snprintf(sztemp, sizeof(sztemp), "%s ans in %d ms, FAIL", sz, waited); showresp(ERR, HEX, sztemp, tosend, returned); return false; } MilliSleep(10); Fl::awake(); } } replystr = returned; waited = 10 * repeat * wait_msec; snprintf(sztemp, sizeof(sztemp), "%s TIMED OUT in %d ms", sz, waited); showresp(INFO, HEX, sztemp, tosend, returned); return false; } bool RIG_ICOM::waitFOR(size_t n, const char *sz) { char sztemp[50]; string returned = ""; string tosend = cmd; int cnt = 0, repeat = 0; size_t num = n + cmd.length(); int delay = (int)(num * 11000.0 / RigSerial.Baud() + progStatus.use_tcpip ? progStatus.tcpip_ping_delay : 0) / 10; if (!progStatus.use_tcpip && !RigSerial.IsOpen()) { replystr = returned; snprintf(sztemp, sizeof(sztemp), "%s TEST", sz); showresp(INFO, HEX, sztemp, tosend, returned); return false; } for (repeat = 0; repeat < progStatus.comm_retries; repeat++) { sendCommand(tosend, 0); returned = ""; for ( cnt = 0; cnt < delay; cnt++) { readResponse(); returned.append(replystr); if (returned.length() >= num) { replystr = returned; waited = 10 * (repeat * delay + cnt); snprintf(sztemp, sizeof(sztemp), "%s ans in %d ms, OK ", sz, waited); showresp(INFO, HEX, sztemp, tosend, returned); return true; } MilliSleep(10); Fl::awake(); } } replystr = returned; waited = 10 * repeat * delay; snprintf(sztemp, sizeof(sztemp), "%s TIMED OUT in %d ms", sz, waited); showresp(ERR, HEX, sztemp, tosend, returned); return false; } flrig-1.3.24/src/rigs/IC718.cxx0000644000175000017500000002745312562731651012662 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC718.h" bool DEBUG_718 = true; //============================================================================= // IC-718 // const char IC718name_[] = "IC-718"; const char *IC718modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "CW-R", "RTTY-R", NULL}; const char IC718_mode_type[] = { 'L', 'U', 'U', 'L', 'L', 'U', 'U'}; const char *IC718_widths[] = { "Wide", "Med", "Narr", NULL}; static int IC718_bw_vals[] = {1,2,3,WVALS_LIMIT}; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnNR, 214, 105, 50 }, { (Fl_Widget *)sldrNR, 266, 105, 156 }, { (Fl_Widget *)sldrMICGAIN,266, 125, 156 }, { (Fl_Widget *)sldrPOWER, 266, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC718::RIG_IC718() { name_ = IC718name_; modes_ = IC718modes_; _mode_type = IC718_mode_type; bandwidths_ = IC718_widths; bw_vals_ = IC718_bw_vals; widgets = rig_widgets; comm_baudrate = BR9600; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = false; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; filter_nbr = 1; has_smeter = has_power_control = has_volume_control = has_mode_control = has_bandwidth_control = has_micgain_control = has_attenuator_control = has_preamp_control = has_noise_control = has_noise_reduction = has_noise_reduction_control = has_auto_notch = has_rf_control = has_split = has_compON = has_extras = has_vox_onoff = true; defaultCIV = 0x5E; adjustCIV(defaultCIV); precision = 1; ndigits = 8; }; //============================================================================= void RIG_IC718::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnNR; rig_widgets[4].W = sldrNR; rig_widgets[5].W = sldrMICGAIN; rig_widgets[6].W = sldrPOWER; } int RIG_IC718::adjust_bandwidth(int m) { return 0; } void RIG_IC718::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\x00'; cmd.append(post); waitFB("sel A"); } void RIG_IC718::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\x01'; cmd.append(post); waitFB("sel B"); } long RIG_IC718::get_vfoA () { cmd = pre_to; cmd += '\x03'; cmd.append( post ); string resp = pre_fm; resp += '\x03'; if (waitFOR(11, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) freqA = fm_bcd_be(&replystr[p+5], 10); } return freqA; } void RIG_IC718::set_vfoA (long freq) { freqA = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo A"); } long RIG_IC718::get_vfoB () { string resp = pre_fm; resp += '\x03'; cmd = pre_to; cmd += '\x03'; cmd.append( post ); if (waitFOR(11, "get vfo B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.freq = fm_bcd_be(&replystr[p+5], 10); } return B.freq; } void RIG_IC718::set_vfoB (long freq) { B.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo B"); } // Volume control val 0 ... 100 void RIG_IC718::set_volume_control(int val) { int ICvol = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x01"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); waitFB("set vol"); } int RIG_IC718::get_volume_control() { cmd = pre_to; cmd.append("\x14\x01"); cmd.append( post ); string resp = pre_fm; resp.append("\x14\x01"); if (waitFOR(9, "get vol")) { size_t p = replystr.rfind(resp); if ( p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) * 100 / 255); } return 0; } void RIG_IC718::get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } int RIG_IC718::get_smeter() { cmd = pre_to; cmd.append("\x15\x02"); cmd.append( post ); string resp = pre_fm; resp.append("\x15\x02"); int mtr = 0; if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(1.3 * mtr - 36.0); if (mtr < 0) mtr = 0; if (mtr > 255) mtr = 255; return (mtr * 100 / 255); } } return -1; } void RIG_IC718::set_attenuator(int val) { cmd = pre_to; cmd += '\x11'; cmd += val ? '\x20' : '\x00'; cmd.append( post ); waitFB("set att"); } void RIG_IC718::set_noise(bool val) { cmd = pre_to; cmd.append("\x16\x22"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set noise"); } int RIG_IC718::get_noise() { cmd = pre_to; cmd.append("\x16\x22"); cmd.append(post); string resp = pre_fm; resp.append("\x16\x22"); if (waitFOR(8, "get noise")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return 0; } void RIG_IC718::set_noise_reduction(int val) { cmd = pre_to; cmd.append("\x16\x40"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set nr"); } int RIG_IC718::get_noise_reduction() { cmd = pre_to; cmd.append("\x16\x40"); cmd.append(post); string resp = pre_fm; resp.append("\x16\x40"); if (waitFOR(8, "get nr")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return 0; } // 0 < val < 100 void RIG_IC718::set_noise_reduction_val(int val) { cmd = pre_to; cmd.append("\x14\x06"); cmd.append(to_bcd(val * 255 / 100, 3)); cmd.append(post); waitFB("set nr val"); } int RIG_IC718::get_noise_reduction_val() { cmd = pre_to; cmd.append("\x14\x06"); cmd.append(post); string resp = pre_fm; resp.append("\x14\x06"); if (waitFOR(9, "get nr val")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) * 100 / 255); } return 0; } void RIG_IC718::set_preamp(int val) { cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd += (unsigned char)val; cmd.append( post ); waitFB("set pre"); } int RIG_IC718::get_preamp() { cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd.append( post ); string resp = pre_fm; resp += '\x16'; resp += '\x02'; if (waitFOR(8, "get pre")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { preamp_label("Pre", true); return 1; } else { preamp_label("Pre", false); return 0; } } } return 0; } void RIG_IC718::set_rf_gain(int val) { int ICrfg = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x02"); cmd.append(to_bcd(ICrfg, 3)); cmd.append( post ); waitFB("set rf gain"); } int RIG_IC718::get_rf_gain() { cmd = pre_to; cmd.append("\x14\x02").append(post); string resp = pre_fm; cmd.append("\x14\x02"); if (waitFOR(9, "get rfg")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) * 100 / 255); } return 0; } void RIG_IC718::set_squelch(int val) { int ICsql = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x03"); cmd.append(to_bcd(ICsql, 3)); cmd.append( post ); waitFB("set sql"); } void RIG_IC718::set_power_control(double val) { cmd = pre_to; cmd.append("\x14\x0A"); cmd.append(to_bcd((int)(val * 255 / 100), 3)); cmd.append( post ); waitFB("set power"); } int RIG_IC718::get_power_control() { string cstr = "\x14\x0A"; string resp = pre_fm; cmd = pre_to; cmd.append(cstr).append(post); resp.append(cstr); if (waitFOR(9, "get power")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) * 100 / 255); } return progStatus.power_level; } void RIG_IC718::set_mic_gain(int val) { val = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(val,3)); cmd.append(post); waitFB("set mic"); } int RIG_IC718::get_mic_gain() { string cstr = "\x14\x0B"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get mic")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return 0; } void RIG_IC718::get_mic_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_IC718::set_modeA(int val) { modeA = val; cmd = pre_to; cmd += '\x06'; cmd += val > 4 ? val + 2 : val; cmd += filter_nbr; cmd.append( post ); waitFB("set mode A"); } int RIG_IC718::get_modeA() { cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get modeA")) { size_t p = replystr.rfind(resp); if (p != string::npos) { modeA = replystr[p+5]; if (modeA > 6) modeA -= 2; filter_nbr = replystr[p+6]; } } return modeA; } void RIG_IC718::set_modeB(int val) { modeB = val; cmd = pre_to; cmd += '\x06'; cmd += val > 4 ? val + 2 : val; cmd += filter_nbr; cmd.append( post ); waitFB("set mode A"); } int RIG_IC718::get_modeB() { cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get modeB")) { size_t p = replystr.rfind(resp); if (p != string::npos) { modeB = replystr[p+5]; if (modeB > 6) modeB -= 2; filter_nbr = replystr[p+6]; } } return modeB; } int RIG_IC718::get_modetype(int n) { return _mode_type[n]; } void RIG_IC718::set_bwA(int val) { filter_nbr = val + 1; set_modeA(modeA); } int RIG_IC718::get_bwA() { return filter_nbr - 1; } void RIG_IC718::set_bwB(int val) { filter_nbr = val + 1; set_modeB(modeB); } int RIG_IC718::get_bwB() { return filter_nbr - 1; } // added by Jason Turning - N6WBL void RIG_IC718::set_auto_notch(int val) { cmd = pre_to; cmd += '\x16'; cmd += '\x41'; cmd += (unsigned char)val; cmd.append( post ); waitFB("set AN"); } int RIG_IC718::get_auto_notch() { cmd = pre_to; cmd += '\x16'; cmd += '\x41'; cmd.append( post ); string resp = pre_fm; resp += '\x16'; resp += '\x41'; if (waitFOR(8, "get AN")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[6] == 0x01) { auto_notch_label("AN", true); return 1; } else { auto_notch_label("AN", false); return 0; } } } return 0; } void RIG_IC718::set_compression() { if (progStatus.compON) { cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x01'; cmd.append(post); waitFB("set compON"); } else { cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x00'; cmd.append(post); waitFB("set compOFF"); } } void RIG_IC718::set_vox_onoff() { if (progStatus.vox_onoff) { cmd = pre_to; cmd.append("\x16\x46"); cmd += '\x01'; cmd.append(post); waitFB("set voxON"); } else { cmd = pre_to; cmd.append("\x16\x46"); cmd += '\x00'; cmd.append(post); waitFB("set voxOFF"); } } void RIG_IC718::set_split(bool val) { cmd = pre_to; cmd += 0x0F; cmd += val ? 0x01 : 0x00; cmd.append(post); waitFB("set split"); } int RIG_IC718::get_split() { cmd = pre_to; cmd += 0x0F; cmd.append(post); string resp = pre_fm; resp += 0x0F; if (waitFOR(7, "get split")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[5] == 0x01) { return 1; } else { return 0; } } } return 0; } // N6WBL flrig-1.3.24/src/rigs/TS870S.cxx0000644000175000017500000011524712562731651013036 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- // // Changes for the TS-870S March 2012, Dave Baxter, G0WBX // // Todo: // Look at:- (Example) // Autonotch control:- (SSB Only on the 870S) (TS-2000) // Noise Reduction control:- (IC-7700) // Extra controls for speach compressor etc:- (IC-9100 (and others)) // Misc controls auto rig on/off with flrig startup/quit:- (FT-450/950) (PS0; PS1;) // Check Autotune action, and any 'busy' status. #include "config.h" #include "TS870S.h" #include "support.h" static const char TS870Sname_[] = "TS-870S"; // mode array Index Values :- 0 1 2 3 4 5 6 7 static const char *TS870Smodes_[] = { "LSB", "USB", "CW", "FM", "AM", "FSK", "CW-R", "FSK-R", NULL}; static const char TS870S_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '9' }; static const char TS870S_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'U' }; //---------------------------------------------------------------------- static const char *TS870S_empty[] = { "N/A", NULL }; //---------------------------------------------------------------------- static int DEF_SL_SH = 0x8704; static const char *TS870S_SSB_SL[] = { // MD1; and MD2; "0", "50", "100", "200", "300", // Available settings (Hz) "400", "500", "600", "800", "1000", NULL }; static const char *TS870S_CAT_ssb_SL[] = { // Corresponding commands. "FW0000;", "FW0005;", "FW0010;", "FW0020;", "FW0030;", "FW0040;", "FW0050;", "FW0060;", "FW0080;", "FW0100;", NULL }; static const char *TS870S_SSB_SL_tooltip = "lo cut"; static const char *TS870S_SSB_btn_SL_label = "L"; static const char *TS870S_SSB_SH[] = { // MD1; and MD2; "1400", "1600", "1800", "2000", "2200", "2400", // Available settings (Hz) "2600", "2800", "3000", "3400", "4600", "6000", NULL }; static int TS870S_SSB_HI_bw_vals[] = {1,2,3,4,5,6,7,8,9,10,11,12,WVALS_LIMIT}; static const char *TS870S_CAT_ssb_SH[] = { // Corresponding commands. "IS 1400;", "IS 1600;", "IS 1800;", "IS 2000;", "IS 2200;", "IS 2400;", "IS 2600;", "IS 2800;", "IS 3000;", "IS 3400;", "IS 4600;", "IS 6000;", NULL }; static const char *TS870S_SSB_SH_tooltip = "hi cut"; static const char *TS870S_SSB_btn_SH_label = "H"; //---------------------------------------------------------------------- static const char *TS870S_AM_SL[] = { // Available values... "0", "100", "200", "500", NULL }; static const char *TS870S_CAT_am_SL[] = { // ... Corresponding commands. "FW0000;", "FW0010;", "FW0020;", "FW0050;", NULL}; static const char *TS870S_AM_SL_tooltip = "lo cut"; static const char *TS870S_AM_btn_SL_label = "L"; static const char *TS870S_AM_SH[] = { "2500", "3000", "4000", "5000", "6000", "7000", NULL }; static int TS870S_AM_HI_bw_vals[] = {1,2,3,4,5,6,WVALS_LIMIT}; static const char *TS870S_CAT_am_SH[] = { "IS 2500;", "IS 3000;", "IS 4000;", "IS 5000;", "IS 6000;", "IS 7000;", NULL}; static const char *TS870S_AM_SH_tooltip = "hi cut"; static const char *TS870S_AM_btn_SH_label = "H"; //---------------------------------------------------------------------- static const char *TS870S_CWwidths[] = { // Available CW bandwidths "50", "100", "200", "400", "600", "1000", NULL}; static int TS870S_CW_bw_vals[] = { 1,2,3,4,5,6,WVALS_LIMIT}; static const char *TS870S_CWbw[] = { // Corresponding commands. "FW0005;", "FW0010;", "FW0020;", "FW0040;", "FW0060;", "FW0100;", NULL}; //---------------------------------------------------------------------- static const char *TS870S_FSKwidths[] = { // Available FSK bandwidths "250", "500", "1000", "1500", NULL}; static int TS870S_FSK_bw_vals[] = {1,2,3,4,WVALS_LIMIT}; static const char *TS870S_FSKbw[] = { // Corresponding commands. "FW0025;", "FW0050;", "FW0100;", "FW0150;", NULL }; //---------------------------------------------------------------------- static const char *TS870S_FMwidths[] = { // Available FM bandwidths "5000", "6000", "8000", "10000", "12000", "14000", NULL}; static int TS870S_FM_bw_vals[] = {1,2,3,4,5,6,WVALS_LIMIT}; static const char *TS870S_FMbw[] = { // Corresponding commands. "FW0500;", "FW0600;", "FW0800;", "FW1000;", "FW1200;", "FW1400;", NULL }; //---------------------------------------------------------------------- static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 125, 156 }, { (Fl_Widget *)sldrPOWER, 54, 145, 368 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; //---------------------------------------------------------------------- void RIG_TS870S::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = btnIFsh; rig_widgets[3].W = sldrIFSHIFT; rig_widgets[4].W = sldrMICGAIN; rig_widgets[5].W = sldrPOWER; selectA(); // cmd = "AC 00;"; sendCommand(cmd); // ATU Off. cmd = "EX0270000;"; sendCommand(cmd); // TX Enable. wbx2 get_preamp(); get_attenuator(); RIG_DEBUG = true; } // add code here for shutting down the transceiver ... void RIG_TS870S::shutdown() { } //---------------------------------------------------------------------- RIG_TS870S::RIG_TS870S() { name_ = TS870Sname_; modes_ = TS870Smodes_; bandwidths_ = TS870S_SSB_SH; bw_vals_ = TS870S_SSB_HI_bw_vals; dsp_SL = TS870S_SSB_SL; SL_tooltip = TS870S_SSB_SL_tooltip; SL_label = TS870S_SSB_btn_SL_label; dsp_SH = TS870S_SSB_SH; SH_tooltip = TS870S_SSB_SH_tooltip; SH_label = TS870S_SSB_btn_SH_label; widgets = rig_widgets; comm_baudrate = BR57600; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = false; // default to safe comm_rtsptt = false; // ditto (used for hardware handshake) comm_dtrptt = false; // ditto // Defaults. B.imode = A.imode = USB; B.iBW = A.iBW = DEF_SL_SH; B.freq = A.freq = 14070000; can_change_alt_vfo = true; nb_level = 2; has_micgain_control = has_notch_control = has_ifshift_control = has_swr_control = false; has_dsp_controls = has_smeter = has_power_out = has_split = has_split_AB = has_noise_control = has_micgain_control = has_volume_control = // see 'read_volume()' in support.cxx has_power_control = true; has_tune_control = false; // disabled for now has_attenuator_control = true; has_preamp_control = false; has_mode_control = has_bandwidth_control = has_ifshift_control = // See 'update_ifshift' in support.cxx has_ptt_control = true; precision = 10; ndigits = 7; } //---------------------------------------------------------------------- const char * RIG_TS870S::get_bwname_(int n, int md) { // md is an index value, NOT a "mode" designator itself. // n also is an index value, used to reference the name in the array. // This uses "ternary" methods, in the form of... // (boolean test) ? (do if true) : (do if false); // http://www.teach-me-c.com/blog/c-ternary-operator static char bwname[20]; if (n > 256) { // hi/lo cutt off bw setting mode. int hi = (n >> 8) & 0x7F; // hi byte (not MSB) int lo = n & 0xFF; // lo byte snprintf(bwname, sizeof(bwname), "%s/%s", (md == 0 || md == 1) ? TS870S_SSB_SL[lo] : // SSB lo (md == 4) ? TS870S_AM_SL[lo] : "N/A", // AM lo (md == 0 || md == 1) ? TS870S_SSB_SH[hi] : // SSB hi (md == 4) ? TS870S_AM_SH[hi] : "N/A" ); // AM hi } else { // plain vanilla single bandwidth mode. snprintf(bwname, sizeof(bwname), "%s", (md == 2 || md == 6) ? TS870S_CWwidths[n] : // CW or CW-R (md == 5 || md == 7) ? TS870S_FSKwidths[n]: // FSK or FSK-R (md == 3 ) ? TS870S_FMwidths[n] : "N/A" ); // FM } return bwname; } //---------------------------------------------------------------------- void RIG_TS870S::selectA() { cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx/Tx A", cmd, ""); vfo = 0; } //---------------------------------------------------------------------- void RIG_TS870S::selectB() { cmd = "FR1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx/Tx B", cmd, ""); vfo = 1; } //---------------------------------------------------------------------- // revision is similar to TS950S code //---------------------------------------------------------------------- void RIG_TS870S::set_split(bool val) { // find out which VFO (or if Memory) is in use for RX. cmd = "FR;"; sendCommand(cmd); showresp(WARN, ASC, "RX-VFO?", cmd, ""); if (wait_char(';', 4, 100, "get VFO for split", ASC) < 4) return; size_t p = replystr.rfind("FR"); // if bad data, change nothing. if (p == string::npos) return; // '0' = VFO-A, '1' = VFO-B, '2' = Memory. switch (replystr[p+2]) { case '0' : useB = false; break; case '1' : useB = true; break; case '2' : default : return; // do nothing the xcvr is in memory mode } split = val; if (useB) { if (val) { cmd = "FR1;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on A", cmd, ""); } else { cmd = "FR1;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, ""); } } else { if (val) { cmd = "FR0;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on B", cmd, ""); } else { cmd = "FR0;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, ""); } } Fl::awake(highlight_vfo, (void *)0); } //---------------------------------------------------------------------- // This works for the 950S ... you can can revert to use your // IF byte 32 test if this does not work on the 870S //---------------------------------------------------------------------- int RIG_TS870S::get_split() { size_t p; int split = 0; char rx = 0, tx = 0; // tx vfo cmd = rsp = "FT"; cmd.append(";"); if (wait_char(';', 4, 100, "get split tx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; tx = replystr[p+2]; } // rx vfo cmd = rsp = "FR"; cmd.append(";"); if (wait_char(';', 4, 100, "get split rx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; rx = replystr[p+2]; // split test split = (tx == '1' ? 2 : 0) + (rx == '1' ? 1 : 0); } return split; } //---------------------------------------------------------------------- long RIG_TS870S::get_vfoA () { cmd = "FA;"; if (wait_char(';', 14, 100, "get vfoA", ASC) < 14) return A.freq; size_t p = replystr.rfind("FA"); if (p == string::npos) return A.freq; long f = 0L; long mul = 1L; for (size_t n = 12; n > 1; n--) { f += (replystr[p + n] - '0') * mul; mul *= 10; } A.freq = f; return A.freq; } //---------------------------------------------------------------------- void RIG_TS870S::set_vfoA (long freq) { A.freq = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfo A", cmd, ""); } //---------------------------------------------------------------------- long RIG_TS870S::get_vfoB () { cmd = "FB;"; if (wait_char(';', 14, 100, "get vfoB", ASC) < 14) return B.freq; size_t p = replystr.rfind("FB"); if (p == string::npos) return B.freq; long f = 0L; long mul = 1L; for (size_t n = 12; n > 1; n--) { f += (replystr[p + n] - '0') * mul; mul *= 10; } B.freq = f; return B.freq; } //---------------------------------------------------------------------- void RIG_TS870S::set_vfoB (long freq) { B.freq = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfo B", cmd, ""); } //---------------------------------------------------------------------- int RIG_TS870S::get_smeter() { cmd = "SM;"; if (wait_char(';', 7, 100, "get smeter", ASC) < 7) return 0; size_t p = replystr.rfind("SM"); if (p == string::npos) return -1; replystr[p + 6] = 0; int mtr = atoi(&replystr[p + 2]); mtr = (mtr * 100) / 30; //wbx return mtr; } //---------------------------------------------------------------------- int RIG_TS870S::get_power_out() { // Shares same command as the 'S' meter reading. int mtr = 0; cmd = "SM;"; if (wait_char(';', 7, 100, "get output power", ASC) < 7) return mtr; size_t p = replystr.rfind("SM"); if (p == string::npos) return mtr; replystr[p + 6] = 0; mtr = atoi(&replystr[p + 2]); mtr = (mtr * 100) / 30; //wbx if (mtr > 100) mtr = 100; // but with a power limit! return mtr; // The power meter scale is not the same as Flrig's default. // a change is needed, one day. wbx2 // Note that the power meter scale is an image and would have to be // redrawn and then set specifically for the xcvr in support.cxx } //---------------------------------------------------------------------- // Transceiver power level void RIG_TS870S::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); // 010 .. 100 } //---------------------------------------------------------------------- int RIG_TS870S::get_power_control() { cmd = "PC;"; if (wait_char(';', 6, 100, "get pwr ctrl", ASC) < 6) return 0; size_t p = replystr.rfind("PC"); if (p == string::npos) return 0; int mtr = 0; replystr[p + 5] = 0; mtr = atoi(&replystr[p + 2]); return mtr; } //---------------------------------------------------------------------- // Volume control return (rig sends back 0 .. 255) int RIG_TS870S::get_volume_control() { cmd = "AG;"; // reply data is 'AGnnn;' nnn = 000 .. 255 wbx if (wait_char(';', 6, 100, "get vol ctrl", ASC) < 6) return 0; size_t p = replystr.rfind("AG"); if (p == string::npos) return 0; replystr[p + 5] = 0; // change the ';' into a 'null' int val = atoi(&replystr[p + 2]); return (int)(val / 2.55); // we only want 0 .. 100 } //---------------------------------------------------------------------- void RIG_TS870S::set_volume_control(int val) // 0 .. 100 { int ivol = (int)(val * 2.55); // 0 .. 255 cmd = "AG000;"; for (int i = 4; i > 1; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); } //---------------------------------------------------------------------- // Tranceiver PTT on/off /* * NOTE! If you use these CAT commands TX and RX, then when in Transmit * the TS-870S *ONLY* takes audio from the front panel Mic socket. * If you need to use the audio going in the rear Acc socket, you MUST * use a hard wired PTT to the Acc socket. THEN it will take audio from * there, and blank the mic. * To do that, in the Config/Xcvr Select menu, use one of the Hardware PTT options. * Just so it has been said... * * BUMMER - HKJ */ void RIG_TS870S::set_PTT_control(int val) { if (val) cmd = "TX;"; else cmd = "RX;"; sendCommand(cmd); } //---------------------------------------------------------------------- // Play with the autotuner // disabled for now wbx void RIG_TS870S::tune_rig() { // cmd = "AC111;"; // sendCommand(cmd); // this might take a while! } //---------------------------------------------------------------------- // the TS-870 actually has 4 attenuator settings. // RA00; = Off, RA01; = 6dB, RA02; = 12dB, RA03; = 18dB wbx void RIG_TS870S::set_attenuator(int val) { if (att_level == 0) { // If attenuator level = 0 (off) att_level = 1; // then turn it on, at 6dB cmd = "RA01;"; // this is the command... atten_label("Att 6", true); // show it in the button... } else if (att_level == 1) { // If attenuator level = 1 (6dB) att_level = 2; // then make it 12dB cmd = "RA02;"; atten_label("Att 12", true); } else if (att_level == 2) { // if it's 12dB att_level = 3; // go to 18dB cmd = "RA03;"; atten_label("Att 18", true); } else if (att_level == 3) { // If it's 18dB att_level = 0; // Loop back to none. cmd = "RA00;"; atten_label("Att", false); } sendCommand(cmd); showresp(WARN, ASC, "set Att", cmd, ""); } //---------------------------------------------------------------------- // Modified to read and show the actual radio setting, in the button. int RIG_TS870S::get_attenuator() { cmd = "RA;"; if (wait_char(';', 5, 100, "get att", ASC) < 5) return att_on; size_t p = replystr.rfind("RA"); if (p == string::npos) return att_on; if (replystr[p + 2] == '0' && replystr[p + 3] == '0') { att_on = 0; // Attenuator is OFF att_level = 0; // remember it... atten_label("Att", false); // show it... } else if (replystr[p + 2] == '0' && replystr[p + 3] == '1') { att_on = 1; // Attenuator is ON, 6dB att_level = 1; // remember the level atten_label("Att 6", true); // show it... } else if (replystr[p + 2] == '0' && replystr[p + 3] == '2') { att_on = 1; // .. still ON, 12dB att_level = 2; // remember this level atten_label("Att 12", true); // show it. } else if (replystr[p + 2] == '0' && replystr[p + 3] == '3') { att_on = 1; // .. still ON 18dB att_level = 3; // remember... atten_label("Att 18", true); // show this too.. } return att_on; // let the rest of the world know. } //---------------------------------------------------------------------- bool RIG_TS870S::get_TS870Sid() { cmd = "ID;"; if (wait_char(';', 6, 100, "get ID", ASC) < 6) return false; size_t p = replystr.rfind("ID"); // String "ID015;" if (p == string::npos) return false; // Bytes 012345 if (replystr[p + 2] == '0' && // wbx2 replystr[p + 3] == '1' && replystr[p + 4] == '5') return true; // wbx return false; } //====================================================================== // mode commands //====================================================================== void RIG_TS870S::set_modeA(int val) { active_mode = A.imode = val; cmd = "MD"; cmd += TS870S_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set mode A", cmd, ""); set_widths(val); } //---------------------------------------------------------------------- int RIG_TS870S::get_modeA() { int md = A.imode; cmd = "MD;"; if (wait_char(';', 4, 100, "get mode A", ASC) < 4) return A.imode; size_t p = replystr.rfind("MD"); if (p == string::npos) return A.imode; switch (replystr[p + 2]) { case '1' : md = tsLSB; break; case '2' : md = tsUSB; break; case '3' : md = tsCW; break; case '4' : md = tsFM; break; case '5' : md = tsAM; break; case '6' : md = tsFSK; break; case '7' : md = tsCWR; break; case '9' : md = tsFSKR; break; default : md = A.imode; } if (md != A.imode) { active_mode = A.imode = md; set_widths(md); } return A.imode; } //---------------------------------------------------------------------- void RIG_TS870S::set_modeB(int val) { active_mode = B.imode = val; cmd = "MD"; cmd += TS870S_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set mode B", cmd, ""); set_widths(val); } //---------------------------------------------------------------------- int RIG_TS870S::get_modeB() { int md = B.imode; cmd = "MD;"; if (wait_char(';', 4, 100, "get mode B", ASC) < 4) return B.imode; size_t p = replystr.rfind("MD"); if (p == string::npos) return B.imode; switch (replystr[p + 2]) { case '1' : md = tsLSB; break; case '2' : md = tsUSB; break; case '3' : md = tsCW; break; case '4' : md = tsFM; break; case '5' : md = tsAM; break; case '6' : md = tsFSK; break; case '7' : md = tsCWR; break; case '9' : md = tsFSKR; break; default : md = B.imode; } if (md != B.imode) { active_mode = B.imode = md; set_widths(md); } return B.imode; } //====================================================================== // Bandpass filter commands //====================================================================== // Comes here when user changes mode, among other things.. int RIG_TS870S::set_widths(int val) // val is from the mode list index, as selected by the user. { int bw = 0; if (val == tsLSB || val == tsUSB ) { // SSB modes bandwidths_ = TS870S_SSB_SH; bw_vals_ = TS870S_SSB_HI_bw_vals; dsp_SL = TS870S_SSB_SL; dsp_SH = TS870S_SSB_SH; SL_tooltip = TS870S_SSB_SL_tooltip; SL_label = TS870S_SSB_btn_SL_label; SH_tooltip = TS870S_SSB_SH_tooltip; SH_label = TS870S_SSB_btn_SH_label; bw = DEF_SL_SH; // 300 ... 2800 Hz } else if (val == tsCW || val == tsCWR) { // CW modes bandwidths_ = TS870S_CWwidths; bw_vals_ = TS870S_CW_bw_vals; dsp_SL = TS870S_empty; dsp_SH = TS870S_empty; bw = 2; // 200Hz } else if (val == tsFSK || val == tsFSKR) { // FSK modes bandwidths_ = TS870S_FSKwidths; bw_vals_ = TS870S_FSK_bw_vals; dsp_SL = TS870S_empty; dsp_SH = TS870S_empty; bw = 1; // 500Hz } else if (val == tsAM) { // val == 5 ==> AM mode bandwidths_ = TS870S_empty; bw_vals_ = TS870S_AM_HI_bw_vals; dsp_SL = TS870S_AM_SL; dsp_SH = TS870S_AM_SH; SL_tooltip = TS870S_AM_SL_tooltip; SL_label = TS870S_AM_btn_SL_label; SH_tooltip = TS870S_AM_SH_tooltip; SH_label = TS870S_AM_btn_SH_label; bw = 0x8401; // 100Hz .. 6000Hz } // FM mode BW selection. else if (val == tsFM) { // FM mode bandwidths_ = TS870S_FMwidths; // load the dropdown with our list bw_vals_ = TS870S_FM_bw_vals; dsp_SL = TS870S_empty; dsp_SH = TS870S_empty; bw = 4; // 10000Hz } return bw; } //---------------------------------------------------------------------- const char **RIG_TS870S::bwtable(int m) { if (m == tsLSB || m == tsUSB || m == tsAM) // these modes have lo and hi settings. BUT MUST RETURN A VALID pointer // NOT EMPTY! return TS870S_SSB_SH; else if (m == tsCW || m == tsCWR) return TS870S_CWwidths; else if (m == tsFSK || m == tsFSKR) return TS870S_FSKwidths; else if (m == tsFM) return TS870S_FMwidths; else return TS870S_SSB_SH; } const char **RIG_TS870S::lotable(int m) { if (m == tsLSB || m == tsUSB || m == tsAM) return TS870S_SSB_SL; // these modes have lo and hi settings. if (m == tsAM) return TS870S_AM_SL; return NULL;//TS870S_empty; } const char **RIG_TS870S::hitable(int m) { if (m == tsLSB || m == tsUSB || m == tsAM) return TS870S_SSB_SH; // these modes have lo and hi settings. if (m == tsAM) return TS870S_AM_SH; return NULL; } //---------------------------------------------------------------------- int RIG_TS870S::adjust_bandwidth(int val) { if (val == tsLSB || val == tsUSB ) return DEF_SL_SH; // 2800Hz .. 300Hz else if (val == tsCW || val == tsCWR) return 2; // 200Hz else if (val == tsFSK || val == tsFSKR) return 1; // 500Hz else if (val == tsFM) return 3; // 10000Hz // else if (val == tsAM) return 0x8401; // 6000Hz .. 100Hz } //---------------------------------------------------------------------- int RIG_TS870S::def_bandwidth(int val) { return adjust_bandwidth(val); } //---------------------------------------------------------------------- void RIG_TS870S::set_bwA(int val) { // LSB, USB if (A.imode == tsLSB || A.imode == tsUSB ) { if (val < 256) return; // not hi/lo setting A.iBW = val; cmd = TS870S_CAT_ssb_SL[A.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS870S_CAT_ssb_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } // AM if (A.imode == tsAM) { if (val < 256) return; // not hi/lo setting A.iBW = val; cmd = TS870S_CAT_am_SL[A.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS870S_CAT_am_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } if (val > 256) return; // CW, CW-R if (A.imode == tsCW || A.imode == tsCWR) { A.iBW = val; cmd = TS870S_CWbw[A.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set CW bw", cmd, ""); return; } // FSK, FSK-R if (A.imode == tsFSK || A.imode == tsFSKR) { A.iBW = val; cmd = TS870S_FSKbw[A.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set FSK bw", cmd, ""); return; } // FM if (A.imode == tsFM) { A.iBW = val; cmd = TS870S_FMbw[A.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set FM bw", cmd, ""); return; } } //---------------------------------------------------------------------- void RIG_TS870S::set_bwB(int val) { if (B.imode == tsLSB || B.imode == tsUSB ) { if (val < 256) return; B.iBW = val; cmd = TS870S_CAT_ssb_SL[B.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS870S_CAT_ssb_SH[(B.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } if (B.imode == tsAM) { if (val < 256) return; B.iBW = val; cmd = TS870S_CAT_am_SL[B.iBW & 0x7F]; // corrected wbx2 sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS870S_CAT_am_SH[(B.iBW >> 8) & 0x7F]; // corrected wbx2 sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } if (val > 256) return; if (B.imode == tsCW || B.imode == tsCWR) { B.iBW = val; cmd = TS870S_CWbw[B.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set CW bw", cmd, ""); return; } if (B.imode == tsFSK || B.imode == tsFSKR) { B.iBW = val; cmd = TS870S_FSKbw[B.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set FSK bw", cmd, ""); return; } if (A.imode == tsFM) { A.iBW = val; cmd = TS870S_FMbw[A.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set FM bw", cmd, ""); return; } } //---------------------------------------------------------------------- int RIG_TS870S::get_bwA() { int i = 0; size_t p; if (A.imode == tsFM) { // FM mode. cmd = "FW;"; // 'width' query if (wait_char(';', 7, 100, "get CW width", ASC) < 7) return A.iBW; p = replystr.rfind("FW"); if (p != string::npos) { // If 'FW' found then scan the known responces to find out what we got. for (i = 0; TS870S_FMbw[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_FMbw[i]) == p) break; // Found returned data, in string array. if (TS870S_FMbw[i] != NULL) A.iBW = i; // if we didn't hit the end, return the array index value. else A.iBW = 1; // Default. } } else if (A.imode == tsCW || A.imode == tsCWR) { // CW modes. cmd = "FW;"; // 'width' query if (wait_char(';', 7, 100, "get CW width", ASC) < 7) return A.iBW; p = replystr.rfind("FW"); if (p != string::npos) { // If 'FW' found then scan the known responces to find out what we got. for (i = 0; TS870S_CWbw[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_CWbw[i]) == p) break; // Found returned data, in string array. if (TS870S_CWbw[i] != NULL) A.iBW = i; // if we didn't hit the end, return the array index value. else A.iBW = 1; // Default. } } else if (A.imode == tsFSK || A.imode == tsFSKR ) { // FSK modes. cmd = "FW;"; if (wait_char(';', 7, 100, "get FSK width", ASC) < 7) return A.iBW; p = replystr.rfind("FW"); if (p != string::npos) { // If 'FW' found then scan the known responces to find out what we got. for (i = 0; TS870S_FSKbw[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_FSKbw[i]) == p) break; // Found returned data, in string array. if (TS870S_FSKbw[i] != NULL) A.iBW = i; // if we didn't hit the end, return the array index value. else A.iBW = 1; // Default. } } else if (A.imode == tsAM) { // AM mode only int lo = A.iBW & 0x7F, hi = (A.iBW >> 8) & 0x7F; // High byte is hi cut index (not MSB though.) Low byte is lo cuttoff index. cmd = "FW;"; // Read Low cuttoff. Returns a two digit code as 'FLxxxx;' in 10Hz increments. if (wait_char(';', 5, 100, "get lower", ASC) < 5) return A.iBW; p = replystr.rfind("FW"); if (p != string::npos) { // If 'FW' found then scan the known responces to find out what we got. for (i = 0; TS870S_CAT_am_SL[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_CAT_am_SL[i]) == p) break; // Found returned data, in string array. if (TS870S_CAT_am_SL[i] != NULL) lo = i; // if we didn't hit the end, return the array index value. else lo = 1; // Default. } cmd = "IS;"; if (wait_char(';', 5, 100, "get upper", ASC) == 5) { p = replystr.rfind("IS "); if (p != string::npos) { for (i = 0; TS870S_CAT_am_SH[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_CAT_am_SH[i]) == p) break; // Found returned data, in string array. if (TS870S_CAT_am_SH[i] != NULL) hi = i; // if we didn't hit the end, return the array index value. else hi = 1; // Default. } A.iBW = ((hi << 8) | (lo & 0x7F)) | 0x8000; // Shift hi index up 8 bits into High Byte, then concatntat it with the Low byte, into one 16 bit value. } } else if (A.imode == tsLSB || A.imode == tsUSB ) { // SSB (upper and lower) int lo = A.iBW & 0x7F, hi = (A.iBW >> 8) & 0x7F; // Same trick as above... cmd = "FW;"; // Read Low cuttoff. Returns a two digit code as 'FLxxxx;' in 10Hz increments. if (wait_char(';', 5, 100, "get lower", ASC) < 5) return A.iBW; p = replystr.rfind("FW"); if (p != string::npos) { // If 'FW' found then scan the known responces to find out what we got. for (i = 0; TS870S_CAT_ssb_SL[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_CAT_ssb_SL[i]) == p) break; // Found returned data, in string array. if (TS870S_CAT_ssb_SL[i] != NULL) lo = i; // if we didn't hit the end, return the array index value. else lo = 1; // Default. } cmd = "IS;"; if (wait_char(';', 5, 100, "get upper", ASC) < 5) return A.iBW; p = replystr.rfind("IS "); if (p != string::npos) { for (i = 0; TS870S_CAT_ssb_SH[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_CAT_ssb_SH[i]) == p) break; // Found returned data, in string array. if (TS870S_CAT_ssb_SH[i] != NULL) hi = i; // if we didn't hit the end, return the array index value. else hi = 1; // Default. } A.iBW = ((hi << 8) | (lo & 0x7F)) | 0x8000; } return A.iBW; } //---------------------------------------------------------------------- int RIG_TS870S::get_bwB() { int i = 0; size_t p; if (B.imode == tsFM) { cmd = "FW;"; // 'width' query if (wait_char(';', 7, 100, "get CW width", ASC) < 7) return B.iBW; p = replystr.rfind("FW"); if (p != string::npos) { // If 'FW' found then scan the known responces to find out what we got. for (i = 0; TS870S_FMbw[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_FMbw[i]) == p) break; // Found returned data, in string array. if (TS870S_FMbw[i] != NULL) B.iBW = i; // if we didn't hit the end, return the array index value. else B.iBW = 1; // Default. } } else if (B.imode == tsCW || B.imode == tsCWR) { // CW modes. cmd = "FW;"; // 'width' query if (wait_char(';', 7, 100, "get CW width", ASC) < 7) return B.iBW; p = replystr.rfind("FW"); if (p != string::npos) { // If 'FW' found then scan the known responces to find out what we got. for (i = 0; TS870S_CWbw[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_CWbw[i]) == p) break; // Found returned data, in string array. if (TS870S_CWbw[i] != NULL) B.iBW = i; // if we didn't hit the end, return the array index value. else B.iBW = 1; // Default. } } else if (B.imode == tsFSK || B.imode == tsFSKR) { // FSK modes. cmd = "FW;"; if (wait_char(';', 7, 100, "get FSK width", ASC) < 7) return B.iBW; p = replystr.rfind("FW"); if (p != string::npos) { // If 'FW' found then scan the known responces to find out what we got. for (i = 0; TS870S_FSKbw[i] != NULL; i++) // bumb array index counter, till string match or end. if (replystr.find(TS870S_FSKbw[i]) == p) break; // Found returned data, in string array. if (TS870S_FSKbw[i] != NULL) B.iBW = i; // if we didn't hit the end, return the array index value. else B.iBW = 1; // Default. } } else if (B.imode == tsAM) { // AM mode only int lo = B.iBW & 0x7F, hi = (B.iBW >> 8) & 0x7F; cmd = "FW;"; // Read Low cuttoff. Returns a two digit code as 'FLxxxx;' in 10Hz increments. if (wait_char(';', 5, 100, "get lower", ASC) < 5) return B.iBW; p = replystr.rfind("FW"); if (p != string::npos) { // If 'FW' found then scan the known responces to find out what we got. for (i = 0; TS870S_CAT_am_SL[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_CAT_am_SL[i]) == p) break; // Found returned data, in string array. if (TS870S_CAT_am_SL[i] != NULL) lo = i; // if we didn't hit the end, return the array index value. else lo = 1; // Default. } cmd = "IS;"; if (wait_char(';', 5, 100, "get upper", ASC) < 5) return B.iBW; p = replystr.rfind("IS "); if (p != string::npos) { for (i = 0; TS870S_CAT_am_SH[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_CAT_am_SH[i]) == p) break; // Found returned data, in string array. if (TS870S_CAT_am_SH[i] != NULL) hi = i; // if we didn't hit the end, return the array index value. else hi = 1; // Default. } B.iBW = ((hi << 8) | (lo & 0x7F)) | 0x8000; } else if (B.imode == tsLSB || B.imode == tsUSB ) { // SSB (Upper and lower) int lo = B.iBW & 0x7F, hi = (B.iBW >> 8) & 0x7F; cmd = "FW;"; // Read Low cuttoff. Returns a two digit code as 'FLxxxx;' in 10Hz increments. if (wait_char(';', 5, 100, "get lower", ASC) < 5) return B.iBW; p = replystr.rfind("FW"); if (p != string::npos) { // If 'FW' found then scan the known responces to find out what we got. for (i = 0; TS870S_CAT_ssb_SL[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_CAT_ssb_SL[i]) == p) break; // Found returned data, in string array. if (TS870S_CAT_ssb_SL[i] != NULL) lo = i; // if we didn't hit the end, return the array index value. else lo = 1; // Default. } cmd = "IS;"; if (wait_char(';', 5, 100, "get upper", ASC) < 5) return B.iBW; p = replystr.rfind("IS "); if (p != string::npos) { for (i = 0; TS870S_CAT_ssb_SH[i] != NULL; i++) // bump array index counter, till string match or end. if (replystr.find(TS870S_CAT_ssb_SH[i]) == p) break; // Found returned data, in string array. if (TS870S_CAT_ssb_SH[i] != NULL) hi = i; // if we didn't hit the end, return the array index value. else hi = 1; // Default. } B.iBW = ((hi << 8) | (lo & 0x7F)) | 0x8000; } return B.iBW; } //---------------------------------------------------------------------- int RIG_TS870S::get_modetype(int n) { return TS870S_mode_type[n]; } //---------------------------------------------------------------------- // val 0 .. 255 void RIG_TS870S::set_mic_gain(int val) { int imic = (int)(val * 2.55); // 0 .. 255 cmd = "MG000;"; for (int i = 3; i > 0; i--) { cmd[1+i] += imic % 10; imic /= 10; } sendCommand(cmd); } //---------------------------------------------------------------------- int RIG_TS870S::get_mic_gain() { int val = 0; cmd = "MG;"; if (wait_char(';', 6, 100, "get mic ctrl", ASC) >= 6) { size_t p = replystr.rfind("MG"); if (p == string::npos) return val; replystr[p + 5] = 0; val = atoi(&replystr[p + 2]); } return (int)(val / 2.55); // we only want 0 .. 100 } //---------------------------------------------------------------------- void RIG_TS870S::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } //---------------------------------------------------------------------- void RIG_TS870S::set_noise(bool val) { if (val) cmd = "NB1;"; else cmd = "NB0;"; sendCommand(cmd); showresp(WARN, ASC, "set NB", cmd, ""); } int RIG_TS870S::get_noise() { cmd = "NB;"; if (wait_char(';', 4, 100, "get NB", ASC) < 4) return 0; size_t p = replystr.rfind("NB"); if (p == string::npos) return 0; return (replystr[p + 2] == '1'); // true if 1 } //====================================================================== // IF shift command only available if the transceiver is in the CW mode // step size is 50 Hz //====================================================================== // See also, the code in support.cxx // setMode and setModeControl, calling 'checkTS870S' // void RIG_TS870S::set_if_shift(int val) { if (active_mode == tsCW || active_mode == tsCWR) { // cw modes progStatus.shift_val = val; cmd = "IS "; cmd.append(to_decimal(abs(val),4)).append(";"); sendCommand(cmd,0); showresp(WARN, ASC, "set IF shift", cmd, ""); } } //---------------------------------------------------------------------- bool RIG_TS870S::get_if_shift(int &val) { if (active_mode == tsCW || active_mode == tsCWR) { // cw modes cmd = "IS;"; if (wait_char(';', 8, 100, "get IF shift", ASC) < 8) { val = progStatus.shift_val; return false; } size_t p = replystr.rfind("IS"); if (p != string::npos) { val = fm_decimal(&replystr[p+3], 4); } else val = progStatus.shift_val; return true; } val = progStatus.shift_val; return false; } //---------------------------------------------------------------------- void RIG_TS870S::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = 400; if_shift_max = max = 1000; if_shift_step = step = 50; if_shift_mid = 800; } //---------------------------------------------------------------------- // Dave, G0WBX, does this work? // I do not see a BP in the 870 command table // void RIG_TS870S::set_notch(bool on, int val) { cmd = "BP00000;"; if (on == false) { sendCommand(cmd); notch_on = false; return; } if (!notch_on) { cmd[6] = '1'; // notch ON sendCommand(cmd); cmd[6] = '0'; notch_on = true; } cmd[3] = '1'; // manual NOTCH position // set notch value offset by 200, ie: 001 -> 400 val = (-val / 9) + 200; if (val < 1) val = 1; if (val > 400) val = 400; for (int i = 3; i > 0; i--) { cmd[3 + i] += val % 10; val /=10; } sendCommand(cmd); } //---------------------------------------------------------------------- //tbd bool RIG_TS870S::get_notch(int &val) { return false; // bool ison = false; // cmd = "BP;"; // int ret = sendCommand(cmd); // return ison; } //---------------------------------------------------------------------- void RIG_TS870S::get_notch_min_max_step(int &min, int &max, int &step) { min = -1143; max = +1143; step = 9; } //---------------------------------------------------------------------- // The End. //---------------------------------------------------------------------- flrig-1.3.24/src/rigs/FT767.cxx0000644000175000017500000000437012562731647012702 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include "FT767.h" static const char FT767name_[] = "FT-767"; static const char *FT767modes_[] = { "LSB", "USB", "CW", "AM", "FM", "FSK", NULL}; static const char FT767_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'U' }; RIG_FT767::RIG_FT767() { // base class values name_ = FT767name_; modes_ = FT767modes_; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = false; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; has_mode_control = true; precision = 10; ndigits = 8; }; void RIG_FT767::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; } long RIG_FT767::get_vfoA () { init_cmd(); cmd[4] = 0x01; // CHECK command int ret = waitN(20, 100, "get vfoA", HEX); if (ret < 20) return freqA; freqA = fm_bcd(replybuff, 14) * 10; // VFO-A in positions 14-17 modeA = replybuff[19]; return freqA; } void RIG_FT767::set_vfoA (long freq) { freqA = freq; freq /=10; // 767 does not support 1 Hz resolution cmd = to_bcd(freq, 8); cmd += 0x08; // SET FREQUENCY sendCommand(cmd); } int RIG_FT767::get_modeA() { return modeA; } void RIG_FT767::set_modeA(int val) { modeA = val; init_cmd(); cmd[3] = 0x10 + val; // 0x10 = LSB ... 0x15 = FSK cmd[4] = 0x0A; // MODESEL sendCommand(cmd); } flrig-1.3.24/src/rigs/FT920.cxx0000644000175000017500000001432512562731651012665 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT920.h" #include "rig.h" static const char FT920name_[] = "FT-920"; static const char *FT920modes_[] = { "LSB", "USB", "CW-USB", "CW-LSB", "AM", "AM-2", "FM", "FM-N", "DATA-LSB", "DATA2-LSB", "DATA-USB", "DATA-FM", NULL}; static const int FT920_def_bw[] = { 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0 }; static const int FT920_mode_val[] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11 }; static const char FT920_mode_type[] = { 'L', 'U', 'U', 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'U', 'U' }; static const char *FT920widths_[] = { "wide", "narr", NULL}; static const int FT920_bw_val[] = { 0, 1 }; RIG_FT920::RIG_FT920() { name_ = FT920name_; modes_ = FT920modes_; bandwidths_ = FT920widths_; bw_vals_ = FT920_bw_val; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = false; comm_rtsptt = false; comm_dtrptt = false; afreq = bfreq = A.freq = B.freq = 14070000; amode = bmode = A.imode = B.imode = 1; aBW = bBW = A.iBW = B.iBW = 0; precision = 10; has_get_info = has_mode_control = has_bandwidth_control = true; precision = 1; ndigits = 8; } int RIG_FT920::adjust_bandwidth(int m) { return FT920_def_bw[m]; } int RIG_FT920::def_bandwidth(int m) { return FT920_def_bw[m]; } void RIG_FT920::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; } void RIG_FT920::initialize() { } void RIG_FT920::selectA() { init_cmd(); cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select A", cmd, replystr); } void RIG_FT920::selectB() { init_cmd(); cmd[3] = 0x01; cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select B", cmd, replystr); } void RIG_FT920::set_split(bool val) { split = val; init_cmd(); cmd[3] = val ? 0x01 : 0x00; cmd[4] = 0x01; sendCommand(cmd); if (val) showresp(INFO, HEX, "set split ON", cmd, replystr); else showresp(INFO, HEX, "set split OFF", cmd, replystr); } bool RIG_FT920::get_info() { init_cmd(); cmd[3] = 0x03; cmd[4] = 0x10; int ret = waitN(28, 100, "get info", HEX); if (ret >= 28) { size_t p = ret - 28; afreq = 0; bfreq = 0; for (size_t n = 1; n < 5; n++) { afreq = afreq * 256 + (unsigned char)replybuff[p + n]; bfreq = bfreq * 256 + (unsigned char)replybuff[p + 14 + n]; } afreq = afreq * 1.25; bfreq = bfreq * 1.25; int md = replybuff[p+5]; switch (md) { case 0 : amode = (md & 0x40) ? 1 : 0; break; case 1 : amode = (md & 0x40) ? 2 : 3; break; case 2 : amode = 4; break; case 3 : amode = (md & 0x80) ? 7 : 6; break; case 4 : amode = (md & 0x40) ? 8 : 10; break; case 6 : amode = 11; break; default : amode = 1; } aBW = (md & 0x80) ? 0 : 1; md = replybuff[p + 19]; switch (md) { case 0 : bmode = (md & 0x40) ? 1 : 0; break; case 1 : bmode = (md & 0x40) ? 2 : 3; break; case 2 : bmode = 4; break; case 3 : bmode = (md & 0x80) ? 7 : 6; break; case 4 : bmode = (md & 0x40) ? 8 : 10; break; case 6 : bmode = 11; break; default : bmode = 1; } bBW = (md & 0x80) ? 0 : 1; A.freq = afreq; A.imode = amode; A.iBW = aBW; B.freq = bfreq; B.imode = bmode; B.iBW = bBW; return true; } return false; } long RIG_FT920::get_vfoA () { return A.freq; } void RIG_FT920::set_vfoA (long freq) { A.freq = freq; freq /=10; // 920 does not support 1 Hz resolution cmd = to_bcd_be(freq, 8); cmd += 0x0A; sendCommand(cmd); showresp(WARN, HEX, "set vfo A", cmd, replystr); } int RIG_FT920::get_modeA() { return A.imode; } void RIG_FT920::set_modeA(int val) { A.imode = val; init_cmd(); cmd[3] = FT920_mode_val[val]; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode A", cmd, replystr); } void RIG_FT920::set_bwA (int val) { A.iBW = val; init_cmd(); cmd[3] = FT920_bw_val[val]; cmd[4] = 0x8C; sendCommand(cmd); showresp(WARN, HEX, "set bw A", cmd, replystr); } int RIG_FT920::get_bwA() { return A.iBW; } long RIG_FT920::get_vfoB() { return B.freq; } void RIG_FT920::set_vfoB(long freq) { B.freq = freq; freq /=10; // 920 does not support 1 Hz resolution cmd = to_bcd_be(freq, 8); cmd += 0x8A; sendCommand(cmd); showresp(WARN, HEX, "set vfo B", cmd, replystr); } void RIG_FT920::set_modeB(int val) { B.imode = val; init_cmd(); cmd[3] = FT920_mode_val[val] | 0x80; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode B", cmd, replystr); } int RIG_FT920::get_modeB() { return B.imode; } void RIG_FT920::set_bwB(int val) { B.iBW = val; init_cmd(); cmd[3] = FT920_bw_val[val] | 0x80; cmd[4] = 0x8C; sendCommand(cmd); showresp(WARN, HEX, "set bw B", cmd, replystr); } int RIG_FT920::get_bwB() { return B.iBW; } /* int RIG_FT920::get_smeter() { init_cmd(); cmd[4] = 0xF7; int ret = sendCommand(cmd, 9); if (ret < 9) return 0; int sval = (200 - (unsigned char)replybuff[ret - 9 + 3]) / 1.1; if (sval < 0) sval = 0; if (sval > 100) sval = 100; return sval; } int RIG_FT920::get_swr() { double swr = (fwdpwr + refpwr) / (fwdpwr - refpwr + .0001); swr -= 1.0; swr *= 25.0; if (swr < 0) swr = 0; if (swr > 100) swr = 100; return (int) swr; } int RIG_FT920::get_power_out() { init_cmd(); cmd[4] = 0xF7; int ret = sendCommand(cmd); if (ret < 9) return 0; fwdpwr = replybuff[ret - 9 + 1] / 2.56; refpwr = replybuff[ret - 9 + 2] / 2.56; return (int) fwdpwr; } */ flrig-1.3.24/src/rigs/IC703.cxx0000644000175000017500000003606312562731647012656 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC703.h" //============================================================================= // IC-703 // const char IC703name_[] = "IC-703"; const char *IC703modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", "D-LSB", "D-USB", NULL}; const char IC703_mode_type[] = {'L', 'U', 'U', 'L', 'L', 'U', 'U', 'U', 'L', 'U' }; const char *IC703_widths[] = { "NARR", "MED", "WIDE", NULL}; static int IC703_bw_vals[] = {1,2,3, WVALS_LIMIT}; static GUI IC703_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 54, 165, 156 }, { (Fl_Widget *)btnNR, 214, 125, 50 }, { (Fl_Widget *)sldrNR, 266, 125, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC703::RIG_IC703() { name_ = IC703name_; modes_ = IC703modes_; _mode_type = IC703_mode_type; bandwidths_ = IC703_widths; bw_vals_ = IC703_bw_vals; comm_baudrate = BR9600; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; widgets = IC703_widgets; has_smeter = has_power_out = has_swr_control = has_alc_control = has_volume_control = has_rf_control = has_sql_control = has_noise_reduction = has_noise_reduction_control = has_noise_control = has_ifshift_control = has_micgain_control = has_power_control = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_cw_wpm = // has_cw_keyer = // has_cw_spot = has_cw_spot_tone = has_cw_qsk = // has_cw_weight = has_tune_control = has_ptt_control = has_mode_control = has_bandwidth_control = has_extras = has_compON = has_compression = has_preamp_control = has_attenuator_control = true; defaultCIV = 0x68; adjustCIV(defaultCIV); precision = 1; ndigits = 8; }; //============================================================================= void RIG_IC703::initialize() { IC703_widgets[0].W = btnVol; IC703_widgets[1].W = sldrVOLUME; IC703_widgets[2].W = sldrRFGAIN; IC703_widgets[3].W = sldrSQUELCH; IC703_widgets[4].W = btnNR; IC703_widgets[5].W = sldrNR; IC703_widgets[6].W = btnIFsh; IC703_widgets[7].W = sldrIFSHIFT; IC703_widgets[8].W = sldrMICGAIN; IC703_widgets[9].W = sldrPOWER; } long RIG_IC703::get_vfoA () { cmd = pre_to; cmd += '\x03'; cmd.append( post ); string resp = pre_fm; resp += '\x03'; if (waitFOR(11, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) freqA = fm_bcd_be(&replystr[p+5], 10); } return freqA; } void RIG_IC703::set_vfoA (long freq) { freqA = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo A"); } void RIG_IC703::set_modeA(int val) { bool data_mode = val > 7 ? true : false; modeA = val; cmd = pre_to; cmd += '\x06'; if (val > 7) val -= 8; else if (val > 5) val++; cmd += val; cmd += bwA + 1; cmd.append( post ); waitFB("set mode A"); if (val < 2) { cmd = pre_to; cmd.append("\x1A\x04"); cmd += data_mode ? 0x01 : 0x00; cmd.append( post ); waitFB("data mode"); } } int RIG_IC703::get_modeA() { cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); if (p != string::npos) { modeA = replystr[p+5]; if (modeA > 6) modeA--; bwA = replystr[p+6] - 1; if (modeA < 2) { cmd = pre_to; cmd.append("\x1A\x04"); cmd.append(post); resp = pre_fm; resp.append("\x1A\x04"); if (waitFOR(8, "data mode?")) { p = replystr.rfind(resp); if (p != string::npos) if (replystr[p+6]) modeA += 8; } } } } return modeA; } void RIG_IC703::set_bwA(int val) { bwA = val; set_modeA(modeA); } int RIG_IC703::get_modetype(int n) { return _mode_type[n]; } int RIG_IC703::get_bwA() { return bwA; } void RIG_IC703::set_attenuator(int val) { cmd = pre_to; cmd += '\x11'; cmd += val ? '\x20' : '\x00'; cmd.append( post ); waitFB("set att"); } int RIG_IC703::get_attenuator() { cmd = pre_to; cmd += '\x11'; cmd.append( post ); string resp = pre_fm; resp += '\x11'; if (waitFOR(7, "get att")) { size_t p = replystr.rfind(resp); if (p != string::npos) return replystr[p+6] == '\x20' ? 1 : 0; } return 0; } void RIG_IC703::set_preamp(int val) { if (preamp_level == 0) { preamp_level = 1; preamp_label("Pre 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Pre 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("Pre", false); } cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd += (unsigned char) preamp_level; cmd.append( post ); waitFB("set preamp"); } int RIG_IC703::get_preamp() { cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd.append( post ); string resp = pre_fm; resp += '\x16'; resp += '\x02'; if (waitFOR(8, "get preamp")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { preamp_label("Pre 1", true); preamp_level = 1; } else if (replystr[p+6] == 0x02) { preamp_label("Pre 2", true); preamp_level = 2; } else { preamp_label("Pre", false); preamp_level = 0; } } } return preamp_level; } int RIG_IC703::get_smeter() { cmd = pre_to; cmd.append("\x15\x02").append(post); string resp = pre_fm; resp.append("\x15\x02"); if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) * 100 / 255); } return -1; } int RIG_IC703::get_power_out() { cmd = pre_to; cmd.append("\x15\x11").append(post); string resp = pre_fm; resp.append("\x15\x11"); if (waitFOR(9, "get power")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) * 100 / 255); } return 0; } int RIG_IC703::get_swr() { cmd = pre_to; cmd.append("\x15\x12").append(post); string resp = pre_fm; resp.append("\x15\x12"); if (waitFOR(9, "get swr")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) * 100 / 255); } return -1; } int RIG_IC703::get_alc() { string cstr = "\x15\x13"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get alc")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.55); if (mtr > 100) mtr = 100; } } return mtr; } // Tranceiver PTT on/off void RIG_IC703::set_PTT_control(int val) { cmd.assign(pre_to); cmd += '\x1c'; cmd += '\x00'; cmd += (val ? '\x01' : '\x00'); cmd.append( post ); waitFB("set PTT"); } // Volume control val 0 ... 100 void RIG_IC703::set_volume_control(int val) { int ICvol = val * 255 / 100; cmd = pre_to; cmd.append("\x14\x01"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); waitFB("set vol"); } int RIG_IC703::get_volume_control() { string cstr = "\x14\x01"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(9, "get vol")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) * 100 / 255); } return progStatus.volume; } void RIG_IC703::get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } // changed noise blanker to noise reduction void RIG_IC703::set_noise(bool val) { cmd = pre_to; cmd.append("\x16\x22"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set noise"); } int RIG_IC703::get_noise() { string cstr = "\x16\x22"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get noise")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return progStatus.noise; } void RIG_IC703::set_noise_reduction(int val) { cmd = pre_to; cmd.append("\x16\x40"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set NR"); } int RIG_IC703::get_noise_reduction() { string cstr = "\x16\x40"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get NR")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return progStatus.noise_reduction; } // 0 < val < 100 void RIG_IC703::set_noise_reduction_val(int val) { cmd = pre_to; cmd.append("\x14\x06"); cmd.append(to_bcd(val * 2.55, 3)); cmd.append(post); waitFB("set NR val"); } int RIG_IC703::get_noise_reduction_val() { string cstr = "\x14\x06"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get NR val")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return progStatus.noise_reduction_val; } int RIG_IC703::get_mic_gain() { string cstr = "\x14\x0B"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get mic")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return 0; } void RIG_IC703::set_mic_gain(int val) { val = (int)(val * 2.55); cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(val,3)); cmd.append(post); waitFB("set mic"); } void RIG_IC703::get_mic_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_IC703::set_if_shift(int val) { int shift = (int)((val + 50) * 2.55 ); cmd.assign(pre_to).append("\x14\x04").append(to_bcd(shift, 3)).append(post); waitFB("set if-shift"); } bool RIG_IC703::get_if_shift(int &val) { string cstr = "\x14\x07"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); val = progStatus.shift_val; if (waitFOR(9, "get if-shift")) { size_t p = replystr.rfind(resp); if (p != string::npos) val = (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55 - 50); } return (progStatus.shift = (val != 0)); } void RIG_IC703::get_if_min_max_step(int &min, int &max, int &step) { min = -50; max = +50; step = 1; } void RIG_IC703::set_squelch(int val) { int IC703sql = (int)(val * 2.55); cmd = pre_to; cmd.append("\x14\x03"); cmd.append(to_bcd(IC703sql, 3)); cmd.append( post ); waitFB("set sql"); } int RIG_IC703::get_squelch() { string cstr = "\x14\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get sql")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return progStatus.squelch; } void RIG_IC703::set_rf_gain(int val) { int IC703rfg = (int)(val * 2.55); cmd = pre_to; cmd.append("\x14\x02"); cmd.append(to_bcd(IC703rfg, 3)); cmd.append( post ); waitFB("set rf gain"); } int RIG_IC703::get_rf_gain() { string cstr = "\x14\x02"; string resp = pre_fm; cmd = pre_to; cmd.append(cstr).append(post); resp.append(cstr); if (waitFOR(9, "get rfgain")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55); } return progStatus.rfgain; } void RIG_IC703::set_power_control(double val) { cmd = pre_to; cmd.append("\x14\x0A"); cmd.append(to_bcd((int)(val * 2.55), 3)); cmd.append( post ); waitFB("set power"); } int RIG_IC703::get_power_control() { string cstr = "\x14\x0A"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr).append(post); if (waitFOR(9, "get power")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55); } return progStatus.power_level; } void RIG_IC703::set_split(bool val) { cmd = pre_to; cmd += 0x0F; cmd += val ? 0x01 : 0x00; cmd.append(post); waitFB("set split"); } int RIG_IC703::get_split() { LOG_WARN("%s", "get split - not implemented"); return progStatus.split; } void RIG_IC703::tune_rig() { cmd = pre_to; cmd.append("\x1c\x01\x02"); cmd.append( post ); waitFB("tune"); } void RIG_IC703::set_compression() { if (progStatus.compON) { cmd.assign(pre_to).append("\x14\x0E"); cmd.append(to_bcd(progStatus.compression * 255 / 100, 3)); cmd.append( post ); waitFB("set comp"); cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x01'; cmd.append(post); waitFB("set Comp ON"); } else{ cmd.assign(pre_to).append("\x16\x44"); cmd += '\x00'; cmd.append(post); waitFB("set Comp OFF"); } } void RIG_IC703::set_vox_onoff() { if (progStatus.vox_onoff) { cmd.assign(pre_to).append("\x16\x46\x01").append(post); waitFB("set vox ON"); } else { cmd.assign(pre_to).append("\x16\x46\x00").append(post); waitFB("set vox OFF"); } } void RIG_IC703::set_vox_gain() { cmd.assign(pre_to).append("\x1A\x03\x09"); cmd.append(to_bcd((int)(progStatus.vox_gain * 2.55), 3)); cmd.append( post ); waitFB("SET vox gain"); } void RIG_IC703::set_vox_anti() { cmd.assign(pre_to).append("\x1A\x03\x10"); cmd.append(to_bcd((int)(progStatus.vox_anti * 2.55), 3)); cmd.append( post ); waitFB("SET anti-vox"); } void RIG_IC703::set_vox_hang() { cmd.assign(pre_to).append("\x1A\x03\x11"); cmd.append(to_bcd((int)(progStatus.vox_hang * 2.55), 3)); cmd.append( post ); waitFB("SET vox hang"); } // CW controls void RIG_IC703::set_cw_wpm() { cmd.assign(pre_to).append("\x14\x0C"); cmd.append(to_bcd(round((progStatus.cw_wpm - 6) * 255 / (60 - 6)), 3)); cmd.append( post ); waitFB("SET cw wpm"); } void RIG_IC703::set_cw_qsk() { int n = round(progStatus.cw_qsk * 10); cmd.assign(pre_to).append("\x14\x0F"); cmd.append(to_bcd(n, 3)); cmd.append(post); waitFB("Set cw qsk delay"); } void RIG_IC703::set_cw_spot_tone() { cmd.assign(pre_to).append("\x14\x09 "); int n = round((progStatus.cw_spot_tone - 300) * 255.0 / 600.0); if (n > 255) n = 255; if (n < 0) n = 0; cmd.append(to_bcd(n, 3)).append(post); waitFB("SET cw spot tone"); } void RIG_IC703::set_cw_vol() { cmd.assign(pre_to).append("\x1A\x03\0x06"); cmd.append(to_bcd((int)(progStatus.cw_vol * 2.55), 3)); cmd.append( post ); waitFB("SET cw sidetone volume"); } flrig-1.3.24/src/rigs/IC7000.cxx0000644000175000017500000004410412562731647012726 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC7000.h" #include "debug.h" //============================================================================= // IC-7000 const char IC7000name_[] = "IC-7000"; const char *IC7000modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", NULL}; const char IC7000_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U' }; const char *IC7000_SSB_CWwidths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3100", "3200", "3300", "3400", "3500", "3600", NULL}; static int IC7000_bw_vals_SSB[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41, WVALS_LIMIT}; const char *IC7000_RTTYwidths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", NULL}; static int IC7000_bw_vals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32, WVALS_LIMIT}; const char *IC7000_AMwidths[] = { "200", "400", "600", "800", "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", "3800", "4000", "4200", "4400", "4600", "4800", "5000", "5200", "5400", "5600", "5800", "6000", "6200", "6400", "6600", "6800", "7000", "7200", "7400", "7600", "7800", "8000", "8200", "8400", "8600", "8800", "9000", "9200", "9400", "9600", "9800", "10000", NULL}; static int IC7000_bw_vals_AM[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41,42,43,44,45,46,47,48,49,50, WVALS_LIMIT}; const char *IC7000_FMwidths[] = { "FIXED", NULL }; static int IC7000_bw_vals_FM[] = { 1, WVALS_LIMIT}; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 266, 105, 156 }, { (Fl_Widget *)btnNR, 2, 145, 50 }, { (Fl_Widget *)sldrNR, 54, 145, 156 }, { (Fl_Widget *)btnNotch, 2, 165, 50 }, { (Fl_Widget *)sldrNOTCH, 54, 165, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC7000::RIG_IC7000() { defaultCIV = 0x70; name_ = IC7000name_; modes_ = IC7000modes_; bandwidths_ = IC7000_SSB_CWwidths; bw_vals_ = IC7000_bw_vals_SSB; _mode_type = IC7000_mode_type; widgets = rig_widgets; A.freq = 432399230; A.imode = 1; A.iBW = 28; B.freq = 432399230; B.imode = 1; B.iBW = 28; adjustCIV(defaultCIV); restore_mbw = false; has_ifshift_control = false; has_extras = has_compON = has_compression = has_smeter = has_power_out = has_alc_control = has_swr_control = has_split = has_auto_notch = has_power_control = has_volume_control = has_mode_control = has_bandwidth_control = has_micgain_control = has_notch_control = has_noise_control = has_noise_reduction_control = has_noise_reduction = has_attenuator_control = has_preamp_control = has_ptt_control = has_tune_control = has_rf_control = has_sql_control = true; precision = 1; ndigits = 9; }; //====================================================================== // IC7000 unique commands //====================================================================== #include "debug.h" void RIG_IC7000::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = sldrMICGAIN; rig_widgets[4].W = sldrSQUELCH; rig_widgets[5].W = btnNR; rig_widgets[6].W = sldrNR; rig_widgets[7].W = btnNotch; rig_widgets[8].W = sldrNOTCH; rig_widgets[9].W = sldrPOWER; cmd = pre_to; cmd += '\x1A'; cmd += '\x05'; cmd += '\x00'; cmd += '\x92'; cmd += '\x00'; cmd.append(post); if (!waitFB("CI-V") && RigSerial.IsOpen()) { flrig_abort = true; return; } cmd = pre_to; cmd.append("\x16\x51"); cmd += '\x00'; cmd.append(post); if (!waitFB("NF2 OFF") && RigSerial.IsOpen()) flrig_abort = true; } void RIG_IC7000::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\x00'; cmd.append(post); if (!waitFB("sel A") && RigSerial.IsOpen()) flrig_abort = true; } void RIG_IC7000::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\x01'; cmd.append(post); if (!waitFB("sel B") && RigSerial.IsOpen()) flrig_abort = true; } long RIG_IC7000::get_vfoA () { string resp = pre_fm; resp += '\x03'; cmd = pre_to; cmd += '\x03'; cmd.append( post ); if (waitFOR(11, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.freq = fm_bcd_be(&replystr[p+5], 10); } else if (RigSerial.IsOpen()) flrig_abort = true; return A.freq; } void RIG_IC7000::set_vfoA (long freq) { A.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append(post); waitFB("set vfo A"); } long RIG_IC7000::get_vfoB () { string resp = pre_fm; resp += '\x03'; cmd = pre_to; cmd += '\x03'; cmd.append( post ); if (waitFOR(11, "get vfo B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.freq = fm_bcd_be(&replystr[p+5], 10); } else if (RigSerial.IsOpen()) flrig_abort = true; return B.freq; } void RIG_IC7000::set_vfoB (long freq) { B.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo B"); } void RIG_IC7000::set_modeA(int val) { A.imode = val; switch (val) { case 7 : val = 8; break; case 6 : val = 7; break; default: break; } cmd = pre_to; cmd += '\x06'; cmd += val; cmd.append( post ); waitFB("set mode A"); } int RIG_IC7000::get_modeA() { int md; string resp = pre_fm; resp += '\x04'; cmd = pre_to; cmd += '\x04'; cmd.append(post); if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md--; A.imode = md; } } else if (RigSerial.IsOpen()) flrig_abort = true; return A.imode; } void RIG_IC7000::set_modeB(int val) { B.imode = val; switch (val) { case 7 : val = 8; break; case 6 : val = 7; break; default: break; } cmd = pre_to; cmd += '\x06'; cmd += val; cmd.append( post ); waitFB("set mode B"); } int RIG_IC7000::get_modeB() { int md; string resp = pre_fm; resp += '\x04'; cmd = pre_to; cmd += '\x04'; cmd.append(post); if (waitFOR(8, "get mode B")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md--; B.imode = md; } } else if (RigSerial.IsOpen()) flrig_abort = true; return B.imode; } int RIG_IC7000::get_bwA() { string cstr = "\x1A\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get bw A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.iBW = (fm_bcd(&replystr[p+6],2)); } else if (RigSerial.IsOpen()) flrig_abort = true; return A.iBW; } int RIG_IC7000::get_bwB() { string cstr = "\x1A\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get bw B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.iBW = (fm_bcd(&replystr[p+6],2)); } else if (RigSerial.IsOpen()) flrig_abort = true; return B.iBW; } void RIG_IC7000::set_bwA(int val) { A.iBW = val; cmd = pre_to; cmd.append("\x1A\x03"); cmd.append(to_bcd(val, 2)); cmd.append( post ); waitFB("set bw A"); } void RIG_IC7000::set_bwB(int val) { B.iBW = val; cmd = pre_to; cmd.append("\x1A\x03"); cmd.append(to_bcd(val, 2)); cmd.append( post ); waitFB("set bw B"); } int RIG_IC7000::adjust_bandwidth(int m) { if (m == 3 || m == 6) { //CW bandwidths_ = IC7000_SSB_CWwidths; bw_vals_ = IC7000_bw_vals_SSB; return 12; } if (m == 4 || m == 7) { //RTTY bandwidths_ = IC7000_RTTYwidths; bw_vals_ = IC7000_bw_vals_RTTY; return 12; } if (m == 2) { // AM bandwidths_ = IC7000_AMwidths; bw_vals_ = IC7000_bw_vals_AM; return 28; } if (m == 5) { // FM bandwidths_ = IC746PRO_AMFMwidths; bw_vals_ = IC7000_bw_vals_FM; return 0; } bandwidths_ = IC7000_SSB_CWwidths; bw_vals_ = IC7000_bw_vals_SSB; return 32; } int RIG_IC7000::def_bandwidth(int m) { return adjust_bandwidth(m); } int RIG_IC7000::get_attenuator() { string cstr = "\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(7, "get att")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+5] ? 1 : 0); } return progStatus.attenuator; } void RIG_IC7000::set_attenuator(int val) { cmd = pre_to; cmd += '\x11'; cmd += val ? '\x12' : '\x00'; cmd.append( post ); waitFB("set att"); } void RIG_IC7000::set_preamp(int val) { cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd += val ? 0x01 : 0x00; cmd.append( post ); waitFB("set preamp"); } int RIG_IC7000::get_preamp() { string cstr = "\x16\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get preamp")) { size_t p = replystr.rfind(resp); if (p != string::npos) return replystr[p+6] ? 1 : 0; } return progStatus.preamp; } void RIG_IC7000::set_auto_notch(int val) { cmd = pre_to; cmd += '\x16'; cmd += '\x41'; cmd += val ? 0x01 : 0x00; cmd.append( post ); waitFB("set AN"); } int RIG_IC7000::get_auto_notch() { string cstr = "\x16\x41"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get AN")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { auto_notch_label("AN", true); return true; } else { auto_notch_label("AN", false); return false; } } } return progStatus.auto_notch; } void RIG_IC7000::set_split(bool val) { cmd = pre_to; cmd += 0x0F; cmd += val ? 0x01 : 0x00; cmd.append(post); waitFB("set split"); } int RIG_IC7000::get_split() { LOG_WARN("%s", "get split - not implemented"); return progStatus.split; /* cmd = pre_to; cmd += 0x0F; cmd.append(post); string resp = pre_fm; resp += 0x0F; if (waitFOR(8, "get split")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return 0; */ } // Volume control val 0 ... 100 void RIG_IC7000::set_volume_control(int val) { int ICvol = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x01"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); waitFB("set vol"); } int RIG_IC7000::get_volume_control() { string cstr = "\x14\x01"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(9, "get vol")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) * 100 / 255); } return progStatus.volume; } void RIG_IC7000::get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_IC7000::set_rf_gain(int val) { int ICrfg = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x02"); cmd.append(to_bcd(ICrfg, 3)); cmd.append( post ); waitFB("set RF"); } int RIG_IC7000::get_rf_gain() { string cstr = "\x14\x02"; string resp = pre_fm; cmd = pre_to; cmd.append(cstr).append(post); resp.append(cstr); if (waitFOR(9, "get RF")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) * 100 / 255); } return progStatus.rfgain; } void RIG_IC7000::set_squelch(int val) { int ICsql = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x03"); cmd.append(to_bcd(ICsql, 3)); cmd.append( post ); waitFB("set sql"); } int RIG_IC7000::get_squelch() { string cstr = "\x14\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get sql")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) * 100 / 255); } return progStatus.squelch; } void RIG_IC7000::set_power_control(double val) { cmd = pre_to; cmd.append("\x14\x0A"); cmd.append(to_bcd((int)(val * 255 / 100), 3)); cmd.append( post ); waitFB("set power"); } int RIG_IC7000::get_power_control() { string cstr = "\x14\x0A"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr).append(post); if (waitFOR(9, "get power")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) * 100 / 255); } return progStatus.power_level; } int RIG_IC7000::get_smeter() { string cstr = "\x15\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.55); if (mtr > 100) mtr = 100; } } return mtr; } int RIG_IC7000::get_power_out() { string cstr = "\x15\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get pout")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.55); if (mtr > 100) mtr = 100; } } return mtr; } int RIG_IC7000::get_alc() { string cstr = "\x15\x13"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get alc")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)ceil(mtr /2.55); if (mtr > 100) mtr = 100; } } return mtr; } int RIG_IC7000::get_mic_gain() { string cstr = "\x14\x0B"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get mic")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return 0; } void RIG_IC7000::set_mic_gain(int val) { val = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(val,3)); cmd.append(post); waitFB("set mic"); } void RIG_IC7000::get_mic_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_IC7000::set_notch(bool on, int val) { int notch = (int)(val * 256.0 / 3000.0); cmd = pre_to; cmd.append("\x16\x48"); cmd += on ? '\x01' : '\x00'; cmd.append(post); waitFB("set notch"); cmd = pre_to; cmd.append("\x14\x0D"); cmd.append(to_bcd(notch,3)); cmd.append(post); waitFB("set notch val"); } bool RIG_IC7000::get_notch(int &val) { bool on = false; val = 0; string cstr = "\x16\x48"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get notch")) { size_t p = replystr.rfind(resp); if (p != string::npos) on = replystr[p + 6]; cmd = pre_to; resp = pre_fm; cstr = "\x14\x0D"; cmd.append(cstr); resp.append(cstr); cmd.append(post); if (waitFOR(9, "notch val")) { size_t p = replystr.rfind(resp); if (p != string::npos) val = (int)ceil(fm_bcd(&replystr[p+6],3) * 3000.0 / 255.0); } } return on; } void RIG_IC7000::get_notch_min_max_step(int &min, int &max, int &step) { min = 0; max = 3000; step = 20; } void RIG_IC7000::set_noise(bool val) { cmd = pre_to; cmd.append("\x16\x22"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set noise"); } int RIG_IC7000::get_noise() { string cstr = "\x16\x22"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get noise")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return 0; } void RIG_IC7000::set_noise_reduction(int val) { cmd = pre_to; cmd.append("\x16\x40"); cmd += val ? 0x01 : 0x00; cmd.append(post); waitFB("set NR"); } int RIG_IC7000::get_noise_reduction() { string cstr = "\x16\x40"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get NR")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] == 0x01 ? 1 : 0); } return 0; } // 0 < val < 100 void RIG_IC7000::set_noise_reduction_val(int val) { cmd = pre_to; cmd.append("\x14\x06"); cmd.append(to_bcd(val * 255 / 100, 3)); cmd.append(post); waitFB("set NR val"); } int RIG_IC7000::get_noise_reduction_val() { string cstr = "\x14\x06"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get NR val")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return 0; } void RIG_IC7000::set_compression() { if (progStatus.compON) { cmd = pre_to; cmd.append("\x16\x44"); cmd += '\x01'; cmd.append(post); waitFB("set Comp ON"); cmd.assign(pre_to).append("\x14\x0E"); cmd.append(to_bcd(progStatus.compression * 255 / 10, 3)); // 0 - 10 cmd.append( post ); waitFB("set comp level"); } else{ cmd.assign(pre_to).append("\x16\x44"); cmd += '\x00'; cmd.append(post); waitFB("set Comp OFF"); } } flrig-1.3.24/src/rigs/DELTA-II.cxx0000644000175000017500000000601612562731647013254 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "DELTA-II.h" //============================================================================= // TT-535 const char RIG_TT535name_[] = "DELTA-II"; const char *RIG_TT535modes_[] = { "LSB", "USB", "AM", "CW", "FM", NULL}; static const char RIG_TT535_mode_type[] = {'L', 'U', 'U', 'L', 'U'}; RIG_TT535::RIG_TT535() { name_ = RIG_TT535name_; modes_ = RIG_TT535modes_; comm_baudrate = BR1200; stopbits = 1; comm_retries = 2; comm_wait = 10; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = false; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; has_mode_control = true; // has_ptt_control = true; pre_to[2] = ok[3] = bad[3] = pre_fm[3] = 0x01; }; int RIG_TT535::adjust_bandwidth(int m) { return 0; } long RIG_TT535::get_vfoA () { return freqA; } void RIG_TT535::set_vfoA (long freq) { freqA = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 8 ) ); cmd.append( post ); int ret = sendCommand(cmd); if (ret != 6); checkresponse(); } void RIG_TT535::set_vfoB (long freq) { freqB = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 8 ) ); cmd.append( post ); if (sendCommand(cmd) != 6); checkresponse(); } long RIG_TT535::get_vfoB () { return freqB; } // ditto on CAT PTT /* void RIG_TT535::set_PTT_control(int val) { cmd = pre_to; cmd += '\x16'; cmd += val ? '\x01' : '\x02'; cmd.append( post ); sendICcommand(cmd,6); checkresponse(6); } */ void RIG_TT535::set_modeA(int md) { modeA = md; cmd = pre_to; cmd += '\x06'; cmd += modeA; cmd.append(post); if (sendCommand(cmd) != 6); checkresponse(); } // same with get mode int RIG_TT535::get_modeA() { // cmd = pre_to; // cmd += '\x04'; // cmd.append(post); // if( sendICcommand (cmd, 8 )) { // modeA = replystr[5]; // bwA = replystr[6]; // } return modeA; } void RIG_TT535::set_modeB(int md) { modeB = md; cmd = pre_to; cmd += '\x06'; cmd += modeB; cmd.append(post); if (sendCommand(cmd) != 6); checkresponse(); } // same with get mode int RIG_TT535::get_modeB() { return modeB; } int RIG_TT535::get_modetype(int n) { return RIG_TT535_mode_type[n]; } flrig-1.3.24/src/rigs/FT900.cxx0000644000175000017500000001740612642041360012654 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // 2015-10-04 adapted from FT890.cxx by Ernst F. Schroeder DJ7HS // the FT-900 has two vfos and can work split // but it cannot change the (hidden) alternate vfo // 2015-12-03 1st stable version DJ7HS // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT900.h" #include "status.h" const char FT900name_[] = "FT-900"; const char *FT900modes_[] = { "LSB", "USB", "CW", "CW-N", "AM", "AM-N", "FM", NULL}; static const int FT900_mode_val[] = { 0, 1, 2, 3, 4, 5, 6 }; static const char FT900_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'U', 'U' }; static const char *FT900widths_[] = { "wide", "narr", NULL}; static const int FT900_bw_val[] = { 0, 1 }; RIG_FT900::RIG_FT900() { name_ = FT900name_; modes_ = FT900modes_; bandwidths_ = FT900widths_; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; afreq = bfreq = A.freq = B.freq = 14070000; amode = bmode = A.imode = B.imode = 1; aBW = bBW = A.iBW = B.iBW = 0; precision = 10; has_smeter = has_power_out = has_get_info = has_ptt_control = has_split = has_split_AB = has_getvfoAorB = has_mode_control = true; precision = 10; ndigits = 7; } void RIG_FT900::initialize() { progStatus.poll_split = 1; // allow pollimg for split info progStatus.poll_vfoAorB = 1; // allow pollimg for vfo info } void RIG_FT900::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; } void RIG_FT900::selectA() { init_cmd(); cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select vfo A", cmd, replystr); } void RIG_FT900::selectB() { init_cmd(); cmd[3] = 0x01; cmd[4] = 0x05; sendCommand(cmd); showresp(WARN, HEX, "select vfo B", cmd, replystr); } void RIG_FT900::set_split(bool val) { init_cmd(); cmd[3] = val ? 0x01 : 0x00; cmd[4] = 0x01; sendCommand(cmd); if (val) showresp(WARN, HEX, "set split ON", cmd, replystr); else showresp(WARN, HEX, "set split OFF", cmd, replystr); progStatus.split = val; } int RIG_FT900::get_split() { return splitison; } int RIG_FT900::get_vfoAorB() { return vfoAorB; } void RIG_FT900::swapvfos() // works, but only with a few tricks { progStatus.poll_frequency = 0; // stop polling read_info progStatus.poll_mode = 0; progStatus.poll_bandwidth = 0; MilliSleep(400); FREQMODE tempA = vfoA; FREQMODE tempB = vfoB; init_cmd(); cmd[4] = 0x85; // copy active vfo to background vfo sendCommand(cmd); showresp(WARN, HEX, "copy active vfo to background vfo", cmd, replystr); if (!useB) { { guard_lock queA_lock(&mutex_queA, 120); while (!queA.empty()) queA.pop(); queA.push(tempB); } FreqDispB->value(tempA.freq); FreqDispB->redraw(); vfoB = tempA; } else { { guard_lock queB_lock(&mutex_queB, 121); while (!queB.empty()) queB.pop(); queB.push(tempA); } FreqDispA->value(tempB.freq); FreqDispA->redraw(); vfoA = tempB; } progStatus.poll_frequency = 1; // restart polling read_info progStatus.poll_mode = 1; progStatus.poll_bandwidth = 1; } bool RIG_FT900::get_info() { // first get the vfo, mode and bandwidth information init_cmd(); cmd[3] = 0x03; cmd[4] = 0x10; // after this command the FT-900 replies with 2 x 9 bytes of data // bytes 1..3 contain binary data for vfoA with 10 Hz resolution // bytes 10..12 contain binary data for vfoB with 10 Hz resolution // bytes 6 and 15 contain the mode and bytes 8 and 17 contain the bandwidth int ret = waitN(18, 100, "get info", HEX); if (ret >= 18) { size_t p = ret - 18; afreq = 0; bfreq = 0; for (size_t n = 1; n < 4; n++) { afreq = afreq * 256 + (unsigned char)replybuff[p + n]; bfreq = bfreq * 256 + (unsigned char)replybuff[p + 9 + n]; } afreq = afreq * 10.0; bfreq = bfreq * 10.0; aBW = 0; // normal BW // mode data for vfoA is in byte 6 // bandwidth data is in byte 8 int md = replybuff[p + 6]; int bw = replybuff[p + 8]; switch (md) { case 0 : // LSB amode = 0; break; case 1 : // USB amode = 1; break; case 2 : // CW amode = (bw & 0x80) ? 3 : 2; aBW = (bw & 0x80) ? 1 : 0; break; case 3 : // AM amode = (bw & 0x40) ? 5 : 4; aBW = (bw & 0x40) ? 1 : 0; break; case 4 : // FM amode = 6; break; default : amode = 1; } bBW = 0; // mode data for vfoB is in byte 15 // bandwidth data is in byte 17 md = replybuff[p + 15]; bw = replybuff[p + 17]; switch (md) { case 0 : // LSB bmode = 0; break; case 1 : // USB bmode = 1; break; case 2 : // CW bmode = (bw & 0x80) ? 3 : 2; bBW = (bw & 0x80) ? 1 : 0; break; case 3 : // AM bmode = (bw & 0x40) ? 5 : 4; bBW = (bw & 0x40) ? 1 : 0; break; case 4 : // FM bmode = 6; break; default : bmode = 1; } A.freq = afreq; A.imode = amode; A.iBW = aBW; B.freq = bfreq; B.imode = bmode; B.iBW = bBW; } // now get some flags init_cmd(); cmd[4] = 0xFA; ret = waitN(5, 100, "get flags info", HEX); // after this command the FT-900 replies with 3 bytes of flags and 2 bytes of dummy data if (ret >= 5) { size_t p = ret - 5; int sp = replybuff[p]; splitison = (sp & 0x04) ? 1 : 0; // 1 if split is set vfoAorB = (sp & 0x40) ? 1 : 0; // 1 if vfoB is in use return true; } return false; } long RIG_FT900::get_vfoA () { return A.freq; } void RIG_FT900::set_vfoA (long freq) { A.freq = freq; freq /=10; // FT-900 does not support 1 Hz resolution cmd = to_bcd_be(freq, 8); cmd += 0x0A; sendCommand(cmd); showresp(WARN, HEX, "set vfo A", cmd, replystr); } int RIG_FT900::get_modeA() { return A.imode; } void RIG_FT900::set_modeA(int val) { A.imode = val; init_cmd(); cmd[3] = FT900_mode_val[val]; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode A", cmd, replystr); } long RIG_FT900::get_vfoB() { return B.freq; } void RIG_FT900::set_vfoB(long freq) { B.freq = freq; freq /=10; // FT-900 does not support 1 Hz resolution cmd = to_bcd_be(freq, 8); cmd += 0x0A; sendCommand(cmd); showresp(WARN, HEX, "set vfo B", cmd, replystr); } void RIG_FT900::set_modeB(int val) { B.imode = val; init_cmd(); cmd[3] = FT900_mode_val[val]; cmd[4] = 0x0C; sendCommand(cmd); showresp(WARN, HEX, "set mode B", cmd, replystr); } int RIG_FT900::get_modeB() { return B.imode; } // Tranceiver PTT on/off void RIG_FT900::set_PTT_control(int val) { init_cmd(); if (val) cmd[3] = 1; else cmd[3] = 0; cmd[4] = 0x0F; sendCommand(cmd, 0); LOG_INFO("%s", str2hex(cmd.c_str(), 5)); } int RIG_FT900::get_smeter() { init_cmd(); cmd[4] = 0xF7; int ret = waitN(5, 100, "get smeter", HEX); if (ret < 5) return 0; int sval = (unsigned char)(replybuff[ret - 2]); sval = sval * 100 / 255; return sval; } int RIG_FT900::get_power_out() { init_cmd(); cmd[4] = 0xF7; int ret = waitN(5, 100, "get pwr out", HEX); if (ret < 5) return 0; int sval = (unsigned char)(replybuff[ret - 2]); sval = sval * 100 / 255; return sval; } flrig-1.3.24/src/rigs/TS480SAT.cxx0000644000175000017500000005351212562731647013261 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "TS480SAT.h" #include "support.h" static const char TS480SATname_[] = "TS-480SAT"; static const char *TS480SATmodes_[] = { "LSB", "USB", "CW", "FM", "AM", "FSK", "CW-R", "FSK-R", NULL}; static const char TS480SAT_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '9' }; static const char TS480SAT_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'U' }; static const char *TS480SAT_empty[] = { "N/A", NULL }; static int TS480SAT_bw_vals[] = {1, WVALS_LIMIT}; // SL command is lo cut when menu 045 OFF static const char *TS480SAT_SL[] = { "0", "50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", NULL }; static const char *TS480SAT_SL_tooltip = "lo cut"; static const char *TS480SAT_btn_SL_label = "L"; // SH command is hi cut when menu 045 OFF static const char *TS480SAT_SH[] = { "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3400", "4000", "5000", NULL }; static int TS480SAT_HI_bw_vals[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,WVALS_LIMIT}; static const char *TS480SAT_SH_tooltip = "hi cut"; static const char *TS480SAT_btn_SH_label = "H"; // SL command is width when menu 045 ON static const char *TS480SAT_dataW[] = { "50", "100", "250", "500", "1000", "1500", "2400", NULL }; static int TS480SAT_data_bw_vals[] = {1,2,3,4,5,6,7, WVALS_LIMIT}; static const char *TS480SAT_dataW_tooltip = "width"; static const char *TS480SAT_dataW_label = "W"; // SH command is center when menu 045 ON static const char *TS480SAT_dataC[] = { "1000", "1500", "2210", NULL }; static const char *TS480SAT_dataC_tooltip = "center"; static const char *TS480SAT_dataC_label = "C"; static const char *TS480SAT_AM_SL[] = { "10", "100", "200", "500", NULL }; static const char *TS480SAT_AM_SH[] = { "2500", "3000", "4000", "5000", NULL }; //static int TS480SAT_AM_bw_vals[] = {1,2,3,4,WVALS_LIMIT}; static const char *TS480SAT_CWwidths[] = { "50", "80", "100", "150", "200", "300", "400", "500", "600", "1000", "2000", NULL}; static int TS480SAT_CW_bw_vals[] = {1,2,3,4,5,6,7,8,9,10,11,WVALS_LIMIT}; static const char *TS480SAT_CWbw[] = { "FW0050;", "FW0080;", "FW0100;", "FW0150;", "FW0200;", "FW0300;", "FW0400;", "FW0500;", "FW0600;", "FW1000;", "FW2000;" }; static const char *TS480SAT_FSKwidths[] = { "250", "500", "1000", "1500", NULL}; static int TS480SAT_FSK_bw_vals[] = { 1,2,3,4,WVALS_LIMIT}; static const char *TS480SAT_FSKbw[] = { "FW0250;", "FW0500;", "FW1000;", "FW1500;" }; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnDataPort, 214, 125, 50 }, { (Fl_Widget *)sldrMICGAIN, 266, 125, 156 }, { (Fl_Widget *)sldrPOWER, 266, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; void RIG_TS480SAT::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnDataPort; rig_widgets[6].W = sldrMICGAIN; rig_widgets[7].W = sldrPOWER; if (progStatus.UIsize == small_ui) has_extras = false; progStatus.rfgain = 100; progStatus.volume = 25; progStatus.power_level = 20; progStatus.mic_gain = 25; check_menu_45(); }; RIG_TS480SAT::RIG_TS480SAT() { // base class values name_ = TS480SATname_; modes_ = TS480SATmodes_; _mode_type = TS480SAT_mode_type; bandwidths_ = TS480SAT_empty; bw_vals_ = TS480SAT_bw_vals; dsp_SL = TS480SAT_SL; SL_tooltip = TS480SAT_SL_tooltip; SL_label = TS480SAT_btn_SL_label; dsp_SH = TS480SAT_SH; SH_tooltip = TS480SAT_SH_tooltip; SH_label = TS480SAT_btn_SH_label; widgets = rig_widgets; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; B.imode = A.imode = 1; B.iBW = A.iBW = 0x8A03; B.freq = A.freq = 14070000; can_change_alt_vfo = true; has_noise_control = false; has_tune_control = false; has_notch_control = false; has_extras = true; has_split = true; has_split_AB = true; has_data_port = true; has_micgain_control = true; has_ifshift_control = true; has_rf_control = true; has_swr_control = true; has_alc_control = true; has_power_out = true; has_dsp_controls = true; has_smeter = true; has_swr_control = true; has_attenuator_control = true; has_preamp_control = true; has_mode_control = true; has_bandwidth_control = true; has_volume_control = true; has_power_control = true; has_tune_control = true; has_ptt_control = true; precision = 1; ndigits = 8; } const char * RIG_TS480SAT::get_bwname_(int n, int md) { static char bwname[20]; if (n > 256) { int hi = (n >> 8) & 0x7F; int lo = n & 0xFF; snprintf(bwname, sizeof(bwname), "%s/%s", (md == 0 || md == 1 || md == 3) ? dsp_SL[lo] : TS480SAT_AM_SL[lo], (md == 0 || md == 1 || md == 3) ? dsp_SH[hi] : TS480SAT_AM_SH[hi] ); } else { snprintf(bwname, sizeof(bwname), "%s", (md == 2 || md == 6) ? TS480SAT_CWwidths[n] : TS480SAT_FSKwidths[n]); } return bwname; } void RIG_TS480SAT::check_menu_45() { // read current switch 45 setting menu_45 = false; cmd = "EX0450000;"; if (wait_char(';', 11, 100, "Check menu item 45", ASC) >= 11) { size_t p = replystr.rfind("EX045"); if (p != string::npos) menu_45 = (replystr[p+9] == '1'); } if (menu_45) { dsp_SL = TS480SAT_dataW; SL_tooltip = TS480SAT_dataW_tooltip; SL_label = TS480SAT_dataW_label; dsp_SH = TS480SAT_dataC; SH_tooltip = TS480SAT_dataC_tooltip; SH_label = TS480SAT_dataC_label; B.iBW = A.iBW = 0x8106; } else { dsp_SL = TS480SAT_SL; SL_tooltip = TS480SAT_SL_tooltip; SL_label = TS480SAT_btn_SL_label; dsp_SH = TS480SAT_SH; SH_tooltip = TS480SAT_SH_tooltip; SH_label = TS480SAT_btn_SH_label; B.iBW = A.iBW = 0x8A03; } } void RIG_TS480SAT::shutdown() { } void RIG_TS480SAT::selectA() { cmd = "FR0;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, ""); } void RIG_TS480SAT::selectB() { cmd = "FR1;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, ""); } void RIG_TS480SAT::set_split(bool val) { split = val; split = val; if (useB) { if (val) { cmd = "FR1;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on A", cmd, ""); } else { cmd = "FR1;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, ""); } } else { if (val) { cmd = "FR0;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on B", cmd, ""); } else { cmd = "FR0;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, ""); } } Fl::awake(highlight_vfo, (void *)0); } bool RIG_TS480SAT::can_split() { return true; } int RIG_TS480SAT::get_split() { size_t p; int split = 0; char rx = 0, tx = 0; // tx vfo cmd = rsp = "FT"; cmd.append(";"); if (wait_char(';', 4, 100, "get split tx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; tx = replystr[p+2]; } // rx vfo cmd = rsp = "FR"; cmd.append(";"); if (wait_char(';', 4, 100, "get split rx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; rx = replystr[p+2]; // split test split = (tx == '1' ? 2 : 0) + (rx == '1' ? 1 : 0); } return split; } long RIG_TS480SAT::get_vfoA () { cmd = "FA;"; if (wait_char(';', 14, 100, "get vfo A", ASC) < 14) return A.freq; size_t p = replystr.rfind("FA"); if (p != string::npos && (p + 12 < replystr.length())) { int f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p+n] - '0'; A.freq = f; } return A.freq; } void RIG_TS480SAT::set_vfoA (long freq) { A.freq = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfo A", cmd, ""); } long RIG_TS480SAT::get_vfoB () { cmd = "FB;"; if (wait_char(';', 14, 100, "get vfo B", ASC) < 14) return B.freq; size_t p = replystr.rfind("FB"); if (p != string::npos && (p + 12 < replystr.length())) { int f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p+n] - '0'; B.freq = f; } return B.freq; } void RIG_TS480SAT::set_vfoB (long freq) { B.freq = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfo B", cmd, ""); } // SM cmd 0 ... 100 (rig values 0 ... 15) int RIG_TS480SAT::get_smeter() { int mtr = 0; cmd = "SM0;"; if (wait_char(';', 8, 100, "get Smeter", ASC) < 8) return 0; size_t p = replystr.rfind("SM"); if (p != string::npos) mtr = 5 * atoi(&replystr[p + 3]); return mtr; } int RIG_TS480SAT::get_power_out() { int mtr = 0; cmd = "SM0;"; if (wait_char(';', 8, 100, "get power", ASC) < 8) return mtr; size_t p = replystr.rfind("SM"); if (p != string::npos) { mtr = 5 * atoi(&replystr[p + 3]); if (mtr > 100) mtr = 100; } return mtr; } // RM cmd 0 ... 100 (rig values 0 ... 8) // User report of RM; command using Send Cmd tab // RM10000;RM20000;RM30000; // RM1nnnn; => SWR // RM2nnnn; => COMP // RM3nnnn; => ALC int RIG_TS480SAT::get_swr() { int mtr = 0; cmd = "RM;"; if (wait_char(';', 8, 100, "get SWR/ALC", ASC) < 8) return (int)mtr; size_t p = replystr.rfind("RM1"); if (p != string::npos) mtr = 66 * atoi(&replystr[p + 3]) / 10; p = replystr.rfind("RM3"); if (p != string::npos) alc = 66 * atoi(&replystr[p+3]) / 10; else alc = 0; swralc_polled = true; return mtr; } int RIG_TS480SAT::get_alc(void) { if (!swralc_polled) get_swr(); swralc_polled = false; return alc; } // Tranceiver PTT on/off void RIG_TS480SAT::set_PTT_control(int val) { if (val) { if (progStatus.data_port) cmd = "TX1;"; // DTS transmission using ANI input else cmd = "TX0;"; // mic input } else cmd = "RX;"; sendCommand(cmd); showresp(WARN, ASC, "set PTT", cmd, ""); } int RIG_TS480SAT::set_widths(int val) { int bw; if (val == 0 || val == 1 || val == 3) { if (menu_45) { bw = 0x8106; // 1500 Hz 2400 wide dsp_SL = TS480SAT_dataW; SL_tooltip = TS480SAT_dataW_tooltip; SL_label = TS480SAT_dataW_label; dsp_SH = TS480SAT_dataC; SH_tooltip = TS480SAT_dataC_tooltip; SH_label = TS480SAT_dataC_label; bandwidths_ = TS480SAT_dataW; bw_vals_ = TS480SAT_data_bw_vals; } else { bw = 0x8A03; // 200 ... 3000 Hz dsp_SL = TS480SAT_SL; SL_tooltip = TS480SAT_SL_tooltip; SL_label = TS480SAT_btn_SL_label; dsp_SH = TS480SAT_SH; SH_tooltip = TS480SAT_SH_tooltip; SH_label = TS480SAT_btn_SH_label; bandwidths_ = TS480SAT_SH; bw_vals_ = TS480SAT_HI_bw_vals; } } else if (val == 2 || val == 6) { bandwidths_ = TS480SAT_CWwidths; bw_vals_ = TS480SAT_CW_bw_vals; dsp_SL = TS480SAT_empty; dsp_SH = TS480SAT_empty; bw = 7; } else if (val == 5 || val == 7) { bandwidths_ = TS480SAT_FSKwidths; bw_vals_ = TS480SAT_FSK_bw_vals; dsp_SL = TS480SAT_empty; dsp_SH = TS480SAT_empty; bw = 1; } else { // val == 4 ==> AM bandwidths_ = TS480SAT_empty; bw_vals_ = TS480SAT_bw_vals; dsp_SL = TS480SAT_AM_SL; dsp_SH = TS480SAT_AM_SH; bw = 0x8201; } return bw; } const char **RIG_TS480SAT::bwtable(int m) { if (m == 0 || m == 1 || m == 3) return TS480SAT_empty; else if (m == 2 || m == 6) return TS480SAT_CWwidths; else if (m == 5 || m == 7) return TS480SAT_FSKwidths; //else AM m == 4 return TS480SAT_empty; } const char **RIG_TS480SAT::lotable(int m) { if (m == 0 || m == 1 || m == 3) return TS480SAT_SL; else if (m == 2 || m == 6) return NULL; else if (m == 5 || m == 7) return NULL; return TS480SAT_AM_SL; } const char **RIG_TS480SAT::hitable(int m) { if (m == 0 || m == 1 || m == 3) return TS480SAT_SH; else if (m == 2 || m == 6) return NULL; else if (m == 5 || m == 7) return NULL; return TS480SAT_AM_SH; } void RIG_TS480SAT::set_modeA(int val) { A.imode = val; cmd = "MD"; cmd += TS480SAT_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set mode", cmd, ""); A.iBW = set_widths(val); } int RIG_TS480SAT::get_modeA() { cmd = "MD;"; if (wait_char(';', 4, 100, "get modeA", ASC) < 4) return A.imode; size_t p = replystr.rfind("MD"); if (p != string::npos && (p + 2 < replystr.length())) { int md = replystr[p+2]; md = md - '1'; if (md == 8) md = 7; A.imode = md; A.iBW = set_widths(A.imode); } return A.imode; } void RIG_TS480SAT::set_modeB(int val) { B.imode = val; cmd = "MD"; cmd += TS480SAT_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set mode B", cmd, ""); B.iBW = set_widths(val); } int RIG_TS480SAT::get_modeB() { cmd = "MD;"; if (wait_char(';', 4, 100, "get modeB", ASC) < 4) return B.imode; size_t p = replystr.rfind("MD"); if (p != string::npos && (p + 2 < replystr.length())) { int md = replystr[p+2]; md = md - '1'; if (md == 8) md = 7; B.imode = md; B.iBW = set_widths(B.imode); } return B.imode; } int RIG_TS480SAT::get_modetype(int n) { return _mode_type[n]; } void RIG_TS480SAT::set_bwA(int val) { if (A.imode == 0 || A.imode == 1 || A.imode == 3 || A.imode == 4) { if (val < 256) return; A.iBW = val; cmd = "SL"; cmd.append(to_decimal(A.iBW & 0xFF, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, SL_tooltip, cmd, ""); cmd = "SH"; cmd.append(to_decimal(((A.iBW >> 8) & 0x7F), 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, SH_tooltip, cmd, ""); } if (val > 256) return; else if (A.imode == 2 || A.imode == 6) { A.iBW = val; cmd = TS480SAT_CWbw[A.iBW]; sendCommand(cmd); showresp(WARN, ASC, "set CW bw", cmd, ""); }else if (A.imode == 5 || A.imode == 7) { A.iBW = val; cmd = TS480SAT_FSKbw[A.iBW]; sendCommand(cmd); showresp(WARN, ASC, "set FSK bw", cmd, ""); } } int RIG_TS480SAT::get_bwA() { int i = 0; size_t p; bool menu45 = menu_45; check_menu_45(); if (menu45 != menu_45) Fl::awake(updateBandwidthControl); if (A.imode == 0 || A.imode == 1 || A.imode == 3 || A.imode == 4) { int lo = A.iBW & 0xFF, hi = (A.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get SL", ASC) == 5) { p = replystr.rfind("SL"); if (p != string::npos) lo = fm_decimal(&replystr[2], 2); } cmd = "SH;"; if (wait_char(';', 5, 100, "get SH", ASC) == 5) { p = replystr.rfind("SH"); if (p != string::npos) hi = fm_decimal(&replystr[2], 2); A.iBW = ((hi << 8) | (lo & 0xFF)) | 0x8000; } } else if (A.imode == 2 || A.imode == 6) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 11; i++) if (replystr.find(TS480SAT_CWbw[i]) == p) break; if (i == 11) i = 10; A.iBW = i; } } } else if (A.imode == 5 || A.imode == 7) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 4; i++) if (replystr.find(TS480SAT_FSKbw[i]) == p) break; if (i == 4) i = 3; A.iBW = i; } } } return A.iBW; } void RIG_TS480SAT::set_bwB(int val) { if (B.imode == 0 || B.imode == 1 || B.imode == 3 || B.imode == 4) { if (val < 256) return; B.iBW = val; cmd = "SL"; cmd.append(to_decimal(B.iBW & 0xFF, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, SL_tooltip, cmd, ""); cmd = "SH"; cmd.append(to_decimal(((B.iBW >> 8) & 0x7F), 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, SH_tooltip, cmd, ""); } if (val > 256) return; else if (B.imode == 2 || B.imode == 6) { // CW B.iBW = val; cmd = TS480SAT_CWbw[B.iBW]; sendCommand(cmd); showresp(WARN, ASC, "set CW bw", cmd, ""); }else if (B.imode == 5 || B.imode == 7) { B.iBW = val; cmd = TS480SAT_FSKbw[B.iBW]; sendCommand(cmd); showresp(WARN, ASC, "set FSK bw", cmd, ""); } } int RIG_TS480SAT::get_bwB() { int i = 0; size_t p; bool menu45 = menu_45; check_menu_45(); if (menu45 != menu_45) Fl::awake(updateBandwidthControl); if (B.imode == 0 || B.imode == 1 || B.imode == 3 || B.imode == 4) { int lo = B.iBW & 0xFF, hi = (B.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get SL", ASC) == 5) { p = replystr.rfind("SL"); if (p != string::npos) lo = fm_decimal(&replystr[2], 2); } cmd = "SH;"; if (wait_char(';', 5, 100, "get SH", ASC) == 5) { p = replystr.rfind("SH"); if (p != string::npos) hi = fm_decimal(&replystr[2], 2); B.iBW = ((hi << 8) | (lo & 0xFF)) | 0x8000; } } else if (B.imode == 2 || B.imode == 6) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 11; i++) if (replystr.find(TS480SAT_CWbw[i]) == p) break; if (i == 11) i = 10; B.iBW = i; } } } else if (B.imode == 5 || B.imode == 7) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 4; i++) if (replystr.find(TS480SAT_FSKbw[i]) == p) break; if (i == 4) i = 3; B.iBW = i; } } } return B.iBW; } int RIG_TS480SAT::adjust_bandwidth(int val) { int bw = 0; if (val == 0 || val == 1 || val == 3) bw = 0x8A03; else if (val == 4) bw = 0x8201; else if (val == 2 || val == 6) bw = 7; else if (val == 5 || val == 7) bw = 1; return bw; } int RIG_TS480SAT::def_bandwidth(int val) { return adjust_bandwidth(val); } void RIG_TS480SAT::set_volume_control(int val) { cmd = "AG"; char szval[5]; snprintf(szval, sizeof(szval), "%04d", val * 255 / 100); cmd += szval; cmd += ';'; LOG_WARN("%s", cmd.c_str()); sendCommand(cmd); } int RIG_TS480SAT::get_volume_control() { int val = progStatus.volume; cmd = "AG0;"; if (wait_char(';', 7, 100, "get vol", ASC) < 7) return val; size_t p = replystr.rfind("AG"); if (p == string::npos) return val; replystr[p + 6] = 0; val = atoi(&replystr[p + 3]); val = val * 100 / 255; return val; } void RIG_TS480SAT::set_power_control(double val) { cmd = "PC"; char szval[4]; if (modeA == 4 && val > 25) val = 25; // AM mode limitation snprintf(szval, sizeof(szval), "%03d", (int)val); cmd += szval; cmd += ';'; LOG_WARN("%s", cmd.c_str()); sendCommand(cmd); } int RIG_TS480SAT::get_power_control() { int val = progStatus.power_level; cmd = "PC;"; if (wait_char(';', 6, 100, "get Power control", ASC) < 6) return val; size_t p = replystr.rfind("PC"); if (p == string::npos) return val; val = atoi(&replystr[p + 2]); return val; } void RIG_TS480SAT::set_attenuator(int val) { if (val) cmd = "RA01;"; else cmd = "RA00;"; LOG_WARN("%s", cmd.c_str()); sendCommand(cmd); } int RIG_TS480SAT::get_attenuator() { cmd = "RA;"; if (wait_char(';', 7, 100, "get attenuator", ASC) < 7) return progStatus.attenuator; size_t p = replystr.rfind("RA"); if (p == string::npos) return progStatus.attenuator; if (replystr[p+3] == '1') return 1; return 0; } void RIG_TS480SAT::set_preamp(int val) { if (val) cmd = "PA1;"; else cmd = "PA0;"; LOG_WARN("%s", cmd.c_str()); sendCommand(cmd); } int RIG_TS480SAT::get_preamp() { cmd = "PA;"; if (wait_char(';', 5, 100, "get preamp", ASC) < 5) return progStatus.preamp; size_t p = replystr.rfind("PA"); if (p == string::npos) return progStatus.preamp; if (replystr[p+2] == '1') return 1; return 0; } void RIG_TS480SAT::tune_rig() { cmd = "AC111;"; LOG_WARN("%s", cmd.c_str()); sendCommand(cmd); } void RIG_TS480SAT::set_if_shift(int val) { cmd = "IS+"; if (val < 0) cmd[2] = '-'; cmd.append(to_decimal(abs(val),4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set IF shift", cmd, ""); } bool RIG_TS480SAT::get_if_shift(int &val) { cmd = "IS;"; if (wait_char(';', 8, 100, "get IF shift", ASC) == 8) { size_t p = replystr.rfind("IS"); if (p != string::npos) { val = fm_decimal(&replystr[p+3], 4); if (replystr[p+2] == '-') val *= -1; return (val != 0); } } val = progStatus.shift_val; return progStatus.shift; } void RIG_TS480SAT::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = -1100; if_shift_max = max = 1100; if_shift_step = step = 10; if_shift_mid = 0; } void RIG_TS480SAT::set_mic_gain(int val) { cmd = "MG"; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set mic gain", cmd, ""); } int RIG_TS480SAT::get_mic_gain() { int val = progStatus.mic_gain; cmd = "MG;"; if (wait_char(';', 6, 100, "get mic gain", ASC) < 6) return val; size_t p = replystr.rfind("MG"); if (p != string::npos) val = fm_decimal(&replystr[p+2], 3); return val; } void RIG_TS480SAT::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_TS480SAT::set_rf_gain(int val) { cmd = "RG"; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set rf gain", cmd, ""); } int RIG_TS480SAT::get_rf_gain() { int val = progStatus.rfgain; cmd = "RG;"; if (wait_char(';', 6, 100, "get rf gain", ASC) < 6) return val; size_t p = replystr.rfind("RG"); if (p != string::npos) val = fm_decimal(&replystr[p+2], 3); return val; } void RIG_TS480SAT::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } flrig-1.3.24/src/rigs/TS590S.cxx0000644000175000017500000010014612562731647013032 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "config.h" #include "TS590S.h" #include "support.h" static const char TS590Sname_[] = "TS-590S"; static const char *TS590Smodes_[] = { "LSB", "USB", "CW", "FM", "AM", "FSK", "CW-R", "FSK-R", "LSB-D", "USB-D", "FM-D", NULL}; static const char TS590S_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '9', '1', '2', '4' }; static const char TS590S_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'U', 'L', 'U', 'U' }; //---------------------------------------------------------------------- static const char *TS590S_empty[] = { "N/A", NULL }; //---------------------------------------------------------------------- static int DEF_SL_SH = 0x8A03; static const char *TS590S_SSB_SL[] = { "0", "50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", NULL }; static const char *TS590S_CAT_ssb_SL[] = { "SL00;", "SL01;", "SL02;", "SL03;", "SL04;", "SL05;", "SL06;", "SL07;", "SL08;", "SL09;", "SL10;", "SL11;", NULL }; static const char *TS590S_SSB_SL_tooltip = "lo cut"; static const char *TS590S_SSB_btn_SL_label = "L"; static const char *TS590S_SSB_SH[] = { "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3400", "4000", "5000", NULL }; static const char *TS590S_CAT_ssb_SH[] = { "SH00;", "SH01;", "SH02;", "SH03;", "SH04;", "SH05;", "SH06;", "SH07;", "SH08;", "SH09;", "SH10;", "SH11;", "SH12;", "SH13;", NULL }; static const char *TS590S_SSB_SH_tooltip = "hi cut"; static const char *TS590S_SSB_btn_SH_label = "H"; //---------------------------------------------------------------------- static int DEF_width_shift = 0x8D05; static const char *TS590S_DATA_width[] = { "50", "80", "100", "150", "200", "250", "300", "400", "500", "600", "1000", "1500", "2000", "2500", NULL }; static const char *TS590S_CAT_data_width[] = { "SL00;", "SL01;", "SL02;", "SL03;", "SL04;", "SL05;", "SL06;", "SL07;", "SL08;", "SL09;", "SL10;", "SL11;", "SL12;", "SL13;", NULL }; static const char *TS590S_DATA_W_tooltip = "width"; static const char *TS590S_DATA_W_btn_label = "W"; static const char *TS590S_DATA_shift[] = { "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2210", NULL }; static const char *TS590S_CAT_data_shift[] = { "SH00;", "SH01;", "SH02;", "SH03;", "SH04;", "SH05;", "SH06;", "SH07;", "SH08;", "SH09;", "SH10;", "SH11;", "SH12;", NULL }; static const char *TS590S_DATA_S_tooltip = "shift"; static const char *TS590S_DATA_S_btn_label = "S"; //---------------------------------------------------------------------- static int DEF_am = 0x8201; static const char *TS590S_AM_SL[] = { "10", "100", "200", "500", NULL }; static const char *TS590S_CAT_am_SL[] = { "SL00;", "SL01;", "SL02;", "SL03;", NULL}; static const char *TS590S_AM_SL_tooltip = "lo cut"; static const char *TS590S_AM_btn_SL_label = "L"; static const char *TS590S_AM_SH[] = { "2500", "3000", "4000", "5000", NULL }; static const char *TS590S_CAT_am_SH[] = { "SH00;", "SH01;", "SH02;", "SH03;", NULL}; static const char *TS590S_AM_SH_tooltip = "hi cut"; static const char *TS590S_AM_btn_SH_label = "H"; //---------------------------------------------------------------------- static int DEF_cw = 7; static const char *TS590S_CWwidths[] = { "50", "80", "100", "150", "200", "250", "300", "400", "500", "600", "1000", "1500", "2000", "2500", NULL}; static const char *TS590S_CWbw[] = { "FW0050;", "FW0080;", "FW0100;", "FW0150;", "FW0200;", "FW0250;", "FW0300;", "FW0400;", "FW0500;", "FW0600;", "FW1000;", "FW1500;", "FW2000;", "FW2500;", NULL}; //---------------------------------------------------------------------- static int DEF_fsk = 1; static const char *TS590S_FSKwidths[] = { "250", "500", "1000", "1500", NULL}; static const char *TS590S_FSKbw[] = { "FW0250;", "FW0500;", "FW1000;", "FW1500;", NULL }; //---------------------------------------------------------------------- static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)btnNR, 2, 165, 50 }, { (Fl_Widget *)sldrNR, 54, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; static string menu003; void RIG_TS590S::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; rig_widgets[9].W = btnNR; rig_widgets[10].W = sldrNR; cmd = "EX0030000;"; if (wait_char(';', 11, 100, "read ex 003", ASC) == 11) menu003 = replystr; cmd = "EX003000000;"; sendCommand(cmd); RIG_DEBUG = true; cmd = "AC000;"; sendCommand(cmd); selectA(); get_preamp(); get_attenuator(); } void RIG_TS590S::shutdown() { // restore state of xcvr beeps cmd = menu003; sendCommand(cmd); } RIG_TS590S::RIG_TS590S() { name_ = TS590Sname_; modes_ = TS590Smodes_; bandwidths_ = TS590S_SSB_SH; dsp_SL = TS590S_SSB_SL; SL_tooltip = TS590S_SSB_SL_tooltip; SL_label = TS590S_SSB_btn_SL_label; dsp_SH = TS590S_SSB_SH; SH_tooltip = TS590S_SSB_SH_tooltip; SH_label = TS590S_SSB_btn_SH_label; widgets = rig_widgets; comm_baudrate = BR115200; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; B.imode = A.imode = USB; B.iBW = A.iBW = DEF_SL_SH; B.freq = A.freq = 14070000; can_change_alt_vfo = true; nb_level = 2; has_micgain_control = has_ifshift_control = false; has_auto_notch = has_notch_control = has_sql_control = has_swr_control = has_noise_reduction = has_noise_reduction_control = has_alc_control = has_dsp_controls = has_smeter = has_power_out = has_split = has_split_AB = has_noise_control = has_micgain_control = has_rf_control = has_volume_control = has_power_control = has_tune_control = has_attenuator_control = has_preamp_control = has_mode_control = has_bandwidth_control = has_ifshift_control = has_ptt_control = true; rxtxa = true; precision = 1; ndigits = 8; att_level = 0; preamp_level = 0; noise_reduction_level = 0; } const char * RIG_TS590S::get_bwname_(int n, int md) { static char bwname[20]; if (n > 256) { int hi = (n >> 8) & 0x7F; int lo = n & 0xFF; snprintf(bwname, sizeof(bwname), "%s/%s", (md == LSB || md == USB || md == FM) ? TS590S_SSB_SL[lo] : (md == AM) ? TS590S_AM_SL[lo] : TS590S_DATA_width[lo], (md == LSB || md == USB || md == FM) ? TS590S_SSB_SH[hi] : (md == AM) ? TS590S_AM_SH[hi] : TS590S_DATA_shift[hi] ); } else { snprintf(bwname, sizeof(bwname), "%s", (md == CW || md == CWR) ? TS590S_CWwidths[n] : TS590S_FSKwidths[n]); } return bwname; } void RIG_TS590S::selectA() { cmd = "FR0;"; sendCommand(cmd, 0); showresp(WARN, ASC, "Rx A", cmd, ""); cmd = "FT0;"; sendCommand(cmd, 0); showresp(WARN, ASC, "Tx A", cmd, ""); rxtxa = true; } void RIG_TS590S::selectB() { cmd = "FR1;"; sendCommand(cmd, 0); showresp(WARN, ASC, "Rx B", cmd, ""); cmd = "FT1;"; sendCommand(cmd, 0); showresp(WARN, ASC, "Tx B", cmd, ""); rxtxa = false; } void RIG_TS590S::set_split(bool val) { split = val; if (useB) { if (val) { cmd = "FR1;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on A", cmd, ""); } else { cmd = "FR1;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, ""); } } else { if (val) { cmd = "FR0;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on B", cmd, ""); } else { cmd = "FR0;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, ""); } } Fl::awake(highlight_vfo, (void *)0); } int RIG_TS590S::get_split() { size_t p; int split = 0; char rx = 0, tx = 0; // tx vfo cmd = rsp = "FT"; cmd.append(";"); if (wait_char(';', 4, 100, "get split tx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; tx = replystr[p+2]; } // rx vfo cmd = rsp = "FR"; cmd.append(";"); if (wait_char(';', 4, 100, "get split rx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; rx = replystr[p+2]; // split test split = (tx == '1' ? 2 : 0) + (rx == '1' ? 1 : 0); } return split; } long RIG_TS590S::get_vfoA () { cmd = "FA;"; if (wait_char(';', 14, 100, "get vfoA", ASC) < 14) return A.freq; size_t p = replystr.rfind("FA"); if (p == string::npos) return A.freq; long f = 0L; long mul = 1L; for (size_t n = 12; n > 1; n--) { f += (replystr[p + n] - '0') * mul; mul *= 10; } A.freq = f; return A.freq; } void RIG_TS590S::set_vfoA (long freq) { A.freq = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd, 0); showresp(WARN, ASC, "set vfo A", cmd, ""); } long RIG_TS590S::get_vfoB () { cmd = "FB;"; if (wait_char(';', 14, 100, "get vfoB", ASC) < 14) return B.freq; size_t p = replystr.rfind("FB"); if (p == string::npos) return B.freq; long f = 0L; long mul = 1L; for (size_t n = 12; n > 1; n--) { f += (replystr[p + n] - '0') * mul; mul *= 10; } B.freq = f; return B.freq; } void RIG_TS590S::set_vfoB (long freq) { B.freq = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd, 0); showresp(WARN, ASC, "set vfo B", cmd, ""); } int RIG_TS590S::get_smeter() { int mtr = 0; cmd = "SM0;"; if (wait_char(';', 8, 100, "get", ASC) < 8) return 0; size_t p = replystr.find("SM0"); if (p == string::npos) return 0; replystr[p + 7] = 0; mtr = atoi(&replystr[p + 3]); mtr *= 50; mtr /= 15; if (mtr > 100) mtr = 100; return mtr; } int RIG_TS590S::get_power_out() { int mtr = 0; cmd = "SM0;"; if (wait_char(';', 8, 100, "get power", ASC) < 8) return mtr; size_t p = replystr.rfind("SM0"); if (p == string::npos) return mtr; mtr = atoi(&replystr[p + 3]); mtr *= 50; mtr /= 18; if (mtr > 100) mtr = 100; return mtr; } static bool read_alc = false; static int alc_val = 0; int RIG_TS590S::get_swr(void) { int mtr = 0; read_alc = false; cmd = "RM;"; if (wait_char(';', 8, 100, "get swr/alc", ASC) < 8) return 0; size_t p = replystr.find("RM3"); if (p != string::npos) { replystr[p + 7] = 0; alc_val = atoi(&replystr[p + 3]); alc_val *= 100; alc_val /= 15; if (alc_val > 100) alc_val = 100; read_alc = true; } p = replystr.find("RM1"); if (p == string::npos) return 0; replystr[p + 7] = 0; mtr = atoi(&replystr[p + 3]); mtr *= 50; mtr /= 15; if (mtr > 100) mtr = 100; return mtr; } int RIG_TS590S::get_alc(void) { if (read_alc) { read_alc = false; return alc_val; } cmd = "RM;"; if (wait_char(';', 8, 100, "get alc", ASC) < 8) return 0; size_t p = replystr.find("RM3"); if (p == string::npos) return 0; replystr[p + 7] = 0; alc_val = atoi(&replystr[p + 3]); alc_val *= 100; alc_val /= 15; if (alc_val > 100) alc_val = 100; return alc_val; } // Transceiver power level void RIG_TS590S::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd, 0); } int RIG_TS590S::get_power_control() { cmd = "PC;"; if (wait_char(';', 6, 100, "get pwr ctrl", ASC) < 6) return 0; size_t p = replystr.rfind("PC"); if (p == string::npos) return 0; int mtr = 0; replystr[p + 5] = 0; mtr = atoi(&replystr[p + 2]); return mtr; } // Volume control return 0 ... 100 int RIG_TS590S::get_volume_control() { cmd = "AG0;"; if (wait_char(';', 7, 100, "get vol ctrl", ASC) < 7) return 0; size_t p = replystr.rfind("AG"); if (p == string::npos) return 0; replystr[p + 6] = 0; int val = atoi(&replystr[p + 3]); return (int)(val / 2.55); } void RIG_TS590S::set_volume_control(int val) { int ivol = (int)(val * 2.55); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd, 0); } // Tranceiver PTT on/off void RIG_TS590S::set_PTT_control(int val) { if (val) { if (data_mode) cmd = "TX1;"; else cmd = "TX0;"; } else cmd = "RX;"; sendCommand(cmd, 0); } void RIG_TS590S::tune_rig() { cmd = "AC111;"; sendCommand(cmd, 0); } void RIG_TS590S::set_attenuator(int val) { att_level = val; if (val) cmd = "RA01;"; else cmd = "RA00;"; sendCommand(cmd, 0); } int RIG_TS590S::get_attenuator() { cmd = "RA;"; if (wait_char(';', 7, 100, "get att", ASC) < 7) return 0; size_t p = replystr.rfind("RA"); if (p == string::npos) return 0; if (replystr[p + 2] == '0' && replystr[p + 3] == '0') att_level = 0; else att_level = 1; return att_level; } void RIG_TS590S::set_preamp(int val) { preamp_level = val; if (val) cmd = "PA1;"; else cmd = "PA0;"; sendCommand(cmd, 0); } int RIG_TS590S::get_preamp() { cmd = "PA;"; if (wait_char(';', 5, 100, "get preamp", ASC) < 5) return 0; size_t p = replystr.rfind("PA"); if (p == string::npos) return 0; if (replystr[p + 2] == '1') preamp_level = 1; else preamp_level = 0; return preamp_level; } //====================================================================== // mode commands //====================================================================== void RIG_TS590S::set_modeA(int val) { active_mode = A.imode = val; cmd = "MD"; cmd += TS590S_mode_chr[val]; cmd += ';'; sendCommand(cmd, 0); showresp(ERR, ASC, "set mode A", cmd, ""); if ( val == LSBD || val == USBD || val == FMD) { data_mode = true; cmd = "DA1;"; sendCommand(cmd, 0); showresp(WARN, ASC, "set data A", cmd, ""); } else if (val == LSB || val == USB || val == FM) { data_mode = false; cmd = "DA0;"; sendCommand(cmd, 0); showresp(WARN, ASC, "set data A", cmd, ""); } set_widths(val); } int RIG_TS590S::get_modeA() { int md = A.imode; cmd = "MD;"; if (wait_char(';', 4, 100, "get mode A", ASC) < 4) return A.imode; size_t p = replystr.rfind("MD"); if (p == string::npos) return A.imode; switch (replystr[p + 2]) { case '1' : md = LSB; break; case '2' : md = USB; break; case '3' : md = CW; break; case '4' : md = FM; break; case '5' : md = AM; break; case '6' : md = FSK; break; case '7' : md = CWR; break; case '9' : md = FSKR; break; default : md = A.imode; } if (md == LSB || md == USB || md == FM) { cmd = "DA;"; if (wait_char(';', 4, 100, "get data A", ASC) < 4) return A.imode; p = replystr.rfind("DA"); if (p == string::npos) return A.imode; if (replystr[p + 2] == '1') { data_mode = true; if (md == LSB) md = LSBD; else if (md == USB) md = USBD; else if (md == FM) md = FMD; } } if (md != A.imode) { active_mode = A.imode = md; set_widths(md); } return A.imode; } void RIG_TS590S::set_modeB(int val) { active_mode = B.imode = val; cmd = "MD"; cmd += TS590S_mode_chr[val]; cmd += ';'; sendCommand(cmd, 0); showresp(WARN, ASC, "set mode B", cmd, ""); if ( val == LSBD || val == USBD || val == FMD) { data_mode = true; cmd = "DA1;"; sendCommand(cmd, 0); showresp(WARN, ASC, "set data B", cmd, ""); } else if (val == LSB || val == USB || val == FM) { cmd = "DA0;"; sendCommand(cmd, 0); showresp(WARN, ASC, "set data B", cmd, ""); } set_widths(val); } int RIG_TS590S::get_modeB() { int md = B.imode; cmd = "MD;"; if (wait_char(';', 4, 100, "get mode B", ASC) < 4) return B.imode; size_t p = replystr.rfind("MD"); if (p == string::npos) return B.imode; switch (replystr[p + 2]) { case '1' : md = LSB; break; case '2' : md = USB; break; case '3' : md = CW; break; case '4' : md = FM; break; case '5' : md = AM; break; case '6' : md = FSK; break; case '7' : md = CWR; break; case '9' : md = FSKR; break; default : md = B.imode; } if (md == LSB || md == USB || md == FM) { cmd = "DA;"; if (wait_char(';', 4, 100, "get dat B", ASC) < 4) return B.imode; p = replystr.rfind("DA"); if (p == string::npos) return B.imode; if (replystr[p + 2] == '1') { data_mode = true; if (md == LSB) md = LSBD; else if (md == USB) md = USBD; else if (md == FM) md = FMD; } } if (md != B.imode) { active_mode = B.imode = md; set_widths(md); } return B.imode; } //====================================================================== // Bandpass filter commands //====================================================================== int RIG_TS590S::set_widths(int val) { int bw = 0; if (val == LSB || val == USB || val == FM || val == FMD) { bandwidths_ = TS590S_SSB_SH; dsp_SL = TS590S_SSB_SL; dsp_SH = TS590S_SSB_SH; SL_tooltip = TS590S_SSB_SL_tooltip; SL_label = TS590S_SSB_btn_SL_label; SH_tooltip = TS590S_SSB_SH_tooltip; SH_label = TS590S_SSB_btn_SH_label; bw = DEF_SL_SH; // 200 lower, 3000 upper } else if (val == CW || val == CWR) { bandwidths_ = TS590S_CWwidths; dsp_SL = TS590S_empty; dsp_SH = TS590S_empty; bw = DEF_cw; } else if (val == FSK || val == FSKR) { bandwidths_ = TS590S_FSKwidths; dsp_SL = TS590S_empty; dsp_SH = TS590S_empty; bw = 1; } else if (val == AM) { // val == 4 ==> AM bandwidths_ = TS590S_AM_SH; dsp_SL = TS590S_AM_SL; dsp_SH = TS590S_AM_SH; SL_tooltip = TS590S_AM_SL_tooltip; SL_label = TS590S_AM_btn_SL_label; SH_tooltip = TS590S_AM_SH_tooltip; SH_label = TS590S_AM_btn_SH_label; bw = DEF_am; } else if (val == LSBD || val == USBD) { bandwidths_ = TS590S_DATA_width; dsp_SL = TS590S_DATA_shift; SL_tooltip = TS590S_DATA_S_tooltip; SL_label = TS590S_DATA_S_btn_label; dsp_SH = TS590S_DATA_width; SH_tooltip = TS590S_DATA_W_tooltip; SH_label = TS590S_DATA_W_btn_label; bw = DEF_width_shift; } return bw; } const char **RIG_TS590S::bwtable(int m) { if (m == LSB || m == USB || m == FM || m == FMD) return TS590S_SSB_SH; else if (m == CW || m == CWR) return TS590S_CWwidths; else if (m == FSK || m == FSKR) return TS590S_FSKwidths; else if (m == AM) return TS590S_AM_SH; else return TS590S_DATA_width; } const char **RIG_TS590S::lotable(int m) { if (m == LSB || m == USB || m == FM || m == FMD) return TS590S_SSB_SL; else if (m == AM) return TS590S_AM_SL; else if (m == LSBD || m == USBD) return TS590S_DATA_shift; // CW CWR FSK FSKR return NULL; } const char **RIG_TS590S::hitable(int m) { if (m == LSB || m == USB || m == FM || m == FMD) return TS590S_SSB_SH; else if (m == AM) return TS590S_AM_SH; else if (m == LSBD || m == USBD) return TS590S_DATA_width; // CW CWR FSK FSKR return NULL; } int RIG_TS590S::adjust_bandwidth(int val) { if (val == LSB || val == USB || val == FM || val == FMD) return DEF_SL_SH; else if (val == LSBD || val == USBD) return DEF_width_shift; else if (val == CW || val == CWR) return DEF_cw; else if (val == FSK || val == FSKR) return DEF_fsk; // else if (val == AM) return DEF_am; } int RIG_TS590S::def_bandwidth(int val) { return adjust_bandwidth(val); } void RIG_TS590S::set_bwA(int val) { // LSB, USB, FM, FM-D if (A.imode == LSB || A.imode == USB || A.imode == FM || A.imode == FMD) { if (val < 256) return; A.iBW = val; cmd = TS590S_CAT_ssb_SL[A.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS590S_CAT_ssb_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } // LSB-D, USB-D if (A.imode == LSBD || A.imode == USBD) { if (val < 256) return; A.iBW = val; cmd = TS590S_CAT_data_shift[A.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set shift", cmd, ""); cmd = TS590S_CAT_data_width[(A.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set width", cmd, ""); return; } // AM if (A.imode == AM) { if (val < 256) return; A.iBW = val; cmd = TS590S_CAT_am_SL[A.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS590S_CAT_am_SH[(A.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } if (val > 256) return; // CW if (A.imode == CW || A.imode == CWR) { A.iBW = val; cmd = TS590S_CWbw[A.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set CW bw", cmd, ""); return; } // FSK if (A.imode == FSK || A.imode == FSKR) { A.iBW = val; cmd = TS590S_FSKbw[A.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set FSK bw", cmd, ""); return; } } void RIG_TS590S::set_bwB(int val) { if (B.imode == LSB || B.imode == USB || B.imode == FM || B.imode == FMD) { if (val < 256) return; B.iBW = val; cmd = TS590S_CAT_ssb_SL[B.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS590S_CAT_ssb_SH[(B.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } if (B.imode == LSBD || B.imode == USBD) { // SSB data mode if (val < 256) return; B.iBW = val; cmd = TS590S_CAT_data_shift[B.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set shift", cmd, ""); cmd = TS590S_CAT_data_width[(B.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set width", cmd, ""); return; } if (B.imode == AM) { if (val < 256) return; B.iBW = val; cmd = TS590S_AM_SL[B.iBW & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set lower", cmd, ""); cmd = TS590S_AM_SH[(B.iBW >> 8) & 0x7F]; sendCommand(cmd,0); showresp(WARN, ASC, "set upper", cmd, ""); return; } if (val > 256) return; if (B.imode == CW || B.imode == CWR) { B.iBW = val; cmd = TS590S_CWbw[B.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set CW bw", cmd, ""); return; } if (B.imode == FSK || B.imode == FSKR) { B.iBW = val; cmd = TS590S_FSKbw[B.iBW]; sendCommand(cmd,0); showresp(WARN, ASC, "set FSK bw", cmd, ""); return; } } int RIG_TS590S::get_bwA() { int i = 0, lo = 0, hi = 0; size_t p; switch (A.imode) { case CW: case CWR: A.iBW = DEF_cw; cmd = "FW;"; if (wait_char(';', 7, 100, "get CW width", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 14; i++) if (replystr.find(TS590S_CWbw[i]) == p) break; if (i == 14) i = 13; A.iBW = i; } } break; case FSK: case FSKR: A.iBW = DEF_fsk; cmd = "FW;"; if (wait_char(';', 7, 100, "get FSK width", ASC) == 7 ) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 4; i++) if (replystr.find(TS590S_FSKbw[i]) == p) break; if (i == 4) i = 3; A.iBW = i; } } break; case LSB: case USB: case FM: A.iBW = DEF_SL_SH; lo = A.iBW & 0x7F; hi = (A.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get lower", ASC) == 5) { p = replystr.rfind("SL"); if (p == string::npos) break; lo = fm_decimal(&replystr[2], 2); cmd = "SH;"; if (wait_char(';', 5, 100, "get upper", ASC) == 5) { p = replystr.rfind("SH"); if (p == string::npos) break; hi = fm_decimal(&replystr[2], 2); A.iBW = ((hi << 8) | (lo & 0x7F)) | 0x8000; } } break; case LSBD: case USBD: case FMD: A.iBW = DEF_width_shift; lo = A.iBW & 0x7F; hi = (A.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get width", ASC) == 5) { p = replystr.rfind("SL"); if (p == string::npos) break; hi = fm_decimal(&replystr[2], 2); cmd = "SH;"; if (wait_char(';', 5, 100, "get shift", ASC) == 5) { p = replystr.rfind("SH"); if (p == string::npos) break; lo = fm_decimal(&replystr[2], 2); A.iBW = ((hi << 8) | (lo & 0x7F)) | 0x8000; } } break; } return A.iBW; } int RIG_TS590S::get_bwB() { int i = 0, lo = 0, hi = 0; size_t p; switch (B.imode) { case CW: case CWR: B.iBW = DEF_cw; cmd = "FW;"; if (wait_char(';', 7, 100, "get CW width", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 14; i++) if (replystr.find(TS590S_CWbw[i]) == p) break; if (i == 14) i = 13; B.iBW = i; } } break; case FSK: case FSKR: B.iBW = DEF_fsk; cmd = "FW;"; if (wait_char(';', 7, 100, "get FSK width", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 4; i++) if (replystr.find(TS590S_FSKbw[i]) == p) break; if (i == 4) i = 3; B.iBW = i; } } break; case LSB: case USB: case FM: B.iBW = DEF_SL_SH; lo = B.iBW & 0xFF; hi = (B.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get lower", ASC) == 5) { p = replystr.rfind("SL"); if (p == string::npos) break; lo = fm_decimal(&replystr[2], 2); cmd = "SH;"; if (wait_char(';', 5, 100, "get upper", ASC) == 5) { p = replystr.rfind("SH"); if (p == string::npos) break; hi = fm_decimal(&replystr[2], 2); B.iBW = ((hi << 8) | (lo & 0x7F)) | 0x8000; } } break; case LSBD: case USBD: case FMD: B.iBW = DEF_width_shift; lo = B.iBW & 0x7F; hi = (B.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get width", ASC) == 5) { p = replystr.rfind("SL"); if (p == string::npos) break; hi = fm_decimal(&replystr[2], 2); cmd = "SH;"; if (wait_char(';', 5, 100, "get shift", ASC) == 5 ) { p = replystr.rfind("SH"); if (p == string::npos) break; lo = fm_decimal(&replystr[2], 2); B.iBW = ((hi << 8) | (lo & 0xFF)) | 0x8000; } } break; } return B.iBW; } int RIG_TS590S::get_modetype(int n) { return TS590S_mode_type[n]; } // val 0 .. 100 void RIG_TS590S::set_mic_gain(int val) { cmd = "MG000;"; for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd, 0); } int RIG_TS590S::get_mic_gain() { int val = 0; cmd = "MG;"; if (wait_char(';', 6, 100, "get mic ctrl", ASC) >= 6) { size_t p = replystr.rfind("MG"); if (p == string::npos) return val; replystr[p + 5] = 0; val = atoi(&replystr[p + 2]); } return val; } void RIG_TS590S::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_TS590S::set_noise(bool val) { if (nb_level == 0) { nb_level = 1; nb_label("NB 1", true); } else if (nb_level == 1) { nb_level = 2; nb_label("NB 2", true); } else if (nb_level == 2) { nb_level = 0; nb_label("NB", false); } cmd = "NB0;"; cmd[2] += nb_level; LOG_INFO("%s", cmd.c_str()); sendCommand(cmd, 0); } //====================================================================== // IF shift command only available if the transceiver is in the CW mode // step size is 50 Hz //====================================================================== void RIG_TS590S::set_if_shift(int val) { if (active_mode == CW || active_mode == CWR) { // cw modes progStatus.shift_val = val; cmd = "IS "; cmd.append(to_decimal(abs(val),4)).append(";"); sendCommand(cmd,0); showresp(WARN, ASC, "set IF shift", cmd, ""); } } bool RIG_TS590S::get_if_shift(int &val) { if (active_mode == CW || active_mode == CWR) { // cw modes cmd = "IS;"; if (wait_char(';', 8, 100, "get IF shift", ASC) == 8) { size_t p = replystr.rfind("IS"); if (p != string::npos) { val = fm_decimal(&replystr[p+3], 4); } else val = progStatus.shift_val; return true; } } val = progStatus.shift_val; return false; } void RIG_TS590S::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = 300; if_shift_max = max = 1000; if_shift_step = step = 50; if_shift_mid = 800; } void RIG_TS590S::set_squelch(int val) { cmd = "SQ0"; cmd.append(to_decimal(abs(val),3)).append(";"); sendCommand(cmd,0); showresp(WARN, ASC, "set squelch", cmd, ""); } int RIG_TS590S::get_squelch() { int val = 0; cmd = "SQ0;"; if (wait_char(';', 7, 100, "get squelch", ASC) >= 7) { size_t p = replystr.rfind("SQ0"); if (p == string::npos) return val; replystr[p + 6] = 0; val = atoi(&replystr[p + 3]); } return val; } void RIG_TS590S::get_squelch_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } void RIG_TS590S::set_rf_gain(int val) { cmd = "RG000;"; int rfval = 255 - val; for (int i = 4; i > 1; i--) { cmd[i] = rfval % 10 + '0'; rfval /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET rfgain", cmd, ""); } int RIG_TS590S::get_rf_gain() { int rfval = 0; cmd = rsp = "RG"; cmd += ';'; if (wait_char(';', 6, 100, "get rfgain", ASC) == 6) { size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.rfgain; for (int i = 2; i < 5; i++) { rfval *= 10; rfval += replystr[p+i] - '0'; } } return 255 - rfval; } void RIG_TS590S::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } void RIG_TS590S::set_noise_reduction(int val) { if (val == -1) { if (noise_reduction_level == 1) { nr_label("NR1", true); } else if (noise_reduction_level == 2) { nr_label("NR2", true); } return; } if (noise_reduction_level == 0) { noise_reduction_level = 1; nr_label("NR1", true); } else if (noise_reduction_level == 1) { noise_reduction_level = 2; nr_label("NR2", true); } else if (noise_reduction_level == 2) { noise_reduction_level = 0; nr_label("NR", false); } cmd.assign("NR"); cmd += '0' + noise_reduction_level; sendCommand (cmd); showresp(WARN, ASC, "SET noise reduction", cmd, ""); } int RIG_TS590S::get_noise_reduction() { cmd = rsp = "NR"; cmd.append(";"); if (wait_char(';', 4, 100, "GET noise reduction", ASC) == 4 ) { size_t p = replystr.rfind(rsp); if (p == string::npos) return noise_reduction_level; noise_reduction_level = replystr[p+2] - '0'; if (noise_reduction_level == 1) { nr_label("NR1", true); } else if (noise_reduction_level == 2) { nr_label("NR2", true); } else { nr_label("NR", false); } } return noise_reduction_level; } void RIG_TS590S::set_noise_reduction_val(int val) { cmd.assign("RL").append(to_decimal(val, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET_noise_reduction_val", cmd, ""); } int RIG_TS590S::get_noise_reduction_val() { if (noise_reduction_level == 0) return 0; int val = 1; cmd = rsp = "RL"; cmd.append(";"); if (wait_char(';', 5, 100, "GET noise reduction val", ASC) == 5) { size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.noise_reduction_val; val = atoi(&replystr[p+2]); } return val; } void RIG_TS590S::set_auto_notch(int v) { cmd.assign("NT").append(v ? "1" : "0" ).append("0;"); sendCommand(cmd); showresp(WARN, ASC, "SET Auto Notch", cmd, ""); } int RIG_TS590S::get_auto_notch() { cmd = "NT;"; if (wait_char(';', 5, 100, "get auto notch", ASC) == 5) { size_t p = replystr.rfind("NT"); if (p == string::npos) return 0; if (replystr[p+2] == '1') return 1; } return 0; } void RIG_TS590S::set_notch(bool on, int val) { if (on) { cmd.assign("NT20;"); sendCommand(cmd); showresp(WARN, ASC, "Set notch ON", cmd, ""); int bp = (int)((val - 300.0) * 128.0 / 2700.0); cmd.assign("BP").append(to_decimal(bp, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set notch freq", cmd, ""); } else { cmd.assign("NT00;"); sendCommand(cmd); showresp(WARN, ASC, "Set notch OFF", cmd, ""); } } bool RIG_TS590S::get_notch(int &val) { val = 300; cmd = "NT;"; if (wait_char(';', 5, 100, "get notch state", ASC) == 5) { size_t p = replystr.rfind("NT"); if (p == string::npos) return 0; if (replystr[p+2] == '2') { cmd.assign("BP;"); if (wait_char(';', 6, 100, "get notch freq", ASC) == 6) { size_t p = replystr.rfind("BP"); if (p != string::npos) val = (int)((atoi(&replystr[p+2]) * 2700.0 / 128.0) + 300.0); return 1; } } } return 0; } void RIG_TS590S::get_notch_min_max_step(int &min, int &max, int &step) { min = 300; max = 3000; step = 20; } flrig-1.3.24/src/rigs/TS480HX.cxx0000644000175000017500000005335112562731651013145 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "TS480HX.h" #include "support.h" static const char TS480HXname_[] = "TS-480HX"; static const char *TS480HXmodes_[] = { "LSB", "USB", "CW", "FM", "AM", "FSK", "CW-R", "FSK-R", NULL}; static const char TS480HX_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '9' }; static const char TS480HX_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'U' }; static const char *TS480HX_empty[] = { "N/A", NULL }; static int TS480HX_bw_vals[] = {1, WVALS_LIMIT}; // SL command is lo cut when menu 045 OFF static const char *TS480HX_SL[] = { "0", "50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", NULL }; static const char *TS480HX_SL_tooltip = "lo cut"; static const char *TS480HX_btn_SL_label = "L"; // SH command is hi cut when menu 045 OFF static const char *TS480HX_SH[] = { "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3400", "4000", "5000", NULL }; static int TS480HX_HI_bw_vals[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,14,WVALS_LIMIT}; static const char *TS480HX_SH_tooltip = "hi cut"; static const char *TS480HX_btn_SH_label = "H"; // SL command is width when menu 045 ON static const char *TS480HX_dataW[] = { "50", "100", "250", "500", "1000", "1500", "2400", NULL }; static int TS480HX_data_bw_vals[] = {1,2,3,4,5,6,7, WVALS_LIMIT}; static const char *TS480HX_dataW_tooltip = "width"; static const char *TS480HX_dataW_label = "W"; // SH command is center when menu 045 ON static const char *TS480HX_dataC[] = { "1000", "1500", "2210", NULL }; static const char *TS480HX_dataC_tooltip = "center"; static const char *TS480HX_dataC_label = "C"; static const char *TS480HX_AM_SL[] = { "10", "100", "200", "500", NULL }; static const char *TS480HX_AM_SH[] = { "2500", "3000", "4000", "5000", NULL }; //static int TS480HX_AM_bw_vals[] = {1,2,3,4,WVALS_LIMIT}; static const char *TS480HX_CWwidths[] = { "50", "80", "100", "150", "200", "300", "400", "500", "600", "1000", "2000", NULL}; static int TS480HX_CW_bw_vals[] = {1,2,3,4,5,6,7,8,9,10,11,WVALS_LIMIT}; static const char *TS480HX_CWbw[] = { "FW0050;", "FW0080;", "FW0100;", "FW0150;", "FW0200;", "FW0300;", "FW0400;", "FW0500;", "FW0600;", "FW1000;", "FW2000;" }; static const char *TS480HX_FSKwidths[] = { "250", "500", "1000", "1500", NULL}; static int TS480HX_FSK_bw_vals[] = { 1,2,3,4,WVALS_LIMIT}; static const char *TS480HX_FSKbw[] = { "FW0250;", "FW0500;", "FW1000;", "FW1500;" }; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnDataPort, 214, 125, 50 }, { (Fl_Widget *)sldrMICGAIN, 266, 125, 156 }, { (Fl_Widget *)sldrPOWER, 266, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; void RIG_TS480HX::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnDataPort; rig_widgets[6].W = sldrMICGAIN; rig_widgets[7].W = sldrPOWER; if (progStatus.UIsize == small_ui) has_extras = false; progStatus.rfgain = 100; progStatus.volume = 25; progStatus.power_level = 20; progStatus.mic_gain = 25; check_menu_45(); }; RIG_TS480HX::RIG_TS480HX() { // base class values name_ = TS480HXname_; modes_ = TS480HXmodes_; _mode_type = TS480HX_mode_type; bandwidths_ = TS480HX_SH; bw_vals_ = TS480HX_HI_bw_vals; dsp_SL = TS480HX_SL; SL_tooltip = TS480HX_SL_tooltip; SL_label = TS480HX_btn_SL_label; dsp_SH = TS480HX_SH; SH_tooltip = TS480HX_SL_tooltip; SH_label = TS480HX_btn_SH_label; widgets = rig_widgets; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; B.imode = A.imode = 1; B.iBW = A.iBW = 0x8A03; B.freq = A.freq = 14070000; has_tune_control = false; has_noise_control = false; has_notch_control = false; has_extras = true; has_split = true; has_split_AB = true; has_data_port = true; has_micgain_control = true; has_ifshift_control = true; has_rf_control = true; has_power_out = true; has_dsp_controls = true; has_smeter = true; has_swr_control = true; has_alc_control = true; has_attenuator_control = true; has_preamp_control = true; has_mode_control = true; has_bandwidth_control = true; has_volume_control = true; has_power_control = true; has_tune_control = true; has_ptt_control = true; precision = 1; ndigits = 8; } const char * RIG_TS480HX::get_bwname_(int n, int md) { static char bwname[20]; if (n > 256) { int hi = (n >> 8) & 0x7F; int lo = n & 0xFF; snprintf(bwname, sizeof(bwname), "%s/%s", (md == 0 || md == 1 || md == 3) ? dsp_SL[lo] : TS480HX_AM_SL[lo], (md == 0 || md == 1 || md == 3) ? dsp_SH[hi] : TS480HX_AM_SH[hi] ); } else { snprintf(bwname, sizeof(bwname), "%s", (md == 2 || md == 6) ? TS480HX_CWwidths[n] : TS480HX_FSKwidths[n]); } return bwname; } void RIG_TS480HX::check_menu_45() { // read current switch 45 setting menu_45 = false; cmd = "EX0450000;"; int ret = wait_char(';', 11, 100, "Check menu item 45", ASC); if (ret >= 11) { size_t p = replystr.rfind("EX045"); if (p != string::npos) menu_45 = (replystr[p+9] == '1'); } if (menu_45) { dsp_SL = TS480HX_dataW; SL_tooltip = TS480HX_dataW_tooltip; SL_label = TS480HX_dataW_label; dsp_SH = TS480HX_dataC; SH_tooltip = TS480HX_dataC_tooltip; SH_label = TS480HX_dataC_label; B.iBW = A.iBW = 0x8106; } else { dsp_SL = TS480HX_SL; SL_tooltip = TS480HX_SL_tooltip; SL_label = TS480HX_btn_SL_label; dsp_SH = TS480HX_SH; SH_tooltip = TS480HX_SH_tooltip; SH_label = TS480HX_btn_SH_label; B.iBW = A.iBW = 0x8A03; } } void RIG_TS480HX::shutdown() { } void RIG_TS480HX::selectA() { cmd = "FR0;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, ""); } void RIG_TS480HX::selectB() { cmd = "FR1;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, ""); } void RIG_TS480HX::set_split(bool val) { split = val; if (useB) { if (val) { cmd = "FR1;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on A", cmd, ""); } else { cmd = "FR1;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, ""); } } else { if (val) { cmd = "FR0;FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on B", cmd, ""); } else { cmd = "FR0;FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, ""); } } Fl::awake(highlight_vfo, (void *)0); } bool RIG_TS480HX::can_split() { return true; } int RIG_TS480HX::get_split() { size_t p; int split = 0; char rx = 0, tx = 0; // tx vfo cmd = rsp = "FT"; cmd.append(";"); if (wait_char(';', 4, 100, "get split tx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; tx = replystr[p+2]; } // rx vfo cmd = rsp = "FR"; cmd.append(";"); if (wait_char(';', 4, 100, "get split rx vfo", ASC) == 4) { p = replystr.rfind(rsp); if (p == string::npos) return split; rx = replystr[p+2]; // split test split = (tx == '1' ? 2 : 0) + (rx == '1' ? 1 : 0); } return split; } long RIG_TS480HX::get_vfoA () { cmd = "FA;"; if (wait_char(';', 14, 100, "get vfo A", ASC) != 14) return A.freq; size_t p = replystr.rfind("FA"); if (p != string::npos && (p + 12 < replystr.length())) { int f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p+n] - '0'; A.freq = f; } return A.freq; } void RIG_TS480HX::set_vfoA (long freq) { A.freq = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfo A", cmd, ""); } long RIG_TS480HX::get_vfoB () { cmd = "FB;"; if (wait_char(';', 14, 100, "get vfo B", ASC) != 14) return B.freq; size_t p = replystr.rfind("FB"); if (p != string::npos && (p + 12 < replystr.length())) { int f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p+n] - '0'; B.freq = f; } return B.freq; } void RIG_TS480HX::set_vfoB (long freq) { B.freq = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfo B", cmd, ""); } // SM cmd 0 ... 100 (rig values 0 ... 15) int RIG_TS480HX::get_smeter() { int mtr = 0; cmd = "SM0;"; if (wait_char(';', 8, 100, "get Smeter", ASC) != 8) return 0; size_t p = replystr.rfind("SM"); if (p != string::npos) mtr = 5 * atoi(&replystr[p + 3]); return mtr; } int RIG_TS480HX::get_power_out() { int mtr = 0; cmd = "SM0;"; if (wait_char(';', 8, 100, "get power", ASC) != 8) return mtr; size_t p = replystr.rfind("SM"); if (p != string::npos) { mtr = 5 * atoi(&replystr[p + 3]); if (mtr > 100) mtr = 100; } return mtr; } // RM cmd 0 ... 100 (rig values 0 ... 8) // User report of RM; command using Send Cmd tab // RM10000;RM20000;RM30000; // RM1nnnn; => SWR // RM2nnnn; => COMP // RM3nnnn; => ALC int RIG_TS480HX::get_swr() { int mtr = 0; cmd = "RM;"; if (wait_char(';', 8, 100, "get SWR/ALC", ASC) != 8) return (int)mtr; size_t p = replystr.rfind("RM1"); if (p != string::npos) mtr = 66 * atoi(&replystr[p + 3]) / 10; p = replystr.rfind("RM3"); if (p != string::npos) alc = 66 * atoi(&replystr[p+3]) / 10; else alc = 0; swralc_polled = true; return mtr; } int RIG_TS480HX::get_alc(void) { if (!swralc_polled) get_swr(); swralc_polled = false; return alc; } // Tranceiver PTT on/off void RIG_TS480HX::set_PTT_control(int val) { if (val) { if (progStatus.data_port) cmd = "TX1;"; // DTS transmission using ANI input else cmd = "TX0;"; // mic input } else cmd = "RX;"; sendCommand(cmd); showresp(WARN, ASC, "set PTT", cmd, ""); } int RIG_TS480HX::set_widths(int val) { int bw; if (val == 0 || val == 1 || val == 3) { if (menu_45) { bw = 0x8106; // 1500 Hz 2400 wide dsp_SL = TS480HX_dataW; SL_tooltip = TS480HX_dataW_tooltip; SL_label = TS480HX_dataW_label; dsp_SH = TS480HX_dataC; SH_tooltip = TS480HX_dataC_tooltip; SH_label = TS480HX_dataC_label; bandwidths_ = TS480HX_dataW; bw_vals_ = TS480HX_data_bw_vals; } else { bw = 0x8A03; // 200 ... 3000 Hz dsp_SL = TS480HX_SL; SL_tooltip = TS480HX_SL_tooltip; SL_label = TS480HX_btn_SL_label; dsp_SH = TS480HX_SH; SH_tooltip = TS480HX_SH_tooltip; SH_label = TS480HX_btn_SH_label; bandwidths_ = TS480HX_SH; bw_vals_ = TS480HX_HI_bw_vals; } } else if (val == 2 || val == 6) { bandwidths_ = TS480HX_CWwidths; bw_vals_ = TS480HX_CW_bw_vals; dsp_SL = TS480HX_empty; dsp_SH = TS480HX_empty; bw = 7; } else if (val == 5 || val == 7) { bandwidths_ = TS480HX_FSKwidths; bw_vals_ = TS480HX_FSK_bw_vals; dsp_SL = TS480HX_empty; dsp_SH = TS480HX_empty; bw = 1; } else { // val == 4 ==> AM bandwidths_ = TS480HX_empty; bw_vals_ = TS480HX_bw_vals; dsp_SL = TS480HX_AM_SL; dsp_SH = TS480HX_AM_SH; bw = 0x8201; } return bw; } const char **RIG_TS480HX::bwtable(int m) { if (m == 0 || m == 1 || m == 3) return TS480HX_empty; else if (m == 2 || m == 6) return TS480HX_CWwidths; else if (m == 5 || m == 7) return TS480HX_FSKwidths; //else AM m == 4 return TS480HX_empty; } const char **RIG_TS480HX::lotable(int m) { if (m == 0 || m == 1 || m == 3) return TS480HX_SL; else if (m == 2 || m == 6) return NULL; else if (m == 5 || m == 7) return NULL; return TS480HX_AM_SL; } const char **RIG_TS480HX::hitable(int m) { if (m == 0 || m == 1 || m == 3) return TS480HX_SH; else if (m == 2 || m == 6) return NULL; else if (m == 5 || m == 7) return NULL; return TS480HX_AM_SH; } void RIG_TS480HX::set_modeA(int val) { A.imode = val; cmd = "MD"; cmd += TS480HX_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set mode", cmd, ""); A.iBW = set_widths(val); } int RIG_TS480HX::get_modeA() { cmd = "MD;"; if (wait_char(';', 14, 100, "get vfo A", ASC) < 14) return A.imode; size_t p = replystr.rfind("MD"); if (p != string::npos && (p + 2 < replystr.length())) { int md = replystr[p+2]; md = md - '1'; if (md == 8) md = 7; A.imode = md; A.iBW = set_widths(A.imode); } return A.imode; } void RIG_TS480HX::set_modeB(int val) { B.imode = val; cmd = "MD"; cmd += TS480HX_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set mode B", cmd, ""); B.iBW = set_widths(val); } int RIG_TS480HX::get_modeB() { cmd = "MD;"; if (wait_char(';', 14, 100, "get vfo B", ASC) < 14) return B.imode; size_t p = replystr.rfind("MD"); if (p != string::npos && (p + 2 < replystr.length())) { int md = replystr[p+2]; md = md - '1'; if (md == 8) md = 7; B.imode = md; B.iBW = set_widths(B.imode); } return B.imode; } int RIG_TS480HX::get_modetype(int n) { return _mode_type[n]; } void RIG_TS480HX::set_bwA(int val) { if (A.imode == 0 || A.imode == 1 || A.imode == 3 || A.imode == 4) { if (val < 256) return; A.iBW = val; cmd = "SL"; cmd.append(to_decimal(A.iBW & 0xFF, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, SL_tooltip, cmd, ""); cmd = "SH"; cmd.append(to_decimal(((A.iBW >> 8) & 0x7F), 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, SH_tooltip, cmd, ""); } if (val > 256) return; else if (A.imode == 2 || A.imode == 6) { A.iBW = val; cmd = TS480HX_CWbw[A.iBW]; sendCommand(cmd); showresp(WARN, ASC, "set CW bw", cmd, ""); }else if (A.imode == 5 || A.imode == 7) { A.iBW = val; cmd = TS480HX_FSKbw[A.iBW]; sendCommand(cmd); showresp(WARN, ASC, "set FSK bw", cmd, ""); } } int RIG_TS480HX::get_bwA() { int i = 0; size_t p; bool menu45 = menu_45; check_menu_45(); if (menu45 != menu_45) Fl::awake(updateBandwidthControl); if (A.imode == 0 || A.imode == 1 || A.imode == 3 || A.imode == 4) { int lo = A.iBW & 0xFF, hi = (A.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get SL", ASC) == 5) { p = replystr.rfind("SL"); if (p != string::npos) lo = fm_decimal(&replystr[2], 2); } cmd = "SH;"; if (wait_char(';', 5, 100, "get SH", ASC) == 5) { p = replystr.rfind("SH"); if (p != string::npos) hi = fm_decimal(&replystr[2], 2); A.iBW = ((hi << 8) | (lo & 0xFF)) | 0x8000; } } else if (A.imode == 2 || A.imode == 6) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 11; i++) if (replystr.find(TS480HX_CWbw[i]) == p) break; if (i == 11) i = 10; A.iBW = i; } } } else if (A.imode == 5 || A.imode == 7) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 4; i++) if (replystr.find(TS480HX_FSKbw[i]) == p) break; if (i == 4) i = 3; A.iBW = i; } } } return A.iBW; } void RIG_TS480HX::set_bwB(int val) { if (B.imode == 0 || B.imode == 1 || B.imode == 3 || B.imode == 4) { if (val < 256) return; B.iBW = val; cmd = "SL"; cmd.append(to_decimal(B.iBW & 0xFF, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, SL_tooltip, cmd, ""); cmd = "SH"; cmd.append(to_decimal(((B.iBW >> 8) & 0x7F), 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, SH_tooltip, cmd, ""); } if (val > 256) return; else if (B.imode == 2 || B.imode == 6) { // CW B.iBW = val; cmd = TS480HX_CWbw[B.iBW]; sendCommand(cmd); showresp(WARN, ASC, "set CW bw", cmd, ""); }else if (B.imode == 5 || B.imode == 7) { B.iBW = val; cmd = TS480HX_FSKbw[B.iBW]; sendCommand(cmd); showresp(WARN, ASC, "set FSK bw", cmd, ""); } } int RIG_TS480HX::get_bwB() { int i = 0; size_t p; bool menu45 = menu_45; check_menu_45(); if (menu45 != menu_45) Fl::awake(updateBandwidthControl); if (B.imode == 0 || B.imode == 1 || B.imode == 3 || B.imode == 4) { int lo = B.iBW & 0xFF, hi = (B.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get SL", ASC) == 5) { p = replystr.rfind("SL"); if (p != string::npos) lo = fm_decimal(&replystr[2], 2); } cmd = "SH;"; if (wait_char(';', 5, 100, "get SH", ASC) == 5) { p = replystr.rfind("SH"); if (p != string::npos) hi = fm_decimal(&replystr[2], 2); B.iBW = ((hi << 8) | (lo & 0xFF)) | 0x8000; } } else if (B.imode == 2 || B.imode == 6) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { sendCommand(cmd); showresp(WARN, ASC, "get FW", cmd, replystr); p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 11; i++) if (replystr.find(TS480HX_CWbw[i]) == p) break; if (i == 11) i = 10; B.iBW = i; } } } else if (B.imode == 5 || B.imode == 7) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < 4; i++) if (replystr.find(TS480HX_FSKbw[i]) == p) break; if (i == 4) i = 3; B.iBW = i; } } } return B.iBW; } int RIG_TS480HX::adjust_bandwidth(int val) { int bw = 0; if (val == 0 || val == 1 || val == 3) bw = 0x8A03; else if (val == 4) bw = 0x8201; else if (val == 2 || val == 6) bw = 7; else if (val == 5 || val == 7) bw = 1; return bw; } int RIG_TS480HX::def_bandwidth(int val) { return adjust_bandwidth(val); } void RIG_TS480HX::set_volume_control(int val) { cmd = "AG"; char szval[5]; snprintf(szval, sizeof(szval), "%04d", val * 255 / 100); cmd += szval; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set vol", cmd, ""); } int RIG_TS480HX::get_volume_control() { int val = progStatus.volume; cmd = "AG0;"; if (wait_char(';', 7, 100, "get vol", ASC) < 7) return val; size_t p = replystr.rfind("AG"); if (p == string::npos) return val; replystr[p + 6] = 0; val = atoi(&replystr[p + 3]); val = val * 100 / 255; return val; } void RIG_TS480HX::set_power_control(double val) { cmd = "PC"; char szval[4]; if (modeA == 4 && val > 50) val = 50; // AM mode limitation snprintf(szval, sizeof(szval), "%03d", (int)val); cmd += szval; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set power", cmd, ""); } int RIG_TS480HX::get_power_control() { int val = progStatus.power_level; cmd = "PC;"; if (wait_char(';', 6, 100, "get power", ASC) < 6) return val; size_t p = replystr.rfind("PC"); if (p == string::npos) return val; val = atoi(&replystr[p + 2]); return val; } void RIG_TS480HX::set_attenuator(int val) { if (val) cmd = "RA01;"; else cmd = "RA00;"; LOG_WARN("%s", cmd.c_str()); sendCommand(cmd); } int RIG_TS480HX::get_attenuator() { cmd = "RA;"; if (wait_char(';', 7, 100, "get attenuator", ASC) < 7) return progStatus.attenuator; size_t p = replystr.rfind("RA"); if (p == string::npos) return progStatus.attenuator; if (replystr[p+3] == '1') return 1; return 0; } void RIG_TS480HX::set_preamp(int val) { if (val) cmd = "PA1;"; else cmd = "PA0;"; LOG_WARN("%s", cmd.c_str()); sendCommand(cmd); } int RIG_TS480HX::get_preamp() { cmd = "PA;"; if (wait_char(';', 5, 100, "get preamp", ASC) < 5) return progStatus.preamp; size_t p = replystr.rfind("PA"); if (p == string::npos) return progStatus.preamp; if (replystr[p+2] == '1') return 1; return 0; } void RIG_TS480HX::tune_rig() { cmd = "AC111;"; sendCommand(cmd); showresp(WARN, ASC, "tune", cmd, ""); } void RIG_TS480HX::set_if_shift(int val) { cmd = "IS+"; if (val < 0) cmd[2] = '-'; cmd.append(to_decimal(abs(val),4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set IF shift", cmd, ""); } bool RIG_TS480HX::get_if_shift(int &val) { cmd = "IS;"; if (wait_char(';', 8, 100, "get IF shift", ASC) == 8) { size_t p = replystr.rfind("IS"); if (p != string::npos) { val = fm_decimal(&replystr[p+3], 4); if (replystr[p+2] == '-') val *= -1; return (val != 0); } } val = progStatus.shift_val; return progStatus.shift; } void RIG_TS480HX::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = -1100; if_shift_max = max = 1100; if_shift_step = step = 10; if_shift_mid = 0; } void RIG_TS480HX::set_mic_gain(int val) { cmd = "MG"; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set mic gain", cmd, ""); } int RIG_TS480HX::get_mic_gain() { int val = progStatus.mic_gain; cmd = "MG;"; if (wait_char(';', 6, 100, "get mic gain", ASC) < 6) return val; size_t p = replystr.rfind("MG"); if (p != string::npos) val = fm_decimal(&replystr[p+2], 3); return val; } void RIG_TS480HX::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_TS480HX::set_rf_gain(int val) { cmd = "RG"; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set rf gain", cmd, ""); } int RIG_TS480HX::get_rf_gain() { int val = progStatus.rfgain; cmd = "RG;"; if (wait_char(';', 6, 100, "get rf gain", ASC) < 6) return val; size_t p = replystr.rfind("RG"); if (p != string::npos) val = fm_decimal(&replystr[p+2], 3); return val; } void RIG_TS480HX::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } flrig-1.3.24/src/rigs/FT950.cxx0000644000175000017500000010061512562731647012673 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // Copyright (C) 2014, Terry Embry, KJ4EED // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT950.h" #include "debug.h" #include "support.h" #define FL950_WAIT_TIME 200 enum mFT950 { mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mPKT_L, mRTTY_U, mPKT_FM, mFM_N, mPKT_U, mAM_N }; // 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 // mode index static const char FT950name_[] = "FT-950"; static const char *FT950modes_[] = { "LSB", "USB", "CW", "FM", "AM", "RTTY-L", "CW-R", "PKT-L", "RTTY-U", "PKT-FM", "FM-N", "PKT-U", "AM-N", NULL}; static const char FT950_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D' }; static const char FT950_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'L', 'U', 'U', 'U', 'U', 'U' }; // 20110707 - SSB "2450", 14 discontinued in latest North American firmware static const int FT950_def_bw[] = { 18, 18, 5, 0, 0, 5, 5, 10, 5, 0, 0, 10, 0 }; // mLSB, mUSB, mCW, mFM, mAM, mRTTY_L, mCW_R, mPKT_L, mRTTY_U, mPKT_FM, mFM_N, mPKT_U, mAM_N static const char *FT950_widths_SSB[] = { "200", "400", "600", "850", "1100", "1350", "1500", "1650", "1800", "1950", "2100", "2250", "2400", "2500", "2600", "2700", "2800", "2900", "3000", NULL }; static int FT950_wvals_SSB[] = { 1,2,3,4,5,6,7,8,9,10,11,12,13,15,16,17,18,19,20, WVALS_LIMIT}; static const char *FT950_widths_SSBD[] = { "100", "200", "300", "400", "500", "800", "1200", "1400", "1700", "2000", "2400", NULL }; static int FT950_wvals_SSBD[] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, WVALS_LIMIT}; static const char *FT950_widths_CW[] = { "100", "200", "300", "400", "500", "800", "1200", "1400", "1700", "2000", "2400", NULL }; static int FT950_wvals_CW[] = { 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, WVALS_LIMIT }; // Single bandwidth modes static const char *FT950_widths_AMFMnar[] = { "NARR", NULL }; static const char *FT950_widths_AMFMnorm[] = { "NORM", NULL }; static const int FT950_wvals_AMFM[] = { 0, WVALS_LIMIT }; // mPKT_FM Multi bandwidth mode static const char *FT950_widths_NN[] = {"NORM", "NARR", NULL }; static const int FT950_wvals_NN[] = {0, 1, WVALS_LIMIT}; // US 60M 5-USB, 5-CW static const char *US_60m_chan[] = {"000","125","126","127","128","130","141","142","143","144","146",NULL}; static const char *US_60m_label[] = {"VFO","U51","U52","U53","U54","U55","U56","U57","U58","U59","U50",NULL}; // UK 60m channel numbers by Brian, G8SEZ static const char *UK_60m_chan[] = {"000","118","120","121","127","128","129","130",NULL}; static const char *UK_60m_label[] = {"VFO","U51","U52","U53","U54","U55","U56","U57",NULL}; static const char **Channels_60m = US_60m_chan; static const char **label_60m = US_60m_label; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)btnNR, 2, 165, 50 }, { (Fl_Widget *)sldrNR, 54, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_FT950::RIG_FT950() { // base class values name_ = FT950name_; modes_ = FT950modes_; bandwidths_ = FT950_widths_SSB; bw_vals_ = FT950_wvals_SSB; widgets = rig_widgets; comm_baudrate = BR38400; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; A.imode = B.imode = modeB = modeA = def_mode = 1; A.iBW = B.iBW = bwA = bwB = def_bw = 12; A.freq = B.freq = freqA = freqB = def_freq = 14070000; has_compON = has_compression = has_a2b = has_ext_tuner = has_xcvr_auto_on_off = has_split = has_split_AB = has_band_selection = has_noise_reduction = has_noise_reduction_control = has_extras = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_vox_on_dataport = has_vfo_adj = has_cw_wpm = has_cw_keyer = // has_cw_vol = has_cw_spot = has_cw_spot_tone = has_cw_qsk = has_cw_weight = can_change_alt_vfo = has_smeter = has_alc_control = has_swr_control = has_power_out = has_power_control = has_volume_control = has_rf_control = has_micgain_control = has_mode_control = has_noise_control = has_bandwidth_control = has_notch_control = has_auto_notch = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = true; // derived specific atten_level = 3; preamp_level = 2; notch_on = false; m_60m_indx = 0; precision = 1; ndigits = 8; } void RIG_FT950::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; rig_widgets[9].W = btnNR; rig_widgets[10].W = sldrNR; // set progStatus defaults if (progStatus.notch_val < 10) progStatus.notch_val = 1500; if (progStatus.noise_reduction_val < 1) progStatus.noise_reduction_val = 1; if (progStatus.power_level < 5) progStatus.power_level = 5; // first-time-thru, or reset if (progStatus.cw_qsk < 15) { progStatus.cw_qsk = 15; progStatus.cw_spot_tone = 700; progStatus.cw_weight = 3.0; progStatus.cw_wpm = 18; progStatus.vox_on_dataport = false; progStatus.vox_gain = 50; progStatus.vox_anti = 50; progStatus.vox_hang = 500; } // Disable Auto Information mode sendCommand("AI0;"); // "MRnnn;" if valid, returns last channel used, "mrlll...;", along with channel nnn info. cmd = "MR118;"; wait_char(';', 27, FL950_WAIT_TIME, "Read UK 60m Channel Mem", ASC); size_t p = replystr.rfind("MR"); if (p == string::npos) { Channels_60m = US_60m_chan; label_60m = US_60m_label; opSelect60->clear(); char **p = (char **)US_60m_label; while (*p) opSelect60->add(*p++); } else { Channels_60m = UK_60m_chan; label_60m = UK_60m_label; opSelect60->clear(); char **p = (char **)UK_60m_label; while (*p) opSelect60->add(*p++); } opSelect60->index(m_60m_indx); } void RIG_FT950::post_initialize() { enable_bandselect_btn(12, false); enable_bandselect_btn(13, true); } long RIG_FT950::get_vfoA () { cmd = rsp = "FA"; cmd += ';'; wait_char(';',11, FL950_WAIT_TIME, "get vfo A", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqA; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqA = f; return freqA; } void RIG_FT950::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo A", cmd, replystr); } long RIG_FT950::get_vfoB () { cmd = rsp = "FB"; cmd += ';'; wait_char(';',11, FL950_WAIT_TIME, "get vfo B", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return freqB; int f = 0; for (size_t n = 2; n < 10; n++) f = f*10 + replystr[p+n] - '0'; freqB = f; return freqB; } void RIG_FT950::set_vfoB (long freq) { freqB = freq; cmd = "FB00000000;"; for (int i = 9; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vfo B", cmd, replystr); } void RIG_FT950::setVfoAdj(double v) { char cmdstr[20]; int iv = fabs(v); snprintf(cmdstr, sizeof(cmdstr), "%02d", iv); cmd = "EX035"; if (v < 0) cmd += '-'; else cmd += '+'; cmd.append(cmdstr); cmd.append(";"); sendCommand(cmd); } double RIG_FT950::getVfoAdj() { cmd = rsp = "EX035"; sendCommand(cmd.append(";")); wait_char(';',9, FL950_WAIT_TIME, "get Vfo Adjust", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; return (double)(atoi(&replystr[p+5])); } void RIG_FT950::get_vfoadj_min_max_step(int &min, int &max, int &step) { min = -25; max = 25; step = 1; } bool RIG_FT950::twovfos() { return true; } void RIG_FT950::selectA() { cmd = "FR0;FT2;"; sendCommand(cmd); showresp(WARN, ASC, "select A", cmd, replystr); } void RIG_FT950::selectB() { cmd = "FR4;FT3;"; sendCommand(cmd); showresp(WARN, ASC, "select B", cmd, replystr); } void RIG_FT950::A2B() { cmd = "AB;"; sendCommand(cmd); showresp(WARN, ASC, "vfo A --> B", cmd, replystr); } bool RIG_FT950::can_split() { return true; } void RIG_FT950::set_split(bool val) { split = val; if (useB) { if (val) { cmd = "FR4;FT2;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on A", cmd, replystr); } else { cmd = "FR4;FT3;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B, Tx on B", cmd, replystr); } } else { if (val) { cmd = "FR0;FT3;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on B", cmd, replystr); } else { cmd = "FR0;FT2;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A, Tx on A", cmd, replystr); } } Fl::awake(highlight_vfo, (void *)0); } int RIG_FT950::get_split() { size_t p; int split = 0; char rx, tx; // tx vfo cmd = rsp = "FT"; cmd.append(";"); wait_char(';',4, FL950_WAIT_TIME, "get split tx vfo", ASC); p = replystr.rfind(rsp); if (p == string::npos) return false; tx = replystr[p+2] - '0'; // rx vfo cmd = rsp = "FR"; cmd.append(";"); wait_char(';',4, FL950_WAIT_TIME, "get split rx vfo", ASC); p = replystr.rfind(rsp); if (p == string::npos) return false; rx = replystr[p+2] - '0'; split = (tx == 1 ? 2 : 0) + (rx >= 4 ? 1 : 0); return split; } int RIG_FT950::get_smeter() { cmd = rsp = "SM0"; cmd += ';'; wait_char(';',7, FL950_WAIT_TIME, "get smeter", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); mtr = mtr * 100.0 / 256.0; return mtr; } int RIG_FT950::get_swr() { cmd = rsp = "RM6"; cmd += ';'; wait_char(';',7, FL950_WAIT_TIME, "get swr", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return (int)ceil(mtr / 2.56); } int RIG_FT950::get_alc() { cmd = rsp = "RM4"; cmd += ';'; wait_char(';',7, FL950_WAIT_TIME, "get alc", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; int mtr = atoi(&replystr[p+3]); return (int)ceil(mtr / 2.56); } int RIG_FT950::get_power_out() { cmd = rsp = "RM5"; sendCommand(cmd.append(";")); wait_char(';',7, FL950_WAIT_TIME, "get pout", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; if (p + 6 >= replystr.length()) return 0; double mtr = (double)(atoi(&replystr[p+3])); // following conversion iaw data measured by Terry, KJ4EED mtr = (.06 * mtr) + (.002 * mtr * mtr); return (int)ceil(mtr); } // Transceiver power level int RIG_FT950::get_power_control() { cmd = rsp = "PC"; cmd += ';'; wait_char(';',6, FL950_WAIT_TIME, "get power", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.power_level; if (p + 5 >= replystr.length()) return progStatus.power_level; int mtr = atoi(&replystr[p+2]); return mtr; } void RIG_FT950::set_power_control(double val) { int ival = (int)val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET power", cmd, replystr); } // Volume control return 0 ... 100 int RIG_FT950::get_volume_control() { cmd = rsp = "AG0"; cmd += ';'; wait_char(';',7, FL950_WAIT_TIME, "get vol", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.volume; if (p + 6 >= replystr.length()) return progStatus.volume; int val = round(atoi(&replystr[p+3]) / 2.55); if (val > 100) val = 100; return ceil(val); } void RIG_FT950::set_volume_control(int val) { int ivol = (int)(val * 2.55); cmd = "AG0000;"; for (int i = 5; i > 2; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET vol", cmd, replystr); } // Tranceiver PTT on/off void RIG_FT950::set_PTT_control(int val) { cmd = val ? "TX1;" : "TX0;"; sendCommand(cmd); showresp(WARN, ASC, "SET PTT", cmd, replystr); } // internal or external tune mode void RIG_FT950::tune_rig() { if (!progStatus.external_tuner) { cmd = "AC002;"; sendCommand(cmd); return; } static bool extun_on = false; static int rmd = modeA; static int rbw = bwA; static int rpwr = 100; static long rfreq = freqA; // fix for menu 047 OFSt default int use_int_tuner = true; // On-The-Fly bandstack by bandstack int/ext tuner // if rig "Tuner" light is on internal else external cmd = rsp = "AC"; cmd.append(";"); wait_char(';',6, FL950_WAIT_TIME, "is Int. Tuner Enabled", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return; if ((p + 5) >= replystr.length()) return; if (replystr[p+4] == '0') { use_int_tuner = false; } if (use_int_tuner) { cmd = "AC002;"; sendCommand(cmd); showresp(WARN, ASC, "tune rig", cmd, replystr); } else { if (extun_on == false) { if (btnPTT->value() == true) return; if (get_split() == 1 || get_split() == 2) return; // no split extune useB ? rmd = modeB : rmd = modeA; useB ? rbw = bwB : rbw = bwA; useB ? rfreq = freqB : rfreq = freqA; useB ? set_modeB(mAM_N) : set_modeA(mAM_N); // useB ? set_modeB(mFM_N) : set_modeA(mFM_N); useB ? set_vfoB(rfreq) : set_vfoA(rfreq); rpwr = get_power_control(); set_power_control(10); sendCommand("EX0360000;"); // AM mic off // sendCommand("EX0560000;"); // FM mic off extun_on = true; btnPTT->value(true); sendCommand("MX1;"); } else { extun_on = false; btnPTT->value(false); sendCommand("MX0;"); sendCommand("EX0361000;"); // AM mic default // sendCommand("EX0560050;"); // FM mic default set_power_control(rpwr); useB ? set_modeB(rmd) : set_modeA(rmd); useB ? set_bwB(rbw) : set_bwA(rbw); useB ? set_vfoB(rfreq) : set_vfoA(rfreq); } } } void RIG_FT950::set_attenuator(int val) { if (atten_level == 0) { atten_level = 1; atten_label("6 dB", true); } else if (atten_level == 1) { atten_level = 2; atten_label("12 dB", true); } else if (atten_level == 2) { atten_level = 3; atten_label("18 dB", true); } else if (atten_level == 3) { atten_level = 0; atten_label("Att", false); } cmd = "RA00;"; cmd[3] += atten_level; sendCommand(cmd); showresp(WARN, ASC, "SET att", cmd, replystr); } int RIG_FT950::get_attenuator() { cmd = rsp = "RA0"; cmd += ';'; wait_char(';',5, FL950_WAIT_TIME, "get att", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.attenuator; if (p + 3 >= replystr.length()) return progStatus.attenuator; atten_level = replystr[p+3] - '0'; if (atten_level == 1) { atten_label("6 dB", true); } else if (atten_level == 2) { atten_label("12 dB", true); } else if (atten_level == 3) { atten_label("18 dB", true); } else { atten_level = 0; atten_label("Att", false); } return atten_level; } void RIG_FT950::set_preamp(int val) { cmd = "PA00;"; if (preamp_level == 0) { preamp_level = 1; preamp_label("Amp 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Amp 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("IPO", false); } cmd[3] = '0' + preamp_level; sendCommand (cmd); showresp(WARN, ASC, "SET preamp", cmd, replystr); } int RIG_FT950::get_preamp() { cmd = rsp = "PA0"; cmd += ';'; wait_char(';',5, FL950_WAIT_TIME, "get pre", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) preamp_level = replystr[p+3] - '0'; if (preamp_level == 1) { preamp_label("Amp 1", true); } else if (preamp_level == 2) { preamp_label("Amp 2", true); } else { preamp_label("IPO", false); preamp_level = 0; } return preamp_level; } int RIG_FT950::adjust_bandwidth(int val) { switch (val) { case mCW : case mCW_R : case mRTTY_L : case mRTTY_U : bandwidths_ = FT950_widths_CW; bw_vals_ = FT950_wvals_CW; break; case mFM : case mAM : bandwidths_ = FT950_widths_AMFMnorm; bw_vals_ = FT950_wvals_AMFM; break; case mFM_N : case mAM_N : bandwidths_ = FT950_widths_AMFMnar; bw_vals_ = FT950_wvals_AMFM; break; case mPKT_FM : bandwidths_ = FT950_widths_NN; bw_vals_ = FT950_wvals_NN; break; case mPKT_L : case mPKT_U : bandwidths_ = FT950_widths_SSBD; bw_vals_ = FT950_wvals_SSBD; break; default: bandwidths_ = FT950_widths_SSB; bw_vals_ = FT950_wvals_SSB; } return FT950_def_bw[val]; } int RIG_FT950::def_bandwidth(int val) { return FT950_def_bw[val]; } const char ** RIG_FT950::bwtable(int n) { switch (n) { case mPKT_FM : return FT950_widths_NN; case mFM : case mAM : return FT950_widths_AMFMnorm; case mFM_N : case mAM_N : return FT950_widths_AMFMnar; case mCW : case mCW_R : case mRTTY_L : case mRTTY_U : return FT950_widths_CW; case mPKT_L : case mPKT_U : return FT950_widths_SSBD; default : break; } return FT950_widths_SSB; } void RIG_FT950::set_modeA(int val) { modeA = val; cmd = "MD0"; cmd += FT950_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode A", cmd, replystr); adjust_bandwidth(modeA); if (val == mCW || val == mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FT950::get_modeA() { cmd = rsp = "MD0"; cmd += ';'; wait_char(';',5, FL950_WAIT_TIME, "get mode A", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'A'; modeA = md; } } adjust_bandwidth(modeA); return modeA; } void RIG_FT950::set_modeB(int val) { modeB = val; cmd = "MD0"; cmd += FT950_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET mode B", cmd, replystr); adjust_bandwidth(modeB); if (val == mCW || val == mCW_R) return; if (progStatus.spot_onoff) { progStatus.spot_onoff = false; set_spot_onoff(); cmd = "CS0;"; sendCommand(cmd); showresp(WARN, ASC, "SET spot off", cmd, replystr); btnSpot->value(0); } } int RIG_FT950::get_modeB() { cmd = rsp = "MD0"; cmd += ';'; wait_char(';',5, FL950_WAIT_TIME, "get mode B", ASC); size_t p = replystr.rfind(rsp); if (p != string::npos) { if (p + 3 < replystr.length()) { int md = replystr[p+3]; if (md <= '9') md = md - '1'; else md = 9 + md - 'A'; modeB = md; } } adjust_bandwidth(modeB); return modeB; } void RIG_FT950::set_bwA(int val) { int bw_indx = bw_vals_[val]; bwA = val; if (modeA == mFM || modeA == mAM || modeA == mFM_N || modeA == mAM_N) return; if (modeA == mPKT_FM) { if (val == 1) cmd = "NA01;"; else cmd = "NA00;"; sendCommand(cmd); showresp(WARN, ASC, "SET bw A", cmd, replystr); return; } if ((((modeA == mLSB || modeA == mUSB) && val < 8)) || ((modeA == mCW || modeA == mCW_R || modeA == mRTTY_L || modeA == mRTTY_U || modeA == mPKT_L || modeA == mPKT_U) && val < 4) ) cmd = "NA01;"; else cmd = "NA00;"; cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw A", cmd, replystr); } int RIG_FT950::get_bwA() { size_t p; if (modeA == mFM || modeA == mAM || modeA == mFM_N || modeA == mAM_N) { bwA = 0; return bwA; } if (modeA == mPKT_FM) { cmd = rsp = "NA0"; cmd += ';'; wait_char(';',5, FL950_WAIT_TIME, "get bw A narrow", ASC); p = replystr.rfind(rsp); if (p == string::npos) { bwA = 0; return bwA; } if (p + 4 >= replystr.length()) { bwA = 0; return bwA; } if (replystr[p+3] == '1') bwA = 1; // narrow on else bwA = 0; return bwA; } cmd = rsp = "SH0"; cmd += ';'; wait_char(';',6, FL950_WAIT_TIME, "get bw A", ASC); p = replystr.rfind(rsp); if (p == string::npos) return bwA; if (p + 5 >= replystr.length()) return bwA; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwA = i; return bwA; } void RIG_FT950::set_bwB(int val) { int bw_indx = bw_vals_[val]; bwB = val; if (modeB == mFM || modeB == mAM || modeB == mFM_N || modeB == mAM_N) return; if (modeB == mPKT_FM) { if (val == 1) cmd = "NA01;"; else cmd = "NA00;"; sendCommand(cmd); showresp(WARN, ASC, "SET bw B", cmd, replystr); return; } if ((((modeB == mLSB || modeB == mUSB) && val < 8)) || ((modeB == mCW || modeB == mCW_R || modeB == mRTTY_L || modeB == mRTTY_U || modeB == mPKT_L || modeB == mPKT_U) && val < 4) ) cmd = "NA01;"; else cmd = "NA00;"; cmd.append("SH0"); cmd += '0' + bw_indx / 10; cmd += '0' + bw_indx % 10; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "SET bw B", cmd, replystr); } int RIG_FT950::get_bwB() { size_t p; if (modeB == mFM || modeB == mAM || modeB == mFM_N || modeB == mAM_N) { bwB = 0; return bwB; } if (modeB == mPKT_FM) { cmd = rsp = "NA0"; cmd += ';'; wait_char(';',5, FL950_WAIT_TIME, "get bw B narrow", ASC); p = replystr.rfind(rsp); if (p == string::npos) { bwB = 0; return bwB; } if (p + 4 >= replystr.length()) { bwB = 0; return bwB; } if (replystr[p+3] == '1') bwB = 1; // narrow on else bwB = 0; return bwB; } cmd = rsp = "SH0"; cmd += ';'; wait_char(';',6, FL950_WAIT_TIME, "get bw B", ASC); p = replystr.rfind(rsp); if (p == string::npos) return bwB; if (p + 5 >= replystr.length()) return bwB; replystr[p+5] = 0; int bw_idx = fm_decimal(&replystr[p+3],2); const int *idx = bw_vals_; int i = 0; while (*idx != WVALS_LIMIT) { if (*idx == bw_idx) break; idx++; i++; } if (*idx == WVALS_LIMIT) i--; bwB = i; return bwB; } int RIG_FT950::get_modetype(int n) { return FT950_mode_type[n]; } void RIG_FT950::set_if_shift(int val) { cmd = "IS0+0000;"; if (val < 0) cmd[3] = '-'; val = abs(val); for (int i = 4; i > 0; i--) { cmd[3+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET if shift", cmd, replystr); } bool RIG_FT950::get_if_shift(int &val) { cmd = rsp = "IS0"; cmd += ';'; wait_char(';',9, FL950_WAIT_TIME, "get if shift", ASC); size_t p = replystr.rfind(rsp); val = progStatus.shift_val; if (p == string::npos) return progStatus.shift; val = atoi(&replystr[p+4]); if (replystr[p+3] == '-') val = -val; return (val != 0); } void RIG_FT950::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = -1000; if_shift_max = max = 1000; if_shift_step = step = 20; if_shift_mid = 0; } void RIG_FT950::set_notch(bool on, int val) { // set notch frequency if (on) { cmd = "BP00001;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch on", cmd, replystr); cmd = "BP01000;"; if (val % 10 >= 5) val += 10; val /= 10; for (int i = 3; i > 0; i--) { cmd[3 + i] += val % 10; val /=10; } sendCommand(cmd); showresp(WARN, ASC, "SET notch val", cmd, replystr); return; } // set notch off cmd = "BP00000;"; sendCommand(cmd); showresp(WARN, ASC, "SET notch off", cmd, replystr); } bool RIG_FT950::get_notch(int &val) { bool ison = false; cmd = rsp = "BP00"; cmd += ';'; wait_char(';',8, FL950_WAIT_TIME, "get notch on/off", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return ison; if (replystr[p+6] == '1') { // manual notch enabled ison = true; val = progStatus.notch_val; cmd = rsp = "BP01"; cmd += ';'; wait_char(';',8, FL950_WAIT_TIME, "get notch val", ASC); p = replystr.rfind(rsp); if (p == string::npos) val = 10; else val = fm_decimal(&replystr[p+4],3) * 10; } return ison; } void RIG_FT950::get_notch_min_max_step(int &min, int &max, int &step) { min = 10; max = 3000; step = 10; } void RIG_FT950::set_auto_notch(int v) { cmd.assign("BC0").append(v ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET DNF Auto Notch Filter", cmd, replystr); } int RIG_FT950::get_auto_notch() { cmd = "BC0;"; wait_char(';',5, FL950_WAIT_TIME, "get auto notch", ASC); size_t p = replystr.rfind("BC0"); if (p == string::npos) return 0; if (replystr[p+3] == '1') return 1; return 0; } int FT950_blanker_level = 2; void RIG_FT950::set_noise(bool b) { cmd = "NB00;"; if (FT950_blanker_level == 0) { FT950_blanker_level = 1; nb_label("NB 1", true); } else if (FT950_blanker_level == 1) { FT950_blanker_level = 2; nb_label("NB 2", true); } else if (FT950_blanker_level == 2) { FT950_blanker_level = 0; nb_label("NB", false); } cmd[3] = '0' + FT950_blanker_level; sendCommand (cmd); showresp(WARN, ASC, "SET NB", cmd, replystr); } int RIG_FT950::get_noise() { cmd = rsp = "NB0"; cmd += ';'; wait_char(';',5, FL950_WAIT_TIME, "get NB", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return FT950_blanker_level; FT950_blanker_level = replystr[p+3] - '0'; if (FT950_blanker_level == 1) { nb_label("NB 1", true); } else if (FT950_blanker_level == 2) { nb_label("NB 2", true); } else { nb_label("NB", false); FT950_blanker_level = 0; } return FT950_blanker_level; } // val 0 .. 100 void RIG_FT950::set_mic_gain(int val) { cmd = "MG000;"; val = (int)(val * 2.50); for (int i = 3; i > 0; i--) { cmd[1+i] += val % 10; val /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET mic", cmd, replystr); } int RIG_FT950::get_mic_gain() { cmd = rsp = "MG"; cmd += ';'; wait_char(';',6, FL950_WAIT_TIME, "get mic", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.mic_gain; int val = atoi(&replystr[p+2]); val = (int)(val / 2.50); if (val > 100) val = 100; return ceil(val); } void RIG_FT950::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FT950::set_rf_gain(int val) { cmd = "RG0000;"; int rfval = (int)(val * 2.50); for (int i = 5; i > 2; i--) { cmd[i] = rfval % 10 + '0'; rfval /= 10; } sendCommand(cmd); showresp(WARN, ASC, "SET rfgain", cmd, replystr); } int RIG_FT950::get_rf_gain() { int rfval = 0; cmd = rsp = "RG0"; cmd += ';'; wait_char(';',7, FL950_WAIT_TIME, "get rfgain", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return progStatus.rfgain; for (int i = 3; i < 6; i++) { rfval *= 10; rfval += replystr[p+i] - '0'; } rfval = (int)(rfval / 2.50); if (rfval > 100) rfval = 100; return ceil(rfval); } void RIG_FT950::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_FT950::set_vox_onoff() { cmd = "VX0;"; if (progStatus.vox_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox", cmd, replystr); } void RIG_FT950::set_vox_gain() { cmd = "VG"; cmd.append(to_decimal(progStatus.vox_gain, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox gain", cmd, replystr); } void RIG_FT950::set_vox_anti() { cmd = "EX117"; cmd.append(to_decimal(progStatus.vox_anti, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET anti-vox", cmd, replystr); } void RIG_FT950::set_vox_hang() { cmd = "VD"; cmd.append(to_decimal(progStatus.vox_hang, 4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET vox delay", cmd, replystr); } void RIG_FT950::set_vox_on_dataport() { cmd = "EX1140;"; if (progStatus.vox_on_dataport) cmd[5] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET vox on data port", cmd, replystr); } void RIG_FT950::set_cw_wpm() { cmd = "KS"; if (progStatus.cw_wpm > 60) progStatus.cw_wpm = 60; if (progStatus.cw_wpm < 4) progStatus.cw_wpm = 4; cmd.append(to_decimal(progStatus.cw_wpm, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw wpm", cmd, replystr); } void RIG_FT950::enable_keyer() { cmd = "KR0;"; if (progStatus.enable_keyer) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET keyer on/off", cmd, replystr); } bool RIG_FT950::set_cw_spot() { if (vfo.imode == mCW || vfo.imode == mCW_R) { cmd = "CS0;"; if (progStatus.spot_onoff) cmd[2] = '1'; sendCommand(cmd); showresp(WARN, ASC, "SET spot on/off", cmd, replystr); return true; } else return false; } void RIG_FT950::set_cw_weight() { int n = round(progStatus.cw_weight * 10); cmd.assign("EX046").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw weight", cmd, replystr); } void RIG_FT950::set_cw_qsk() { int n = progStatus.cw_qsk / 5 - 3; cmd.assign("EX049").append(to_decimal(n, 1)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw qsk", cmd, replystr); } void RIG_FT950::set_cw_spot_tone() { int n = (progStatus.cw_spot_tone - 300) / 50; cmd.assign("EX045").append(to_decimal(n, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET cw tone", cmd, replystr); } /* void RIG_FT950::set_cw_vol() { } */ void RIG_FT950::set_band_selection(int v) { int chan_mem_on = false; cmd = "IF;"; wait_char(';',27, FL950_WAIT_TIME, "get vfo mode in set_band_selection", ASC); size_t p = replystr.rfind("IF"); if (p == string::npos) return; if ((p + 26) >= replystr.length()) return; if (replystr[p+21] != '0') { // vfo 60M memory mode chan_mem_on = true; } if (v == 13) { m_60m_indx = opSelect60->index(); if (m_60m_indx) cmd.assign("MC").append(Channels_60m[m_60m_indx]).append(";"); else if (chan_mem_on) cmd = "VM;"; } else { // v == 1..11 band selection OR return to vfo mode == 0 if (chan_mem_on) { cmd = "VM;"; opSelect60->index(m_60m_indx = 0); } else { if (v < 3) v = v - 1; cmd.assign("BS").append(to_decimal(v, 2)).append(";"); } } sendCommand(cmd); showresp(WARN, ASC, "Select Band Stacks", cmd, replystr); } // DNR void RIG_FT950::set_noise_reduction_val(int val) { cmd.assign("RL0").append(to_decimal(val, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET_noise_reduction_val", cmd, replystr); } int RIG_FT950::get_noise_reduction_val() { int val = 1; cmd = rsp = "RL0"; cmd.append(";"); wait_char(';',6, FL950_WAIT_TIME, "GET noise reduction val", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return val; val = atoi(&replystr[p+3]); return val; } // DNR void RIG_FT950::set_noise_reduction(int val) { cmd.assign("NR0").append(val ? "1" : "0" ).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET noise reduction", cmd, replystr); } int RIG_FT950::get_noise_reduction() { int val; cmd = rsp = "NR0"; cmd.append(";"); wait_char(';',5, FL950_WAIT_TIME, "GET noise reduction", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) return 0; val = replystr[p+3] - '0'; return val; } void RIG_FT950::set_xcvr_auto_on() { if (!progStatus.xcvr_auto_on) return; cmd = rsp = "PS"; cmd.append(";"); wait_char(';',4, FL950_WAIT_TIME, "Test: Is Rig ON", ASC); size_t p = replystr.rfind(rsp); if (p == string::npos) { // rig is off, power on cmd = "PS1;"; sendCommand(cmd); MilliSleep(1500); // 1.0 < T < 2.0 seconds sendCommand(cmd); MilliSleep(3000); // Wait for rig startup? Maybe not needed. } } void RIG_FT950::set_xcvr_auto_off() { if (!progStatus.xcvr_auto_off) return; cmd = "PS0;"; sendCommand(cmd); } void RIG_FT950::set_compression() { if (progStatus.compON) { if (progStatus.compression == 0) { cmd.assign("PR2;"); // mic eq on sendCommand(cmd); showresp(WARN, ASC, "set Comp EQ on", cmd, replystr); } else { cmd.assign("PR1;PL").append(to_decimal(progStatus.compression, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set Comp on", cmd, replystr); } } else{ cmd.assign("PR0;"); sendCommand(cmd); showresp(WARN, ASC, "set Comp off", cmd, replystr); } } /* // Audio Peak Filter, like set_cw_spot bool RIG_FT950::set_cw_APF() { if (vfo.imode == mCW || vfo.imode == mCW_R) { cmd = "CO0000;"; if (progStatus.apf_onoff) cmd[5] = '2'; sendCommand(cmd); showresp(WARN, ASC, "SET APF on/off", cmd, replystr); return true; } else return false; } */ flrig-1.3.24/src/rigs/TT563.cxx0000644000175000017500000000556112562731647012715 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "TT563.h" //============================================================================= // TT-563 const char RIG_TT563name_[] = "OMNI-VI"; const char *RIG_TT563modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", NULL}; static const char RIG_TT563_mode_type[] = {'L', 'U', 'U', 'U', 'L', 'U'}; const char *RIG_TT563widths[] = { "NARR", "WIDE", NULL}; static int TT563_bw_vals[] = {1, 2, WVALS_LIMIT}; RIG_TT563::RIG_TT563() { name_ = RIG_TT563name_; modes_ = RIG_TT563modes_; bandwidths_ = RIG_TT563widths; bw_vals_ = TT563_bw_vals; comm_baudrate = BR9600; stopbits = 1; comm_retries = 2; comm_wait = 10; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; def_mode = modeB = modeA = 1; def_bw = bwB = bwA = 1; def_freq = freqB = freqA = 14070000; has_mode_control = true; has_ptt_control = true; pre_to[2] = ok[3] = bad[3] = pre_fm[3] = 0x04; precision = 10; ndigits = 7; }; long RIG_TT563::get_vfoA () { cmd = pre_to; cmd += '\x03'; cmd.append( post ); int ret = sendCommand(cmd); if (ret >= 11) { freqA = fm_bcd_be(&replystr[ret - 11 + 5], 10); } return freqA; } void RIG_TT563::set_vfoA (long freq) { freqA = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 8 ) ); cmd.append( post ); sendCommand(cmd); checkresponse(); } void RIG_TT563::set_PTT_control(int val) { cmd = pre_to; cmd += '\x16'; cmd += val ? '\x01' : '\x02'; cmd.append( post ); sendCommand(cmd); checkresponse(); } void RIG_TT563::set_modeA(int md) { modeA = md; cmd = pre_to; cmd += '\x06'; cmd += modeA; cmd.append(post); sendCommand(cmd); checkresponse(); } int RIG_TT563::get_modeA() { cmd = pre_to; cmd += '\x04'; cmd.append(post); int ret = sendCommand(cmd); if (ret >= 8) { modeA = replystr[ret - 8 + 5]; bwA = replystr[ret - 8 + 6]; } return modeA; } int RIG_TT563::get_modetype(int n) { return RIG_TT563_mode_type[n]; } flrig-1.3.24/src/rigs/IC728.cxx0000644000175000017500000000430712562731647012661 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC728.h" //============================================================================= // IC-728 // const char IC728name_[] = "IC-728"; const char *IC728modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", NULL}; const char *IC728_widths[] = { "NARR", "WIDE", NULL}; static int IC728_bw_vals[] = {1,2, WVALS_LIMIT}; RIG_IC728::RIG_IC728() { name_ = IC728name_; modes_ = IC728modes_; bandwidths_ = IC728_widths; bw_vals_ = IC728_bw_vals; comm_baudrate = BR1200; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; defaultCIV = 0x38; adjustCIV(defaultCIV); precision = 10; ndigits = 7; }; //============================================================================= long RIG_IC728::get_vfoA () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(10, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) freqA = fm_bcd_be(&replystr[p+5], 8); } return freqA; } void RIG_IC728::set_vfoA (long freq) { freqA = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 8 ) ); cmd.append( post ); waitFB("set vfo A"); } flrig-1.3.24/src/rigs/IC910.cxx0000644000175000017500000001245212562731647012652 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC910.h" const char IC910Hname_[] = "IC-910H"; const char *IC910Hmodes_[] = { "LSB", "USB", "AM", "CW", "FM", NULL}; // mode values are 0, 1, 2, 3, 4, 5, 7, 8 const char IC910H_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U'}; const char *IC910H_widths[] = {"none", NULL}; static int IC910H_bw_val[] = {1, WVALS_LIMIT}; static GUI ic910h_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 54, 165, 156 }, { (Fl_Widget *)btnNR, 214, 125, 50 }, { (Fl_Widget *)sldrNR, 266, 125, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC910H::RIG_IC910H() { defaultCIV = 0x60; name_ = IC910Hname_; modes_ = IC910Hmodes_; _mode_type = IC910H_mode_type; bandwidths_ = IC910H_widths; bw_vals_ = IC910H_bw_val; widgets = ic910h_widgets; def_freq = 1296070000L; def_mode = 1; has_notch_control = has_tune_control = has_alc_control = has_bandwidth_control = false; has_smeter = has_extras = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_compON = has_compression = has_ptt_control = has_power_control = has_volume_control = has_mode_control = has_micgain_control = has_attenuator_control = has_preamp_control = has_ifshift_control = has_swr_control = has_noise_control = has_noise_reduction = has_noise_reduction_control = has_rf_control = has_sql_control = restore_mbw = true; comp_is_on = !progStatus.compON; adjustCIV(defaultCIV); precision = 10; ndigits = 9; }; void RIG_IC910H::initialize() { ic910h_widgets[0].W = btnVol; ic910h_widgets[1].W = sldrVOLUME; ic910h_widgets[2].W = sldrRFGAIN; ic910h_widgets[3].W = sldrSQUELCH; ic910h_widgets[4].W = btnNR; ic910h_widgets[5].W = sldrNR; ic910h_widgets[6].W = btnIFsh; ic910h_widgets[7].W = sldrIFSHIFT; ic910h_widgets[8].W = sldrMICGAIN; ic910h_widgets[9].W = sldrPOWER; } // this looks like trouble void RIG_IC910H::set_vfoA (long freq) { long nufreq; if (freq > 1300000000L) nufreq = 1300000000L; else if (freq > 450000000L && freq < 1240000000L && freqA <= 450000000L) nufreq = 1240000000L; else if (freq > 450000000L && freq < 1240000000L && freqA >= 1240000000L) nufreq = 450000000L; else if (freq > 148000000L && freq < 430000000L && freqA <= 148000000L) nufreq = 430000000L; else if (freq > 148000000L && freq < 430000000L && freqA >= 430000000L) nufreq = 148000000L; else if (freq < 144000000L) nufreq = 144000000L; else nufreq = freq; freqA = nufreq; if (freqA != freq) { vfoA.freq = freqA; setFreqDispA((void*)0); } A.freq = freqA; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freqA, 10 ) ); cmd.append( post ); waitFB("set vfo A");} void RIG_IC910H::set_compression() { if (progStatus.compON) { cmd = pre_to; cmd.append("\x14\x0E"); cmd.append(to_bcd(progStatus.compression * 255 / 100, 3)); cmd.append( post ); waitFB("set comp"); if (comp_is_on != progStatus.compON) { comp_is_on = progStatus.compON; cmd = pre_to; cmd.append("\x16\01"); cmd.append( post ); waitFB("set comp val"); } } else if (comp_is_on != progStatus.compON) { comp_is_on = progStatus.compON; cmd = pre_to; cmd.append("\x16\00"); cmd.append( post ); waitFB("set comp"); } } void RIG_IC910H::set_vox_onoff() { cmd = pre_to; cmd.append("\x16\x46"); cmd += progStatus.vox_onoff ? 1 : 0; cmd.append(post); waitFB("set vox"); } void RIG_IC910H::set_vox_gain() { cmd = pre_to; cmd.append("\x1A\x02"); cmd.append(to_bcd(progStatus.vox_gain * 255 / 100, 3)); cmd.append(post); waitFB("set vox gain"); } void RIG_IC910H::set_vox_anti() { cmd = pre_to; cmd.append("\x1A\x04"); cmd.append(to_bcd(progStatus.vox_anti * 255 / 100, 3)); cmd.append(post); waitFB("set antivox"); } void RIG_IC910H::set_vox_hang() { cmd = pre_to; cmd.append("\x1A\x03"); cmd.append(to_bcd(progStatus.vox_hang * 255 / 100, 3)); cmd.append(post); waitFB("set vox hang"); } int RIG_IC910H::get_smeter() { string cstr = "\x16\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); int mtr= -1; if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) { mtr = fm_bcd(&replystr[p+6], 3); mtr = (int)(mtr /2.55); if (mtr > 100) mtr = 100; } } return mtr; } flrig-1.3.24/src/rigs/IC756.cxx0000644000175000017500000003264512562731651012663 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "debug.h" #include "support.h" //============================================================================= // 756 //============================================================================= #include "IC756.h" const char IC756name_[] = "IC-756"; const char *IC756modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", NULL}; // mode values are 0, 1, 2, 3, 4, 5, 7, 8 const char IC756_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U'}; const char *IC756_widths[] = { "NORM", "NARR", NULL}; static int IC756_bw_vals[] = {1, 2, WVALS_LIMIT}; static GUI ic756_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 54, 165, 156 }, { (Fl_Widget *)btnNR, 2, 185, 50 }, { (Fl_Widget *)sldrNR, 54, 185, 156 }, { (Fl_Widget *)btnIFsh, 214, 125, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 125, 156 }, { (Fl_Widget *)btnNotch, 214, 145, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 165, 156 }, { (Fl_Widget *)sldrPOWER, 266, 185, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC756::RIG_IC756() { defaultCIV = 0x50; name_ = IC756name_; modes_ = IC756modes_; bandwidths_ = IC756_widths; bw_vals_ = IC756_bw_vals; _mode_type = IC756_mode_type; widgets = ic756_widgets; comm_baudrate = BR19200; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = false; comm_rtsptt = true; comm_dtrptt = false; def_freq = freqB = freqA = B.freq = A.freq = 14070000L; def_mode = modeB = modeA = B.imode = A.imode = 1; def_bw = bwB = bwA = B.iBW = A.iBW = 0; filter_nbr = 0; ICvol = 0; has_bandwidth_control = has_smeter = has_power_control = has_volume_control = has_mode_control = has_micgain_control = has_notch_control = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = has_noise_control = has_noise_reduction = has_noise_reduction_control = has_rf_control = has_sql_control = has_split = restore_mbw = true; precision = 1; ndigits = 9; adjustCIV(defaultCIV); }; void RIG_IC756::initialize() { ic756_widgets[0].W = btnVol; ic756_widgets[1].W = sldrVOLUME; ic756_widgets[2].W = sldrRFGAIN; ic756_widgets[3].W = sldrSQUELCH; ic756_widgets[4].W = btnNR; ic756_widgets[5].W = sldrNR; ic756_widgets[6].W = btnIFsh; ic756_widgets[7].W = sldrIFSHIFT; ic756_widgets[8].W = btnNotch; ic756_widgets[9].W = sldrNOTCH; ic756_widgets[10].W = sldrMICGAIN; ic756_widgets[11].W = sldrPOWER; } //============================================================================= // 756PRO //============================================================================= #include "IC756.h" const char IC756PROname_[] = "IC-756PRO"; //============================================================================= const char *IC756PROmodes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", NULL}; const char IC756PRO_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U' }; const char *IC756PRO_widths[] = { "FIXED", NULL}; static int IC756PRO_bw_vals[] = { 1, WVALS_LIMIT}; static GUI ic756pro_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 125, 156 }, { (Fl_Widget *)sldrPOWER, 266, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC756PRO::RIG_IC756PRO() { defaultCIV = 0x5C; name_ = IC756PROname_; modes_ = IC756PROmodes_; bandwidths_ = IC756PRO_widths; bw_vals_ = IC756PRO_bw_vals; _mode_type = IC756PRO_mode_type; widgets = ic756pro_widgets; def_freq = freqA = freqB = A.freq = 14070000; def_mode = modeA = modeB = B.imode = 1; def_bw = bwA = bwB = A.iBW = B.iBW = 0; atten_level = 3; preamp_level = 2; adjustCIV(defaultCIV); has_smeter = has_power_control = has_volume_control = has_mode_control = has_micgain_control = has_auto_notch = has_attenuator_control = has_preamp_control = has_ptt_control = has_noise_control = has_rf_control = true; precision = 1; ndigits = 9; }; void RIG_IC756PRO::initialize() { ic756pro_widgets[0].W = btnVol; ic756pro_widgets[1].W = sldrVOLUME; ic756pro_widgets[2].W = sldrRFGAIN; ic756pro_widgets[3].W = sldrMICGAIN; ic756pro_widgets[4].W = sldrPOWER; } void RIG_IC756PRO::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\xD0'; cmd.append(post); waitFB("sel A"); } void RIG_IC756PRO::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\xD1'; cmd.append(post); waitFB("sel B"); } long RIG_IC756PRO::get_vfoA () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(11, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.freq = fm_bcd_be(&replystr[p+5], 10); } return A.freq; } void RIG_IC756PRO::set_vfoA (long freq) { A.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo A"); } long RIG_IC756PRO::get_vfoB () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(11, "get vfo B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.freq = fm_bcd_be(&replystr[p+5], 10); } return B.freq; } void RIG_IC756PRO::set_vfoB (long freq) { B.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo B"); } int RIG_IC756PRO::get_smeter() { string cstr = "\x15\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return 0; } // Volume control val 0 ... 100 void RIG_IC756PRO::set_volume_control(int val) { ICvol = (int)(val); cmd = pre_to; cmd.append("\x14\x01"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); waitFB("set vol"); } int RIG_IC756PRO::get_volume_control() { string cstr = "\x14\x01"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get vol")) { size_t p = replystr.rfind(resp); if (p != string::npos) return ((int)(fm_bcd(&replystr[p+6],3))); } return 0; } void RIG_IC756PRO::get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } // Tranceiver PTT on/off void RIG_IC756PRO::set_PTT_control(int val) { cmd = pre_to; cmd += '\x1c'; cmd += '\x00'; cmd += (unsigned char) val; cmd.append( post ); waitFB("set PTT"); } // changed noise blanker to noise reduction void RIG_IC756PRO::set_noise(bool val) { cmd = pre_to; cmd.append("\x16\x22"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set noise"); } int RIG_IC756PRO::get_noise() { string cstr = "\x16\x22"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get noise")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return 0; } int RIG_IC756PRO::get_modetype(int n) { return _mode_type[n]; } void RIG_IC756PRO::set_mic_gain(int val) { val = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(val,3)); cmd.append(post); waitFB("set mic"); } void RIG_IC756PRO::get_mic_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_IC756PRO::set_if_shift(int val) { int shift = (int)((val + 50) * 2.56 ); if (shift == 256) shift = 255; cmd = pre_to; cmd.append("\x14\x07"); cmd.append(to_bcd(shift, 3)); cmd.append(post); waitFB("set IF on/off"); cmd = pre_to; cmd.append("\x14\x08"); cmd.append(to_bcd(shift, 3)); cmd.append(post); waitFB("set IF val"); } void RIG_IC756PRO::get_if_min_max_step(int &min, int &max, int &step) { min = -50; max = +50; step = 2; } int IC756PROsql = 0; void RIG_IC756PRO::set_squelch(int val) { IC756PROsql = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x03"); cmd.append(to_bcd(IC756PROsql, 3)); cmd.append( post ); waitFB("set sql"); } int IC756PROrfg = 0; void RIG_IC756PRO::set_rf_gain(int val) { IC756PROrfg = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x02"); cmd.append(to_bcd(IC756PROrfg, 3)); cmd.append( post ); waitFB("set rf gain"); } void RIG_IC756PRO::set_power_control(double val) { cmd = pre_to; cmd.append("\x14\x0A"); cmd.append(to_bcd((int)(val * 255 / 100), 3)); cmd.append( post ); waitFB("set power"); } void RIG_IC756PRO::set_split(bool val) { cmd = pre_to; cmd += 0x0F; cmd += val ? 0x01 : 0x00; cmd.append(post); waitFB("set split"); } //====================================================================== // IC756PRO unique commands //====================================================================== void RIG_IC756PRO::set_modeA(int val) { A.imode = val; switch (val) { case 7 : val = 8; break; case 6 : val = 7; break; default: break; } cmd = pre_to; cmd += '\x06'; cmd += val; cmd.append( post ); waitFB("set mode A"); } int RIG_IC756PRO::get_modeA() { int md; string cstr = "\x04"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md--; A.imode = md; } } return A.imode; } void RIG_IC756PRO::set_modeB(int val) { B.imode = val; switch (val) { case 7 : val = 8; break; case 6 : val = 7; break; default: break; } cmd = pre_to; cmd += '\x06'; cmd += val; cmd.append( post ); waitFB("set mode B"); } int RIG_IC756PRO::get_modeB() { int md; string cstr = "\x04"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get mode B")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md--; B.imode = md; } } return B.imode; } int RIG_IC756PRO::adjust_bandwidth(int m) { return 0; } int RIG_IC756PRO::def_bandwidth(int m) { return (0); } const char **RIG_IC756PRO::bwtable(int m) { return IC756PRO_widths; } void RIG_IC756PRO::set_auto_notch(int v) { progStatus.auto_notch = v; cmd = pre_to; cmd.append("\x16\x48"); cmd += v ? '\x01' : '\x00'; cmd.append(post); waitFB("set auto notch"); } int RIG_IC756PRO::get_auto_notch() { return progStatus.auto_notch; } void RIG_IC756PRO::set_attenuator(int val) { int cmdval = 0; if (atten_level == 0) { atten_level = 1; atten_label("6 dB", true); cmdval = 0x06; } else if (atten_level == 1) { atten_level = 2; atten_label("12 dB", true); cmdval = 0x12; } else if (atten_level == 2) { atten_level = 3; atten_label("18 dB", true); cmdval = 0x18; } else if (atten_level == 3) { atten_level = 0; atten_label("Att", false); cmdval = 0x00; } cmd = pre_to; cmd += '\x11'; cmd += cmdval; cmd.append( post ); waitFB("set att"); } int RIG_IC756PRO::get_attenuator() { string cstr = "\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(7, "get att")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+5] == 0x06) { atten_level = 1; atten_label("6 dB", true); } else if (replystr[p+5] == 0x12) { atten_level = 2; atten_label("12 dB", true); } else if (replystr[p+5] == 0x18) { atten_level = 3; atten_label("18 dB", true); } else if (replystr[p+5] == 0x00) { atten_level = 0; atten_label("Att", false); } } } return atten_level; } void RIG_IC756PRO::set_preamp(int val) { if (preamp_level == 0) { preamp_level = 1; preamp_label("Pre 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Pre 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("Pre", false); } cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd += (unsigned char) preamp_level; cmd.append( post ); waitFB("set preamp"); } int RIG_IC756PRO::get_preamp() { string cstr = "\x16\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get preamp")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { preamp_label("Pre 1", true); preamp_level = 1; } else if (replystr[p+6] == 0x02) { preamp_label("Pre 2", true); preamp_level = 2; } else { preamp_label("Pre", false); preamp_level = 0; } } } return preamp_level; } flrig-1.3.24/src/rigs/TT550.cxx0000644000175000017500000012262612562731647012713 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- // TenTec Pegasus computer controlled transceiver #include #include #include #include #include #include #include "TT550.h" #include "support.h" #include "util.h" #include "debug.h" #include "rig.h" static const char TT550name_[] = "TT-550"; enum TT550_MODES { TT550_AM_MODE, TT550_USB_MODE, TT550_LSB_MODE, TT550_CW_MODE, TT550_DIGI_MODE, TT550_FM_MODE }; static const char *TT550modes_[] = { "AM", "USB", "LSB", "CW", "DIGI", "FM", NULL}; static const int TT550_def_bw[] = { 32, 20, 20, 10, 20, 32 }; static const char TT550mode_chr[] = { '0', '1', '2', '3', '1', '4' }; static const char TT550mode_type[] = { 'U', 'U', 'L', 'L', 'U', 'U' }; static const char *TT550_widths[] = { "300", "330", "375", "450", "525", "600", "675", "750", "900", "1050", "1200", "1350", "1500", "1650", "1800", "1950", "2100", "2250", "2400", "2550", "2700", "2850", "3000", "3300", "3600", "3900", "4200", "4500", "4800", "5100", "5400", "5700", "6000", "8000", NULL}; static int TT550_bw_vals[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34, WVALS_LIMIT}; static const int TT550_filter_nbr[] = { 32, 31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0, 33 }; static const int TT550_filter_width[] = { 300, 330, 375, 450, 525, 600, 675, 750, 900, 1050, 1200, 1350, 1500, 1650, 1800, 1950, 2100, 2250, 2400, 2550, 2700, 2850, 3000, 3300, 3600, 3900, 4200, 4500, 4800, 5100, 5400, 5700, 6000, 8000 }; const char *TT550_xmt_widths[] = { "900", "1050", "1200", "1350", "1500", "1650", "1800", "1950", "2100", "2250", "2400", "2550", "2700", "2850", "3000", "3300", "3600", "3900", NULL}; static const int TT550_xmt_filter_nbr[] = { 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 11, 10, 9, 8, 7}; static const int TT550_xmt_filter_width[] = { 900, 1050, 1200, 1350, 1500, 1650, 1800, 1950, 2100, 2250, 2400, 2550, 2700, 2850, 3000, 3300, 3600, 3900 }; static const int TT550_steps[] = { 1, 10, 100, 1000, 10000 }; static char TT550restart[] = "XX\r"; static char TT550init[] = "P1\r"; //static char TT550isRADIO[] = " RADIO START"; //static char TT550isDSP[] = " DSP START"; //static char TT550setFREQ[] = "N123456\r"; static char TT550setMODE[] = "Mnn\r"; static char TT550setRcvBW[] = "Wx\r"; static char TT550setXmtBW[] = "Cx\r"; static char TT550setVolume[] = "Vn\r"; static char TT550setAGC[] = "Gc\r"; static char TT550setRFGAIN[] = "An\r"; static char TT550setATT[] = "Bc\r"; static char TT550setCWWPM[] = "Eabcdef\r"; static char TT550setMONVOL[] = "Hn\r"; static char TT550setCWMONVOL[] = "Jn\r"; static char TT550setNRNOTCH[] = "Kna\r"; static char TT550setLINEOUT[] = "Ln\r"; // 63 - min, 0 - max static char TT550setMICLINE[] = "O1cn\r"; // ******************************************* static char TT550setPOWER[] = "Pn\r"; // **************************************** static char TT550setXMT[] = "Q1\r"; static char TT550setRCV[] = "Q0\r"; static char TT550setSQUELCH[] = "Sn\r"; // 0..19; 6db / unit static char TT550setVOX[] = "Uc\r"; // '0' = off; '1' = on static char TT550setVOXGAIN[] = "UGn\r"; // 0 <= n <= 255 static char TT550setANTIVOX[] = "UAn\r"; // 0..255 static char TT550setVOXHANG[] = "UHn\r"; // 0..255; n= delay*0.0214 sec static char TT550setCWSPOTLVL[] = "Fn\r"; // 0..255; 0 = off static char TT550setCWQSK[] = "UQn\r"; // 0..255; 0 = none static char TT550setAUXHANG[] = "UTn\r"; // 0..255; 0 = none static char TT550setBLANKER[] = "Dn\r"; // 0..7; 0 = off static char TT550setSPEECH[] = "Yn\r"; // 0..127; 0 = off static char TT550setDISABLE[] = "#0\r"; // disable transmitter static char TT550setENABLE[] = "#1\r"; // enable transmitter static char TT550setTLOOP_OFF[] = "#2\r"; // disable T loop static char TT550setTLOOP_ON[] = "#3\r"; // enable T loop static char TT550setKEYER_OFF[] = "#6\r"; // enable keyer static char TT550setKEYER_ON[] = "#7\r"; // disable keyer static char TT550setALIVE_OFF[] = "#8\r"; // disable keep alive //static char TT550setALIVE_ON[] = "#9\r"; // enable keep alive //static char TT550getAGC[] = "?Y\r"; // 0..255 //static char TT550getFWDPWR[] = "?F\r"; // F<0..255> //static char TT550getREFPWR[] = "?R\r"; // R<0..255> static char TT550query[] = "?S\r"; // S<0..255><0..255> static char TT550getFWDREF[] = "?S\r"; // T<0..255><0..255> static char TT550setAMCARRIER[] = "R \r"; // enables AM mode transmit static string xcvrstream = ""; static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 125, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 54, 165, 368 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_TT550::RIG_TT550() { // base class values name_ = TT550name_; modes_ = TT550modes_; bandwidths_ = TT550_widths; bw_vals_ = TT550_bw_vals; widgets = rig_widgets; comm_baudrate = BR57600; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; serloop_timing = 100; def_mode = modeA = modeB = 1; def_bw = bwA = bwB = 20; def_freq = freqA = freqB = 14070000; max_power = 100; can_change_alt_vfo = true; VfoAdj = 0; Bfo = 600; ATTlevel = 0; RFgain = 100; has_notch_control = has_preamp_control = false; has_extras = has_bfo = has_smeter = has_power_out = has_split = has_split_AB = has_swr_control = has_micgain_control = has_power_control = has_agc_level = has_cw_wpm = has_cw_vol = has_cw_spot = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_compression = has_rit = has_xit = has_rf_control = has_attenuator_control = has_volume_control = has_ifshift_control = has_ptt_control = has_bandwidth_control = has_auto_notch = has_tune_control = has_noise_control = has_mode_control = true; auto_notch = noise_reduction = false; precision = 1; ndigits = 8; } void RIG_TT550::showASCII(string s1, string s) { while (s[0] == ' ' || s[0] == '\r' || s[0] == '\n') s.erase(0,1); for (size_t i = 0; i < s.length(); i++) { if (s[i] == '\r' || s[i] == '\n') s[i] = ' '; } LOG_WARN("%9s : %s", s1.c_str(), s.c_str()); } void RIG_TT550::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = sldrMICGAIN; rig_widgets[6].W = sldrPOWER; sendCommand(TT550restart, 14); if (replystr.find("RADIO") == string::npos) { showASCII("Power up", "DSP START"); sendCommand(TT550init); // put into radio mode } showASCII("Init", replystr); sendCommand("?V\r", 13); showASCII("Version", replystr); sendCommand(TT550setALIVE_OFF, 0); set_volume_control(0); set_auto_notch(auto_notch); set_compression(); set_vox_hang(); set_vox_anti(); set_vox_gain(); set_vox_onoff(); set_cw_spot(); set_cw_vol(); set_cw_wpm(); set_cw_qsk(); enable_keyer(); set_agc_level(); set_line_out(); // use_line_in = progStatus.use_line_in; set_mic_gain(progStatus.mic_gain); set_mic_line(0); set_rf_gain(RFgain); XitFreq = progStatus.xit_freq; RitFreq = progStatus.rit_freq; Bfo = progStatus.bfo_freq; set_vfoA(freqA); VfoAdj = progStatus.vfo_adj; setXit(XitFreq); setRit(RitFreq); setBfo(Bfo); set_attenuator(0); set_mon_vol(); set_squelch_level(); set_if_shift(pbt); set_aux_hang(); set_volume_control(progStatus.volume); cmd = TT550setAMCARRIER; cmd[1] = 0x0F; sendCommand(cmd, 0); enable_tloop(); enable_xmtr(); xcvrstream.clear(); keypad_timeout = 0; onA = true; encoder_count = 0; } void RIG_TT550::enable_xmtr() { if (progStatus.tt550_enable_xmtr) cmd = TT550setENABLE; else cmd = TT550setDISABLE; sendCommand(cmd, 0); } void RIG_TT550::enable_tloop() { if (progStatus.tt550_enable_tloop) cmd = TT550setTLOOP_ON; else cmd = TT550setTLOOP_OFF; sendCommand(cmd, 0); } void RIG_TT550::shutdown() { cmd = "Vx\r"; cmd[1] = 0; sendCommand(cmd, 0); // volume = zero cmd = "Lx\r"; cmd[1] = 0x3F; sendCommand(cmd, 0); // line out = minimum } int DigiAdj = 0; void RIG_TT550::set_vfoRX(long freq) { int NVal = 0, FVal = 0; // N value / finetune value int TBfo = 0; // temporary BFO (Hz) int IBfo = 0; // Intermediate BFO Freq (Hz) int PbtAdj = PbtActive ? pbt : 0;//PbtFreq : 0; // passband adj (Hz) int RitAdj = RitActive ? RitFreq : 0; // RIT adj (Hz) int FiltAdj = (TT550_filter_width[def_bw])/2; // filter bw (Hz) long lFreq = freq * (1 + VfoAdj * 1e-6) + RitAdj; LOG_INFO("rx freq = %ld", freq); if(def_mode == TT550_DIGI_MODE) { DigiAdj = 1500 - FiltAdj - 200; DigiAdj = DigiAdj < 0 ? 0 : DigiAdj; IBfo = FiltAdj + 200; lFreq += (IBfo + PbtAdj + DigiAdj); IBfo = IBfo + PbtAdj + DigiAdj; } if(def_mode == TT550_USB_MODE) { IBfo = FiltAdj + 200; lFreq += (IBfo + PbtAdj); IBfo = IBfo + PbtAdj; } if(def_mode == TT550_LSB_MODE) { IBfo = FiltAdj + 200; lFreq -= (IBfo + PbtAdj); IBfo = IBfo + PbtAdj; } if(def_mode == TT550_CW_MODE) { // CW Mode uses LSB Mode if (( FiltAdj + 300) <= Bfo) { IBfo = PbtAdj + Bfo; } else { IBfo = FiltAdj + 300; lFreq += (Bfo - IBfo); IBfo = IBfo + PbtAdj; } } if(def_mode == TT550_FM_MODE) { lFreq += Bfo; IBfo = 0; } lFreq -= 1250; NVal = lFreq / 2500 + 18000; FVal = (int)((lFreq % 2500) * 5.46); cmd = "N"; cmd += (NVal >> 8) & 0xff; cmd += NVal & 0xff; cmd += (FVal >> 8) & 0xff; cmd += FVal & 0xff; TBfo = (int)((IBfo + 8000)*2.73); cmd += (TBfo >> 8) & 0xff; cmd += TBfo & 0xff; cmd += '\r'; sendCommand(cmd, 0); } void RIG_TT550::set_vfoTX(long freq) { int NVal = 0, FVal = 0; // N value / finetune value int TBfo = 0; // temporary BFO int IBfo = 1500; // Intermediate BFO Freq int bwBFO = 0; // BFO based on selected bandwidth int FilterBw = 0; // Filter Bandwidth determined from table int XitAdj; long lFreq = freq * (1 + VfoAdj * 1e-6); LOG_INFO("tx freq = %ld", freq); lFreq += XitAdj = XitActive ? XitFreq : 0; if (progStatus.tt550_use_xmt_bw) FilterBw = TT550_xmt_filter_width[progStatus.tt550_xmt_bw]; else FilterBw = TT550_filter_width[def_bw]; if (FilterBw < 900) FilterBw = 900; if (FilterBw > 3900) FilterBw = 3900; // if (def_mode == TT550_DIGI_MODE) FilterBw = 3000; bwBFO = (FilterBw/2) + 200; IBfo = (bwBFO > IBfo) ? bwBFO : IBfo ; if (def_mode == TT550_USB_MODE || def_mode == TT550_DIGI_MODE) { lFreq += IBfo; TBfo = (int)(IBfo * 2.73); } if (def_mode == TT550_LSB_MODE) { lFreq -= IBfo; TBfo = (int)(IBfo * 2.73); } // CW Mode uses LSB Mode if(def_mode == TT550_CW_MODE) { IBfo = 1500; // fixed for CW lFreq += Bfo - IBfo; TBfo = (int)(Bfo * 2.73); } if(def_mode == TT550_FM_MODE) { IBfo = 0; lFreq -= IBfo; TBfo = 0; } lFreq -= 1250; NVal = lFreq / 2500 + 18000; FVal = (int)((lFreq % 2500) * 5.46); cmd = "T"; cmd += (NVal >> 8) & 0xff; cmd += NVal & 0xff; cmd += (FVal >> 8) & 0xff; cmd += FVal & 0xff; cmd += (TBfo >> 8) & 0xff; cmd += TBfo & 0xff; cmd += '\r'; sendCommand(cmd, 0); } void RIG_TT550::set_split(bool val) { printf("set split %s\n", val ? "ON" : "OFF"); split = val; // selectA(); if (split) { if (onA) set_vfoTX(freqB); else set_vfoTX(freqA); } else { if (onA) set_vfoTX(freqA); else set_vfoTX(freqB); } } void RIG_TT550::set_vfo(long freq) { //LOG_WARN("set vfo %ld", freq); set_vfoRX(freq); if (!split) set_vfoTX(freq); xcvrstream.clear(); } void RIG_TT550::set_vfoA (long freq) { LOG_WARN("set vfo A %ld", freq); freqA = freq; if (onA) set_vfo(freq); } int enc_change = 0; void RIG_TT550::process_encoder(int val) { } long RIG_TT550::get_vfoA () { if (onA) { freqA += enc_change; enc_change = 0; } return freqA; } void RIG_TT550::set_vfoB (long freq) { LOG_WARN("set vfo B %ld", freq); freqB = freq; if (!onA) set_vfo(freqB); } long RIG_TT550::get_vfoB () { if (!onA) { freqB += enc_change; enc_change = 0; } return freqB; } // Tranceiver PTT on/off void RIG_TT550::set_PTT_control(int val) { if (val) cmd = TT550setXMT; else cmd = TT550setRCV; sendCommand(cmd, 0); //LOG_WARN("%s", str2hex(cmd.c_str(), cmd.length())); } void RIG_TT550::set_mode(int val) { def_mode = val; if (val == TT550_AM_MODE) { cmd = TT550setMODE; cmd[1] = cmd[2] = TT550mode_chr[val]; sendCommand(cmd, 0); cmd = TT550setPOWER; cmd[1] = 0xFF; sendCommand(cmd, 0); set_power_control(progStatus.tt550_AM_level); } else { cmd = TT550setMODE; cmd[1] = cmd[2] = TT550mode_chr[val]; sendCommand(cmd, 0); set_power_control(progStatus.power_level); } set_bw(def_bw); } void RIG_TT550::set_modeA(int val) { LOG_WARN("mode A = %d", val); modeA = val; set_mode(val); } void RIG_TT550::set_modeB(int val) { LOG_WARN("mode B = %d", val); modeB = val; if (!onA) set_mode(val); } int RIG_TT550::get_modeB() { return modeB; } static int ret_mode = TT550_CW_MODE; static void tt550_tune_off(void *) { pthread_mutex_lock(&mutex_serial); selrig->set_power_control(0); selrig->set_PTT_control(0); sendCommand("$0\r", 0); LOG_INFO("%s", str2hex("$0\r", 3)); selrig->set_modeA(ret_mode); pthread_mutex_unlock(&mutex_serial); } void RIG_TT550::tune_rig() { ret_mode = modeA; set_modeA(TT550_CW_MODE); set_power_control(5); sendCommand("$1\r", 0); LOG_INFO("%s", str2hex("$1\r", 3)); set_PTT_control(1); Fl::add_timeout(5.0, tt550_tune_off); } int RIG_TT550::get_modeA() { return modeA; } int RIG_TT550::get_modetype(int n) { return TT550mode_type[n]; } void RIG_TT550::set_bw(int val) { LOG_WARN("bw = %d", val); def_bw = val; int rxbw = TT550_filter_nbr[val]; int txbw = rxbw; if (progStatus.tt550_use_xmt_bw) txbw = TT550_xmt_filter_nbr[progStatus.tt550_xmt_bw]; if (txbw < 7) txbw = 7; if (txbw > 24) txbw = 24; cmd = TT550setRcvBW; cmd[1] = rxbw; sendCommand(cmd, 0); cmd = TT550setXmtBW; cmd[1] = txbw; sendCommand(cmd, 0); set_vfo(onA ? freqA : freqB); } void RIG_TT550::set_bwA(int val) { LOG_WARN("bw A = %d", val); bwA = val; set_bw(bwA); } int RIG_TT550::get_bwA() { return bwA; } void RIG_TT550::set_bwB(int val) { LOG_WARN("bw B = %d", val); bwB = val; if (!onA) set_bw(val); } int RIG_TT550::get_bwB() { return bwB; } int RIG_TT550::adjust_bandwidth(int md) { return bwA; } int RIG_TT550::def_bandwidth(int m) { if (m < 0) m = 0; if (m > 4) m = 4; return TT550_def_bw[m]; } void RIG_TT550::set_if_shift(int val) { // PbtFreq = val; // if (PbtFreq) PbtActive = true; pbt = val; if (pbt) PbtActive = true; set_vfoRX(onA ? freqA : freqB); } bool RIG_TT550::get_if_shift(int &val) { val = pbt;//PbtFreq; if (!val) return false; return true; } void RIG_TT550::get_if_min_max_step(int &min, int &max, int &step) { min = -500; max = 500; step = 50; } void RIG_TT550::set_attenuator(int val) { cmd = TT550setATT; if (val) cmd[1] = '1'; else cmd[1] = '0'; sendCommand(cmd, 0); LOG_WARN("%s", str2hex(cmd.c_str(), cmd.length())); } void RIG_TT550::set_volume_control(int val) { cmd = TT550setVolume; cmd[1] = 0xFF & ((val * 255) / 100); sendCommand(cmd, 0); LOG_WARN("%s", str2hex(cmd.c_str(), cmd.length())); } int RIG_TT550::get_volume_control() { return progStatus.volume; } static void show_encA(void *) { txt_encA->show(); } static void hide_encA(void *) { txt_encA->hide(); } static void update_encA(void *d) { char *str = (char *)d; txt_encA->value(str); } void RIG_TT550::selectA() { LOG_WARN("%s", "select A"); onA = true; Fl::awake(hide_encA, NULL); xcvrstream.clear(); } void RIG_TT550::selectB() { LOG_WARN("%s", "select B"); onA = false; Fl::awake(hide_encA, NULL); xcvrstream.clear(); } void RIG_TT550::process_freq_entry(char c) { static bool have_decimal = false; float ffreq = 0.0; long freq = 0; if (xcvrstream.empty()) have_decimal = false; if (c != '\r') { if ((c >= '0' && c <= '9') || c == '.') { xcvrstream += c; if (!have_decimal && c == '.') have_decimal = true; else if (have_decimal && c == '.') { xcvrstream.clear(); have_decimal = false; keypad_timeout = 0; Fl::awake(hide_encA, NULL); return; } ffreq = 0; sscanf(xcvrstream.c_str(), "%f", &ffreq); if (have_decimal) ffreq *= 1000; freq = (long) ffreq; if (!txt_encA->visible()) Fl::awake(show_encA, NULL); Fl::awake(update_encA, (void*)xcvrstream.c_str()); // LOG_WARN("%s => %ld", str2hex(xcvrstream.c_str(), xcvrstream.length()), freq); keypad_timeout = progStatus.tt550_keypad_timeout / progStatus.serloop_timing; } } else { keypad_timeout = 0; if (xcvrstream.empty()) return; ffreq = 0; sscanf(xcvrstream.c_str(), "%f", &ffreq); if (have_decimal) ffreq *= 1000; freq = (long) ffreq; if (freq < 50000) freq *= 1000; Fl::awake(hide_encA, NULL); if (onA) { freqA = freq; } else { freqB = freq; } xcvrstream.clear(); have_decimal = false; } } //static const char *tt550_fkey_strings[] = {"None","Clear","CW++","CW--","Band++","Band--","Step++","Step--"}; void RIG_TT550::fkey_clear() { // LOG_WARN("%s", tt550_fkey_strings[1]); xcvrstream.clear(); keypad_timeout = 0; Fl::awake(hide_encA, NULL); } void RIG_TT550::fkey_cw_plus() { // LOG_WARN("%s", tt550_fkey_strings[2]); if (progStatus.tt550_cw_wpm >= 80) return; progStatus.tt550_cw_wpm++; spnr_tt550_cw_wpm->value(progStatus.tt550_cw_wpm); spnr_tt550_cw_wpm->redraw(); selrig->set_cw_wpm(); } void RIG_TT550::fkey_cw_minus() { if (progStatus.tt550_cw_wpm <= 5) return; progStatus.tt550_cw_wpm--; spnr_tt550_cw_wpm->value(progStatus.tt550_cw_wpm); spnr_tt550_cw_wpm->redraw(); selrig->set_cw_wpm(); } struct BANDS { int lo; int hi; int digi; }; static BANDS ibands[] = { { 0, 1800000, 28120000 }, { 1800000, 2000000, 1807000 }, { 3500000, 4000000, 3580000 }, { 7000000, 7300000, 7035000 }, { 10100000, 10150000, 10140000 }, { 14000000, 14350000, 14070000 }, { 18068000, 18168000, 18100000 }, { 21000000, 21450000, 21070000 }, { 24890000, 24990000, 24920000 }, { 28000000, 29700000, 28120000 }, { 29700000, 0, 1807000 } }; void RIG_TT550::fkey_band_plus() { FREQMODE vfoplus = vfo; for (size_t i = 1; i < sizeof(ibands) / sizeof(BANDS); i++) { if (vfo.freq < ibands[i].lo) { vfoplus.freq = ibands[i].digi; break; } } vfo.src = UI; if (!useB) { guard_lock queA_lock(&mutex_queA, 500); queA.push(vfoplus); } else { guard_lock queB_lock(&mutex_queB, 500); queB.push(vfoplus); } } void RIG_TT550::fkey_band_minus() { FREQMODE vfoplus = vfo; for (size_t i = sizeof(ibands) / sizeof(BANDS) - 2; i >= 0; i--) { if (vfo.freq > ibands[i].hi) { vfoplus.freq = ibands[i].digi; break; } } vfo.src = UI; if (!useB) { guard_lock queA_lock(&mutex_queA, 500); queA.push(vfoplus); } else { guard_lock queB_lock(&mutex_queB, 500); queB.push(vfoplus); } } void RIG_TT550::fkey_step_plus() { progStatus.tt550_encoder_step++; if (progStatus.tt550_encoder_step > 4) progStatus.tt550_encoder_step = 0; sel_tt550_encoder_step->value(progStatus.tt550_encoder_step); sel_tt550_encoder_step->redraw(); } void RIG_TT550::fkey_step_minus() { progStatus.tt550_encoder_step--; if (progStatus.tt550_encoder_step < 0) progStatus.tt550_encoder_step = 4; sel_tt550_encoder_step->value(progStatus.tt550_encoder_step); sel_tt550_encoder_step->redraw(); } void RIG_TT550::process_fkey(char c) { if (c == 0x11) switch (progStatus.tt550_F1_func) { case 1 : fkey_clear(); break; case 2 : fkey_cw_plus(); break; case 3 : fkey_cw_minus(); break; case 4 : fkey_band_plus(); break; case 5 : fkey_band_minus(); break; case 6 : fkey_step_plus(); break; case 7 : fkey_step_minus(); break; default: ; } if (c == 0x12) switch (progStatus.tt550_F2_func) { case 1 : fkey_clear(); break; case 2 : fkey_cw_plus(); break; case 3 : fkey_cw_minus(); break; case 4 : fkey_band_plus(); break; case 5 : fkey_band_minus(); break; case 6 : fkey_step_plus(); break; case 7 : fkey_step_minus(); break; default: ; } if (c == 0x13) switch (progStatus.tt550_F3_func) { case 1 : fkey_clear(); break; case 2 : fkey_cw_plus(); break; case 3 : fkey_cw_minus(); break; case 4 : fkey_band_plus(); break; case 5 : fkey_band_minus(); break; case 6 : fkey_step_plus(); break; case 7 : fkey_step_minus(); break; default: ; } } void RIG_TT550::process_keypad(char c) { if (c < 0 || c > 0x7f) return; if (c == 0x11 || c == 0x12 || c == 0x13) process_fkey(c); else process_freq_entry(c); } void RIG_TT550::get_302() { if (keypad_timeout) { keypad_timeout--; if (keypad_timeout == 0) { xcvrstream.clear(); Fl::awake(hide_encA, NULL); } } // reading any pending encoder / keyboard strings size_t p = 0; int encval = 0; int encode = 0; size_t len; if (!readResponse()) return; pending.append(replystr); len = replystr.length(); while (p < len) { switch (replystr[p]) { case 'U' : if (len - p < 3) { pending.erase(0,p); break; } process_keypad(replystr[p+1]); p += 3; break; case '!' : if (len - p < 5) { pending.erase(0,p); break; } encval = ((unsigned char)replystr[p+1] << 8) | (unsigned char)replystr[p+2]; if (encval > 16383) encval -= 65536; encode += encval; p += 5; break; default : p++; break; } } if (encode) enc_change = encode * TT550_steps[progStatus.tt550_encoder_step]; } int RIG_TT550::get_smeter() { int sval = 0; float fval; int fp; size_t p; size_t len; get_302(); p = 0; sendCommand( TT550query, 0); len = readResponse(); while ((p < len) && (replystr[p] != 'S') && (replystr[p] != 'T')) p++; if (p) { pending.append(replystr.substr(0,p)); replystr.erase(0,p); } len = replystr.length(); if (replystr[0] == 'S' && len > 5) { sscanf(&replystr[1], "%4x", &sval); fval = sval/256.0; sval = (int)(fval * 100.0 / 18.0); if (sval > 100) sval = 0; Fl::awake(updateFwdPwr, (void*)0); } else if (replystr[0] == 'T' && len > 3) { fp = (unsigned char)replystr[1]; Fl::awake(updateFwdPwr, reinterpret_cast(fp)); } return sval; } int RIG_TT550::get_swr() { double swr, nu; if (fwdpwr == 0) return 0; if (fwdpwr == refpwr) return 100; nu = sqrt(refpwr / fwdpwr); swr = (1 + nu) / (1 - nu) - 1.0; swr *= 16.67; if (swr < 0) swr = 0; if (swr > 100) swr = 100; return (int)swr; } int RIG_TT550::get_power_out() { cmd = TT550getFWDREF; int ret = sendCommand(cmd, 4); if (ret < 4) return fwdpwr; size_t p = replystr.rfind("T"); if (p == string::npos) return fwdpwr; fwdpwr = (unsigned char)replystr[p+1]; refpwr = (unsigned char)replystr[p+2]; return fwdpwr; } void RIG_TT550::setBfo(int val) { progStatus.bfo_freq = Bfo = val; if (!onA) { set_vfoRX(freqB); set_vfoTX(freqB); } else if (split) { set_vfoRX(freqA); set_vfoTX(freqB); } else { set_vfoRX(freqA); set_vfoTX(freqA); } } int RIG_TT550::getBfo() { return Bfo; } void RIG_TT550::setVfoAdj(double v) { VfoAdj = v; set_vfoRX(onA ? freqA : freqB); } void RIG_TT550::setRit(int val) { progStatus.rit_freq = RitFreq = val; if (RitFreq) RitActive = true; if (!onA) { set_vfoRX(freqB); set_vfoTX(freqB); } else if (split) { set_vfoRX(freqA); set_vfoTX(freqB); } else { set_vfoRX(freqA); set_vfoTX(freqA); } } int RIG_TT550::getRit() { return RitFreq; } void RIG_TT550::setXit(int val) { progStatus.xit_freq = XitFreq = val; if (XitFreq) XitActive = true; if (!onA) { set_vfoRX(freqB); set_vfoTX(freqB); } else if (split) { set_vfoRX(freqA); set_vfoTX(freqB); } else { set_vfoRX(freqA); set_vfoTX(freqA); } } int RIG_TT550::getXit() { return XitFreq; } void RIG_TT550::set_rf_gain(int val) { cmd = TT550setRFGAIN; cmd[1] = (unsigned char)(255 - val * 2.55); if (cmd[1] == 0x0D) cmd[1] = 0x0E; RFgain = val; sendCommand(cmd, 0); } int RIG_TT550::get_rf_gain() { return RFgain; } void RIG_TT550::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_TT550::set_line_out() { cmd = TT550setLINEOUT; cmd[1] = (0x3F) & (((100 - progStatus.tt550_line_out) * 63) / 100); if (cmd[1] == 0x0D) cmd[1] = 0x0E; sendCommand(cmd, 0); } void RIG_TT550::set_agc_level() { cmd = TT550setAGC; switch (progStatus.tt550_agc_level) { case 0 : cmd[1] = '1'; break; case 1 : cmd[1] = '2'; break; case 2 : cmd[1] = '3'; break; } sendCommand(cmd, 0); } void RIG_TT550::set_cw_wpm() { cmd = TT550setCWWPM; int duration = 7200 / progStatus.tt550_cw_wpm; int ditfactor = duration * progStatus.tt550_cw_weight; int spcfactor = duration * (2.0 - progStatus.tt550_cw_weight); int dahfactor = duration * 3; cmd[1] = 0xFF & (ditfactor >> 8); cmd[2] = 0xFF & ditfactor; cmd[3] = 0xFF & (dahfactor >> 8); cmd[4] = 0xFF & dahfactor; cmd[5] = 0xFF & (spcfactor >> 8); cmd[6] = 0xFF & spcfactor; sendCommand(cmd, 0); } void RIG_TT550::set_cw_vol() { int val = progStatus.tt550_cw_vol; cmd = TT550setCWMONVOL; cmd[1] = 0xFF & (val * 255) / 100; if (cmd[1] == 0x0D) cmd[1] = 0x0E; sendCommand(cmd, 0); } bool RIG_TT550::set_cw_spot() { int val = progStatus.tt550_cw_spot; cmd = TT550setCWSPOTLVL; cmd[1] = 0xFF & ((val * 255 ) / 100); if (!progStatus.tt550_spot_onoff) cmd[1] = 0; if (cmd[1] == 0x0D) cmd[1] = 0x0E; sendCommand(cmd, 0); return true; } void RIG_TT550::set_spot_onoff() { set_cw_spot(); } // front panel Preamp control is hijacked for a spot control ! void RIG_TT550::set_preamp(int val) { progStatus.tt550_spot_onoff = val; set_cw_spot(); } void RIG_TT550::set_cw_weight() { set_cw_wpm(); } void RIG_TT550::set_cw_qsk() { cmd = TT550setCWQSK; cmd[2] = (0xFF) & (int)(progStatus.tt550_cw_qsk * 2); if (cmd[2] == 0x0D) cmd[2] = 0x0E; sendCommand(cmd, 0); } void RIG_TT550::enable_keyer() { if (progStatus.tt550_enable_keyer) cmd = TT550setKEYER_ON; else cmd = TT550setKEYER_OFF; sendCommand(cmd, 0); } void RIG_TT550::set_vox_onoff() { cmd = TT550setVOX; cmd[1] = progStatus.vox_onoff ? '1' : '0'; sendCommand(cmd, 0); } void RIG_TT550::set_vox_gain() { cmd = TT550setVOXGAIN; cmd[2] = (0xFF) & (int)(progStatus.tt550_vox_gain * 2.55); if (cmd[2] == 0x0D) cmd[2] = 0x0E; sendCommand(cmd, 0); } void RIG_TT550::set_vox_anti() { cmd = TT550setANTIVOX; cmd[2] = (0xFF) & (int)(progStatus.tt550_vox_anti * 2.55); if (cmd[2] == 0x0D) cmd[2] = 0x0E; sendCommand(cmd, 0); } void RIG_TT550::set_vox_hang() { cmd = TT550setVOXHANG; cmd[2] = (0xFF) & (int)(progStatus.tt550_vox_hang * 2.55); if (cmd[2] == 0x0D) cmd[2] = 0x0E; sendCommand(cmd, 0); } void RIG_TT550::set_aux_hang() { cmd = TT550setAUXHANG; cmd[2] = 0; sendCommand(cmd, 0); } void RIG_TT550::set_compression() { cmd = TT550setSPEECH; cmd[1] = (0x7F) & (int)(progStatus.tt550_compression * 1.27); if (cmd[1] == 0x0D) cmd[1] = 0x0E; sendCommand(cmd, 0); } void RIG_TT550::set_auto_notch(int v) { auto_notch = v; cmd = TT550setNRNOTCH; cmd[1] = '0'; cmd[1] = noise_reduction ? '1' : '0'; if (v) cmd[2] = '1'; else cmd[2] = '0'; sendCommand(cmd, 0); } void RIG_TT550::set_noise_reduction(int b) { noise_reduction = b; cmd = TT550setNRNOTCH; if (b) cmd[1] = '1'; else cmd[1] = '0'; cmd[2] = auto_notch ? '1' : '0'; sendCommand(cmd, 0); } void RIG_TT550::set_mic_gain(int v) { progStatus.mic_gain = v; if (!progStatus.tt550_use_line_in) { cmd = TT550setMICLINE; cmd[2] = 0; cmd[3] = (unsigned char) v; sendCommand(cmd, 0); } } void RIG_TT550::set_mic_line(int v) { if (progStatus.tt550_use_line_in) { cmd = TT550setMICLINE; cmd[2] = 1; cmd[3] = 0;//(unsigned char) v; sendCommand(cmd, 0); } } void RIG_TT550::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 15; step = 1; } float pwr_set[] = { 0, 3, 6, 10, 13, 17, 20, 24, 28, 34, 40, 46, 52, 59, 67, 75, 82, 90, 98, 104, 109 }; void RIG_TT550::set_power_control(double val) { if (def_mode == TT550_AM_MODE) { progStatus.tt550_AM_level = (int)val; cmd = TT550setAMCARRIER; cmd[1] = (unsigned char)(val * .64); } else { progStatus.power_level = (int) val; cmd = TT550setPOWER; size_t sel = 0; for (sel = 0; sel < sizeof(pwr_set); sel++) if (pwr_set[sel] >= val) break; sel--; float v = 5.0 * (sel + 1.0 * (val - pwr_set[sel])/(pwr_set[sel+1]-pwr_set[sel])); cmd[1] = (unsigned char)(v * 2.55); // cmd[1] = (unsigned char)(val * 2.55); } if (cmd[1] == 0x0D) cmd[1] = 0x0E; sendCommand(cmd, 0); } void RIG_TT550::set_mon_vol() { cmd = TT550setMONVOL; cmd[1] = 0xFF & ((progStatus.tt550_mon_vol * 255) / 100); if (cmd[1] == 0x0D) cmd[1] = 0x0E; sendCommand(cmd, 0); } void RIG_TT550::set_squelch_level() { cmd = TT550setSQUELCH; cmd[1] = 0xFF & ((progStatus.tt550_squelch_level * 255) / 100); if (cmd[1] == 0x0D) cmd[1] = 0x0E; sendCommand(cmd, 0); } void RIG_TT550::set_nb_level() { cmd = TT550setBLANKER; cmd[1] = progStatus.tt550_nb_level; sendCommand(cmd, 0); } void RIG_TT550::set_noise(bool b) { progStatus.noise = b; set_noise_reduction(b); } void RIG_TT550::tuner_bypass() { } // callbacks for tt550 transceiver void cb_tt550_line_out() { pthread_mutex_lock(&mutex_serial); selrig->set_line_out(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_agc_level() { pthread_mutex_lock(&mutex_serial); selrig->set_agc_level(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_cw_wpm() { pthread_mutex_lock(&mutex_serial); selrig->set_cw_wpm(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_cw_vol() { pthread_mutex_lock(&mutex_serial); selrig->set_cw_vol(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_cw_spot() { pthread_mutex_lock(&mutex_serial); selrig->set_cw_spot(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_cw_weight() { pthread_mutex_lock(&mutex_serial); selrig->set_cw_weight(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_enable_keyer() { pthread_mutex_lock(&mutex_serial); selrig->enable_keyer(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_spot_onoff() { pthread_mutex_lock(&mutex_serial); selrig->set_spot_onoff(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_vox_gain() { pthread_mutex_lock(&mutex_serial); selrig->set_vox_gain(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_vox_anti() { pthread_mutex_lock(&mutex_serial); selrig->set_vox_anti(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_vox_hang() { pthread_mutex_lock(&mutex_serial); selrig->set_vox_hang(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_vox_onoff() { pthread_mutex_lock(&mutex_serial); selrig->set_vox_onoff(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_compression() { pthread_mutex_lock(&mutex_serial); selrig->set_compression(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_mon_vol() { pthread_mutex_lock(&mutex_serial); selrig->set_mon_vol(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_tuner_bypass() { pthread_mutex_lock(&mutex_serial); selrig->tuner_bypass(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_enable_xmtr() { pthread_mutex_lock(&mutex_serial); selrig->enable_xmtr(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_enable_tloop() { pthread_mutex_lock(&mutex_serial); selrig->enable_tloop(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_nb_level() { pthread_mutex_lock(&mutex_serial); // progStatus.tt550_nb_level = cbo_tt550_nb_level->index(); selrig->set_nb_level(); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_use_line_in() { pthread_mutex_lock(&mutex_serial); if (progStatus.tt550_use_line_in) selrig->set_mic_line(0); else selrig->set_mic_gain(progStatus.mic_gain); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_setXmtBW() { pthread_mutex_lock(&mutex_serial); selrig->set_bwA(selrig->bwA); pthread_mutex_unlock(&mutex_serial); } void cb_tt550_cw_qsk() { pthread_mutex_lock(&mutex_serial); selrig->set_cw_qsk(); pthread_mutex_unlock(&mutex_serial); } //====================================================================== // data strings captured from TenTec Windows control program for Pegasus //====================================================================== /* Pegasus Control Program Startup, Query and Close Sequences ========================================================== ========================= start program ====================================== WRITE Length 3: 58 58 0D "XX" READ Length 2: 0D 0D READ Length 14: 20 20 52 41 44 49 4F 20 53 54 41 52 54 0D " RADIO START" WRITE Length 3: 3F 56 0D "?V" version? READ Length 13: 56 45 52 20 31 32 39 31 2D 35 33 38 0D "VER 1291.538" WRITE Length 7: 4D 31 31 0D "M11" mode - USB / USB 50 2B 0D "P+" power = 16.8 watts WRITE Length 28: 47 31 0D "G1" agc - slow 4E 51 5C 0A A9 67 70 0D "N...." Receive tuning factor 54 51 5C 0A A9 12 20 0D "T...." Transmit tuning factor 57 0A 0D "W." Width 3000 56 3E 0D "V." Volume 24 4C 00 0D "L0" Line out - 0, full output WRITE Length 3: 50 2B 0D "P+" power = 16.8 watts WRITE Length 3: 4A 29 0D "J." sidetone volume = 16 WRITE Length 13: 4F 31 01 00 0D "O1." select line in, gain factor = 1 55 47 0F 0D "UG." Vox gain = 15 55 48 0F 0D "UH." Vox hang = 15 WRITE Length 16: 55 41 5D 0D "UA." Antivox = 36 55 30 0D "U0" Vox OFF 48 00 0D "H." Audio monitor volume = 0 23 32 0D "#2" Disable 'T' loop 23 31 0D "#1" Enable transmitter WRITE Length 26: 43 0A 0D "C." Transmit filter width = 3000 23 36 0D "#6" Enable keyer 53 00 0D "S." Squelch = 0, OFF 52 0F 0D "R." UNKNOWN 45 01 1F 03 5D 01 1F 0D "E...." Keyer timing 44 00 0D "D." Noise blanker = 0, OFF 59 00 0D "Y." Speech processor = 0, OFF WRITE Length 8: 55 51 00 0D "UQ." set CW QSK = 0..255 55 54 00 0D "UT." set AUX TX HANG = 0..255 (aux T/R delay) ============================ smeter query ====================================== WRITE Length 3: 3F 53 0D "?S" read smeter READ Length 6: 53 30 39 31 42 0D "S...." smeter value ============================== close program ==================================== WRITE Length 3: 56 00 0D "V0" volume = ZERO WRITE Length 3: 4C 3F 0D "L." Line out = 63, MINIMUM unsigned char datastream[] = { 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0xFF, 0xFF, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x21, 0x00, 0x01, 0x00, 0x0D, 0x80 }; */ flrig-1.3.24/src/rigs/IC706MKIIG.cxx0000644000175000017500000001110312562731647013426 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC706MKIIG.h" //============================================================================= // IC-706MKIIG // const char IC706MKIIGname_[] = "IC-706MKIIG"; const char *IC706MKIIGmodes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "WFM", NULL}; const char IC706MKIIG_mode_type[] = { 'L', 'U', 'U', 'L', 'L', 'U', 'U'}; //const char *IC706MKIIG_widths[] = { "WIDE", "NARR", NULL}; const char *IC706MKIIG_widths[] = { "n/a", NULL}; static int IC706MKIIG_bw_vals[] = { 1, WVALS_LIMIT}; RIG_IC706MKIIG::RIG_IC706MKIIG() { name_ = IC706MKIIGname_; modes_ = IC706MKIIGmodes_; bandwidths_ = IC706MKIIG_widths; bw_vals_ = IC706MKIIG_bw_vals; _mode_type = IC706MKIIG_mode_type; comm_baudrate = BR19200; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = false; comm_rtsptt = false; comm_dtrptt = false; def_freq = freqA = freqB = A.freq = B.imode = 14070000; def_mode = modeA = modeB = A.imode = B.imode = 1; def_bw = bwA = bwB = A.iBW = B.iBW = 0; has_smeter = has_mode_control = has_attenuator_control = true; defaultCIV = 0x58; adjustCIV(defaultCIV); precision = 1; ndigits = 9; }; //============================================================================= void RIG_IC706MKIIG::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\x00'; cmd.append(post); waitFB("select A"); } void RIG_IC706MKIIG::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\x01'; cmd.append(post); waitFB("select B"); } long RIG_IC706MKIIG::get_vfoA () { cmd = pre_to; cmd += '\x03'; cmd.append( post ); string resp = pre_fm; resp += '\x03'; if (waitFOR(11, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) freqA = fm_bcd_be(&replystr[p+5], 10); } return freqA; } void RIG_IC706MKIIG::set_vfoA (long freq) { freqA = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo A"); } long RIG_IC706MKIIG::get_vfoB () { cmd = pre_to; cmd += '\x03'; cmd.append( post ); string resp = pre_fm; resp += '\x03'; if (waitFOR(11, "get vfo B")) { size_t p = replystr.rfind(resp); if (p != string::npos) freqB = fm_bcd_be(&replystr[p+5], 10); } return freqB; } void RIG_IC706MKIIG::set_vfoB (long freq) { freqB = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo B"); } void RIG_IC706MKIIG::set_split(bool b) { cmd = pre_to; cmd += '\x0F'; cmd += b ? '\x01' : '\x00'; cmd.append( post ); waitFB("set split"); } void RIG_IC706MKIIG::set_modeA(int val) { modeA = val; cmd = pre_to; cmd += '\x06'; cmd += val > 5 ? val + 2 : val; cmd += bwA; cmd.append( post ); waitFB("set mode A"); } int RIG_IC706MKIIG::get_modeA() { cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); if (p != string::npos) { modeA = replystr[p+5]; if (modeA > 6) modeA -= 2; // bwA = replystr[p+6]; } } return modeA; } int RIG_IC706MKIIG::get_modetype(int n) { return _mode_type[n]; } /* void RIG_IC706MKIIG::set_bwA(int val) { bwA = val; set_modeA(modeA); } int RIG_IC706MKIIG::get_bwA() { return bwA; } */ void RIG_IC706MKIIG::set_attenuator(int val) { cmd = pre_to; cmd += '\x11'; cmd += val ? '\x20' : '\x00'; cmd.append( post ); waitFB("set att"); } int RIG_IC706MKIIG::get_smeter() { cmd = pre_to; cmd.append("\x15\x02"); cmd.append( post ); string resp = pre_fm; resp.append("\x15\x02"); if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return -1; } flrig-1.3.24/src/rigs/rigbase.cxx0000644000175000017500000002011212642041360013512 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "rigbase.h" #include "util.h" #include "debug.h" #include "rig_io.h" #include "support.h" const char *szNORIG = "NONE"; const char *szNOMODES[] = {"LSB", "USB", NULL}; const char *szNOBWS[] = {"NONE", NULL}; const char *szDSPLO[] = {"NONE", NULL}; const char *szDSPHI[] = {"NONE", NULL}; const char *szdsptooltip = "dsp tooltip"; const char *szbtnlabel = " "; const int ibw_val = -1; static GUI basewidgets[] = { {NULL, 0, 0} }; rigbase::rigbase() { name_ = szNORIG; modes_ = szNOMODES; bandwidths_ = szNOBWS; dsp_SL = szDSPLO; SL_tooltip = szdsptooltip; SL_label = szbtnlabel; dsp_SH = szDSPHI; SH_tooltip = szdsptooltip; SH_label = szbtnlabel; bw_vals_ = &ibw_val; widgets = basewidgets; serloop_timing = 200; // msec, 5x / second stopbits = 2; CIV = 0; defaultCIV = 0; USBaudio = false; has_xcvr_auto_on_off = comm_echo = has_vfo_adj = has_rit = has_xit = has_bfo = has_power_control = has_volume_control = has_mode_control = has_bandwidth_control = has_dsp_controls = has_micgain_control = has_mic_line_control = has_auto_notch = has_notch_control = has_noise_control = has_noise_reduction_control = has_noise_reduction = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = has_swr_control = has_alc_control = has_rf_control = has_sql_control = has_data_port = restore_mbw = has_extras = has_nb_level = has_agc_level = has_cw_wpm = has_cw_vol = has_cw_spot = has_cw_spot_tone = has_cw_qsk = has_cw_break_in = has_cw_delay = has_cw_weight = has_cw_keyer = has_vox_onoff = has_vox_gain = has_vox_anti = has_vox_hang = has_vox_on_dataport = has_compression = has_compON = use_line_in = has_bpf_center = has_special = has_ext_tuner = has_smeter = has_power_out = has_split = has_split_AB = has_a2b = has_band_selection = has_get_info = has_getvfoAorB = false; data_type = BINARY; A.freq = 14070000L; A.imode = 1; A.iBW = 0; B.freq = 14070000L; B.imode = 1; B.iBW = 0; inuse = onA; precision = 1; ndigits = 9; can_change_alt_vfo = false; freqA = 14070000L; modeA = 1; bwA = 0; freqB = 14070000L; modeB = 1; bwB = 0; def_freq = 14070000L; def_mode = 1; def_bw = 0; bpf_center = 0; pbt = 0; max_power = 100; active_mode = 0; // wbx if_shift_min = -1500; if_shift_max = 1500; if_shift_step = 10; if_shift_mid = 0; } string rigbase::to_bcd_be(long freq, int len) { unsigned char a; int numchars = len / 2; string bcd = ""; if (len & 1) numchars ++; for (int i = 0; i < numchars; i++) { a = 0; a |= freq % 10; freq /= 10; a |= (freq % 10)<<4; freq /= 10; bcd += a; } return bcd; } string rigbase::to_bcd(long freq, int len) { string bcd_be = to_bcd_be(freq, len); string bcd = ""; int bcdlen = bcd_be.size(); for (int i = bcdlen - 1; i >= 0; i--) bcd += bcd_be[i]; return bcd; } long rigbase::fm_bcd (char *bcd, int len) { int i; long f = 0; int numchars = len/2; if (len & 1) numchars ++; for (i = 0; i < numchars; i++) { f *=10; f += (bcd[i] >> 4) & 0x0F; f *= 10; f += bcd[i] & 0x0F; } return f; } long rigbase::fm_bcd_be(char *bcd, int len) { char temp; int numchars = len/2; if (len & 1) numchars++; for (int i = 0; i < numchars / 2; i++) { temp = bcd[i]; bcd[i] = bcd[numchars -1 - i]; bcd[numchars -1 - i] = temp; } return fm_bcd(bcd, len); } string rigbase::to_binary_be(long freq, int len) { static string bin = ""; for (int i = 0; i < len; i++) { bin += freq & 0xFF; freq >>= 8; } return bin; } string rigbase::to_binary(long freq, int len) { static string bin = ""; string bin_be = to_binary_be(freq, len); int binlen = bin_be.size(); for (int i = binlen - 1; i >= 0; i--) bin += bin_be[i]; return bin; } long rigbase::fm_binary(char *binary, int len) { int i; long f = 0; for (i = 0; i < len; i++) { f *= 256; f += (unsigned char)binary[i]; } return f; } long rigbase::fm_binary_be(char *binary_be, int len) { unsigned char temp; int numchars = len/2; if (len & 1) numchars++; for (int i = 0; i < numchars / 2; i++) { temp = binary_be[i]; binary_be[i] = binary_be[numchars -1 - i]; binary_be[numchars -1 - i] = temp; } return fm_binary(binary_be, len); } string rigbase::to_decimal_be(long d, int len) { static string sdec_be; sdec_be.clear(); for (int i = 0; i < len; i++) { sdec_be += (char)((d % 10) + '0'); d /= 10; } return sdec_be; } string rigbase::to_decimal(long d, int len) { static string sdec; sdec.clear(); string sdec_be = to_decimal_be(d, len); int bcdlen = sdec_be.size(); for (int i = bcdlen - 1; i >= 0; i--) sdec += sdec_be[i]; return sdec; } long rigbase::fm_decimal(char *decimal, int len) { long d = 0; for (int i = 0; i < len; i++) { d *= 10; d += decimal[i] - '0'; } return d; } long rigbase::fm_decimal_be(char *decimal_be, int len) { unsigned char temp; int numchars = len/2; if (len & 1) numchars++; for (int i = 0; i < numchars / 2; i++) { temp = decimal_be[i]; decimal_be[i] = decimal_be[numchars -1 - i]; decimal_be[numchars -1 - i] = temp; } return fm_decimal(decimal_be, len); } int rigbase::waitN(size_t n, int timeout, const char *sz, int pr) { char sztemp[50]; string returned = ""; string tosend = cmd; int cnt = 0; int waited = 0; size_t num = n + cmd.length(); int delay = num * 11000.0 / RigSerial.Baud() + progStatus.use_tcpip ? progStatus.tcpip_ping_delay : 0; replystr.clear(); if(!progStatus.use_tcpip && !RigSerial.IsOpen()) { snprintf(sztemp, sizeof(sztemp), "TEST %s", sz); showresp(WARN, pr, sztemp, tosend, replystr); return 0; } sendCommand(tosend, 0); MilliSleep(delay); returned = ""; for ( cnt = 0; cnt < timeout / 10; cnt++) { readResponse(); returned.append(replystr); if (returned.length() >= n) { replystr = returned; waited = cnt * 10 + delay; snprintf(sztemp, sizeof(sztemp), "%s OK %d ms", sz, waited); showresp(WARN, pr, sztemp, cmd, returned); return replystr.length(); } MilliSleep(10); Fl::awake(); } replystr = returned; waited = timeout + delay; snprintf(sztemp, sizeof(sztemp), "%s failed %d ms", sz, waited); showresp(ERR, pr, sztemp, cmd, returned); return 0; } int report_level = INFO; int rigbase::wait_char(int ch, size_t n, int timeout, const char *sz, int pr) { char sztemp[50]; string returned = ""; string tosend = cmd; int cnt = 0; int waited = 0; size_t num = n + cmd.length(); int delay = num * 11000.0 / RigSerial.Baud() + progStatus.use_tcpip ? progStatus.tcpip_ping_delay : 0; replystr.clear(); if(!progStatus.use_tcpip && !RigSerial.IsOpen()) { snprintf(sztemp, sizeof(sztemp), "TEST %s", sz); showresp(report_level, pr, sztemp, tosend, replystr); return 0; } sendCommand(tosend, 0); MilliSleep(delay); returned = ""; for ( cnt = 0; cnt < timeout / 10; cnt++) { readResponse(); returned.append(replystr); if (returned.find(ch) != string::npos) { replystr = returned; waited = cnt * 10 + delay; snprintf(sztemp, sizeof(sztemp), "%s OK %d ms", sz, waited); showresp(report_level, pr, sztemp, cmd, returned); return replystr.length(); } MilliSleep(10); Fl::awake(); } replystr = returned; waited = timeout + delay; snprintf(sztemp, sizeof(sztemp), "%s failed %d ms", sz, waited); showresp(ERR, pr, sztemp, cmd, returned); return 0; } flrig-1.3.24/src/rigs/PCR1000.cxx0000644000175000017500000010602012562731647013045 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- /* * Driver for PCR-1000 April 2012, Brian Miezejewski, k5hfi */ /* Todo: * * 1) Need on/off button to turn the radio on and off? * 2) Up the baud rate to 37800 after connect * 3) Support for fast mode. * 4) Scan support for scanning between a frequency pair * 5) Scan support for scanning a list of frequencies stored in flrig. * 6) Implement band scope. * 7) BFO support? * */ /* Notes: * The Icom PCR-1000 differs for most of the other rigs controlled by flrig in * that settings do not change at the rig, they are all controlled by flrig. There is * no reason to poll for frequency, volume, mode, etc., they simply can't change on their own. * On the other hand, things like s-meter reading do change, but the PCR-1000 will send these * with no poll needed when the receiver is in "fast" mode. * * Note that while the PCR-1000 does not have a second VFO, we have virtualized a second * vfo in the PCR-1000 flrig implementation. Each VFO stores its frequency, mode, and bandwidth. * The FREQMODE variable is used to store the VFO states. */ #include "config.h" #include "PCR1000.h" #include "support.h" const char RIG_PCR1000::name[] = "PCR-1000"; // mode array Index Values :- 0 1 2 3 4 5 const char *RIG_PCR1000::modes[] = { "LSB", "USB", "AM", "CW", "NFM", "WFM", NULL}; const char RIG_PCR1000::mode_chr[] = { '0', '1', '2', '3', '5', '6' }; const char RIG_PCR1000::mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'U' }; // band width array Index Values :- 0 1 2 3 4 const char *RIG_PCR1000::band_widths[] = { "2.8k","6k","15k","50k","230k",NULL}; static int PCR1000_bw_vals[] = {1,2,3,4,5,WVALS_LIMIT}; //---------------------------------------------------------------------- // Array used for the conversion of hex values to a character string const char RIG_PCR1000::hex_chars[] = { '0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F' } ; //---------------------------------------------------------------------- char RIG_PCR1000::volume_command[] = "J40XX\r\n" ; char RIG_PCR1000::squelch_command[] = "J41XX\r\n" ; char RIG_PCR1000::if_shift_command[] = "J43XX\r\n" ; const char RIG_PCR1000::noise_off_command[] = "J4600\r\n" ; const char RIG_PCR1000::noise_on_command[] = "J4601\r\n" ; const char RIG_PCR1000::att_off_command[] = "J4700\r\n" ; const char RIG_PCR1000::att_on_command[] = "J4701\r\n" ; char RIG_PCR1000::check_power_command[] = "H1?" ; char RIG_PCR1000::power_on_command[] = "H101\r\n" ; char RIG_PCR1000::power_off_command[] = "H100\r\n" ; const char RIG_PCR1000::get_smeter_command[] = "I1?" ; //---------------------------------------------------------------------- //---------------------------------------------------------------------- static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; //---------------------------------------------------------------------- /* * A PCR-1000 will start issuing repeating H100 to indicate its status as * off as soon as you connect to it. It will start at 9600-n-1 and uses rts/cts for * transaction control. */ void RIG_PCR1000::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; modes_ = modes; bandwidths_ = band_widths; bw_vals_ = PCR1000_bw_vals; selectA(); // Lets see if the radio is turned on. sendCommand(check_power_command,6); showresp(WARN, ASC, "Check Power", check_power_command , replystr); // If the radio is turned off, turn it on. if(replystr.rfind("H100")) { sendCommand(power_on_command,6); showresp(WARN, ASC, "Power ON", power_on_command , replystr); } // Set the radio with the default values set_volume_control(current_volume) ; set_squelch(sql); RIG_DEBUG = true; } //---------------------------------------------------------------------- RIG_PCR1000::RIG_PCR1000() : current_vfo(A) { // current_vfo = A ; name_ = name; modes_ = modes; bandwidths_ = band_widths; widgets = rig_widgets; comm_baudrate = BR9600; stopbits = 1; comm_retries = 2; comm_wait = 50; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = false; comm_rtsptt = false; comm_dtrptt = false; // Defaults. A.imode = 1; A.freq = 14070000L; A.iBW = 0 ; B.imode = 1; B.freq = 14070000L; B.iBW = 0 ; sql = 127 ; // Set squelch to a reasonable value if_shift = 0 ; // IF shift off attenuator = 0 ; // Attenuator is set to off noise = 0 ; // Noise blanker to off current_volume = 25 ; // Set volume to make at least a little noise, otherwise there is no // indication when the radio is switched on. has_micgain_control = has_notch_control = has_ifshift_control = has_swr_control = false; has_smeter = has_bandwidth_control = has_volume_control = has_mode_control = has_sql_control = has_noise_control = has_attenuator_control = has_ifshift_control = true; precision = 10 ; ndigits = 9 ; } //---------------------------------------------------------------------- void RIG_PCR1000::shutdown() { // Turn off the radio sendCommand(power_off_command,6); showresp(WARN, ASC, "Power ON", power_on_command , replystr); } //---------------------------------------------------------------------- /* * Set the frequency in the current mode command */ void RIG_PCR1000::setFreqModeBW(FREQMODE &freqMode) { RIG_PCR1000::freq_cmd myComm = { {'K','0'}, {'0','0','0','7','2','0','0','0','0','0'}, {'0','0'}, {'0','0'}, {'0','0','\r','\n','\0'} } ; // Set the mode myComm.mode[1] = mode_chr[ freqMode.imode ] ; // Set the frequency in the selected mode command long freq = freqMode.freq ; for( int pos = 9 ; pos >= 0 ; pos--,freq /= 10 ) { myComm.frequency[pos] = '0'+(freq%10) ; } // Set the band width myComm.band_width[1] = '0'+ freqMode.iBW ; // printf("Freq:%s",myComm.command); sendCommand(myComm.command,5); showresp(WARN, ASC, "set vfo", myComm.command, replystr); } //---------------------------------------------------------------------- /* * The PCR-1000 cannot change its frequency so it is always whatever we last set it to */ //---------------------------------------------------------------------- void RIG_PCR1000::set_vfoA (long freq) { freqA = A.freq = freq; setFreqModeBW(A) ; } long RIG_PCR1000::get_vfoA () { return A.freq; } //---------------------------------------------------------------------- void RIG_PCR1000::set_vfoB (long freq) { freqB = B.freq = freq; setFreqModeBW(B) ; } long RIG_PCR1000::get_vfoB () { return B.freq; } //====================================================================== // Some utility functions //====================================================================== /* * This method converts a character to its hex values, i.e. * '0' = 0 * '5' = 5 * 'A' = 10 * */ int RIG_PCR1000::hexTo(const char c) const { return ( c <= '9') ? c - '0' : c - 'A' + 10 ; } /* * This method sets the value of ival into the first 2 characters in cptr, i.e. * 17 is converted to "11" * 37 is converted to "25" * */ void RIG_PCR1000::set2Hex(int ival, char *cptr) { cptr[0] = hex_chars[ival / 16] ; cptr[1] = hex_chars[ival % 16] ; } //---------------------------------------------------------------------- int RIG_PCR1000::get_smeter() { // returns 0-100 int ret = sendCommand(get_smeter_command,6) ; showresp(WARN, ASC, "S meter", get_smeter_command, replystr); ret = hexTo(replystr.c_str()[3]) * 16 + hexTo(replystr.c_str()[4]) ; return (int)((float)ret * ( 100.0 / 255.0 ) ) ; } //---------------------------------------------------------------------- // Volume control return (rig sends back 0 .. 255) int RIG_PCR1000::get_volume_control() { return current_volume ; } //---------------------------------------------------------------------- void RIG_PCR1000::set_volume_control(int val) // 0 .. 100 { current_volume = val ; int ival = (int)(val * 2.55); // 0 .. 255 set2Hex( ival, &(volume_command[3])) ; sendCommand(volume_command, 5); showresp(WARN, ASC, "set volume", volume_command, replystr); } //====================================================================== // Band width commands //====================================================================== void RIG_PCR1000::set_bwA(int val) { A.iBW = bwA = val; setFreqModeBW(A); } int RIG_PCR1000::get_bwA() { return A.iBW ; } void RIG_PCR1000::set_bwB(int val) { B.iBW = bwB = val; setFreqModeBW(B); } int RIG_PCR1000::get_bwB() { return B.iBW ; } //====================================================================== // mode commands //====================================================================== void RIG_PCR1000::set_modeA(int val) { modeA = A.imode = val ; setFreqModeBW(A); } //---------------------------------------------------------------------- int RIG_PCR1000::get_modeA() { return A.imode; } //---------------------------------------------------------------------- void RIG_PCR1000::set_modeB(int val) { modeB = B.imode = val ; setFreqModeBW(B); } //---------------------------------------------------------------------- int RIG_PCR1000::get_modeB() { return B.imode; } //---------------------------------------------------------------------- int RIG_PCR1000::get_modetype(int n) { return mode_type[n]; } //====================================================================== // mode commands //====================================================================== //---------------------------------------------------------------------- void RIG_PCR1000::selectA() { current_vfo = A ; } //---------------------------------------------------------------------- void RIG_PCR1000::selectB() { current_vfo = B ; } //---------------------------------------------------------------------- void RIG_PCR1000::A2B() { B.freq = A.freq ; B.iBW = A.iBW ; B.imode = A.imode ; B.src = A.src ; } //---------------------------------------------------------------------- void RIG_PCR1000::swapAB() { FREQMODE T ; T.freq = B.freq ; T.iBW = B.iBW ; T.imode = B.imode ; T.src = B.src ; B.freq = A.freq ; B.iBW = A.iBW ; B.imode = A.imode ; B.src = A.src ; A.freq = T.freq ; A.iBW = T.iBW ; A.imode = T.imode ; A.src = T.src ; } //====================================================================== // Squelch commands //====================================================================== //---------------------------------------------------------------------- void RIG_PCR1000::set_squelch(int val) { sql = val ; set2Hex( val, &(squelch_command[3])) ; sendCommand(squelch_command, 5); showresp(WARN, ASC, "S meter", squelch_command, replystr); } int RIG_PCR1000::get_squelch() { return sql ; } //====================================================================== // IF shift commands //====================================================================== //---------------------------------------------------------------------- /* * Since the PCR1000 IF shift shifts in 10 hertz increments we display and store * the actual shift. Just dived by 10 and and 80 before its set. * */ void RIG_PCR1000::set_if_shift(int val) { if_shift = val ; set2Hex( val/10 + 80, &(if_shift_command[3])) ; sendCommand(if_shift_command, 5); showresp(WARN, ASC, "S meter", if_shift_command, replystr); } bool RIG_PCR1000::get_if_shift(int &val) { val = if_shift ; return (if_shift == if_shift_mid)?false:true ; } //====================================================================== // Attenuator commands //====================================================================== //---------------------------------------------------------------------- void RIG_PCR1000::set_attenuator(int val) { if( val != attenuator ) { if( val ) { // Turn att on sendCommand(att_on_command, 5); showresp(WARN, ASC, "S meter", att_on_command, replystr); attenuator = 1 ; } else { // Turn att off sendCommand(att_off_command, 5); showresp(WARN, ASC, "S meter", att_off_command, replystr); attenuator = 0 ; } } } int RIG_PCR1000::get_attenuator() { return attenuator ; } //====================================================================== // Noise reduction commands (Doesn't do much on PCR-1000 :-( ) //====================================================================== //---------------------------------------------------------------------- void RIG_PCR1000::set_noise(bool on) { if( on ) { // Turn on sendCommand(noise_on_command, 5); showresp(WARN, ASC, "Noise Reduction ON", noise_on_command, replystr); noise = 1 ; } else { // Turn off sendCommand(noise_off_command, 5); showresp(WARN, ASC, "Noise Reduction OFF", noise_off_command, replystr); noise = 0 ; } } int RIG_PCR1000::get_noise() { return noise ; } //====================================================================== // Command structures for the PCR1000 // // From http://www.gm4jjj.co.uk/PCR1000.html //====================================================================== /* PCR1000 Command List The ICOM PCR1000 Computer Controlled Radio Command Protocol has not been published by ICOM, however I have compiled this list from various sources. Warning: I take no responsibility for the accuracy of any of the following, you use it at your own risk! - Make sure you have a backup of your EEPROM before trying any experimentation! Updated 10 JAN 2002 All commands are sent is ASCII in the format: Command + CR + LF CR = chr$(13) LF = chr$(10) EXCEPT when in AUTOUPDATE mode (see G3xx command), when NO CR + LF IS REQUIRED after the Command Note that no G0XX is returned in autoupdate mode Some responses from the PCR1000 have an added character at the end of the response string. It is usually a duplicate of the last character of the string and can be discarded. (A bug, I suppose) DTR and RTS set high by software. When radio is first turned on, the software send the following commands: initial boot up at 9600 Baud. H101 Turn Radio ON G105 Set Baud rate to 38400 Baud G300 Set Autoupdate to OFF H1? Is radio still ON? Responds H100 for OFF, H101 for ON H101 Radio ON command G4? Possible Inquire Firmware Revision? US and UK version returns G410 G301 Auto Update ON GE? Inquire Country/Region returns GE09 in FCC USA version and GE02 in EUR/AUS version GD? Is DSP Installed? Returns GD00 if NO, GD01 if Yes K00857937500050200 Set Frequency and mode and filter J4100 Set Squelch J5100 See Tone Squelch J5000 Set VSC off J4380 Set IF Shift to mid range J4500 Set AGC OFF J4600 Set Noise Blanker OFF J4700 Set Attenuator OFF J4A80 Not known LD82000 Set Tracking Filter to Automatic J8001J8101J8200J8301 DSP Packet. See DSP commands below J4000 Set Volume ME0000120050100012500 Set Bandscope ON to +- 200 Khz and 12.5 Khz step ' This is returned when Bandscope first turned ON NE100000000000000000000000000000000000 NE110000000000000000000000000000000000 NE120000000000000000000000000000000000 NE130000000000000000000000000000000000 NE140000000000000000000000000000000000 NE150000000000000000000000000000000000 NE160000000000000000000000000000000000 NE170000000000000000000000000000000000 NE190000000000000000000000000000000000 NE1A0000000000000000000000000000000000 NE1B0000000000000000000000000000000000 NE1C0000000000000000000000000000000000 NE1D0000000000000000000000000000000000 NE1E0000000000000000000000000000000000 NE1F0000000000000000000000000000000000 ___________________________________________________ Command Status: G0xx where xx = 00 when command is Good, 01 when command is Bad Signal Update: G3xx 00 = off (Program needs to Poll status) See I1? to I3? below 01 = on (Radio sends Status when a parameter changes) See Ix? commands 02 = binary mode (Update off) 03 = binary mode (Update on) Inquire signal information. These commands can be Polled or are returned as a packet if Autoupdate is ON (See G301) and one of the values changes. I0? Squelch Status returns 04 = Closed, 07 = Open I1? Signal Strength returns 00 to FF I2? Signal Centering returns 00 = Low, 80 = Centered, FF = High I3? DTMF Tone returns I300 if NO DTMF tone present returns I31 + ASCII digit 0 to F (* = E, # = F) Alive: H1? Is radio alive? Radio responds H101 (on) or H100 (off) Volume: J40xx xx Range 00 to FF Squelch: J41xx xx Range 00 to FF IF Shift: J43xx xx Range 00 to FF AGC: J45xx xx = 01 for ON, 00 for OFF NB: J46xx xx = 01 for ON, 00 for OFF Attenuator: J47xx xx = 01 for ON, 00 for OFF VSC: J50xx xx = 01 for ON, 00 for OFF T Squelch on = J51tt (tt=tone , 01=67Hz, 33=254.1Hz) T Squelch off = J5100 Frequency: K0GMMMKKKHHHmmff00 where K0 G MMM KKK HHH mm ff 00 G=GHz MMM=MHz KKK=KHz HHH=Hz mm = mode ff = Filter 00 = Padding Bytes (always there) Mode Settings: 00 = LSB 01 = USB 02 = AM 03 = CW 04 = Not used or Unknown 05 = NFM 06 = WFM Filter Settings: 00 = 3 Khz (actually 2.8 Khz) (CW USB LSB AM) 01 = 6 Khz (CW USB LSB AM NFM) 02 = 15 Khz (AM NFM) 03 = 50 Khz (AM NFM WFM) 04 = 230 Khz (WFM) Radio Replies I0xx Squelch Status xx=04 Closed, 07 Open I1ss ss is Signal Strength 00 to FF I200 Signal Frequency < Display Frequency I280 Signal Frequency = Display Frequency I2FF Signal Frequency > Display Frequency I300 No DTMF Present I31t t is DTMF tone (* = E, # = F) Baud Rate G1xx where xx is: 00 = 300 01 = 1200 02 = 4800 03 = 9600 04 = 19200 05 = 38400 Signal Update G3xx 00 = off (Program needs to inquire signal strength, DTMF tone, Center, etc) 01 = on (Radio sends signal strength, DTMF tone, etc as needed) 02 = binary mode (Update off) 03 = binary mode (Update on) __________________________________________________________ Icom PCR1000 Band Scope commands. The basic command to turn the bandscope function On is: ME0000120050100012500 + CR + LF The command breaks down this way: ME00001 20050100012500 ME00001 is the preamble. It's always the same. ME00001 20 050100012500 20 is the number of samples. It must be a 2 digit HEX number represented in ASCII. Add leading 0 if necessary. Calculate this number by dividing the Scope Bandwidth by the step size. For example in the +- 200 Khz span the total bandwidth is 400 Khz. If the step size is 12.5 khz then 400/12.5 is 32 or 20 Hex. If you get a non integer answer for the initial division then increment the sample number by 1 or 2 (sample should be an EVEN number). You can arbitrarily set the sample higher(SLIGHTLY) to allow the display to be moved inward from the edges of the scope display. ME0000120 05 0100012500 05 is a sample rate value that determines how fast the scope is swept and in the Icom software is either 05 or 28. This is interpreted as a hex number and must be 2 digits. The practical values for this runs from 01 (very fast and resource intensive) to about 70 (very slow and nearly useless). Putting 00 here locks the PCR1000 and software up. In the Icom software the number of samples determine this value. Sample numbers above 10 hex use 05 and those 10 Hex or lower use 28 Hex. ME000012005 01 00012500 01 This is the On/Off characters. If they are 00 then the bandscope is OFF. If they are 01 the bandscope is ON ME00001200501 00 012500 00 is a padding value and must be there. ME0000120050100 012500 012500 is the step size expressed in HERTZ. It must be 6 digits long, padded with LEADING ZEROS. Examples are 001000 for 1000 hertz (1 Khz), 030000 for 30 Khz and 100000 for 100 Khz. The bandscope accepts values down to at least 10 hertz but the Icom software displays a LIMIT warning at 1 Khz and at 100 Khz. The Band Scope commands appear to be insensitive to mode and bandwidth except for the fact that it doesn't work in USB, LSB or CW. It has been hypothesized that the product detector circuitry is used by the Band Scope. Typical Band Scope Commands: ME00001C8050100001000 +- 100 Khz @ 1 Khz ME0000164050100001000 +- 50 ME0000132050100001000 +- 25 ME00001A0050100002500 +- 200 Khz @ 2.5 Khz ME0000150050100002500 +- 100 ME0000128050100002500 +- 50 ME0000114050100002500 +- 25 ME0000150050100005000 +- 200 Khz @ 5.0 Khz ME0000128050100005000 +- 100 ME0000114050100005000 +- 50 ME000010A280100005000 +- 25 ME0000140050100006250 +- 200 Khz @ 6.25 Khz ME0000120050100006250 +- 100 ME0000110280100006250 +- 50 ME0000108280100006250 +- 25 ME000012E050100009000 +- 200 Khz @ 9.0 Khz ME0000118050100009000 +- 100 ME000010C280100009000 +- 50 ME0000106280100009000 +- 25 ME0000128050100010000 +- 200 Khz @ 10.0 Khz ME0000114050100010000 +- 100 ME000010A280100010000 +- 50 ME0000106280100010000 +- 25 ME0000120050100012500 +- 200 Khz @ 12.5 Khz ME0000110280100012500 +- 100 ME0000110280100012500 +- 50 ME0000108280100012500 +- 25 ME0000114050100020000 +- 200 Khz @ 20.0 Khz ME000010A280100020000 +- 100 ME0000106280100020000 +- 50 ME0000104280100020000 +- 25 ME0000110280100025000 +- 200 Khz @ 25.0 Khz ME0000108280100025000 +- 100 ME0000104280100025000 +- 50 ME0000100280100025000 +- 25 ME000010E280100030000 +- 200 Khz @ 30.0 Khz ME0000108280100030000 +- 100 ME0000104280100030000 +- 50 ME0000100280100030000 +- 25 ME0000108280100050000 +- 200 Khz @ 50.0 Khz ME0000104280100050000 +- 100 ME0000100280100050000 +- 50 Note 00 sample size This is invalid! ME0000104280100100000 +- 200 Khz @ 100.0 Khz ME0000100280100100000 +- 100 Invalid ME0000100280100100000 +- 50 Invalid ********************************************************************** The data is returned in 37 byte packets. The packets begin with the Letters NE1 followed by the 2 digit hex packet number. The Packet numbers run from 00 to F0 (must be 2 digits). Typical packet numbers would be NE100, NE170, NE180 and NE1F0. These numbers are followed by 32 bytes that contain signal level information for EACH sample (16 per packet). Each byte is a hex number (in ascii) that can run from 00 to FF. The bytes in packet NE180 represent the first 16 samples UP from the displayed frequency in ascending order. The bytes in packet NE170 represent the 16 samples BELOW the displayed frequency in descending order. For example the following: NE18020202020202020202020202020202020 NE1 80 20202020202020202020202020202020 NE1 is the fixed preamble NE1 80 20202020202020202020202020202020 80 is the packet number NE180 20 202020202020202020202020202020 20 is the sample signal level (20 Hex) at the displayed frequency NE18020 20 2020202020202020202020202020 This is the next sample level UP from the displayed freq The next 14 values represent the next 14 sample levels. If less samples are needed, the higher sample levels are set to 00. If more then 16 sanple levels are needed Up from the center freq, then the next packet NE190 hold the values. For the following: NE17000000000000000001111111111111111 NE1 7000000000000000001111111111111111 NE1 is the fixed preamble NE1 70 00000000000000001111111111111111 70 is the packet number. Packet 70 is the first packet BELOW the center frequency. NE170000000000000000011111111111111 11 11 This is the first sample level BELOW the center frequency. NE1700000000000000000111111111111 11 11 11 This is the next LOWER sample level and so on. In this example, only 16 (10 Hex) samples were specified. 8 samples are provided here below center freq and the corresponding 8 above center freq would be in the NE180 packet. If more then the 32 samples that can be displayed with NE170 and NE180 were specified then additional packets would be sent. For example if 48(decimal) samples were specified then the following packets would be returned: NE160 would have 8 samples (in the UPPER 8) NE170 would have 16 samples NE180 would have 16 samples NE190 would have 8 samples (in the LOWER 8) Note that they are sent in ascending order from NE160 to NE190. A rough indication of the number of packets needed for a given sample size is (Number of samples)/16 plus 1. If the number is ODD then add 1 more packet. Sample in order sent (This is a continous string): NE1600000000000000000000030180FA61F14 NE1701F2B0C0F7E030C2B85088E080F2B4314 NE1801B8E181830085FEC6603083001143003 NE19001030101012701000000000000000000 When Band Scope is first turned ON or is turned OFF, ALL 16 packets are returned with ALL samples set to 00. ___________________________________________________________ The DSP commands below have to be sent as a packet followed by a Cr + Lf sample packet J8001J8101J820FJ8301 | | is always there and never changes J8001J8101J820FJ8301 | | DSP ON J8100 is DSP Off J8001J8101J820FJ8301 | | ANR on and set to max would be J8200 if off J8001J8101J820FJ8301 | | Notch turned ON J8301 turns notch ON With this in mind here is the DSP Command Set: On startup the software sends GD? Returns GD00 if NO DSP installed Returns GD01 if DSP Installed Autoupdate must be ON (send G301 + cr + lf): J8001 Always the same J81xx where xx is 00 if DSP is OFF and 01 if ON J82xx This is the ANR function (Automatic Noise Reduction) xx is 00 if ANR is OFF. If ON, xx varies from 01 to 0F when you turn a knob on the new DSP Popup panel. J83xx is the Automatic Notch filter. xx is 00 if notch is OFF and 01 if ON. The following data is written to the PCR1000.ini file. DSPON with either 0 or 1 for Off/On DSPANF with either 0 or 1 for Off/On DSPNR with either 0 or 1 for Off/On DSPNRLEVEL with value 0 to 15 for Noise Reduction level ---------------------------------------------------------- COUNTRY/REGION Table GE? (Returns contents of Address 7E of the EEPROM) JAPAN 00 USA 01 EUR/AUS 02 FRA 03 DEN 04 CAN 05 GENE1 06 GENE2 07 FCC JPN 08 FCC USA 09 FCC EUR/AUS 0A FCC FRA 0B FCC DEN 0C FCC CAN 0D FCC GENE1 0E FCC GENE2 OF TRACKING FILTER LD820x xx=00 automatic tracking, Range 01 to FF manual setting of filter EEPROM UNLOCKING Don't play with these unless you have a verified backup of your own PCR-1000 EEPROM contents You need to unlock the protection even to READ the EEPROM contents. The Unlock Codes are: GC01 GCF0 Note the response to both the above commands is G001 Read Command: LD0xx? xx= eeprom address 00 to 7F Replies LD0xxyy yy = data in location xx Write Command: LD0xxyy xx = address yy = data to write Replies G000 if OK To put protection back on again turn the PCR-1000 off and on again. Use the software command H100 or the switch. The baud rate will then return to 9600. Average Values Use these if you have a corrupted EEPROM and no backup Crash Pattern This is what the PCR-1000 produces if it crashes and corrupts the EEPROM EEPROM Locations (DATA IN DECIMAL) ADDRESS AVERAGE CRASHED COMMENTS (HEX) (DEC) (DEC) 00 0 0 RESERVED 01 0 0 RESERVED 02 82 82 CHECK PATTERN 03 88 88 CHECK PATTERN 04 99 128 REFERENCE XTAL SHIFT (CENTRE =128) 05 0 0 RESERVED 06 0 0 RESERVED 07 0 0 RESERVED 08 63 0 FM LEVEL S0 REF-VOLT 09 79 48 FM LEVEL S3 REF-VOLT 0A 95 80 FM LEVEL S5 REF-VOLT 0B 117 112 FM LEVEL S7 REF-VOLT 0C 140 144 FM LEVEL S9 REF-VOLT 0D 166 176 FM LEVEL S9+20 REF-VOLT 0E 188 208 FM LEVEL S9+40 REF-VOLT 0F 210 240 FM LEVEL S9+60 REF-VOLT 10 54 0 WFM LEVEL S0 REF-VOLT 11 67 48 WFM LEVEL S3 REF-VOLT 12 80 80 WFM LEVEL S5 REF-VOLT 13 103 112 WFM LEVEL S7 REF-VOLT 14 126 144 WFM LEVEL S9 REF-VOLT 15 152 176 WFM LEVEL S9+20 REF-VOLT 16 177 208 WFM LEVEL S9+40 REF-VOLT 17 199 240 WFM LEVEL S9+60 REF-VOLT 18 21 0 SCOPE LEVEL S0 REF-VOLT 19 39 48 SCOPE LEVEL S3 REF-VOLT 1A 45 80 SCOPE LEVEL S5 REF-VOLT 1B 55 112 SCOPE LEVEL S7 REF-VOLT 1C 57 144 SCOPE LEVEL S9 REF-VOLT 1D 61 176 SCOPE LEVEL S9+20 REF-VOLT 1E 64 208 SCOPE LEVEL S9+40 REF-VOLT 1F 67 240 SCOPE LEVEL S9+60 REF-VOLT 20 21 115 FM CENTERMETER LOW 21 57 46 FM CENTERMETER HIGH 22 115 115 RESERVED 23 146 146 RESERVED 24 11 166 FM NOISESQL THRESHOLD LEVEL 25 11 36 FM NOISESQL TIGHT LEVEL 26 2 0 FM NOISESQL SETTING T2 27 4 0 FM NOISESQL SETTING T3 28 0 0 RESERVED 29 0 0 RESERVED 2A 96 96 CTCSS-DET JUDGEMENT LEVEL (CLOSE) 2B 160 160 CTCSS-DET JUDGEMENT LEVEL (OPEN) 2C 98 144 BPF0 LEVEL S9 REFERENCE 2D 137 144 BPF1 LEVEL S9 REFERENCE 2E 111 144 BPF2 LEVEL S9 REFERENCE 2F 106 144 BPF3 LEVEL S9 REFERENCE 30 125 144 BPF4 LEVEL S9 REFERENCE 50.02MHZ 31 130 144 BPF4 LEVEL S9 REFERENCE 58.28MHZ 32 129 144 BPF4 LEVEL S9 REFERENCE 58.32MHZ 33 135 144 BPF4 LEVEL S9 REFERENCE 88.02MHZ 34 138 144 BPF4 LEVEL S9 REFERENCE 108.28MHZ 35 138 144 BPF4 LEVEL S9 REFERENCE 108.32MHZ 36 141 144 BPF4 LEVEL S9 REFERENCE 130.02MHZ 37 140 144 BPF4 LEVEL S9 REFERENCE 149.98MHZ 38 118 144 BPF5 LEVEL S9 REFERENCE 150.02MHZ 39 122 144 BPF5 LEVEL S9 REFERENCE 183.28MHZ 3A 121 144 BPF5 LEVEL S9 REFERENCE 183.32MHZ 3B 122 144 BPF5 LEVEL S9 REFERENCE 216.02MHZ 3C 119 144 BPF5 LEVEL S9 REFERENCE 265.68MHZ 3D 117 144 BPF5 LEVEL S9 REFERENCE 265.72MHZ 3E 117 144 BPF5 LEVEL S9 REFERENCE 300.02MHZ 3F 110 144 BPF5 LEVEL S9 REFERENCE 349.98HZ 40 124 144 BPF6 LEVEL S9 REFERENCE 350.02HZ 41 123 144 BPF6 LEVEL S9 REFERENCE 383.28MHZ 42 123 144 BPF6 LEVEL S9 REFERENCE 383.32MHZ 43 125 144 BPF6 LEVEL S9 REFERENCE 433.32MHZ 44 123 144 BPF6 LEVEL S9 REFERENCE 483.28MHZ 45 123 144 BPF6 LEVEL S9 REFERENCE 483.32MHZ 46 121 144 BPF6 LEVEL S9 REFERENCE 558.32MHZ 47 119 144 BPF6 LEVEL S9 REFERENCE 633.28MHZ 48 119 144 BPF6 LEVEL S9 REFERENCE 633.32MHZ 49 116 144 BPF6 LEVEL S9 REFERENCE 699.98MHZ 4A 103 144 BPF7 LEVEL S9 REFERENCE 700.02MHZ 4B 107 144 BPF7 LEVEL S9 REFERENCE 750.02MHZ 4C 110 144 BPF7 LEVEL S9 REFERENCE 799.98MHZ 4D 110 144 BPF7 LEVEL S9 REFERENCE 800.02MHZ 4E 120 144 BPF7 LEVEL S9 REFERENCE 916.68MHZ 4F 119 144 BPF7 LEVEL S9 REFERENCE 916.72MHZ 50 123 144 BPF7 LEVEL S9 REFERENCE 1016.68MHZ 51 122 144 BPF7 LEVEL S9 REFERENCE 1016.72MHZ 52 112 144 BPF7 LEVEL S9 REFERENCE 1166.68MHZ 53 111 144 BPF7 LEVEL S9 REFERENCE 1166.72MHZ 54 110 144 BPF7 LEVEL S9 REFERENCE 1299.98MHZ 55 0 0 RESERVED 56 0 0 RESERVED 57 0 0 RESERVED 58 35 128 BPF4 TUNING PEAK-POINT 50.02MHZ 59 35 128 BPF4 TUNING PEAK-POINT 58.28MHZ 5A 117 128 BPF4 TUNING PEAK-POINT 58.32MHZ 5B 110 128 BPF4 TUNING PEAK-POINT 88.02MHZ 5C 114 128 BPF4 TUNING PEAK-POINT 108.28MHZ 5D 188 128 BPF4 TUNING PEAK-POINT 108.32MHZ 5E 191 128 BPF4 TUNING PEAK-POINT 130.02MHZ 5F 204 128 BPF4 TUNING PEAK-POINT 149.98MHZ 60 70 128 BPF5 TUNING PEAK-POINT 150.02MHZ 61 43 128 BPF5 TUNING PEAK-POINT 183.28MHZ 62 118 128 BPF5 TUNING PEAK-POINT 183.32MHZ 63 101 28 BPF5 TUNING PEAK-POINT 216.02MHZ 64 92 128 BPF5 TUNING PEAK-POINT 265.68MHZ 65 180 128 BPF5 TUNING PEAK-POINT 265.72MHZ 66 173 128 BPF5 TUNING PEAK-POINT 300.02MHZ 67 177 128 BPF5 TUNING PEAK-POINT 349.98MHZ 68 46 128 BPF6 TUNING PEAK-POINT 350.02MHZ 69 32 128 BPF6 TUNING PEAK-POINT 383.28MHZ 6A 113 128 BPF6 TUNING PEAK-POINT 383.32MHZ 6B 95 128 BPF6 TUNING PEAK-POINT 433.32MHZ 6C 83 128 BPF6 TUNING PEAK-POINT 483.28MHZ 6D 156 128 BPF6 TUNING PEAK-POINT 483.32MHZ 6E 132 128 BPF6 TUNING PEAK-POINT 558.32MHZ 6F 112 128 BPF6 TUNING PEAK-POINT 633.28MHZ 70 187 128 BPF6 TUNING PEAK-POINT 633.32MHZ 71 185 128 BPF6 TUNING PEAK-POINT 699.98MHZ 72 75 128 BPF7 TUNING PEAK-POINT 700.02MHZ 73 66 128 BPF7 TUNING PEAK-POINT 750.02MHZ 74 57 128 BPF7 TUNING PEAK-POINT 799.98MHZ 75 146 128 BPF7 TUNING PEAK-POINT 800.02MHZ 76 79 128 BPF7 TUNING PEAK-POINT 916.68MHZ 77 160 128 BPF7 TUNING PEAK-POINT 916.72MHZ 78 122 128 BPF7 TUNING PEAK-POINT 1016.68MHZ 79 194 128 BPF7 TUNING PEAK-POINT 1016.72MHZ 7A 127 128 BPF7 TUNING PEAK-POINT 1166.68MHZ 7B 202 128 BPF7 TUNING PEAK-POINT 1166.72MHZ 7C 170 128 BPF7 TUNING PEAK-POINT 1299.98MHZ 7D 0 0 RESERVED 7E * 7 COUNTRY/REGION (*See Table of values) 7F 2 7 RESERVED Unknowns --------- Still looking for the purpose of the following PCR commands:- LE20050 LE20040 Above used by icom in their EEPROM routines in their software for setting up the radio and also some third party software I have seen. Is this understood or is it just being copied? GCD0 GE07 H800 * see below LD840? LD846? LD84A? * see below LD842 * see below LD844 * see below LD848 LD860 LD862 G4? returns G410 J4A80 If anyone fill in the gaps that would be great! Update:- Some more info has come in! - Thanks to the guys on the PCR-1000 list. There are some questions about the following commands: LD840? (always 0) LD842? (current signal strength) LD844? (centering info?) LD846? (usually 0x60) LD848? (always 0) LD84A? (old LD842?) LD84C? (always 0) LD84E? (always 0) LD860? (always 0) LD862? (always 0) LD864? (always 0) LD842? returns the current signal strength level, same as for I1? LD84A? returns the previous signal strength. I believe this is what the radio uses to determine if the signal strength level has changed (as you probably noticed, it only kicks out a new I1xx message in G301 mode when the signal strength changes). LD844? returns something relevant to frequency. If I set the PCR-1000 to 144.35, NBFM, 6Khz filter, and set my HT for 144.35 Mhz, when I transmit on the HT, this value goes to 0x25. Moving the HT to 144.355 causes the value to increase to a nominal 0x37, and moving the HT to 144.345 causes the value to decrease to a nominal 0x15. Interesting relationship between these values: 0x37 - 0x25 = 0x12, and 0x25 - 0x15 = 0x10. This is 18 decimal and 16 decimal respectively. Two pretty close numbers for shifting +/- 5Khz. I expect this register has something to do with the centering information. I'm not completely sure about this, but every document except 1 has the auto tracking register mis-coded. It's generally listed as LD8200 to turn off, and LD8201 to set to manual. It's actually LD82000 (note three 0's) to turn off, and can be varied from LD82001 to LD820FF. I don't know exactly what the tracking thingie does, but it has a pronounced affect turning it off or on. - Editor's note this has now been corrected in this document, it is the tracking of the RF stage with frequency I believe. There's also a mention of H800 in the documents. H8 will accept values from 00 to FF, and has an odd effect on the audio. Values greater than or equal to 0x81 cause a very brief (100ms or so) drop out on the audio. Values 0x80 and below don't do this. Interestingly enough, when G301 is in effect, changing H8 causes an H9 message to be output. H9 can be read with the H9? command. I've only seen 0x00, 0x01, and 0x10 be reported back. The following command sequence seems to have something to do with squelch and signal strength. H800; J4180; H881; H9? (reports H901), J4100. Now the squelch should be open, but isn't. Setting H800 will open the squelch again. Now do H8FF; H9? Audio opens, and H9? reports H910. Curious. All my experimenting is in NBFM mode, so perhaps some of these other registers come into play in other modes. Something else that's not mentioned in any of the documentation is that when G301 mode is on, commands don't generate a response unless they're interrogative (i.e. GD? or H1?). */ flrig-1.3.24/src/rigs/TS2000.cxx0000644000175000017500000006611212646444222012750 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "TS2000.h" #include "support.h" static const char TS2000name_[] = "TS-2000"; static const char *TS2000modes_[] = { "LSB", "USB", "CW", "FM", "AM", "FSK", "CW-R", "FSK-R", NULL}; static const char TS2000_mode_chr[] = { '1', '2', '3', '4', '5', '6', '7', '9' }; static const char TS2000_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'L', 'L', 'U' }; static const char *TS2000_empty[] = { "N/A", NULL }; //------------------------------------------------------------------------------ static const char *TS2000_SL[] = { "0", "50", "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", NULL }; static const char *TS2000_CAT_SL[] = { "SL00;", "SL01;", "SL02;", "SL03;", "SL04;", "SL05;", "SL06;", "SL07;", "SL08;", "SL09;", "SL10;", "SL11;" }; static const char *TS2000_SL_tooltip = "lo cut"; static const char *TS2000_SSB_btn_SL_label = "L"; //------------------------------------------------------------------------------ static const char *TS2000_SH[] = { "1400", "1600", "1800", "2000", "2200", "2400", "2600", "2800", "3000", "3400", "4000", "5000", NULL }; static const char *TS2000_CAT_SH[] = { "SH00;", "SH01;", "SH02;", "SH03;", "SH04;", "SH05;", "SH06;", "SH07;", "SH08;", "SH09;", "SH10;", "SH11;" }; static const char *TS2000_SH_tooltip = "hi cut"; static const char *TS2000_SSB_btn_SH_label = "H"; //------------------------------------------------------------------------------ static const char *TS2000_AM_SL[] = { "0", "100", "200", "500", NULL }; static const char *TS2000_AM_SH[] = { "2500", "3000", "4000", "5000" }; //------------------------------------------------------------------------------ static const char *TS2000_CWwidths[] = { "50", "80", "100", "150", "200", "300", "400", "500", "600", "1000", "2000", NULL}; static const char *TS2000_CWbw[] = { "FW0050;", "FW0080;", "FW0100;", "FW0150;", "FW0200;", "FW0300;", "FW0400;", "FW0500;", "FW0600;", "FW1000;", "FW2000;" }; //------------------------------------------------------------------------------ static const char *TS2000_FSKwidths[] = { "250", "500", "1000", "1500", NULL}; static const char *TS2000_FSKbw[] = { "FW0250;", "FW0500;", "FW1000;", "FW1500;" }; //------------------------------------------------------------------------------ static GUI rig_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)btnNotch, 214, 125, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 54, 165, 368 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; // mid range on loudness static string menu012 = "EX01200004"; void RIG_TS2000::initialize() { rig_widgets[0].W = btnVol; rig_widgets[1].W = sldrVOLUME; rig_widgets[2].W = sldrRFGAIN; rig_widgets[3].W = btnIFsh; rig_widgets[4].W = sldrIFSHIFT; rig_widgets[5].W = btnNotch; rig_widgets[6].W = sldrNOTCH; rig_widgets[7].W = sldrMICGAIN; rig_widgets[8].W = sldrPOWER; menu012.clear(); cmd = "EX0120000;"; // read menu 012 state //might return something like EX01200004; if (wait_char(';', 11, 100, "read ex 012", ASC) == 11) menu012 = replystr; // disable beeps before resetting front panel display to SWR cmd = "EX01200000;"; sendCommand(cmd); select_swr(); // restore state of xcvr beeps // cmd = menu012; // sendCommand(cmd); // get current noise reduction values for NR1 and NR2 string current_nr; cmd = "NR;"; if (wait_char(';', 4, 100, "read current NR", ASC) == 4) current_nr = replystr; cmd = "NR1;"; sendCommand(cmd); cmd = "RL;"; if (wait_char(';', 5, 100, "GET noise reduction val", ASC) == 5) { size_t p = replystr.rfind("RL"); if (p != string::npos) _nrval1 = atoi(&replystr[p+2]); } cmd = "NR2;"; sendCommand(cmd); cmd = "RL;"; if (wait_char(';', 5, 100, "GET noise reduction val", ASC) == 5) { size_t p = replystr.rfind("RL"); if (p != string::npos) _nrval2 = atoi(&replystr[p+2]); } // restore xcvr setting for NR cmd = current_nr; sendCommand(cmd); } void RIG_TS2000::shutdown() { // restore state of xcvr beeps if (menu012.empty()) return; cmd = menu012; sendCommand(cmd); } static bool is_tuning = false; static int skip_get = 2; RIG_TS2000::RIG_TS2000() { // base class values name_ = TS2000name_; modes_ = TS2000modes_; bandwidths_ = TS2000_empty; dsp_SL = TS2000_SL; SL_tooltip = TS2000_SL_tooltip; SL_label = TS2000_SSB_btn_SL_label; dsp_SH = TS2000_SH; SH_tooltip = TS2000_SH_tooltip; SH_label = TS2000_SSB_btn_SH_label; widgets = rig_widgets; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; B.imode = A.imode = 1; B.iBW = A.iBW = 0x8803; B.freq = A.freq = 14070000; can_change_alt_vfo = true; has_power_out = has_swr_control = has_alc_control = has_split = has_split_AB = has_dsp_controls = has_rf_control = has_notch_control = has_auto_notch = has_ifshift_control = has_smeter = has_noise_reduction = has_noise_reduction_control = has_noise_control = has_micgain_control = has_volume_control = has_power_control = has_tune_control = has_attenuator_control = has_preamp_control = has_mode_control = has_bandwidth_control = has_ptt_control = true; rxona = true; precision = 1; ndigits = 9; att_level = 0; preamp_level = 0; _noise_reduction_level = 0; _nrval1 = 2; _nrval2 = 4; is_tuning = false; } // return true iff transceiver is still in tune mode bool RIG_TS2000::tuning() { if (!is_tuning) return false; cmd = "AC;"; if (wait_char(';', 6, 100, "tuning?", ASC) == 6) { if (replystr[4] == '1') return true; } is_tuning = false; skip_get = 2; return is_tuning; } const char * RIG_TS2000::get_bwname_(int n, int md) { static char bwname[20]; if (n > 256) { int hi = (n >> 8) & 0x7F; int lo = n & 0xFF; snprintf(bwname, sizeof(bwname), "%s/%s", (md == LSB || md == USB || md == FM) ? TS2000_SL[lo] : TS2000_AM_SL[lo], (md == LSB || md == USB || md == FM) ? TS2000_SH[hi] : TS2000_AM_SH[hi] ); } else { snprintf(bwname, sizeof(bwname), "%s", (md == CW || md == CWR) ? TS2000_CWwidths[n] : TS2000_FSKwidths[n]); } return bwname; } void RIG_TS2000::selectA() { cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A", cmd, ""); cmd = "FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on A", cmd, ""); rxona = true; } void RIG_TS2000::selectB() { cmd = "FR1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B", cmd, ""); cmd = "FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on B", cmd, ""); rxona = false; } void RIG_TS2000::set_split(bool val) { split = val; if (useB) { if (val) { cmd = "FR1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B", cmd, ""); cmd = "FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on A", cmd, ""); } else { cmd = "FR1;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on B", cmd, ""); cmd = "FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on B", cmd, ""); } rxona = false; } else { if (val) { cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A", cmd, ""); cmd = "FT1;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on B", cmd, ""); } else { cmd = "FR0;"; sendCommand(cmd); showresp(WARN, ASC, "Rx on A", cmd, ""); cmd = "FT0;"; sendCommand(cmd); showresp(WARN, ASC, "Tx on A", cmd, ""); } rxona = true; } Fl::awake(highlight_vfo, (void *)0); } int RIG_TS2000::get_split() { size_t p; int split = 0; int rx = 0, tx = 0; // tx vfo cmd = "FT;"; if (wait_char(';', 4, 100, "get split tx vfo", ASC) == 4) { p = replystr.rfind("FT"); if (p == string::npos) return split; tx = replystr[p+2] - '0'; } // rx vfo cmd = "FR;"; if (wait_char(';', 4, 100, "get split rx vfo", ASC) == 4) { p = replystr.rfind("FR"); if (p == string::npos) return split; rx = replystr[p+2] - '0'; } // split test split = tx * 2 + rx; return split; } long RIG_TS2000::get_vfoA () { cmd = "FA;"; if (wait_char(';', 14, 100, "get vfo A", ASC) == 14) { size_t p = replystr.rfind("FA"); if (p != string::npos) { int f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p+n] - '0'; A.freq = f; } } return A.freq; } void RIG_TS2000::set_vfoA (long freq) { A.freq = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfo A", cmd, ""); } long RIG_TS2000::get_vfoB () { cmd = "FB;"; if (wait_char(';', 14, 100, "get vfo B", ASC) == 14) { size_t p = replystr.rfind("FB"); if (p != string::npos) { int f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p+n] - '0'; B.freq = f; } } return B.freq; } void RIG_TS2000::set_vfoB (long freq) { B.freq = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(WARN, ASC, "set vfo B", cmd, ""); } int RIG_TS2000::get_smeter() { if (rxona) cmd = "SM0;"; else cmd = "SM1;"; if (wait_char(';', 8, 100, "get smeter", ASC) == 8) { int smtr = 0; size_t p = replystr.rfind("SM"); if (p != string::npos) { smtr = fm_decimal(&replystr[p+3],4); if (rxona) smtr = (smtr * 100) / 30; else smtr = (smtr * 100) / 15; return smtr; } } return 0; } int RIG_TS2000::get_swr() { cmd = "RM;"; if (wait_char(';', 8, 100, "get swr", ASC) == 8) { int swrmtr = 0; size_t p = replystr.rfind("RM1"); if (p != string::npos) { swrmtr = fm_decimal(&replystr[p+3], 4); swrmtr = (swrmtr * 10) / 3; return swrmtr; } } return 0; } int RIG_TS2000::get_alc(void) { cmd = "RM;"; if (wait_char(';', 8, 100, "get alc", ASC) == 8) { int alcmtr = 0; size_t p = replystr.rfind("RM3"); if (p != string::npos) { alcmtr = fm_decimal(&replystr[p+3], 4); alcmtr = (alcmtr * 10) / 3; return alcmtr; } } return 0; } void RIG_TS2000::select_swr() { cmd = "RM1;"; sendCommand(cmd); showresp(WARN, ASC, "select SWR", cmd, ""); } void RIG_TS2000::select_alc() { cmd = "RM3;"; sendCommand(cmd); showresp(WARN, ASC, "select ALC", cmd, ""); } // Transceiver power level void RIG_TS2000::set_power_control(double val) { int ival = (int)val; cmd = "PC"; cmd.append(to_decimal(ival, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set pwr ctrl", cmd, ""); } int RIG_TS2000::get_power_out() { cmd = "SM0;"; if (wait_char(';', 8, 100, "get power out", ASC) == 8) { size_t p = replystr.rfind("SM0"); if (p != string::npos) { int poutmtr = 0; poutmtr = fm_decimal(&replystr[p+3],4); if (poutmtr <= 6) poutmtr = poutmtr * 2; else if (poutmtr <= 11) poutmtr = 11 + (poutmtr - 6)*(26 - 11)/(11 - 6); else if (poutmtr <= 18) poutmtr = 26 + (poutmtr - 11)*(50 - 26)/(18 - 11); else poutmtr = 50 + (poutmtr - 18)*(100 - 50)/(27 - 18); if (poutmtr > 100) poutmtr = 100; return poutmtr; } } return 0; } int RIG_TS2000::get_power_control() { cmd = "PC;"; if (wait_char(';', 6, 100, "get pout", ASC) == 6) { int pctrl = 0; size_t p = replystr.rfind("PC"); if (p != string::npos) { pctrl = fm_decimal(&replystr[p+2], 3); return pctrl; } } return 0; } // Volume control return 0 ... 100 int RIG_TS2000::get_volume_control() { cmd = "AG0;"; if (wait_char(';', 7, 100, "get vol", ASC) == 7) { int volctrl = 0; size_t p = replystr.rfind("AG"); if (p != string::npos) { volctrl = fm_decimal(&replystr[p+3],3); return (int)(volctrl / 2.55); } } return 0; } void RIG_TS2000::set_volume_control(int val) { int ivol = (int)(val * 2.55); cmd = "AG0"; cmd.append(to_decimal(ivol, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set vol", cmd, ""); } // Tranceiver PTT on/off void RIG_TS2000::set_PTT_control(int val) { if (val) cmd = "TX;"; else cmd = "RX;"; sendCommand(cmd); showresp(WARN, ASC, "set PTT", cmd, ""); } void RIG_TS2000::tune_rig() { // cmd = "AC111;"; // | |||______ start tuner = 1 // | ||_______ set TX hold = 1 // | |________ set RX hold = 1 // |__________ tune transceiver command prefix if (tuning()) return; cmd = "AC111;"; sendCommand(cmd); showresp(WARN, ASC, "send tune command", cmd, ""); is_tuning = true; } void RIG_TS2000::set_attenuator(int val) { att_level = val; if (val) cmd = "RA01;"; else cmd = "RA00;"; sendCommand(cmd); showresp(WARN, ASC, "set ATT", cmd, ""); } int RIG_TS2000::get_attenuator() { cmd = "RA;"; if (wait_char(';', 7, 100, "get ATT", ASC) == 7) { size_t p = replystr.rfind("RA"); if (p != string::npos && (p+3 < replystr.length())) { if (replystr[p+2] == '0' && replystr[p+3] == '0') att_level = 0; else att_level = 1; } } return att_level; } void RIG_TS2000::set_preamp(int val) { preamp_level = val; if (val) cmd = "PA1;"; else cmd = "PA0;"; sendCommand(cmd); showresp(WARN, ASC, "set PRE", cmd, ""); } int RIG_TS2000::get_preamp() { cmd = "PA;"; if (wait_char(';', 5, 100, "get PRE", ASC) == 5) { size_t p = replystr.rfind("PA"); if (p != string::npos && (p+2 < replystr.length())) { if (replystr[p+2] == '1') preamp_level = 1; else preamp_level = 0; } } return preamp_level; } int RIG_TS2000::set_widths(int val) { int bw; switch (val) { case LSB: case USB: case FM: bandwidths_ = TS2000_SH; dsp_SL = TS2000_SL; SL_tooltip = TS2000_SL_tooltip; SL_label = TS2000_SSB_btn_SL_label; dsp_SH = TS2000_SH; SH_tooltip = TS2000_SH_tooltip; SH_label = TS2000_SSB_btn_SH_label; if (val == FM) bw = 0x8A03; // 200 ... 4000 Hz else bw = 0x8803; // 200 ... 3000 Hz break; case CW: case CWR: bandwidths_ = TS2000_CWwidths; dsp_SL = TS2000_empty; dsp_SH = TS2000_empty; bw = 7; break; case FSK: case FSKR: bandwidths_ = TS2000_FSKwidths; dsp_SL = TS2000_empty; dsp_SH = TS2000_empty; bw = 1; break; case AM: default: bandwidths_ = TS2000_AM_SH; dsp_SL = TS2000_AM_SL; dsp_SH = TS2000_AM_SH; bw = 0x8201; break; } return bw; } const char **RIG_TS2000::bwtable(int val) { if (val == LSB || val == USB || val == FM) return TS2000_SH; else if (val == CW || val == CWR) return TS2000_CWwidths; else if (val == FSK || val == FSKR) return TS2000_FSKwidths; //else AM m == 4 return TS2000_AM_SH; } const char **RIG_TS2000::lotable(int val) { if (val == LSB || val == USB || val == FM) return TS2000_SL; if (val == AM) return TS2000_AM_SL; return NULL; } const char **RIG_TS2000::hitable(int val) { if (val == LSB || val == USB || val == FM) return TS2000_SH; if (val == AM) return TS2000_AM_SH; return NULL; } void RIG_TS2000::set_modeA(int val) { if (val >= (int)sizeof(TS2000_mode_chr)) return; _currmode = A.imode = val; cmd = "MD"; cmd += TS2000_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set mode", cmd, ""); A.iBW = set_widths(val); } int RIG_TS2000::get_modeA() { if (tuning()) return A.imode; if (skip_get) { skip_get--; return A.imode; } cmd = "MD;"; if (wait_char(';', 4, 100, "get mode A", ASC) == 4) { size_t p = replystr.rfind("MD"); if (p != string::npos) { int md = replystr[p+2]; md = md - '1'; if (md == 8) md = 7; A.imode = md; A.iBW = set_widths(A.imode); } } _currmode = A.imode; return A.imode; } void RIG_TS2000::set_modeB(int val) { if (val >= (int)sizeof(TS2000_mode_chr)) return; _currmode = B.imode = val; cmd = "MD"; cmd += TS2000_mode_chr[val]; cmd += ';'; sendCommand(cmd); showresp(WARN, ASC, "set mode B", cmd, ""); B.iBW = set_widths(val); } int RIG_TS2000::get_modeB() { if (tuning()) return B.imode; if (skip_get) return B.imode; cmd = "MD;"; if (wait_char(';', 4, 100, "get mode B", ASC) == 4) { size_t p = replystr.rfind("MD"); if (p != string::npos) { int md = replystr[p+2]; md = md - '1'; if (md == 8) md = 7; B.imode = md; B.iBW = set_widths(B.imode); } } _currmode = B.imode; return B.imode; } int RIG_TS2000::adjust_bandwidth(int val) { int bw = 0; if (val == LSB || val == USB) bw = 0x8803; else if (val == FM) bw = 0x8A03; else if (val == AM) bw = 0x8301; else if (val == CW || val == CWR) bw = 7; else if (val == FSK || val == FSKR) bw = 1; return bw; } int RIG_TS2000::def_bandwidth(int val) { return adjust_bandwidth(val); } void RIG_TS2000::set_bwA(int val) { if (A.imode == LSB || A.imode == USB || A.imode == FM || A.imode == AM) { if (val < 256) return; A.iBW = val; cmd = "SL"; int index = A.iBW & 0x7F; if (index >= (int)sizeof(TS2000_CAT_SL)) return; cmd = TS2000_CAT_SL[index]; sendCommand(cmd); showresp(WARN, ASC, "set lower", cmd, ""); cmd = "SH"; index = (A.iBW >> 8) & 0x7F; if (index >= (int)sizeof(TS2000_CAT_SH)) return; cmd = TS2000_CAT_SH[index]; sendCommand(cmd); showresp(WARN, ASC, "set upper", cmd, ""); } if (val > 256) return; else if (A.imode == CW || A.imode == CWR) { A.iBW = val; int index = A.iBW & 0x7F; if (index >= (int)sizeof(TS2000_CWbw)) return; cmd = TS2000_CWbw[index]; sendCommand(cmd); showresp(WARN, ASC, "set CW bw", cmd, ""); }else if (A.imode == FSK || A.imode == FSKR) { A.iBW = val; int index = A.iBW & 0x7F; if (index >= (int)sizeof(TS2000_FSKbw)) return; cmd = TS2000_FSKbw[index]; sendCommand(cmd); showresp(WARN, ASC, "set FSK bw", cmd, ""); } } int RIG_TS2000::get_bwA() { if (tuning()) return A.iBW; if (skip_get) return A.iBW; size_t i = 0; size_t p; if (A.imode == LSB || A.imode == USB || A.imode == FM || A.imode == AM) { int lo = A.iBW & 0xFF, hi = (A.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get SL", ASC) == 5) { p = replystr.rfind("SL"); if (p != string::npos) lo = fm_decimal(&replystr[2], 2); } cmd = "SH;"; if (wait_char(';', 5, 100, "get SH", ASC) == 5) { p = replystr.rfind("SH"); if (p != string::npos) hi = fm_decimal(&replystr[2], 2); A.iBW = ((hi << 8) | (lo & 0xFF)) | 0x8000; } } else if (A.imode == CW || A.imode == CWR) { // CW cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < sizeof(TS2000_CWbw); i++) if (replystr.find(TS2000_CWbw[i]) == p) break; A.iBW = i; } } } else if (A.imode == FSK || A.imode == FSKR) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < sizeof(TS2000_FSKbw); i++) if (replystr.find(TS2000_FSKbw[i]) == p) break; A.iBW = i; } } } return A.iBW; } void RIG_TS2000::set_bwB(int val) { if (B.imode == LSB || B.imode == USB || B.imode == FM || B.imode == AM) { if (val < 256) return; B.iBW = val; cmd = "SL"; int index = B.iBW & 0x7F; if (index >= (int)sizeof(TS2000_CAT_SL)) return; cmd = TS2000_CAT_SL[index]; sendCommand(cmd); showresp(WARN, ASC, "set lower", cmd, ""); cmd = "SH"; index = (B.iBW >> 8) & 0x7F; if (index >= (int)sizeof(TS2000_CAT_SH)) return; cmd = TS2000_CAT_SH[index]; sendCommand(cmd); showresp(WARN, ASC, "set upper", cmd, ""); } if (val > 256) return; else if (B.imode == CW || B.imode == CWR) { B.iBW = val; int index = B.iBW & 0x7F; if (index >= (int)sizeof(TS2000_CWbw)) return; cmd = TS2000_CWbw[index]; sendCommand(cmd); showresp(WARN, ASC, "set CW bw", cmd, ""); }else if (B.imode == FSK || B.imode == FSKR) { B.iBW = val; int index = B.iBW & 0x7F; if (index >= (int)sizeof(TS2000_FSKbw)) return; cmd = TS2000_FSKbw[index]; sendCommand(cmd); showresp(WARN, ASC, "set FSK bw", cmd, ""); } } int RIG_TS2000::get_bwB() { if (tuning()) return B.iBW; if (skip_get) return B.iBW; size_t i = 0; size_t p; if (B.imode == LSB || B.imode == USB || B.imode == FM || B.imode == AM) { int lo = B.iBW & 0xFF, hi = (B.iBW >> 8) & 0x7F; cmd = "SL;"; if (wait_char(';', 5, 100, "get SL", ASC) == 5) { p = replystr.rfind("SL"); if (p != string::npos) lo = fm_decimal(&replystr[2], 2); } cmd = "SH;"; if (wait_char(';', 5, 100, "get SH", ASC) == 5) { p = replystr.rfind("SH"); if (p != string::npos) hi = fm_decimal(&replystr[2], 2); B.iBW = ((hi << 8) | (lo & 0xFF)) | 0x8000; } } else if (B.imode == CW || B.imode == CWR) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < sizeof(TS2000_CWbw); i++) if (replystr.find(TS2000_CWbw[i]) == p) break; B.iBW = i; } } } else if (B.imode == FSK || B.imode == FSKR) { cmd = "FW;"; if (wait_char(';', 7, 100, "get FW", ASC) == 7) { p = replystr.rfind("FW"); if (p != string::npos) { for (i = 0; i < sizeof(TS2000_FSKbw); i++) if (replystr.find(TS2000_FSKbw[i]) == p) break; B.iBW = i; } } } return B.iBW; } int RIG_TS2000::get_modetype(int n) { if (n >= (int)sizeof(TS2000_mode_type)) return 0; return TS2000_mode_type[n]; } // val 0 .. 100 void RIG_TS2000::set_mic_gain(int val) { cmd = "MG"; cmd.append(to_decimal(val,3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set mic", cmd, ""); } int RIG_TS2000::get_mic_gain() { cmd = "MG;"; if (wait_char(';', 6, 100, "get mic", ASC) == 6) { int mgain = 0; size_t p = replystr.rfind("MG"); if (p != string::npos) { mgain = fm_decimal(&replystr[p+2], 3); return mgain; } } return 0; } void RIG_TS2000::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_TS2000::set_noise(bool b) { if (b) cmd = "NB1;"; else cmd = "NB0;"; sendCommand(cmd); showresp(WARN, ASC, "set NB", cmd, ""); } int RIG_TS2000::get_noise() { cmd = "NB;"; if (wait_char(';', 4, 100, "get Noise Blanker", ASC) == 4) { size_t p = replystr.rfind("NB"); if (p == string::npos) return 0; if (replystr[p+2] == '0') return 0; } return 1; } //====================================================================== // IF shift only available if the transceiver is in the CW mode // step size is 50 Hz //====================================================================== void RIG_TS2000::set_if_shift(int val) { bool cw = (useB && (B.imode == 2 || B.imode == 6)) || (!useB && (A.imode == 2 || A.imode == 6)); if (!cw) { setIFshiftButton((void*)0); return; } cmd = "IS "; cmd.append(to_decimal(val,4)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set IF shift", cmd, ""); } bool RIG_TS2000::get_if_shift(int &val) { cmd = "IS;"; if (wait_char(';', 8, 100, "get IF shift", ASC) == 8) { size_t p = replystr.rfind("IS "); if (p != string::npos) { val = fm_decimal(&replystr[p+3], 4); return true; } } val = if_shift_mid; return false; } void RIG_TS2000::get_if_min_max_step(int &min, int &max, int &step) { if_shift_min = min = 400; if_shift_max = max = 1000; if_shift_step = step = 50; if_shift_mid = 700; } void RIG_TS2000::set_notch(bool on, int val) { if (on) { cmd = "BC2;"; // set manual notch sendCommand(cmd); showresp(WARN, ASC, "set notch on", cmd, ""); cmd = "BP"; // val = round((val - 220) / 50); val = round((val - 200) / 50); cmd.append(to_decimal(val, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set notch val", cmd, ""); } else { cmd = "BC0;"; // no notch action sendCommand(cmd); showresp(WARN, ASC, "set notch off", cmd, ""); } } bool RIG_TS2000::get_notch(int &val) { bool ison = false; cmd = "BC;"; if (wait_char(';', 4, 100, "get notch on/off", ASC) == 4) { size_t p = replystr.rfind("BC"); if (p != string::npos) { if (replystr[p+2] == '2') { ison = true; cmd = "BP;"; if (wait_char(';', 6, 100, "get notch val", ASC) == 6) { p = replystr.rfind("BP"); if (p != string::npos) val = 200 + 50 * fm_decimal(&replystr[p+2],3); } } } } return (ison); } void RIG_TS2000::get_notch_min_max_step(int &min, int &max, int &step) { min = 200; max = 3350; step = 50; } void RIG_TS2000::set_auto_notch(int v) { cmd = v ? "NT1;" : "NT0;"; sendCommand(cmd); showresp(WARN, ASC, "set auto notch", cmd, ""); } int RIG_TS2000::get_auto_notch() { cmd = "NT;"; if (wait_char(';', 4, 100, "get auto notch", ASC) == 4) { int anotch = 0; size_t p = replystr.rfind("NT"); if (p != string::npos) { anotch = (replystr[p+2] == '1'); return anotch; } } return 0; } void RIG_TS2000::set_rf_gain(int val) { cmd = "RG"; cmd.append(to_decimal(val * 255 / 100, 3)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "set rf gain", cmd, ""); } int RIG_TS2000::get_rf_gain() { cmd = "RG;"; int rfg = 100; if (wait_char(';', 6, 100, "get rf gain", ASC) == 6) { size_t p = replystr.rfind("RG"); if (p != string::npos) rfg = fm_decimal(&replystr[p+2] ,3) * 100 / 255; } return rfg; } void RIG_TS2000::set_noise_reduction(int val) { if (val == -1) { return; } _noise_reduction_level = val; if (_noise_reduction_level == 0) { nr_label("NR", false); } else if (_noise_reduction_level == 1) { nr_label("NR1", true); } else if (_noise_reduction_level == 2) { nr_label("NR2", true); } cmd.assign("NR"); cmd += '0' + _noise_reduction_level; cmd += ';'; sendCommand (cmd); showresp(WARN, ASC, "SET noise reduction", cmd, ""); } int RIG_TS2000::get_noise_reduction() { cmd = rsp = "NR"; cmd.append(";"); if (wait_char(';', 4, 100, "GET noise reduction", ASC) == 4) { size_t p = replystr.rfind(rsp); if (p == string::npos) return _noise_reduction_level; _noise_reduction_level = replystr[p+2] - '0'; } if (_noise_reduction_level == 1) { nr_label("NR1", true); } else if (_noise_reduction_level == 2) { nr_label("NR2", true); } else { nr_label("NR", false); } return _noise_reduction_level; } void RIG_TS2000::set_noise_reduction_val(int val) { if (_noise_reduction_level == 0) return; if (_noise_reduction_level == 1) _nrval1 = val; else _nrval2 = val; cmd.assign("RL").append(to_decimal(val, 2)).append(";"); sendCommand(cmd); showresp(WARN, ASC, "SET_noise_reduction_val", cmd, ""); } int RIG_TS2000::get_noise_reduction_val() { int nrval = 0; if (_noise_reduction_level == 0) return 0; int val = progStatus.noise_reduction_val; cmd = rsp = "RL"; cmd.append(";"); if (wait_char(';', 5, 100, "GET noise reduction val", ASC) == 5) { size_t p = replystr.rfind(rsp); if (p == string::npos) { nrval = (_noise_reduction_level == 1 ? _nrval1 : _nrval2); return nrval; } val = atoi(&replystr[p+2]); } if (_noise_reduction_level == 1) _nrval1 = val; else _nrval2 = val; return val; } flrig-1.3.24/src/rigs/IC746.cxx0000644000175000017500000006302212562731651012653 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC746.h" //============================================================================= // IC-746, IC746PRO //============================================================================= const char IC746name_[] = "IC-746"; const char *IC746modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", NULL}; // mode values are 0, 1, 2, 3, 4, 5, 7, 8 const char IC746_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U'}; const char *IC746_widths[] = { "NORM", "NARR", NULL}; static int IC746_bw_vals[] = { 1, 2, WVALS_LIMIT}; static GUI ic746_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrSQUELCH, 54, 165, 156 }, { (Fl_Widget *)btnNR, 2, 185, 50 }, { (Fl_Widget *)sldrNR, 54, 185, 156 }, { (Fl_Widget *)btnIFsh, 214, 125, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 125, 156 }, { (Fl_Widget *)btnNotch, 214, 145, 50 }, { (Fl_Widget *)sldrNOTCH, 266, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 165, 156 }, { (Fl_Widget *)sldrPOWER, 266, 185, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC746::RIG_IC746() { defaultCIV = 0x56; name_ = IC746name_; modes_ = IC746modes_; bandwidths_ = IC746_widths; bw_vals_ = IC746_bw_vals; _mode_type = IC746_mode_type; widgets = ic746_widgets; comm_baudrate = BR9600; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; def_freq = freqB = freqA = B.freq = A.freq = 14070000L; def_mode = modeB = modeA = B.imode = A.imode = 1; def_bw = bwB = bwA = B.iBW = A.iBW = 0; filter_nbr = 0; ICvol = 0; has_bandwidth_control = has_smeter = has_power_control = has_volume_control = has_mode_control = has_micgain_control = has_notch_control = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = has_noise_control = has_noise_reduction = has_noise_reduction_control = has_rf_control = has_sql_control = has_split = restore_mbw = true; precision = 1; ndigits = 9; }; void RIG_IC746::initialize() { ic746_widgets[0].W = btnVol; ic746_widgets[1].W = sldrVOLUME; ic746_widgets[2].W = sldrRFGAIN; ic746_widgets[3].W = sldrSQUELCH; ic746_widgets[4].W = btnNR; ic746_widgets[5].W = sldrNR; ic746_widgets[6].W = btnIFsh; ic746_widgets[7].W = sldrIFSHIFT; ic746_widgets[8].W = btnNotch; ic746_widgets[9].W = sldrNOTCH; ic746_widgets[10].W = sldrMICGAIN; ic746_widgets[11].W = sldrPOWER; } void RIG_IC746::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\x00'; cmd.append(post); waitFB("sel A"); } void RIG_IC746::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\x01'; cmd.append(post); waitFB("sel B"); } long RIG_IC746::get_vfoA () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(11, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.freq = fm_bcd_be(&replystr[p+5], 10); } return A.freq; } void RIG_IC746::set_vfoA (long freq) { A.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo A"); } long RIG_IC746::get_vfoB () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(11, "get vfo B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.freq = fm_bcd_be(&replystr[p+5], 10); } return B.freq; } void RIG_IC746::set_vfoB (long freq) { B.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo B"); } int RIG_IC746::get_smeter() { string cstr = "\x15\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return 0; } // Volume control val 0 ... 100 void RIG_IC746::set_volume_control(int val) { ICvol = (int)(val); cmd = pre_to; cmd.append("\x14\x01"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); waitFB("set vol"); } int RIG_IC746::get_volume_control() { string cstr = "\x14\x01"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get vol")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3)); } return 0; } void RIG_IC746::get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } // Tranceiver PTT on/off void RIG_IC746::set_PTT_control(int val) { cmd = pre_to; cmd += '\x1c'; cmd += '\x00'; cmd += (unsigned char) val; cmd.append( post ); waitFB("set PTT"); } void RIG_IC746::set_attenuator(int val) { cmd = pre_to; cmd += '\x11'; cmd += val ? 0x20 : 0x00; cmd.append( post ); waitFB("set att"); if (!val) { preamp_level--; if (preamp_level < 0) preamp_level = 2; set_preamp(1); } } int RIG_IC746::get_attenuator() { string cstr = "\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(7, "get att")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+5] ? 1 : 0); } return 0; } void RIG_IC746::set_preamp(int val) { if (preamp_level == 0) { preamp_level = 1; preamp_label("Pre 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Pre 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("Pre", false); } cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd += (unsigned char) preamp_level; cmd.append( post ); waitFB("set preamp"); } int RIG_IC746::get_preamp() { string cstr = "\x16\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get preamp")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { preamp_label("Pre 1", true); preamp_level = 1; } else if (replystr[p+6] == 0x02) { preamp_label("Pre 2", true); preamp_level = 2; } else { preamp_label("Pre", false); preamp_level = 0; } } } return preamp_level; } // changed noise blanker to noise reduction void RIG_IC746::set_noise(bool val) { cmd = pre_to; cmd.append("\x16\x22"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set noise"); } int RIG_IC746::get_noise() { string cstr = "\x16\x22"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get noise")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return 0; } void RIG_IC746::set_noise_reduction(int val) { cmd = pre_to; cmd.append("\x16\x40"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set NR"); } int RIG_IC746::get_noise_reduction() { string cstr = "\x16\x40"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get NR")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return 0; } // 0 < val < 100 void RIG_IC746::set_noise_reduction_val(int val) { cmd = pre_to; cmd.append("\x14\x06"); cmd.append(to_bcd(val * 255 / 100, 3)); cmd.append(post); waitFB("set NR val"); } int RIG_IC746::get_noise_reduction_val() { string cstr = "\x14\x06"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get NR val")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return 0; } void RIG_IC746::set_modeA(int val) { A.imode = val; cmd = pre_to; cmd += '\x06'; cmd += val > 5 ? val + 1 : val; cmd += filter_nbr + 1; // filter # cmd.append( post ); waitFB("set mode A"); } int RIG_IC746::get_modeA() { string cstr = "\x04"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); if (p != string::npos) { A.imode = replystr[p+5]; if (A.imode > 6) A.imode--; filter_nbr = replystr[p+6] - 1; } } return A.imode; } void RIG_IC746::set_bwA(int val) { filter_nbr = val; set_modeA(A.imode); } int RIG_IC746::get_bwA() { return filter_nbr; } void RIG_IC746::set_modeB(int val) { B.imode = val; cmd = pre_to; cmd += '\x06'; cmd += val > 5 ? val + 1 : val; cmd += filter_nbr + 1; // filter cmd.append( post ); waitFB("set mode B"); } int RIG_IC746::get_modeB() { string cstr = "\x04"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get mode B")) { size_t p = replystr.rfind(resp); if (p != string::npos) { B.imode = replystr[p+5]; if (B.imode > 6) B.imode--; filter_nbr = replystr[p+6] - 1; } } return B.imode; } void RIG_IC746::set_bwB(int val) { filter_nbr = val; set_modeB(B.imode); } int RIG_IC746::get_bwB() { return filter_nbr; } int RIG_IC746::get_modetype(int n) { return _mode_type[n]; } void RIG_IC746::set_mic_gain(int val) { val = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(val,3)); cmd.append(post); waitFB("set mic"); } void RIG_IC746::get_mic_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_IC746::set_if_shift(int val) { int shift = (int)((val + 50) * 2.56 ); if (shift == 256) shift = 255; cmd = pre_to; cmd.append("\x14\x07"); cmd.append(to_bcd(shift, 3)); cmd.append(post); waitFB("set IF on/off"); cmd = pre_to; cmd.append("\x14\x08"); cmd.append(to_bcd(shift, 3)); cmd.append(post); waitFB("set IF val"); } void RIG_IC746::get_if_min_max_step(int &min, int &max, int &step) { min = -50; max = +50; step = 2; } int ICsql = 0; void RIG_IC746::set_squelch(int val) { ICsql = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x03"); cmd.append(to_bcd(ICsql, 3)); cmd.append( post ); waitFB("set sql"); } int ICrfg = 0; void RIG_IC746::set_rf_gain(int val) { ICrfg = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x02"); cmd.append(to_bcd(ICrfg, 3)); cmd.append( post ); waitFB("set rf gain"); } void RIG_IC746::set_power_control(double val) { cmd = pre_to; cmd.append("\x14\x0A"); cmd.append(to_bcd((int)(val * 255 / 100), 3)); cmd.append( post ); waitFB("set power"); } void RIG_IC746::set_split(bool val) { cmd = pre_to; cmd += 0x0F; cmd += val ? 0x10 : 0x00; cmd.append(post); waitFB("set split"); } //============================================================================= // 746PRO const char IC746PROname_[] = "IC-746PRO"; const char *IC746PROmodes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", "D-LSB", "D-USB", "D-FM", NULL}; const char IC746PRO_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U', 'L', 'U', 'U' }; const char *IC746PRO_SSBwidths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3100", "3200", "3300", "3400", "3500", "3600", NULL}; static int IC746PRO_bw_vals_SSB[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41, WVALS_LIMIT}; const char *IC746PRO_RTTYwidths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", NULL}; static int IC746PRO_bw_vals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32, WVALS_LIMIT}; const char *IC746PRO_AMFMwidths[] = { "FILT-1", "FILT-2", "FILT-3", NULL }; static int IC746PRO_bw_vals_AMFM[] = { 1,2,3,WVALS_LIMIT}; RIG_IC746PRO::RIG_IC746PRO() { defaultCIV = 0x66; name_ = IC746PROname_; modes_ = IC746PROmodes_; bandwidths_ = IC746PRO_SSBwidths; bw_vals_ = IC746PRO_bw_vals_SSB; _mode_type = IC746PRO_mode_type; atten_level = 1; preamp_level = 2; def_mode = modeB = modeA = B.imode = A.imode = 1; def_bw = bwB = bwA = B.iBW = A.iBW = 34; def_freq = freqB = freqA = B.freq = A.freq = 14070000L; has_smeter = has_power_control = has_volume_control = has_mode_control = has_bandwidth_control = has_micgain_control = has_notch_control = has_attenuator_control = has_preamp_control = has_ifshift_control = has_ptt_control = has_tune_control = has_noise_control = has_noise_reduction = has_noise_reduction_control = has_rf_control = has_sql_control = has_split = restore_mbw = true; has_swr_control = has_alc_control = has_power_out = true; adjustCIV(defaultCIV); }; void RIG_IC746PRO::set_modeA(int val) { A.imode = val; bool datamode = false; switch (val) { case 10 : val = 5; datamode = true; break; case 9 : val = 1; datamode = true; break; case 8 : val = 0; datamode = true; break; case 7 : val = 8; break; case 6 : val = 7; break; default: break; } cmd = pre_to; cmd += '\x06'; cmd += val; cmd += filter_nbr + 1; // filter 1 ... 3 cmd.append( post ); waitFB("set mode A"); if (datamode) { // LSB / USB ==> use DATA mode cmd = pre_to; cmd.append("\x1A\x06\x01"); cmd.append(post); waitFB("data mode"); } } int RIG_IC746PRO::get_modeA() { int md; string cstr = "\x04"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md--; filter_nbr = replystr[p+6] - 1; cstr = "\x1A\x06"; resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "data ?")) { p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6]) { switch (md) { case 0 : md = 8; break; case 1 : md = 9; break; case 5 : md = 10; break; default : break; } } } } A.imode = md; } } return A.imode; } void RIG_IC746PRO::set_modeB(int val) { B.imode = val; bool datamode = false; switch (val) { case 10 : val = 5; datamode = true; break; case 9 : val = 1; datamode = true; break; case 8 : val = 0; datamode = true; break; case 7 : val = 8; break; case 6 : val = 7; break; default: break; } cmd = pre_to; cmd += '\x06'; cmd += val; cmd += filter_nbr + 1; cmd.append( post ); waitFB("set mode B"); if (datamode) { // LSB / USB ==> use DATA mode cmd = pre_to; cmd.append("\x1A\x06\x01"); cmd.append(post); waitFB("data mode"); } } int RIG_IC746PRO::get_modeB() { int md; string cstr = "\x04"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get mode B")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md--; filter_nbr = replystr[p+6] - 1; // this is the filter #; not the bandwidth cstr = "\x1A\x06"; resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "data ?")) { p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6]) { switch (md) { case 0 : md = 8; break; case 1 : md = 9; break; case 5 : md = 10; break; default : break; } } } } B.imode = md; } } return B.imode; } int RIG_IC746PRO::adjust_bandwidth(int m) { if (m == 0 || m == 1 || m == 8 || m == 9) { //SSB bandwidths_ = IC746PRO_SSBwidths; bw_vals_ = IC746PRO_bw_vals_SSB; return (32); } if (m == 3 || m == 6) { //CW bandwidths_ = IC746PRO_SSBwidths; bw_vals_ = IC746PRO_bw_vals_SSB; return (14); } if (m == 4 || m == 7) { //RTTY bandwidths_ = IC746PRO_RTTYwidths; bw_vals_ = IC746PRO_bw_vals_RTTY; return (28); } bandwidths_ = IC746PRO_AMFMwidths; bw_vals_ = IC746PRO_bw_vals_AMFM; return (0); } int RIG_IC746PRO::def_bandwidth(int m) { if (m == 0 || m == 1 || m == 8 || m == 9) { //SSB return (32); } if (m == 3 || m == 6) { //CW return (14); } if (m == 4 || m == 7) { //RTTY return (28); } bandwidths_ = IC746PRO_AMFMwidths; return (0); } const char **RIG_IC746PRO::bwtable(int m) { if (m == 0 || m == 1 || m == 8 || m == 9) //SSB return IC746PRO_SSBwidths; if (m == 3 || m == 6) //CW return IC746PRO_SSBwidths; if (m == 4 || m == 7) //RTTY return IC746PRO_RTTYwidths; return IC746PRO_AMFMwidths; } int RIG_IC746PRO::get_swr() { string cstr = "\x15\x12"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(9, "get swr")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55 ); } return -1; } int RIG_IC746PRO::get_alc() { string cstr = "\x15\x13"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(9, "get alc")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55 ); } return -1; } // Transceiver power level return power in watts int RIG_IC746PRO::get_power_out() { string cstr = "\x15\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(9, "get power")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55 ); } return -1; } void RIG_IC746PRO::tune_rig() { cmd = pre_to; cmd.append("\x1c\x01\x02"); cmd.append( post ); waitFB("tune"); } void RIG_IC746PRO::set_bwA(int val) { // if (bandwidths_ == IC746PRO_AMFMwidths) { // filter_nbr = val; // set_modeA(A.imode); // return; // } A.iBW = val; cmd = pre_to; cmd.append("\x1A\x03"); cmd.append(to_bcd(A.iBW,2)); cmd.append( post ); waitFB("set bw A"); } int RIG_IC746PRO::get_bwA() { string cstr = "\x1A\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get bw A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.iBW = (int)ceil(fm_bcd(&replystr[p + 6], 2)); } return A.iBW; } void RIG_IC746PRO::set_bwB(int val) { // if (bandwidths_ == IC746PRO_AMFMwidths) { // filter_nbr = val; // set_modeA(A.imode); // return; // } B.iBW = val; cmd = pre_to; cmd.append("\x1A\x03"); cmd.append(to_bcd(B.iBW,2)); cmd.append( post ); waitFB("set bw B"); } int RIG_IC746PRO::get_bwB() { string cstr = "\x1A\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get bw B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.iBW = (int)(fm_bcd(&replystr[p + 6], 2)); } return B.iBW; } int RIG_IC746PRO::get_attenuator() { string cstr = "\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(7, "get att")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+5] ? 1 : 0); } return 0; } void RIG_IC746PRO::set_attenuator(int val) { int cmdval = val ? 0x20 : 0x00; cmd = pre_to; cmd += '\x11'; cmd += cmdval; cmd.append( post ); waitFB("set att"); } bool IC_notchon = false; void RIG_IC746PRO::set_notch(bool on, int val) { int notch = (int)(val/20.0 + 128); if (notch > 256) notch = 255; if (on != IC_notchon) { cmd = pre_to; cmd.append("\x16\x48"); cmd += on ? '\x01' : '\x00'; cmd.append(post); waitFB("set notch"); IC_notchon = on; } if (on) { cmd = pre_to; cmd.append("\x14\x0D"); cmd.append(to_bcd(notch,3)); cmd.append(post); waitFB("set notch val"); } } bool RIG_IC746PRO::get_notch(int &val) { bool on = false; val = 0; string cstr = "\x16\x48"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get notch")) { size_t p = replystr.rfind(resp); if (p != string::npos) on = replystr[p + 6] ? 1 : 0; cmd = pre_to; resp = pre_fm; cstr = "\x14\x0D"; cmd.append(cstr); resp.append(cstr); cmd.append(post); if (waitFOR(9, "get notch val")) { size_t p = replystr.rfind(resp); if (p != string::npos) val = 20*ceil(fm_bcd(&replystr[p + 6],3) - 128); } } return on; } void RIG_IC746PRO::get_notch_min_max_step(int &min, int &max, int &step) { min = -1280; max = 1280; step = 20; } void RIG_IC746PRO::set_rf_gain(int val) { int ICrfg = val * 255 / 100; cmd = pre_to; cmd.append("\x14\x02"); cmd.append(to_bcd(ICrfg, 3)); cmd.append( post ); waitFB("set rf gain"); } int RIG_IC746PRO::get_rf_gain() { string cstr = "\x14\x02"; string resp = pre_fm; cmd = pre_to; cmd.append(cstr).append(post); resp.append(cstr); if (waitFOR(9, "get rfgain")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55); } return progStatus.rfgain; } void RIG_IC746PRO::set_squelch(int val) { int IC746PROsql = val * 255 / 100; cmd = pre_to; cmd.append("\x14\x03"); cmd.append(to_bcd(IC746PROsql, 3)); cmd.append( post ); waitFB("set sql"); } int RIG_IC746PRO::get_squelch() { string cstr = "\x14\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get sql")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return progStatus.squelch; } void RIG_IC746PRO::set_power_control(double val) { cmd = pre_to; cmd.append("\x14\x0A"); cmd.append(to_bcd((int)(val * 2.55), 3)); cmd.append( post ); waitFB("set power"); } int RIG_IC746PRO::get_power_control() { string cstr = "\x14\x0A"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr).append(post); if (waitFOR(9, "get power")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55); } return progStatus.power_level; } void RIG_IC746PRO::set_preamp(int val) { if (preamp_level == 0) { preamp_level = 1; preamp_label("Pre 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Pre 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("Pre", false); } cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd += (unsigned char) preamp_level; cmd.append( post ); waitFB("set preamp"); } int RIG_IC746PRO::get_preamp() { string cstr = "\x16\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get preamp")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { preamp_label("Pre 1", true); preamp_level = 1; } else if (replystr[p+6] == 0x02) { preamp_label("Pre 2", true); preamp_level = 2; } else { preamp_label("Pre", false); preamp_level = 0; } } } return preamp_level; } int RIG_IC746PRO::get_mic_gain() { string cstr = "\x14\x0B"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get mic")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return 0; } void RIG_IC746PRO::set_mic_gain(int val) { val = (int)(val * 2.55); cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(val,3)); cmd.append(post); waitFB("set mic"); } void RIG_IC746PRO::get_mic_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_IC746PRO::set_if_shift(int val) { int shift = (int)((val + 50) * 2.55 ); cmd = pre_to; cmd.append("\x14\x07"); cmd.append(to_bcd(shift, 3)); cmd.append(post); waitFB("set if-shift"); } bool RIG_IC746PRO::get_if_shift(int &val) { string cstr = "\x14\x07"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); val = progStatus.shift_val; if (waitFOR(9, "get if-shift")) { size_t p = replystr.rfind(resp); if (p != string::npos) val = (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55 - 50); } return (progStatus.shift = (val != 0)); } void RIG_IC746PRO::get_if_min_max_step(int &min, int &max, int &step) { min = -50; max = +50; step = 1; } void RIG_IC746PRO::set_split(bool val) { cmd = pre_to; cmd += 0x0F; cmd += val ? 0x01 : 0x00; cmd.append(post); waitFB("set split"); } int RIG_IC746PRO::get_split() { string cstr = "\x0F"; string resp = pre_fm; resp.append(cstr); cmd.assign(pre_to).append(cstr).append(post); if (waitFOR(7, "get split")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+5] ? 1 : 0); } return 0; } flrig-1.3.24/src/rigs/FT1000.cxx0000644000175000017500000001544612562731651012740 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT1000.h" static const char FT1000name_[] = "FT-1000 **"; static const char *FT1000modes_[] = { "LSB", "USB", "CW-2.4", "CW-500", "AM-6", "AM-2.4", "FM", "FM", "RTTY-L", "RTTY-U", "PKT-LSB", "PKT-FM", NULL}; static const char FT1000_mode_type[] = { 'L', 'U', 'L', 'L', 'U', 'U', 'U', 'U', 'L', 'U', 'L', 'U' }; static const char *FT1000_widths[] = { "2400", "2000", "500", "250", "6000", NULL }; static int FT1000_bw_vals[] = { 1,2,3,4,5, WVALS_LIMIT}; // FT1000 class RIG_FT1000::RIG_FT1000() { // base class values name_ = FT1000name_; modes_ = FT1000modes_; bandwidths_ = FT1000_widths; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; serloop_timing = 5000; // every 5 seconds FT1000 is a very slow beast! comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; has_mode_control = has_bandwidth_control = has_ptt_control = has_tune_control = true; precision = 10; ndigits = 7; }; // from hamlib /* yaesu_cmd_set_t { 0x00, 0x00, 0x00, 0x00, 0x01 }, // Split (OFF) { 0x00, 0x00, 0x00, 0x01, 0x01 }, // Split (On) { 0x00, 0x00, 0x00, 0x00, 0x02 }, // Recall Memory { 0x00, 0x00, 0x00, 0x00, 0x03 }, // Memory Operations { 0x00, 0x00, 0x00, 0x00, 0x04 }, // Lock (OFF) { 0x00, 0x00, 0x00, 0x01, 0x04 }, // Lock (ON) { 0x00, 0x00, 0x00, 0x00, 0x05 }, // Select VFO (A) { 0x00, 0x00, 0x00, 0x01, 0x05 }, // Select VFO (B) { 0x00, 0x00, 0x00, 0x00, 0x06 }, // Copy Memory Data to VFO A { 0x00, 0x00, 0x00, 0x00, 0x07 }, // OP Freq Up 0.1MHz { 0x00, 0x00, 0x01, 0x00, 0x07 }, // OP Freq Up 1MHz { 0x00, 0x00, 0x00, 0x00, 0x08 }, // OP Freq Down 0.1MHz { 0x00, 0x00, 0x01, 0x00, 0x08 }, // OP Freq Down 1MHz { 0x00, 0x00, 0x00, 0x00, 0x09 }, // RX Clarifier (OFF) { 0x00, 0x00, 0x00, 0x01, 0x09 }, // RX Clarifier (ON) { 0x00, 0x00, 0x00, 0x80, 0x09 }, // TX Clarifier (OFF) { 0x00, 0x00, 0x00, 0x81, 0x09 }, // TX Clarifier (ON) { 0x00, 0x00, 0x00, 0xff, 0x09 }, // Clear Clarifier Offset { 0x00, 0x00, 0x00, 0x00, 0x09 }, // Clarifier { 0x00, 0x00, 0x00, 0x00, 0x0a }, // Set Op Freq { 0x00, 0x00, 0x00, 0x00, 0x0c }, // OP Mode Set LSB { 0x00, 0x00, 0x00, 0x01, 0x0c }, // OP Mode Set USB { 0x00, 0x00, 0x00, 0x02, 0x0c }, // OP Mode Set CW 2.4KHz { 0x00, 0x00, 0x00, 0x03, 0x0c }, // OP Mode Set CW 500Hz { 0x00, 0x00, 0x00, 0x04, 0x0c }, // OP Mode Set AM 6KHz { 0x00, 0x00, 0x00, 0x05, 0x0c }, // OP Mode Set AM 2.4KHz { 0x00, 0x00, 0x00, 0x06, 0x0c }, // OP Mode Set FM { 0x00, 0x00, 0x00, 0x08, 0x0c }, // OP Mode Set RTTY LSB { 0x00, 0x00, 0x00, 0x09, 0x0c }, // OP Mode Set RTTY USB { 0x00, 0x00, 0x00, 0x0a, 0x0c }, // OP Mode Set PKT LSB { 0x00, 0x00, 0x00, 0x0b, 0x0c }, // OP Mode Set PKT FM { 0x00, 0x00, 0x00, 0x00, 0x0e }, // Pacing { 0x00, 0x00, 0x00, 0x00, 0x0f }, // PTT (OFF) { 0x00, 0x00, 0x00, 0x01, 0x0f }, // PTT (ON) { 0x00, 0x00, 0x00, 0x00, 0x10 }, // Update All Data (1508 bytes) { 0x00, 0x00, 0x00, 0x01, 0x10 }, // Update Memory Ch Number { 0x00, 0x00, 0x00, 0x02, 0x10 }, // Update Op Data { 0x00, 0x00, 0x00, 0x03, 0x10 }, // Update VFO Data { 0x00, 0x00, 0x00, 0x04, 0x10 }, // Update Memory Ch Data { 0x00, 0x00, 0x00, 0x00, 0x81 }, // Tuner (OFF) { 0x00, 0x00, 0x00, 0x01, 0x81 }, // Tuner (ON) { 0x00, 0x00, 0x00, 0x00, 0x82 }, // Tuner (Start) { 0x00, 0x00, 0x00, 0x00, 0x84 }, // Repeater Mode (OFF) { 0x00, 0x00, 0x00, 0x01, 0x84 }, // Repeater Mode (Minus) { 0x00, 0x00, 0x00, 0x02, 0x84 }, // Repeater Mode (Plus) { 0x00, 0x00, 0x00, 0x00, 0x85 }, // Copy displayed VFO (A=B || B=A) { 0x00, 0x00, 0x00, 0x00, 0x8C }, // Select Bandwidth { 0x00, 0x00, 0x00, 0x00, 0x8E }, // Step Operating Frequency Up { 0x00, 0x00, 0x00, 0x01, 0x8E }, // Step Operating Frequency Down { 0x00, 0x00, 0x00, 0x00, 0xf7 }, // Read Meter { 0x00, 0x00, 0x00, 0x00, 0xf8 }, // DIM Level { 0x00, 0x00, 0x00, 0x00, 0xf9 }, // Set Offset for Repeater Shift { 0x00, 0x00, 0x00, 0x00, 0xfa }, // Read Status Flags */ void RIG_FT1000::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; } int RIG_FT1000::adjust_bandwidth(int m) { if (m == 0 || m == 1 || m == 8 || m == 9 || m == 10 || m == 11) return 0; if ( m == 3 ) return 0; if ( m == 4 ) return 2; if ( m == 4 ) return 4; if ( m == 5 ) return 0; if ( m == 6 || m == 7 || m == 11) return 0; return 0; } long RIG_FT1000::get_vfoA () { init_cmd(); cmd[3] = 2; cmd[4] = 0x10; int ret = waitN(17, 100, "get vfoA", HEX); if (ret < 17) return freqA; replybuff[9] = 0; freqA = fm_bcd(&replybuff[6], 8) * 10; bwA = replybuff[13] & 0x07; return freqA; } void RIG_FT1000::set_vfoA (long freq) { freqA = freq; freq /=10; // 1000 does not support 1 Hz resolution cmd = to_bcd(freq, 8); cmd += 0x0A; sendCommand(cmd, 0); } int RIG_FT1000::get_modeA() { init_cmd(); cmd[4] = 0x0C; int ret = waitN(5, 100, "get modeA", HEX); if (ret < 5) return modeA; modeA = cmd[4]; return modeA; } void RIG_FT1000::set_modeA(int val) { modeA = val; init_cmd(); cmd[3] = val; cmd[4] = 0x0C; sendCommand(cmd, 0); } int RIG_FT1000::get_modetype(int n) { return FT1000_mode_type[n]; } void RIG_FT1000::set_bwA(int n) { init_cmd(); cmd[3] = n; cmd[4] = 0x8C; sendCommand(cmd, 0); bwA = n; } int RIG_FT1000::get_bwA() { return bwA; } // Tranceiver PTT on/off void RIG_FT1000::set_PTT_control(int val) { init_cmd(); if (val) cmd[3] = 1; else cmd[3] = 0; cmd[4] = 0x0F; sendCommand(cmd, 0); } void RIG_FT1000::tune_rig() { init_cmd(); cmd[4] = 0x82; sendCommand(cmd, 0); } int RIG_FT1000::get_power_out(void) { init_cmd(); cmd[4] = 0xF7; int ret = waitN(5, 100, "get pwr out", HEX); if (ret < 5) return 0; return replybuff[0] && 0x0F; } int RIG_FT1000::get_smeter(void) { init_cmd(); cmd[4] = 0xF7; int ret = waitN(5, 100, "get smeter", HEX); if (ret < 5) return 0; return replybuff[0] && 0x0F; } flrig-1.3.24/src/rigs/K3.cxx0000644000175000017500000003761312646443275012410 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "K3.h" #include "status.h" const char K3name_[] = "K3"; const char *K3modes_[] = { "LSB", "USB", "CW", "FM", "AM", "DATA", "CW-R", "DATA-R", NULL}; const char modenbr[] = { '1', '2', '3', '4', '5', '6', '7', '9' }; static const char K3_mode_type[] = { 'L', 'U', 'L', 'U', 'U', 'U', 'U', 'L' }; static const char *K3_widths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "550", "600", "650", "700", "750", "800", "850", "900", "950", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", NULL}; static int K3_bw_vals[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38, 39,40, WVALS_LIMIT}; static int def_mode_width[] = { 34, 34, 15, 37, 37, 34, 15, 34 }; static GUI k3_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 125, 156 }, { (Fl_Widget *)sldrPOWER, 266, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_K3::RIG_K3() { // base class values name_ = K3name_; modes_ = K3modes_; bandwidths_ = K3_widths; bw_vals_ = K3_bw_vals; comm_baudrate = BR38400; widgets = k3_widgets; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; def_freq = freqA = freqB = 14070000; def_mode = modeA = modeB = 1; def_bw = bwA = bwB = 34; can_change_alt_vfo = has_split_AB = has_micgain_control = has_rf_control = has_bandwidth_control = has_power_control = has_volume_control = has_mode_control = has_ptt_control = has_noise_control = has_attenuator_control = has_smeter = has_power_out = has_split = has_ifshift_control = has_preamp_control = true; has_notch_control = has_tune_control = has_swr_control = false; if_shift_min = 400; if_shift_max = 2600; if_shift_step = 10; if_shift_mid = 1500; precision = 1; ndigits = 8; } int RIG_K3::adjust_bandwidth(int m) { return def_mode_width[m]; } int RIG_K3::def_bandwidth(int m) { return def_mode_width[m]; } #define K3_WAIT_TIME 800 extern int report_level; void RIG_K3::initialize() { debug::level = debug::INFO_LEVEL; LOG_INFO("K3"); k3_widgets[0].W = btnVol; k3_widgets[1].W = sldrVOLUME; k3_widgets[2].W = sldrRFGAIN; k3_widgets[3].W = btnIFsh; k3_widgets[4].W = sldrIFSHIFT; k3_widgets[5].W = sldrMICGAIN; k3_widgets[6].W = sldrPOWER; report_level = INFO; cmd = "AI0;"; // disable auto-info sendCommand(cmd); showresp(INFO, ASC, "disable auto-info", cmd, replystr); cmd = "K31;"; // K3 extended mode sendCommand(cmd); showresp(INFO, ASC, "K3 extended mode", cmd, replystr); cmd = "SWT49;"; // Fine tuning (1 Hz mode) sendCommand(cmd); showresp(INFO, ASC, "set fine tune", cmd, replystr); cmd = "OM;"; // request options to get power level int ret = wait_char(';', 16, K3_WAIT_TIME, "Options", ASC); if (ret) { if (replystr.find("P") == string::npos) { minpwr = 0; maxpwr = 12; steppwr = 1; } else { minpwr = 0; maxpwr = 106; steppwr = 1; } } get_vfoA(); get_modeA(); get_bwA(); get_vfoB(); get_modeB(); get_bwB(); set_split(false); // normal ops } void RIG_K3::shutdown() { } long RIG_K3::get_vfoA () { cmd = "FA;"; int ret = wait_char(';', 14, K3_WAIT_TIME, "get vfo A", ASC); if (ret < 14) return freqA; size_t p = replystr.rfind("FA"); if (p == string::npos) return freqA; long f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p + n] - '0'; freqA = f; return freqA; } void RIG_K3::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set vfo A", cmd, replystr); } long RIG_K3::get_vfoB () { cmd = "FB;"; int ret = wait_char(';', 14, K3_WAIT_TIME, "get vfo B", ASC); if (ret < 14) return freqB; size_t p = replystr.rfind("FB"); if (p == string::npos) return freqB; long f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p + n] - '0'; freqB = f; return freqB; } void RIG_K3::set_vfoB (long freq) { if (split_on == false) { LOG_INFO("split on"); return; } freqB = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set vfo B", cmd, replystr); } // Volume control void RIG_K3::set_volume_control(int val) { int ivol = (int)(val * 2.55); cmd = "AG000;"; for (int i = 4; i > 1; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set vol", cmd, replystr); } int RIG_K3::get_volume_control() { cmd = "AG;"; int ret = wait_char(';', 6, K3_WAIT_TIME, "get volume", ASC); if (ret < 6) return progStatus.volume; size_t p = replystr.rfind("AG"); if (p == string::npos) return 0; replystr[p + 5] = 0; int v = atoi(&replystr[p + 2]); return (int)(v / 2.55); } void RIG_K3::set_pbt_values(int val) { switch (val) { case 0 : case 1 : case 3 : case 4 : if_shift_min = 400; if_shift_max = 2600; if_shift_step = 10; if_shift_mid = 1500; break; case 2 : case 6 : if_shift_min = 300; if_shift_max = 1300; if_shift_step = 10; if_shift_mid = 800; break; case 5 : case 7 : if_shift_min = 100; if_shift_max = 2100; if_shift_step = 10; if_shift_mid = 1000; break; } progStatus.shift_val = if_shift_mid; Fl::awake(adjust_if_shift_control, (void *)0); } void RIG_K3::set_modeA(int val) { modeA = val; cmd = "MD0;"; cmd[2] = modenbr[val]; sendCommand(cmd); showresp(INFO, ASC, "set mode A", cmd, replystr); set_pbt_values(val); } int RIG_K3::get_modeA() { cmd = "MD;"; int ret = wait_char(';', 4, K3_WAIT_TIME, "get mode A", ASC); if (ret < 4) return modeA; size_t p = replystr.rfind("MD"); if (p == string::npos) return modeA; int md = replystr[p + 2] - '1'; if (md == 8) md--; if (md != modeA) set_pbt_values(md); return (modeA = md); } void RIG_K3::set_modeB(int val) { if (split_on == false) { LOG_INFO("split on"); return; } modeB = val; cmd = "MD$0;"; cmd[3] = modenbr[val]; sendCommand(cmd); showresp(INFO, ASC, "set mode B", cmd, replystr); set_pbt_values(val); } int RIG_K3::get_modeB() { cmd = "MD$;"; int ret = wait_char(';', 4, K3_WAIT_TIME, "get mode B", ASC); if (ret < 4) return modeB; size_t p = replystr.rfind("MD$"); if (p == string::npos) return modeB; int md = replystr[p + 3] - '1'; if (md == 8) md--; if (md != modeB) set_pbt_values(md); return (modeB = md); } int RIG_K3::get_modetype(int n) { return K3_mode_type[n]; } void RIG_K3::set_preamp(int val) { if (val) sendCommand("PA1;", 0); else sendCommand("PA0;", 0); } int RIG_K3::get_preamp() { cmd = "PA;"; int ret = wait_char(';', 4, K3_WAIT_TIME, "get preamp", ASC); if (ret < 4) return progStatus.preamp; size_t p = replystr.rfind("PA"); if (p == string::npos) return 0; return (replystr[p + 2] == '1' ? 1 : 0); } // void RIG_K3::set_attenuator(int val) { if (val) sendCommand("RA01;", 0); else sendCommand("RA00;", 0); } int RIG_K3::get_attenuator() { cmd = "RA;"; int ret = wait_char(';', 5, K3_WAIT_TIME, "set ATT", ASC); if (ret < 5) return progStatus.attenuator; size_t p = replystr.rfind("RA"); if (p == string::npos) return 0; return (replystr[p + 3] == '1' ? 1 : 0); } // Transceiver power level void RIG_K3::set_power_control(double val) { int ival = val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set power ctrl", cmd, replystr); } int RIG_K3::get_power_control() { cmd = "PC;"; int ret = wait_char(';', 6, K3_WAIT_TIME, "get power level", ASC); if (ret < 6) return progStatus.power_level; size_t p = replystr.rfind("PC"); if (p == string::npos) return progStatus.power_level; return fm_decimal(&replystr[p+2], 3); } void RIG_K3::get_pc_min_max_step(double &min, double &max, double &step) { min = minpwr; max = maxpwr; step = steppwr; } // Transceiver rf control void RIG_K3::set_rf_gain(int val) { int ival = val; cmd = "RG000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set rfgain ctrl", cmd, replystr); } int RIG_K3::get_rf_gain() { cmd = "RG;"; int ret = wait_char(';', 6, K3_WAIT_TIME, "get RF gain", ASC); if (ret < 6) return progStatus.rfgain; size_t p = replystr.rfind("RG"); if (p == string::npos) return progStatus.rfgain; replystr[p + 5] = 0; int v = atoi(&replystr[p + 2]); return v; } void RIG_K3::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 250; step = 1; } // Transceiver mic control void RIG_K3::set_mic_gain(int val) { int ival = (int)val; cmd = "MG000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set mic ctrl", cmd, replystr); } int RIG_K3::get_mic_gain() { cmd = "MG;"; int ret = wait_char(';', 6, K3_WAIT_TIME, "get MIC gain", ASC); if (ret < 6) return progStatus.mic_gain; size_t p = replystr.rfind("MG"); if (p == string::npos) return progStatus.mic_gain; replystr[p + 5] = 0; int v = atoi(&replystr[p + 2]); return v; } void RIG_K3::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 60; step = 1; } // Tranceiver PTT on/off void RIG_K3::set_PTT_control(int val) { if (val) sendCommand("TX;", 0); else sendCommand("RX;", 0); } //BG (Bargraph Read; GET only) //RSP format: BGnn; where is 00 (no bars) through 10 (bar 10) if the bargraph is in DOT mode, and 12 (no //bars) through 22 (all 10 bars) if the bargraph is in BAR mode. Reads the S-meter level on receive. Reads the //power output level or ALC level on transmit, depending on the RF/ALC selection. Also see SM/SM$ command, //which can read either main or sub RX S-meter level. //SM $ (S-meter Read; GET only) //Basic RSP format: SMnnnn; where nnnn is 0000-0015. S9=6; S9+20=9; S9+40=12; S9+60=15. //K3 Extended RSP format (K31): nnnn is 0000-0021. S9=9; S9+20=13; S9+40=17; S9+60=21. //This command can be used to obtain either the main (SM) or sub (SM$) S-meter readings. Returns 0000 in transmit //mode. BG can be used to simply emulate the bar graph level, and applies to either RX or TX mode. int RIG_K3::get_smeter() { cmd = "SM;"; int ret = wait_char(';', 7, K3_WAIT_TIME, "get Smeter", ASC); if (ret < 7) return 0; size_t p = replystr.rfind("SM"); if (p == string::npos) return 0; replystr[p + 6] = 0; int mtr = atoi(&replystr[p + 3]); if (mtr <= 6) mtr = (int) (50.0 * mtr / 6.0); else mtr = (int)(50 + (mtr - 6.0) * 50.0 / 9.0); return mtr; } void RIG_K3::set_noise(bool on) { if (on) sendCommand("NB1;", 0); else sendCommand("NB0;", 0); } int RIG_K3::get_noise() { cmd = "NB;"; int ret = wait_char(';', 4, K3_WAIT_TIME, "get Noise Blanker", ASC); if (ret < 4) return progStatus.noise; size_t p = replystr.rfind("NB"); if (p == string::npos) return progStatus.noise; return (replystr[p+2] == '1' ? 1 : 0); } // FW $ (Filter Bandwidth and Number; GET/SET) // K3 Extended SET/RSP format (K31): FWxxxx; where xxxx is 0-9999, the bandwidth // in 10-Hz units. May be quantized and/or range limited based on the present // operating mode. void RIG_K3::set_bwA(int val) { cmd = "FW0000;"; bwA = val; val = atoi(K3_widths[val]); val /= 10; cmd[5] += val % 10; val /= 10; cmd[4] += val % 10; val /= 10; cmd[3] += val % 10; val /= 10; cmd[2] += val % 10; sendCommand(cmd); showresp(INFO, ASC, "set bw A", cmd, replystr); } int RIG_K3::get_bwA() { cmd = "FW;"; int ret = wait_char(';', 7, K3_WAIT_TIME, "get bandwidth A", ASC); if (ret < 7) return bwA; size_t p = replystr.rfind("FW"); if (p == string::npos) return bwA; int bw = 0; for (int i = 2; i < 6; i++) bw = bw * 10 + replystr[p+i] - '0'; bw *= 10; for (bwA = 0; bwA < 36; bwA++) if (bw <= atoi(K3_widths[bwA])) break; return bwA; } void RIG_K3::set_bwB(int val) { if (split_on == false) { LOG_INFO("split on"); return; } cmd = "FW$0000;"; bwA = val; val = atoi(K3_widths[val]); val /= 10; cmd[6] += val % 10; val /= 10; cmd[5] += val % 10; val /= 10; cmd[4] += val % 10; val /= 10; cmd[3] += val % 10; sendCommand(cmd); showresp(INFO, ASC, "set bw B", cmd, replystr); } int RIG_K3::get_bwB() { cmd = "FW$;"; int ret = wait_char(';', 8, K3_WAIT_TIME, "get bandwidth B", ASC); if (ret < 8) return bwB; size_t p = replystr.rfind("FW$"); if (p == string::npos) return bwB; int bw = 0; for (int i = 3; i < 7; i++) bw = bw * 10 + replystr[p+i] - '0'; bw *= 10; for (bwB = 0; bwB < 36; bwB++) if (bw <= atoi(K3_widths[bwB])) break; return bwB; } int RIG_K3::get_power_out() { cmd = "BG;"; // responds BGnn; 0 < nn < 10 int ret = wait_char(';', 5, K3_WAIT_TIME, "get power out", ASC); if (ret < 5) return 0; size_t p = replystr.rfind("BG"); if (p == string::npos) return 0; replystr[p + 4] = 0; int mtr = atoi(&replystr[p + 2]) * 10; if (mtr > 100) mtr = 100; return mtr; } bool RIG_K3::can_split() { return true; } void RIG_K3::set_split(bool val) { if (val) { cmd = "FT1;"; sendCommand(cmd); showresp(INFO, ASC, "set split ON", cmd, replystr); } else { cmd = "FR0;"; sendCommand(cmd); showresp(INFO, ASC, "set split OFF", cmd, replystr); } split_on = val; } // 01234567890123456789012345678901234567 // 0 1 2 3 7 // IF00014070000*****+yyyyrx*00tmvspbd1*; // |---------| | // vfo a/b split on = '1', off = '0' // IF00014070000 -000000 0002000011 ; OFF // IF00014070000 -000000 0002001011 ; ON int RIG_K3::get_split() { cmd = "IF;"; int ret = wait_char(';', 38, K3_WAIT_TIME, "get split", ASC); if (ret < 38) return split_on; size_t p = replystr.rfind("IF"); if (p == string::npos) return split_on; split_on = replystr[p+32] - '0'; return split_on; } void RIG_K3::set_if_shift(int val) { cmd = "IS 0000;"; cmd[6] += val % 10; val /= 10; cmd[5] += val % 10; val /= 10; cmd[4] += val % 10; val /= 10; cmd[3] += val % 10; sendCommand(cmd); showresp(INFO, ASC, "set if shift", cmd, replystr); } bool RIG_K3::get_if_shift(int &val) { cmd = "IS;"; int ret = wait_char(';', 8, K3_WAIT_TIME, "get IF shift", ASC); val = progStatus.shift_val; if (ret < 8) return progStatus.shift; size_t p = replystr.rfind("IS "); if (p == string::npos) return progStatus.shift; sscanf(&replystr[p + 3], "%d", &progStatus.shift_val); val = progStatus.shift_val; if (val == if_shift_mid) progStatus.shift = false; else progStatus.shift = true; return progStatus.shift; } void RIG_K3::get_if_min_max_step(int &min, int &max, int &step) { min = if_shift_min; max = if_shift_max; step = if_shift_step; } void RIG_K3::get_if_mid() { cmd = "IS 9999;"; sendCommand(cmd); waitResponse(500); showresp(INFO, ASC, "center pbt", cmd, replystr); cmd = "IS;"; int ret = wait_char(';', 8, K3_WAIT_TIME, "get PBT center", ASC); if (ret < 8) return; size_t p = replystr.rfind("IS "); if (p == string::npos) return; sscanf(&replystr[p + 3], "%d", &if_shift_mid); } flrig-1.3.24/src/rigs/FT857D.cxx0000644000175000017500000001231712626471743013005 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include "FT857D.h" #include "support.h" static const char FT857Dname_[] = "FT-857D"; static const char FT897Dname_[] = "FT-897D"; static const char *FT857Dmodes_[] = { "LSB", "USB", "CW", "CW-R", "AM", "FM", "DIG", "PKT", NULL}; static const int FT857D_mode_val[] = { 0, 1, 2, 3, 4, 8, 0x0A, 0x0C }; static const char FT857D_mode_type[] = { 'L', 'U', 'U', 'L', 'U', 'U', 'U', 'U' }; RIG_FT857D::RIG_FT857D() { // base class values name_ = FT857Dname_; modes_ = FT857Dmodes_; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; has_split_AB = has_smeter = has_power_out = has_mode_control = true; precision = 10; ndigits = 8; }; RIG_FT897D::RIG_FT897D() { name_ = FT897Dname_; onB = false; }; void RIG_FT857D::set_getACK() { for (int i = 0; i < 5; i++) { sendCommand(cmd, 0); for (int j = 0; j < 10; j++) { if (readResponse() == 1) return; MilliSleep(50); } } } void RIG_FT857D::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; } long RIG_FT857D::get_vfoA () { init_cmd(); cmd[4] = 0x03; int ret = waitN(5, 100, "get vfo A", HEX); if (ret == 5) { freqA = fm_bcd(replybuff, 8) * 10; int mode = replybuff[4]; for (int i = 0; i < 8; i++) if (FT857D_mode_val[i] == mode) { modeA = i; break; } } return freqA; } void RIG_FT857D::set_vfoA (long freq) { freqA = freq; freq /=10; // 857D does not support 1 Hz resolution cmd = to_bcd(freq, 8); cmd += 0x01; replystr.clear(); set_getACK(); showresp(WARN, HEX, "set vfo A", cmd, replystr); } long RIG_FT857D::get_vfoB () { init_cmd(); cmd[4] = 0x03; int ret = waitN(5, 100, "get vfo B", HEX); if (ret == 5) { freqB = fm_bcd(replybuff, 8) * 10; int mode = replybuff[4]; for (int i = 0; i < 8; i++) if (FT857D_mode_val[i] == mode) { modeB = i; break; } } return freqB; } void RIG_FT857D::set_vfoB (long freq) { freqB = freq; freq /=10; // 857D does not support 1 Hz resolution cmd = to_bcd(freq, 8); cmd += 0x01; replystr.clear(); set_getACK(); showresp(WARN, HEX, "set vfo B", cmd, replystr); } int RIG_FT857D::get_modeA() { // read by get_vfoA return modeA; } int RIG_FT857D::get_modeB() { // read by get_vfoB return modeB; } int RIG_FT857D::get_modetype(int n) { return FT857D_mode_type[n]; } void RIG_FT857D::set_modeA(int val) { modeA = val; init_cmd(); cmd[0] = FT857D_mode_val[val]; cmd[4] = 0x07; replystr.clear(); set_getACK(); showresp(WARN, HEX, "set mode A", cmd, replystr); } void RIG_FT857D::set_modeB(int val) { modeB = val; init_cmd(); cmd[0] = FT857D_mode_val[val]; cmd[4] = 0x07; replystr.clear(); set_getACK(); showresp(WARN, HEX, "set mode B", cmd, replystr); } // Tranceiver PTT on/off void RIG_FT857D::set_PTT_control(int val) { init_cmd(); if (val) cmd[4] = 0x08; else cmd[4] = 0x88; replystr.clear(); set_getACK(); showresp(WARN, HEX, "set PTT", cmd, replystr); } // mod submitted by Rich, WA4SXZ, for power_out and smeter int RIG_FT857D::get_power_out(void) { init_cmd(); cmd[4] = 0xF7; int ret = waitN(1, 100, "get pout", HEX); if (ret == 1) { int fwdpwr = replybuff[0] & 0x0F; fwdpwr = fwdpwr * 100 / 15; return fwdpwr; } return 0; } int RIG_FT857D::get_smeter(void) { init_cmd(); cmd[4] = 0xE7; int ret = waitN(1, 100, "get smeter", HEX); if (ret == 1) { int sval = replybuff[0] & 0x0F; sval = (sval-1) * 100 / 15; return sval; } return 0; } void RIG_FT857D::selectA() { if (!onB) return; onB = false; init_cmd(); cmd[4] = 0x81; // this is a toggle ... no way of knowing which is A or B replystr.clear(); set_getACK(); showresp(WARN, HEX, "select A", cmd, replystr); } void RIG_FT857D::selectB() { if (onB) return; onB = true; init_cmd(); cmd[4] = 0x81; // this is a toggle ... no way of knowing which is A or B replystr.clear(); set_getACK(); showresp(WARN, HEX, "select B", cmd, replystr); } bool RIG_FT857D::can_split() { return true; } void RIG_FT857D::set_split(bool val) { split = val; replystr.clear(); init_cmd(); if (val) { cmd[4] = 0x02; set_getACK(); showresp(WARN, HEX, "set split ON", cmd, replystr); } else { cmd[4] = 0x82; set_getACK(); showresp(WARN, HEX, "set split OFF", cmd, replystr); } } flrig-1.3.24/src/rigs/IC756PRO2.cxx0000644000175000017500000004564412562731647013336 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC756PRO2.h" #include "debug.h" #include "support.h" const char IC756PRO2name_[] = "IC-756PRO-II"; //============================================================================= const char *IC756PRO2modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", "CW-R", "RTTY-R", "D-LSB", "D-USB", "D-FM", NULL}; const char IC756PRO2_mode_type[] = { 'L', 'U', 'U', 'U', 'L', 'U', 'L', 'U', 'L', 'U', 'U' }; const char *IC756PRO2_SSBwidths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", "2800", "2900", "3000", "3100", "3200", "3300", "3400", "3500", "3600", NULL}; static int IC756PRO2_bw_vals_SSB[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38,39,40, 41, WVALS_LIMIT}; const char *IC756PRO2_RTTYwidths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2100", "2200", "2300", "2400", "2500", "2600", "2700", NULL}; static int IC756PRO2_bw_vals_RTTY[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32, WVALS_LIMIT}; const char *IC756PRO2_AMFMwidths[] = { "FILT-1", "FILT-2", "FILT-3", NULL }; static int IC756PRO2_bw_vals_AMFM[] = { 1, 2, 3, WVALS_LIMIT}; static GUI ic756pro2_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnNR, 2, 165, 50 }, { (Fl_Widget *)sldrNR, 54, 165, 156 }, { (Fl_Widget *)btnIFsh, 214, 125, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 125, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 145, 156 }, { (Fl_Widget *)sldrPOWER, 266, 165, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_IC756PRO2::RIG_IC756PRO2() { defaultCIV = 0x64; name_ = IC756PRO2name_; modes_ = IC756PRO2modes_; bandwidths_ = IC756PRO2_SSBwidths; bw_vals_ = IC756PRO2_bw_vals_SSB; _mode_type = IC756PRO2_mode_type; widgets = ic756pro2_widgets; def_freq = freqA = freqB = A.freq = 14070000; def_mode = modeA = modeB = B.imode = 1; def_bw = bwA = bwB = A.iBW = B.iBW = 32; atten_level = 3; preamp_level = 2; adjustCIV(defaultCIV); has_a2b = has_bandwidth_control = has_ifshift_control = has_tune_control = has_swr_control = has_alc_control = has_smeter = has_power_control = has_volume_control = has_mode_control = has_micgain_control = has_auto_notch = has_attenuator_control = has_preamp_control = has_ptt_control = has_noise_reduction = has_noise_reduction_control = has_noise_control = has_rf_control = true; precision = 1; ndigits = 9; }; void RIG_IC756PRO2::initialize() { ic756pro2_widgets[0].W = btnVol; ic756pro2_widgets[1].W = sldrVOLUME; ic756pro2_widgets[2].W = sldrRFGAIN; ic756pro2_widgets[3].W = btnNR; ic756pro2_widgets[4].W = sldrNR; ic756pro2_widgets[5].W = btnIFsh; ic756pro2_widgets[6].W = sldrIFSHIFT; ic756pro2_widgets[7].W = sldrMICGAIN; ic756pro2_widgets[8].W = sldrPOWER; } void RIG_IC756PRO2::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\xD0'; cmd.append(post); waitFB("sel A"); } void RIG_IC756PRO2::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\xD1'; cmd.append(post); waitFB("sel B"); } void RIG_IC756PRO2::A2B() { cmd = pre_to; cmd += '\x07'; cmd += '\xB1'; cmd.append(post); waitFB("A->B"); } long RIG_IC756PRO2::get_vfoA () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(11, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.freq = fm_bcd_be(&replystr[p+5], 10); } return A.freq; } void RIG_IC756PRO2::set_vfoA (long freq) { A.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo A"); } long RIG_IC756PRO2::get_vfoB () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(11, "get vfo B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.freq = fm_bcd_be(&replystr[p+5], 10); } return B.freq; } void RIG_IC756PRO2::set_vfoB (long freq) { B.freq = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 10 ) ); cmd.append( post ); waitFB("set vfo B"); } int RIG_IC756PRO2::get_smeter() { string cstr = "\x15\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get smeter")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6], 3) / 2.55); } return 0; } // Volume control val 0 ... 100 void RIG_IC756PRO2::set_volume_control(int val) { ICvol = (int)(val); cmd = pre_to; cmd.append("\x14\x01"); cmd.append(to_bcd(ICvol, 3)); cmd.append( post ); waitFB("set vol"); } int RIG_IC756PRO2::get_volume_control() { string cstr = "\x14\x01"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get vol")) { size_t p = replystr.rfind(resp); if (p != string::npos) return ((int)(fm_bcd(&replystr[p+6],3))); } return 0; } void RIG_IC756PRO2::get_vol_min_max_step(int &min, int &max, int &step) { min = 0; max = 255; step = 1; } // Tranceiver PTT on/off void RIG_IC756PRO2::set_PTT_control(int val) { cmd = pre_to; cmd += '\x1c'; cmd += '\x00'; cmd += (unsigned char) val; cmd.append( post ); waitFB("set PTT"); } // changed noise blanker to noise reduction void RIG_IC756PRO2::set_noise(bool val) { cmd = pre_to; cmd.append("\x16\x22"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set noise"); } int RIG_IC756PRO2::get_noise() { string cstr = "\x16\x22"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get noise")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return 0; } void RIG_IC756PRO2::set_noise_reduction(int val) { cmd = pre_to; cmd.append("\x16\x40"); cmd += val ? 1 : 0; cmd.append(post); waitFB("set NR"); } int RIG_IC756PRO2::get_noise_reduction() { string cstr = "\x16\x40"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get NR")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (replystr[p+6] ? 1 : 0); } return 0; } // 0 < val < 100 void RIG_IC756PRO2::set_noise_reduction_val(int val) { cmd = pre_to; cmd.append("\x14\x06"); cmd.append(to_bcd(val * 255 / 100, 3)); cmd.append(post); waitFB("set NR val"); } int RIG_IC756PRO2::get_noise_reduction_val() { string cstr = "\x14\x06"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(9, "get NR val")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p+6],3) / 2.55); } return 0; } int RIG_IC756PRO2::get_modetype(int n) { return _mode_type[n]; } void RIG_IC756PRO2::set_mic_gain(int val) { val = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x0B"); cmd.append(to_bcd(val,3)); cmd.append(post); waitFB("set mic"); } void RIG_IC756PRO2::get_mic_gain_min_max_step(int &min, int &max, int &step) { min = 0; max = 100; step = 1; } void RIG_IC756PRO2::set_if_shift(int val) { int shift = (int)((val + 50) * 2.56 ); if (shift == 256) shift = 255; cmd = pre_to; cmd.append("\x14\x07"); cmd.append(to_bcd(shift, 3)); cmd.append(post); waitFB("set IF on/off"); cmd = pre_to; cmd.append("\x14\x08"); cmd.append(to_bcd(shift, 3)); cmd.append(post); waitFB("set IF val"); } void RIG_IC756PRO2::get_if_min_max_step(int &min, int &max, int &step) { min = -50; max = +50; step = 2; } int IC756PRO2sql = 0; void RIG_IC756PRO2::set_squelch(int val) { IC756PRO2sql = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x03"); cmd.append(to_bcd(IC756PRO2sql, 3)); cmd.append( post ); waitFB("set sql"); } int IC756PRO2rfg = 0; void RIG_IC756PRO2::set_rf_gain(int val) { IC756PRO2rfg = (int)(val * 255 / 100); cmd = pre_to; cmd.append("\x14\x02"); cmd.append(to_bcd(IC756PRO2rfg, 3)); cmd.append( post ); waitFB("set rf gain"); } void RIG_IC756PRO2::set_power_control(double val) { cmd = pre_to; cmd.append("\x14\x0A"); cmd.append(to_bcd((int)(val * 255 / 100), 3)); cmd.append( post ); waitFB("set power"); } void RIG_IC756PRO2::set_split(bool val) { cmd = pre_to; cmd += 0x0F; cmd += val ? 0x01 : 0x00; cmd.append(post); waitFB("set split"); } //====================================================================== // IC756PRO2 unique commands //====================================================================== void RIG_IC756PRO2::set_modeA(int val) { A.imode = val; bool datamode = false; switch (val) { case 10 : val = 5; datamode = true; break; case 9 : val = 1; datamode = true; break; case 8 : val = 0; datamode = true; break; case 7 : val = 8; break; case 6 : val = 7; break; default: break; } cmd = pre_to; cmd += '\x06'; cmd += val; cmd.append( post ); waitFB("set mode A"); if (datamode) { // LSB / USB ==> use DATA mode cmd = pre_to; cmd.append("\x1A\x06\x01"); cmd.append(post); waitFB("data mode"); } } int RIG_IC756PRO2::get_modeA() { int md; string cstr = "\x04"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get mode A")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md--; A.iBW = replystr[p+6]; cstr = "\x1A\x06"; resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "data ?")) { p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6]) { switch (md) { case 0 : md = 8; break; case 1 : md = 9; break; case 5 : md = 10; break; default : break; } } } } A.imode = md; } } return A.imode; } void RIG_IC756PRO2::set_modeB(int val) { B.imode = val; bool datamode = false; switch (val) { case 10 : val = 5; datamode = true; break; case 9 : val = 1; datamode = true; break; case 8 : val = 0; datamode = true; break; case 7 : val = 8; break; case 6 : val = 7; break; default: break; } cmd = pre_to; cmd += '\x06'; cmd += val; cmd.append( post ); waitFB("set mode B"); if (datamode) { // LSB / USB ==> use DATA mode cmd = pre_to; cmd.append("\x1A\x06\x01"); cmd.append(post); waitFB("data mode"); } } int RIG_IC756PRO2::get_modeB() { int md; string cstr = "\x04"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "get mode B")) { size_t p = replystr.rfind(resp); if (p != string::npos) { md = replystr[p+5]; if (md > 6) md--; B.iBW = replystr[p+6]; cstr = "\x1A\x06"; resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append(post); if (waitFOR(8, "data ?")) { p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6]) { switch (md) { case 0 : md = 8; break; case 1 : md = 9; break; case 5 : md = 10; break; default : break; } } } } B.imode = md; } } return B.imode; } int RIG_IC756PRO2::adjust_bandwidth(int m) { if (m == 0 || m == 1 || m == 8 || m == 9) { //SSB bandwidths_ = IC756PRO2_SSBwidths; bw_vals_ = IC756PRO2_bw_vals_SSB; return (32); } if (m == 3 || m == 6) { //CW bandwidths_ = IC756PRO2_SSBwidths; bw_vals_ = IC756PRO2_bw_vals_SSB; return (14); } if (m == 4 || m == 7) { //RTTY bandwidths_ = IC756PRO2_RTTYwidths; bw_vals_ = IC756PRO2_bw_vals_RTTY; return (28); } bandwidths_ = IC756PRO2_AMFMwidths; bw_vals_ = IC756PRO2_bw_vals_AMFM; return (0); } int RIG_IC756PRO2::def_bandwidth(int m) { if (m == 0 || m == 1 || m == 8 || m == 9) { //SSB return (32); } if (m == 3 || m == 6) { //CW return (14); } if (m == 4 || m == 7) { //RTTY return (28); } bandwidths_ = IC756PRO2_AMFMwidths; return (0); } const char **RIG_IC756PRO2::bwtable(int m) { if (m == 0 || m == 1 || m == 8 || m == 9) //SSB return IC756PRO2_SSBwidths; if (m == 3 || m == 6) //CW return IC756PRO2_SSBwidths; if (m == 4 || m == 7) //RTTY return IC756PRO2_RTTYwidths; return IC756PRO2_AMFMwidths; } int RIG_IC756PRO2::get_swr() { string cstr = "\x15\x12"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(9, "get swr")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55 ); } return -1; } int RIG_IC756PRO2::get_alc() { string cstr = "\x15\x13"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(9, "get alc")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55 ); } return -1; } // Transceiver power level return power in watts int RIG_IC756PRO2::get_power_out() { string cstr = "\x15\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(9, "get power")) { size_t p = replystr.rfind(resp); if (p != string::npos) return (int)ceil(fm_bcd(&replystr[p + 6],3) / 2.55 ); } return -1; } void RIG_IC756PRO2::tune_rig() { cmd = pre_to; cmd.append("\x1c\x01\x02"); cmd.append( post ); waitFB("tune"); } void RIG_IC756PRO2::set_bwA(int val) { if (bandwidths_ == IC756PRO2_AMFMwidths) { A.iBW = val + 1; set_modeA(A.imode); return; } A.iBW = val; cmd = pre_to; cmd.append("\x1A\x03"); cmd.append(to_bcd(A.iBW,2)); cmd.append( post ); waitFB("set bw A"); } int RIG_IC756PRO2::get_bwA() { if (bandwidths_ == IC756PRO2_AMFMwidths) { return A.iBW - 1; } string cstr = "\x1A\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get bw A")) { size_t p = replystr.rfind(resp); if (p != string::npos) A.iBW = (int)(fm_bcd(&replystr[p + 6], 2)); } return A.iBW; } void RIG_IC756PRO2::set_bwB(int val) { if (bandwidths_ == IC756PRO2_AMFMwidths) { B.iBW = val + 1; set_modeB(B.imode); return; } B.iBW = val; cmd = pre_to; cmd.append("\x1A\x03"); cmd.append(to_bcd(B.iBW,2)); cmd.append( post ); waitFB("set bw B"); } int RIG_IC756PRO2::get_bwB() { if (bandwidths_ == IC756PRO2_AMFMwidths) { return B.iBW - 1; } string cstr = "\x1A\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get bw B")) { size_t p = replystr.rfind(resp); if (p != string::npos) B.iBW = (int)(fm_bcd(&replystr[p + 6], 2)); } return B.iBW; } bool IC756PRO2_notchon = false; void RIG_IC756PRO2::set_notch(bool on, int val) { int notch = (int)(val/20.0 + 128); if (notch > 256) notch = 255; if (on != IC756PRO2_notchon) { cmd = pre_to; cmd.append("\x16\x48"); cmd += on ? '\x01' : '\x00'; cmd.append(post); waitFB("set notch"); IC756PRO2_notchon = on; } if (on) { cmd = pre_to; cmd.append("\x14\x0D"); cmd.append(to_bcd(notch,3)); cmd.append(post); waitFB("set notch val"); } } bool RIG_IC756PRO2::get_notch(int &val) { bool on = false; val = 0; string cstr = "\x16\x48"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get notch")) { size_t p = replystr.rfind(resp); if (p != string::npos) on = replystr[p + 6] ? 1 : 0; cmd = pre_to; resp = pre_fm; cstr = "\x14\x0D"; cmd.append(cstr); resp.append(cstr); cmd.append(post); if (waitFOR(9, "get notch val")) { size_t p = replystr.rfind(resp); if (p != string::npos) val = 20*ceil(fm_bcd(&replystr[p + 6],3) - 128); } } return on; } void RIG_IC756PRO2::get_notch_min_max_step(int &min, int &max, int &step) { min = -1280; max = 1280; step = 20; } void RIG_IC756PRO2::set_attenuator(int val) { int cmdval = 0; if (atten_level == 0) { atten_level = 1; atten_label("6 dB", true); cmdval = 0x06; } else if (atten_level == 1) { atten_level = 2; atten_label("12 dB", true); cmdval = 0x12; } else if (atten_level == 2) { atten_level = 3; atten_label("18 dB", true); cmdval = 0x18; } else if (atten_level == 3) { atten_level = 0; atten_label("Att", false); cmdval = 0x00; } cmd = pre_to; cmd += '\x11'; cmd += cmdval; cmd.append( post ); waitFB("set att"); } int RIG_IC756PRO2::get_attenuator() { string cstr = "\x11"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(7, "get att")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+5] == 0x06) { atten_level = 1; atten_label("6 dB", true); } else if (replystr[p+5] == 0x12) { atten_level = 2; atten_label("12 dB", true); } else if (replystr[p+5] == 0x18) { atten_level = 3; atten_label("18 dB", true); } else if (replystr[p+5] == 0x00) { atten_level = 0; atten_label("Att", false); } } } return atten_level; } void RIG_IC756PRO2::set_preamp(int val) { if (preamp_level == 0) { preamp_level = 1; preamp_label("Pre 1", true); } else if (preamp_level == 1) { preamp_level = 2; preamp_label("Pre 2", true); } else if (preamp_level == 2) { preamp_level = 0; preamp_label("Pre", false); } cmd = pre_to; cmd += '\x16'; cmd += '\x02'; cmd += (unsigned char) preamp_level; cmd.append( post ); waitFB("set preamp"); } int RIG_IC756PRO2::get_preamp() { string cstr = "\x16\x02"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(8, "get preamp")) { size_t p = replystr.rfind(resp); if (p != string::npos) { if (replystr[p+6] == 0x01) { preamp_label("Pre 1", true); preamp_level = 1; } else if (replystr[p+6] == 0x02) { preamp_label("Pre 2", true); preamp_level = 2; } else { preamp_label("Pre", false); preamp_level = 0; } } } return preamp_level; } flrig-1.3.24/src/rigs/FT747.cxx0000644000175000017500000001107112562731647012674 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include "debug.h" #include "util.h" #include "FT747.h" static const char FT747name_[] = "FT-747"; static const char *FT747modes_[] = { "LSB", "USB", "CW", "CWN", "AMW", "AMN", "FMW", "FMN", NULL}; static const char FT747_mode_type[] = { 'L', 'U', 'U', 'U', 'U', 'U', 'U', 'U' }; RIG_FT747::RIG_FT747() { // base class values name_ = FT747name_; modes_ = FT747modes_; comm_baudrate = BR4800; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = false; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; has_split = true; has_split_AB = true; has_get_info = true; has_ptt_control = true; has_mode_control = true; precision = 10; ndigits = 8; }; void RIG_FT747::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; } void RIG_FT747::selectA() { init_cmd(); cmd[4] = 0x05; sendCommand(cmd); showresp(INFO, HEX, "select A", cmd, replystr); } void RIG_FT747::selectB() { init_cmd(); cmd[3] = 0x01; cmd[4] = 0x05; sendCommand(cmd); showresp(INFO, HEX, "select B", cmd, replystr); } void RIG_FT747::set_split(bool val) { split = val; init_cmd(); cmd[3] = val ? 0x01 : 0x00; cmd[4] = 0x01; sendCommand(cmd); if (val) showresp(INFO, HEX, "set split ON", cmd, replystr); else showresp(INFO, HEX, "set split OFF", cmd, replystr); } bool RIG_FT747::get_info() { long int afreq = A.freq, bfreq = B.freq; int amode = A.imode; init_cmd(); cmd[4] = 0x10; int ret = waitN(28, 100, "get info", HEX); showresp(DEBUG, HEX, "get info", cmd, replystr); if (ret >= 28) { // GET FREQUENCY bytes ARE NOT the same as SET FREQUENCY bytes // returned values are packed BCD // | 00 00 | f2 f3 | f4 f5 | f6 f7 | f8 f9 | where // f2 - 10's of MHz // f3 - MHz // ... f9 - Hz // | 00 00 | 01 04 | 02 05 | 00 00 | 00 00 | = 14.250.000 Hz afreq = fm_bcd(&replybuff[9], 8); bfreq = fm_bcd(&replybuff[16], 8); int md = replybuff[22]; switch (md) { case 0x01 : amode = 6; // FMW break; case 0x81 : amode = 7; // FMN break; case 0x02 : amode = 4; // AMW break; case 0x82 : amode = 5; // AMN break; case 0x04 : amode = 2; // CW break; case 0x84 : amode = 3; // CWN break; case 0x08 : amode = 1; // USB break; case 0x10 : amode = 0; // LSB break; } A.freq = afreq; A.imode = amode; B.freq = bfreq; B.imode = amode; return true; } A.freq = afreq; A.imode = amode; B.freq = bfreq; B.imode = amode; return false; } long RIG_FT747::get_vfoA () { return A.freq; } void RIG_FT747::set_vfoA (long freq) { A.freq = freq; freq /=10; // 747 does not support 1 Hz resolution cmd = to_bcd_be(freq, 8); cmd += 0x0A; // SET FREQUENCY SLOG_INFO("cmd: %s", str2hex(cmd.c_str(), cmd.length())); sendCommand(cmd); } int RIG_FT747::get_modeA() { return A.imode; } void RIG_FT747::set_modeA(int val) { A.imode = val; init_cmd(); cmd[3] = val; cmd[4] = 0x0C; // MODESEL SLOG_INFO("cmd: %s", str2hex(cmd.c_str(), cmd.length())); sendCommand(cmd); } long RIG_FT747::get_vfoB () { return B.freq; } void RIG_FT747::set_vfoB (long freq) { B.freq = freq; freq /=10; cmd = to_bcd_be(freq, 8); cmd += 0x0A; // SET FREQUENCY SLOG_INFO("cmd: %s", str2hex(cmd.c_str(), cmd.length())); sendCommand(cmd); } int RIG_FT747::get_modeB() { return B.imode; } void RIG_FT747::set_modeB(int val) { B.imode = val; init_cmd(); cmd[3] = val; cmd[4] = 0x0C; // MODESEL SLOG_INFO("cmd: %s", str2hex(cmd.c_str(), cmd.length())); sendCommand(cmd); } void RIG_FT747::set_PTT_control(int val) { init_cmd(); cmd[3] = val ? 0x01 : 0x00; cmd[4] = 0x0F; sendCommand(cmd); } flrig-1.3.24/src/rigs/KX3.cxx0000644000175000017500000004676112646444205012536 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "KX3.h" #include "status.h" const char KX3name_[] = "KX3"; const char *KX3modes_[] = { "LSB", "USB", "CW", "FM", "AM", "DATA", "CW-R", "DATA-R", NULL}; const char modenbr[] = { '1', '2', '3', '4', '5', '6', '7', '9' }; static const char KX3_mode_type[] = { 'L', 'U', 'L', 'U', 'U', 'U', 'U', 'L' }; static const char *KX3_widths[] = { "50", "100", "150", "200", "250", "300", "350", "400", "450", "500", "550", "600", "650", "700", "750", "800", "850", "900", "950", "1000", "1100", "1200", "1300", "1400", "1500", "1600", "1700", "1800", "1900", "2000", "2200", "2400", "2600", "2800", "3000", "3200", "3400", "3600", "4000", NULL}; static int KX3_bw_vals[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38, 39,40, WVALS_LIMIT}; static int def_mode_width[] = { 34, 34, 15, 37, 37, 34, 15, 34 }; static GUI k3_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)btnIFsh, 214, 105, 50 }, { (Fl_Widget *)sldrIFSHIFT, 266, 105, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 125, 156 }, { (Fl_Widget *)sldrPOWER, 266, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_KX3::RIG_KX3() { // base class values name_ = KX3name_; modes_ = KX3modes_; bandwidths_ = KX3_widths; bw_vals_ = KX3_bw_vals; comm_baudrate = BR38400; widgets = k3_widgets; stopbits = 1; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = false; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; def_freq = freqA = freqB = 14070000; def_mode = modeA = modeB = 1; def_bw = bwA = bwB = 34; can_change_alt_vfo = has_split_AB = has_micgain_control = has_rf_control = has_bandwidth_control = has_power_control = has_volume_control = has_mode_control = has_ptt_control = has_noise_control = has_attenuator_control = has_smeter = has_power_out = has_split = has_ifshift_control = has_preamp_control = true; has_notch_control = has_tune_control = has_swr_control = false; if_shift_min = 400; if_shift_max = 2600; if_shift_step = 10; if_shift_mid = 1500; precision = 1; ndigits = 8; } int RIG_KX3::adjust_bandwidth(int m) { return def_mode_width[m]; } int RIG_KX3::def_bandwidth(int m) { return def_mode_width[m]; } extern int report_level; void RIG_KX3::initialize() { debug::level = debug::INFO_LEVEL; LOG_INFO("KX3"); k3_widgets[0].W = btnVol; k3_widgets[1].W = sldrVOLUME; k3_widgets[2].W = sldrRFGAIN; k3_widgets[3].W = btnIFsh; k3_widgets[4].W = sldrIFSHIFT; k3_widgets[5].W = sldrMICGAIN; k3_widgets[6].W = sldrPOWER; report_level = INFO; cmd = "AI0;"; // disable auto-info sendCommand(cmd); showresp(INFO, ASC, "disable auto-info", cmd, replystr); cmd = "K31;"; // KX3 extended mode sendCommand(cmd); showresp(INFO, ASC, "KX3 extended mode", cmd, replystr); cmd = "OM;"; // request options to get power level int ret = wait_char(';', 16, KX3_WAIT_TIME, "Options", ASC); if (ret) { if (replystr.find("P") == string::npos) { minpwr = 0; maxpwr = 12; steppwr = 1; } else { minpwr = 0; maxpwr = 106; steppwr = 1; } } get_vfoA(); get_modeA(); get_bwA(); get_vfoB(); get_modeB(); get_bwB(); set_split(false); // normal ops } void RIG_KX3::shutdown() { } long RIG_KX3::get_vfoA () { cmd = "FA;"; int ret = wait_char(';', 14, KX3_WAIT_TIME, "get vfo A", ASC); if (ret < 14) return freqA; size_t p = replystr.rfind("FA"); if (p == string::npos) return freqA; long f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p + n] - '0'; freqA = f; return freqA; } void RIG_KX3::set_vfoA (long freq) { freqA = freq; cmd = "FA00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set vfo A", cmd, replystr); } long RIG_KX3::get_vfoB () { cmd = "FB;"; int ret = wait_char(';', 14, KX3_WAIT_TIME, "get vfo B", ASC); if (ret < 14) return freqB; size_t p = replystr.rfind("FB"); if (p == string::npos) return freqB; long f = 0; for (size_t n = 2; n < 13; n++) f = f*10 + replystr[p + n] - '0'; freqB = f; return freqB; } void RIG_KX3::set_vfoB (long freq) { if (split_on == false) { LOG_INFO("split on"); return; } freqB = freq; cmd = "FB00000000000;"; for (int i = 12; i > 1; i--) { cmd[i] += freq % 10; freq /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set vfo B", cmd, replystr); } // Volume control void RIG_KX3::set_volume_control(int val) { int ivol = (int)(val * 2.55); cmd = "AG000;"; for (int i = 4; i > 1; i--) { cmd[i] += ivol % 10; ivol /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set vol", cmd, replystr); } int RIG_KX3::get_volume_control() { cmd = "AG;"; int ret = wait_char(';', 6, KX3_WAIT_TIME, "get volume", ASC); if (ret < 6) return progStatus.volume; size_t p = replystr.rfind("AG"); if (p == string::npos) return 0; replystr[p + 5] = 0; int v = atoi(&replystr[p + 2]); return (int)(v / 2.55); } void RIG_KX3::set_pbt_values(int val) { switch (val) { case 0 : case 1 : case 3 : case 4 : if_shift_min = 400; if_shift_max = 2600; if_shift_step = 10; if_shift_mid = 1500; break; case 2 : case 6 : if_shift_min = 300; if_shift_max = 1300; if_shift_step = 10; if_shift_mid = 800; break; case 5 : case 7 : if_shift_min = 100; if_shift_max = 2100; if_shift_step = 10; if_shift_mid = 1000; break; } progStatus.shift_val = if_shift_mid; Fl::awake(adjust_if_shift_control, (void *)0); } /* * MD $ (Operating Mode; GET/SET) * SET/RSP format: MDn; or MD$n; * where n is * 1 (LSB), * 2 (USB), * 3 (CW), * 4 (FM), * 5 (AM), * 6 (DATA), * 7 (CW-REV), * 9 (DATA-REV). * Notes: * (1) K3 only: In Diversity Mode (accessed by holding SUB), sending MDn; * sets both main and sub mode to n. * (2) DATA and DATA-REV select the data sub-mode that was last in effect * on the present band. (To read/set data sub-mode, use DT.) * The norm/rev conditions for the K3’s data sub-modes are * handled in two pairs at present: * DATA A/PSK D, and * AFSK A/FSK D. * E.g., if the radio is set up for DATA A mode, alternating between * MD6 and MD9 will cause both DATA A and PSK D to be set to the * same normal/reverse condition. * In K2 command modes 1 and 3 (K21 and K23), the RSP message converts * modes 6 and 7 (DATA and DATA-REV) to modes 1 and 2 (LSB and USB). * This may be useful with existing software applications that don't * handle DATA modes correctly. */ /* The DT command needs to be included for get/set mode * * DT (DATA Sub-Mode; GET/SET) * SET/RSP format: DTn; where n is the data sub-mode last used with VFO A, * whether or not DATA mode is in effect: * 0 (DATA A), * 1 (AFSK A), * 2 (FSK D), * 3 (PSK D). See MD for data normal/reverse considerations. * In Diversity Mode (K3 only, accessed by sending DV1 or via a long hold * of SUB), sending DTn matches the sub receiver’s mode to the main receiver’s. * Notes: * (1) Use DT only when the transceiver is in DATA mode; otherwise, * the returned value may not be valid. * (2) In AI2/3 modes, changing the data sub-mode results in both FW * and IS responses. * (3) The present data sub-mode is also reported as part of the IF command, * although this requires that K31 be in effect. Refer to the IF command * for details. */ /* and last but not least, the IF command * * IF (Transceiver Information; GET only) * RSP format: IF[f]*****+yyyyrx*00tmvspbd1*; * where the fields are defined as follows: * [f] Operating frequency, excluding any RIT/XIT offset * (11 digits; see FA command format) * * represents a space (BLANK, or ASCII 0x20) * + either "+" or "-" (sign of RIT/XIT offset) * yyyy RIT/XIT offset in Hz (range is -9999 to +9999 Hz when * computer-controlled) * r 1 if RIT is on, 0 if off * x 1 if XIT is on, 0 if off * t 1 if the K3 is in transmit mode, 0 if receive * m operating mode (see MD command) * v receive-mode VFO selection, 0 for VFO A, 1 for VFO B * s 1 if scan is in progress, 0 otherwise * p 1 if the transceiver is in split mode, 0 otherwise * b Basic RSP format: always 0; * K2 Extended RSP format (K22): * 1 if present IF response is due to a band change; 0 otherwise * d Basic RSP format: always 0; * K3 Extended RSP format (K31): * 1 DATA sub-mode, if applicable * (0=DATA A, 1=AFSK A, 2= FSK D, 3=PSK D) * The fixed-value fields (space, 0, and 1) are provided for syntactic * compatibility with existing software. * * 01234567890123456789012345678901234567 * 0 1 2 3 7 * IF00014070000*****+yyyyrx*00tmvspbd1*; * |---------| | * vfo a/b split on = '1', off = '0' * IF00014070000 -000000 0002000011 ; OFF * IF00014070000 -000000 0002001011 ; ON */ void RIG_KX3::set_modeA(int val) { modeA = val; cmd = "MD0;"; cmd[2] = modenbr[val]; sendCommand(cmd); showresp(INFO, ASC, "set mode A", cmd, replystr); set_pbt_values(val); } int RIG_KX3::get_modeA() { cmd = "MD;"; int ret = wait_char(';', 4, KX3_WAIT_TIME, "get mode A", ASC); if (ret < 4) return modeA; size_t p = replystr.rfind("MD"); if (p == string::npos) return modeA; int md = replystr[p + 2] - '1'; if (md == 8) md--; if (md != modeA) set_pbt_values(md); return (modeA = md); } void RIG_KX3::set_modeB(int val) { if (split_on == false) { LOG_INFO("split on"); return; } modeB = val; cmd = "MD$0;"; cmd[3] = modenbr[val]; sendCommand(cmd); showresp(INFO, ASC, "set mode B", cmd, replystr); set_pbt_values(val); } int RIG_KX3::get_modeB() { cmd = "MD$;"; int ret = wait_char(';', 4, KX3_WAIT_TIME, "get mode B", ASC); if (ret < 4) return modeB; size_t p = replystr.rfind("MD$"); if (p == string::npos) return modeB; int md = replystr[p + 3] - '1'; if (md == 8) md--; if (md != modeB) set_pbt_values(md); return (modeB = md); } int RIG_KX3::get_modetype(int n) { return KX3_mode_type[n]; } void RIG_KX3::set_preamp(int val) { if (val) sendCommand("PA1;", 0); else sendCommand("PA0;", 0); } int RIG_KX3::get_preamp() { cmd = "PA;"; int ret = wait_char(';', 4, KX3_WAIT_TIME, "get preamp", ASC); if (ret < 4) return progStatus.preamp; size_t p = replystr.rfind("PA"); if (p == string::npos) return 0; return (replystr[p + 2] == '1' ? 1 : 0); } // void RIG_KX3::set_attenuator(int val) { if (val) sendCommand("RA01;", 0); else sendCommand("RA00;", 0); } int RIG_KX3::get_attenuator() { cmd = "RA;"; int ret = wait_char(';', 5, KX3_WAIT_TIME, "set ATT", ASC); if (ret < 5) return progStatus.attenuator; size_t p = replystr.rfind("RA"); if (p == string::npos) return 0; return (replystr[p + 3] == '1' ? 1 : 0); } // Transceiver power level void RIG_KX3::set_power_control(double val) { int ival = val; cmd = "PC000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set power ctrl", cmd, replystr); } int RIG_KX3::get_power_control() { cmd = "PC;"; int ret = wait_char(';', 6, KX3_WAIT_TIME, "get power level", ASC); if (ret < 6) return progStatus.power_level; size_t p = replystr.rfind("PC"); if (p == string::npos) return progStatus.power_level; return fm_decimal(&replystr[p+2], 3); } void RIG_KX3::get_pc_min_max_step(double &min, double &max, double &step) { min = minpwr; max = maxpwr; step = steppwr; } // Transceiver rf control void RIG_KX3::set_rf_gain(int val) { int ival = val; cmd = "RG000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set rfgain ctrl", cmd, replystr); } int RIG_KX3::get_rf_gain() { cmd = "RG;"; int ret = wait_char(';', 6, KX3_WAIT_TIME, "get RF gain", ASC); if (ret < 6) return progStatus.rfgain; size_t p = replystr.rfind("RG"); if (p == string::npos) return progStatus.rfgain; replystr[p + 5] = 0; int v = atoi(&replystr[p + 2]); return v; } void RIG_KX3::get_rf_min_max_step(int &min, int &max, int &step) { min = 0; max = 250; step = 1; } // Transceiver mic control void RIG_KX3::set_mic_gain(int val) { int ival = (int)val; cmd = "MG000;"; for (int i = 4; i > 1; i--) { cmd[i] += ival % 10; ival /= 10; } sendCommand(cmd); showresp(INFO, ASC, "set mic ctrl", cmd, replystr); } int RIG_KX3::get_mic_gain() { cmd = "MG;"; int ret = wait_char(';', 6, KX3_WAIT_TIME, "get MIC gain", ASC); if (ret < 6) return progStatus.mic_gain; size_t p = replystr.rfind("MG"); if (p == string::npos) return progStatus.mic_gain; replystr[p + 5] = 0; int v = atoi(&replystr[p + 2]); return v; } void RIG_KX3::get_mic_min_max_step(int &min, int &max, int &step) { min = 0; max = 60; step = 1; } // Tranceiver PTT on/off void RIG_KX3::set_PTT_control(int val) { if (val) sendCommand("TX;", 0); else sendCommand("RX;", 0); } //BG (Bargraph Read; GET only) //RSP format: BGnn; where is 00 (no bars) through 10 (bar 10) if the bargraph is in DOT mode, and 12 (no //bars) through 22 (all 10 bars) if the bargraph is in BAR mode. Reads the S-meter level on receive. Reads the //power output level or ALC level on transmit, depending on the RF/ALC selection. Also see SM/SM$ command, //which can read either main or sub RX S-meter level. //SM $ (S-meter Read; GET only) //Basic RSP format: SMnnnn; where nnnn is 0000-0015. S9=6; S9+20=9; S9+40=12; S9+60=15. //KX3 Extended RSP format (KX31): nnnn is 0000-0021. S9=9; S9+20=13; S9+40=17; S9+60=21. //This command can be used to obtain either the main (SM) or sub (SM$) S-meter readings. Returns 0000 in transmit //mode. BG can be used to simply emulate the bar graph level, and applies to either RX or TX mode. int RIG_KX3::get_smeter() { cmd = "SM;"; int ret = wait_char(';', 7, KX3_WAIT_TIME, "get Smeter", ASC); if (ret < 7) return 0; size_t p = replystr.rfind("SM"); if (p == string::npos) return 0; replystr[p + 6] = 0; int mtr = atoi(&replystr[p + 3]); if (mtr <= 6) mtr = (int) (50.0 * mtr / 6.0); else mtr = (int)(50 + (mtr - 6.0) * 50.0 / 9.0); return mtr; } void RIG_KX3::set_noise(bool on) { if (on) sendCommand("NB1;", 0); else sendCommand("NB0;", 0); } int RIG_KX3::get_noise() { cmd = "NB;"; int ret = wait_char(';', 4, KX3_WAIT_TIME, "get Noise Blanker", ASC); if (ret < 4) return progStatus.noise; size_t p = replystr.rfind("NB"); if (p == string::npos) return progStatus.noise; return (replystr[p+2] == '1' ? 1 : 0); } // BW $ (Filter Bandwidth and Number; GET/SET) // KX3 Extended SET/RSP format (K31): BWxxxx; where xxxx is 0-9999, the bandwidth in 10-Hz units. May be // quantized and/or range limited based on the present operating mode. void RIG_KX3::set_bwA(int val) { cmd = "BW0000;"; bwA = val; val = atoi(KX3_widths[val]); val /= 10; cmd[5] += val % 10; val /= 10; cmd[4] += val % 10; val /= 10; cmd[3] += val % 10; val /= 10; cmd[2] += val % 10; sendCommand(cmd); showresp(INFO, ASC, "set bw A", cmd, replystr); } int RIG_KX3::get_bwA() { cmd = "BW;"; int ret = wait_char(';', 7, KX3_WAIT_TIME, "get bandwidth A", ASC); if (ret < 7) return bwA; size_t p = replystr.rfind("FW"); if (p == string::npos) return bwA; int bw = 0; for (int i = 2; i < 6; i++) bw = bw * 10 + replystr[p+i] - '0'; bw *= 10; for (bwA = 0; bwA < 36; bwA++) if (bw <= atoi(KX3_widths[bwA])) break; return bwA; } void RIG_KX3::set_bwB(int val) { if (split_on == false) { LOG_INFO("split on"); return; } cmd = "BW$0000;"; bwA = val; val = atoi(KX3_widths[val]); val /= 10; cmd[6] += val % 10; val /= 10; cmd[5] += val % 10; val /= 10; cmd[4] += val % 10; val /= 10; cmd[3] += val % 10; sendCommand(cmd); showresp(INFO, ASC, "set bw B", cmd, replystr); } int RIG_KX3::get_bwB() { cmd = "BW$;"; int ret = wait_char(';', 8, KX3_WAIT_TIME, "get bandwidth B", ASC); if (ret < 8) return bwB; size_t p = replystr.rfind("FW$"); if (p == string::npos) return bwB; int bw = 0; for (int i = 3; i < 7; i++) bw = bw * 10 + replystr[p+i] - '0'; bw *= 10; for (bwB = 0; bwB < 36; bwB++) if (bw <= atoi(KX3_widths[bwB])) break; return bwB; } int RIG_KX3::get_power_out() { cmd = "BG;"; // responds BGnn; 0 < nn < 10 int ret = wait_char(';', 5, KX3_WAIT_TIME, "get power out", ASC); if (ret < 5) return 0; size_t p = replystr.rfind("BG"); if (p == string::npos) return 0; replystr[p + 4] = 0; int mtr = atoi(&replystr[p + 2]) * 10; if (mtr > 100) mtr = 100; return mtr; } bool RIG_KX3::can_split() { return true; } void RIG_KX3::set_split(bool val) { if (val) { cmd = "FT1;"; sendCommand(cmd); showresp(INFO, ASC, "set split ON", cmd, replystr); } else { cmd = "FR0;"; sendCommand(cmd); showresp(INFO, ASC, "set split OFF", cmd, replystr); } split_on = val; } // 01234567890123456789012345678901234567 // 0 1 2 3 7 // IF00014070000*****+yyyyrx*00tmvspbd1*; // |---------| | // vfo a/b split on = '1', off = '0' // IF00014070000 -000000 0002000011 ; OFF // IF00014070000 -000000 0002001011 ; ON int RIG_KX3::get_split() { cmd = "IF;"; int ret = wait_char(';', 38, KX3_WAIT_TIME, "get split", ASC); if (ret < 38) return split_on; size_t p = replystr.rfind("IF"); if (p == string::npos) return split_on; split_on = replystr[p+32] - '0'; return split_on; } void RIG_KX3::set_if_shift(int val) { cmd = "IS 0000;"; cmd[6] += val % 10; val /= 10; cmd[5] += val % 10; val /= 10; cmd[4] += val % 10; val /= 10; cmd[3] += val % 10; sendCommand(cmd); showresp(INFO, ASC, "set if shift", cmd, replystr); } bool RIG_KX3::get_if_shift(int &val) { cmd = "IS;"; int ret = wait_char(';', 8, KX3_WAIT_TIME, "get IF shift", ASC); val = progStatus.shift_val; if (ret < 8) return progStatus.shift; size_t p = replystr.rfind("IS "); if (p == string::npos) return progStatus.shift; sscanf(&replystr[p + 3], "%d", &progStatus.shift_val); val = progStatus.shift_val; if (val == if_shift_mid) progStatus.shift = false; else progStatus.shift = true; return progStatus.shift; } void RIG_KX3::get_if_min_max_step(int &min, int &max, int &step) { min = if_shift_min; max = if_shift_max; step = if_shift_step; } void RIG_KX3::get_if_mid() { cmd = "IS 9999;"; sendCommand(cmd); waitResponse(500); showresp(INFO, ASC, "center pbt", cmd, replystr); cmd = "IS;"; int ret = wait_char(';', 8, KX3_WAIT_TIME, "get PBT center", ASC); if (ret < 8) return; size_t p = replystr.rfind("IS "); if (p == string::npos) return; sscanf(&replystr[p + 3], "%d", &if_shift_mid); } flrig-1.3.24/src/rigs/TT588.cxx0000644000175000017500000004000612562731647012715 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // Fernando M. Maresca, // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- /* * Note for anyone wishing to expand on the command set. * * A rejected command is responded to by a three character sequence "Zy\r". * where the y is the letter of the command in error * you need to check for that response * */ #include "TT588.h" #include "support.h" #include "math.h" #include "debug.h" // fer, debugging purpose #include #include static const char TT588name_[] = "Omni-VII"; //static const char *TT588modes_[] = { "D-USB", "USB", "LSB", "CW", "AM", "FM", NULL} //static const char TT588mode_chr[] = { '1', '1', '2', '3', '0', '4' }; //static const char TT588mode_type[] = { 'U', 'U', 'L', 'L', 'U', 'U' }; static const char *TT588modes_[] = { "AM", "USB", "LSB", "CWU", "FM", "CWL", "FSK", NULL}; static const char TT588mode_chr[] = { '0', '1', '2', '3', '4', '5', '6' }; static const char TT588mode_type[] = { 'U', 'U', 'L', 'U', 'U', 'L', 'L' }; // filter # is 37 - index static const char *TT588_widths[] = { "200", "250", "300", "350", "400", "450", "500", "600", "700", "800", "900", "1000", "1200", "1400", "1600", "1800", "2000", "2200", "2400", "2500", "2600", "2800", "3000", "3200", "3400", "3600", "3800", "4000", "4500", "5000", "5500", "6000", "6500", "7000", "7500", "8000", "9000", "12000", NULL}; static int TT588_bw_vals[] = { 1, 2, 3, 4, 5, 6, 7, 8, 9,10, 11,12,13,14,15,16,17,18,19,20, 21,22,23,24,25,26,27,28,29,30, 31,32,33,34,35,36,37,38, WVALS_LIMIT}; static const int TT588_numeric_widths[] = { 200, 250, 300, 350, 400, 450, 500, 600, 700, 800, 900, 1000, 1200, 1400, 1600, 1800, 2000, 2200, 2400, 2500, 2600, 2800, 3000, 3200, 3400, 3600, 3800, 4000, 4500, 5000, 5500, 6000, 6500, 7000, 7500, 8000, 9000, 12000, 0}; static char TT588setFREQA[] = "*Annnn\r"; static char TT588setFREQB[] = "*Bnnnn\r"; //static char TT588setAGC[] = "*Gn\r"; static char TT588setSQLCH[] = "*Hc\r"; static char TT588setRF[] = "*Ic\r"; static char TT588setATT[] = "*Jc\r"; static char TT588setNB[] = "*Knar\r"; static char TT588setMODE[] = "*Mnn\r"; static char TT588setSPLIT[] = "*Nn\n"; static char TT588setPBT[] = "*Pxx\r"; static char TT588setVOL[] = "*Un\r"; static char TT588setBW[] = "*Wx\r"; // these C1* and C2* commands are for ethernet only //static char TT588setPOWER[] = "*C1Xn\r"; //static char TT588setPREAMP[] = "*C1Zn\r"; //static char TT588getPOWER[] = "?C1X\r"; //static char TT588getPREAMP[] = "?C1Z\r"; // set pout is not available under serial interface //static char TT588setPOWER[] = "*C1Xn\r"; // F command gets fwd and ref power //static char TT588getFWDPWR[] = "?F\r"; static char TT588getPOWER[] = "?F\r"; static char TT588getFREQA[] = "?A\r"; static char TT588getFREQB[] = "?B\r"; //static char TT588getAGC[] = "?G\r"; static char TT588getSQLCH[] = "?H\r"; static char TT588getRF[] = "?I\r"; static char TT588getATT[] = "?J\r"; static char TT588getNB[] = "?K\r"; static char TT588getMODE[] = "?M\r"; static char TT588getSPLIT[] = "?N\r"; static char TT588getPBT[] = "?P\r"; static char TT588getSMETER[] = "?S\r"; static char TT588getVOL[] = "?U\r"; static char TT588getBW[] = "?W\r"; //static char TT588getFWDPWR[] = "?F\r"; //static char TT588getREFPWR[] = "?R\r"; static char TT588setXMT[] = "*Tnn\r"; static GUI tt588_widgets[]= { { (Fl_Widget *)btnVol, 2, 125, 50 }, { (Fl_Widget *)sldrVOLUME, 54, 125, 156 }, { (Fl_Widget *)sldrRFGAIN, 54, 145, 156 }, { (Fl_Widget *)sldrMICGAIN, 266, 125, 156 }, { (Fl_Widget *)sldrSQUELCH, 266, 145, 156 }, { (Fl_Widget *)NULL, 0, 0, 0 } }; RIG_TT588::RIG_TT588() { // base class values name_ = TT588name_; modes_ = TT588modes_; bandwidths_ = TT588_widths; bw_vals_ = TT588_bw_vals; widgets = tt588_widgets; comm_baudrate = BR57600; stopbits = 1; comm_retries = 2; comm_wait = 20; comm_timeout = 50; comm_echo = false; comm_rtscts = true; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true;// false; comm_rtsptt = false; comm_dtrptt = false; serloop_timing = 200; def_mode = modeB = modeA = A.imode = B.iBW = 1; def_bw = bwB = bwA = A.iBW = B.iBW = 15; def_freq = freqB = freqA = A.freq = B.freq = 14070000; max_power = 100; pbt = 0; VfoAdj = progStatus.vfo_adj; vfo_corr = 0; atten_level = 0; nb_ = 0; an_ = 0; has_preamp_control = has_bpf_center = has_power_control = // must be in REMOTE mode has_micgain_control = // must be in REMOTE mode has_tune_control = has_vfo_adj = false; can_change_alt_vfo = // has_auto_notch = // has_notch_control = has_split = has_split_AB = has_smeter = has_power_out = has_swr_control = has_volume_control = has_rf_control = has_attenuator_control = has_ifshift_control = has_sql_control = has_ptt_control = has_bandwidth_control = has_noise_control = has_mode_control = true; precision = 1; ndigits = 8; } void RIG_TT588::initialize() { tt588_widgets[0].W = btnVol; tt588_widgets[1].W = sldrVOLUME; tt588_widgets[2].W = sldrRFGAIN; tt588_widgets[3].W = sldrMICGAIN; tt588_widgets[4].W = sldrSQUELCH; VfoAdj = progStatus.vfo_adj; } void RIG_TT588::shutdown() { set_if_shift(0); } long RIG_TT588::get_vfoA () { cmd = TT588getFREQA; int ret = waitN(6, 100, "get vfo A"); if (ret >= 6) { /* whenever 41 is in the freq. value answered, we don't want to use that index for an offset. (reproduce: freq. set around 21 MHz, then drag the wf to change freq. up and down.) */ size_t p = replystr.rfind("A"); if (p != string::npos) { int f = 0; for (size_t n = 1; n < 5; n++) f = f*256 + (unsigned char)replystr[n]; freqA = f; } } return (long)(freqA - vfo_corr); } void RIG_TT588::set_vfoA (long freq) { freqA = freq; vfo_corr = (freq / 1e6) * VfoAdj + 0.5; long xfreq = freqA + vfo_corr; cmd = TT588setFREQA; cmd[5] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[4] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[3] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[2] = xfreq & 0xff; sendCommand(cmd); showresp(WARN, HEX, "set vfo A", cmd, replystr); return ; } long RIG_TT588::get_vfoB() { cmd = TT588getFREQB; int ret = waitN(6, 100, "get vfo B"); if (ret >= 6) { size_t p = replystr.rfind("B"); if (p != string::npos) { int f = 0; for (size_t n = 1; n < 5; n++) f = f*256 + (unsigned char)replystr[n]; freqB = f; } } return (long)(freqB - vfo_corr); } void RIG_TT588::set_vfoB (long freq) { freqB = freq; vfo_corr = (freq / 1e6) * VfoAdj + 0.5; long xfreq = freqB + vfo_corr; cmd = TT588setFREQB; cmd[5] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[4] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[3] = xfreq & 0xff; xfreq = xfreq >> 8; cmd[2] = xfreq & 0xff; sendCommand(cmd); showresp(WARN, HEX, "set vfo B", cmd, replystr); return ; } void RIG_TT588::setVfoAdj(double v) { VfoAdj = v; } void RIG_TT588::set_modeA(int val) { modeA = val; cmd = TT588setMODE; cmd[2] = TT588mode_chr[modeA]; cmd[3] = TT588mode_chr[modeB]; sendCommand(cmd); showresp(WARN, HEX, "set mode A", cmd, replystr); } void RIG_TT588::set_modeB(int val) { modeB = val; cmd = TT588setMODE; cmd[2] = TT588mode_chr[modeA]; cmd[3] = TT588mode_chr[modeB]; sendCommand(cmd); showresp(WARN, HEX, "set mode B", cmd, replystr); } int RIG_TT588::get_modeA() { cmd = TT588getMODE; int ret = waitN(4, 100, "get mode A"); if (ret < 4) return modeA; size_t p = replystr.rfind("M"); if (p == string::npos) return modeA; modeA = replystr[p + 1] - '0'; return modeA; } int RIG_TT588::get_modeB() { cmd = TT588getMODE; int ret = waitN(4, 100, "get mode A"); if (ret < 4) return modeB; size_t p = replystr.rfind("M"); if (p == string::npos) return modeB; modeB = replystr[p + 1] - '0'; return modeB; } int RIG_TT588::get_modetype(int n) { return TT588mode_type[n]; } void RIG_TT588::set_bwA(int val) { bwA = val; cmd = TT588setBW; cmd[2] = 37 - val; sendCommand(cmd); showresp(WARN, HEX, "set BW A", cmd, replystr); set_if_shift(pbt); } void RIG_TT588::set_bwB(int val) { bwB = val; cmd = TT588setBW; cmd[2] = 37 - val; sendCommand(cmd); showresp(WARN, HEX, "set BW B", cmd, replystr); set_if_shift(pbt); } int RIG_TT588::get_bwA() { cmd = TT588getBW; int ret = waitN(3, 100, "get BW A"); if (ret < 3) return 37 - bwA; size_t p = replystr.rfind("W"); if (p == string::npos) return 37 - bwA; bwA = (int)(replystr[p + 1] & 0x7F); return 37 - bwA; } int RIG_TT588::get_bwB() { cmd = TT588getBW; int ret = waitN(3, 100, "get BW B"); if (ret < 3) return 37 - bwB; size_t p = replystr.rfind("W"); if (p == string::npos) return 37 - bwB; bwB = (int)(replystr[p + 1] & 0x7F); return 37 - bwB; } int RIG_TT588::adjust_bandwidth(int m) { if (m == 0) return 35; // AM if (m == 1 || m == 2) return 22; // LSB-USB if (m == 3 || m == 5) return 9; if (m == 6) return 0; if (m == 4) return 25; return 22; } int RIG_TT588::def_bandwidth(int m) { return adjust_bandwidth(m); } void RIG_TT588::set_if_shift(int val) { pbt = val; cmd = TT588setPBT; short int si = val; int bpval = progStatus.bpf_center - 200 - TT588_numeric_widths[bwA]/2; if ((modeA == 1 || modeA == 2) && progStatus.use_bpf_center) si += (bpval > 0 ? bpval : 0); cmd[2] = (si & 0xff00) >> 8; cmd[3] = (si & 0xff); sendCommand(cmd); showresp(WARN, HEX, "set pbt", cmd, replystr); } bool RIG_TT588::get_if_shift(int &val) { cmd = TT588getPBT; int ret = waitN(4, 100, "get pbt"); val = pbt; if (ret >= 4) { size_t p = replystr.rfind("P"); if (p != string::npos) { val = ((replystr[p + 1] & 0xFF) << 8) | (replystr[p+2] & 0xFF); if (val > 0x7FFF) val -= 0x10000; } } return (val == 0 ? false : true); } void RIG_TT588::get_if_min_max_step(int &min, int &max, int &step) { min = -2500; max = 2500; step = 10; } void RIG_TT588::set_attenuator(int val) { cmd = TT588setATT; atten_level++; if (atten_level == 4) atten_level = 0; cmd[2] = '0' + atten_level; switch (atten_level) { case 0: atten_label("0 dB", false); break; case 1: atten_label("6 dB", true); break; case 2: atten_label("12 dB", true); break; case 3: atten_label("18 dB", true); break; } sendCommand(cmd); showresp(WARN, HEX, "set att", cmd, replystr); } int RIG_TT588::get_attenuator() { cmd = TT588getATT; int ret = waitN(3, 100, "get att"); int val = atten_level; if (ret >= 3) { size_t p = replystr.rfind("J"); if (p != string::npos) val = (replystr[p + 1] - '0'); } if (atten_level != val) atten_level = val; switch (atten_level) { case 0: atten_label("0 dB", false); break; case 1: atten_label("6 dB", true); break; case 2: atten_label("12 dB", true); break; case 3: atten_label("18 dB", true); break; } return atten_level; } int RIG_TT588::get_smeter() { int sval = 0; float fval = 0; cmd = TT588getSMETER; int ret = waitN(6, 100, "get smeter"); if (ret < 6) return sval; size_t p = replystr.rfind("S"); if (p == string::npos) return sval; sscanf(&replystr[p + 1], "%4x", &sval); fval = sval/256.0; sval = (int)(fval * 100.0 / 18.0); if (sval > 100) sval = 100; return sval; } int RIG_TT588::get_volume_control() { cmd = TT588getVOL; int ret = waitN(3, 100, "get vol"); if (ret < 3) return progStatus.volume; size_t p = replystr.rfind("U"); if (p == string::npos) return progStatus.volume; return (int)((replystr[p + 1] & 0x7F) / 1.27); } void RIG_TT588::set_volume_control(int vol) { cmd = TT588setVOL; cmd[2] = 0x7F & (int)(vol * 1.27); sendCommand(cmd); showresp(WARN, HEX, "set vol", cmd, replystr); } void RIG_TT588::set_rf_gain(int val) { cmd = TT588setRF; cmd[2] = 0x7F & (int)(val * 1.27); sendCommand(cmd); showresp(WARN, HEX, "set rfgain", cmd, replystr); } int RIG_TT588::get_rf_gain() { cmd = TT588getRF; int ret = waitN(3, 100, "get rfgain"); if (ret < 3) return 100; size_t p = replystr.rfind("I"); if (p == string::npos) return 100; return (int)((replystr[p+1] & 0x7F) / 1.27); } // Tranceiver PTT on/off void RIG_TT588::set_PTT_control(int val) { cmd = TT588setXMT; if (val) { cmd[2] = 0x04; cmd[3] = 0; } else { cmd[2] = 0; cmd[3] = 0; } sendCommand(cmd); showresp(WARN, HEX, "set PTT", cmd, replystr); } int RIG_TT588::get_power_out() { cmd = TT588getPOWER; int ret = waitN(4, 100, "get pout"); if (ret < 4) return 0; size_t p = replystr.rfind("F"); if (p == string::npos) return 0; fwdpwr = replystr[p + 1] & 0x7F; refpwr = replystr[p + 2] & 0x7F; // it looks like it never returns reflected power < 1 refpwr -= 1; fwdv = sqrtf(fwdpwr); refv = sqrtf(refpwr); return fwdpwr; } int RIG_TT588::get_swr() { float swr = (fwdv + refv)/(fwdv - refv) ; swr -= 1; swr *= 25.0; if (swr < 0) swr = 0; if (swr > 100) swr = 100; return (int)swr; } void RIG_TT588::set_squelch(int val) { cmd = TT588setSQLCH; cmd[2] = (unsigned char)(val * 1.27); sendCommand(cmd); showresp(WARN, HEX, "set sql", cmd, replystr); } int RIG_TT588::get_squelch() { cmd = TT588getSQLCH; int ret = waitN(3, 100, "get sql"); if (ret < 3) return 0; size_t p = replystr.rfind("H"); if (p == string::npos) return 0; return (int)((replystr[p+1] & 0x7F) / 1.27); } void RIG_TT588::set_noise(bool val) { static char nblabel[] = "NB "; nb_++; if (nb_ == 8) nb_ = 0; nblabel[2] = '0' + nb_; nb_label(nblabel, nb_ ? true : false); cmd = TT588setNB; cmd[2] = (unsigned char)nb_; cmd[3] = 0; cmd[4] = (unsigned char)an_; sendCommand(cmd); showresp(WARN, HEX, "set NB", cmd, replystr); } int RIG_TT588::get_noise() { cmd = TT588getNB; int ret = waitN(5, 100, "get NB"); if (ret < 5) return nb_; size_t p = replystr.rfind("K"); if (p == string::npos) return nb_; int val = replystr[p+1]; if (nb_ != val) nb_ = val; static char nblabel[] = "NB "; nblabel[2] = '0' + nb_; nb_label(nblabel, nb_ ? true : false); return nb_; } /* void RIG_TT588::set_auto_notch(int val) { static char anlabel[] = "AN "; an_++; if (an_ == 10) an_ = 0; anlabel[2] = '0' + an_; auto_notch_label(anlabel, an_ > 0 ? true : false); cmd = TT588setNB; cmd[2] = (unsigned char)nb_; cmd[3] = 0; cmd[4] = (unsigned char)an_; sendCommand(cmd); } int RIG_TT588::get_auto_notch() { cmd = TT588getNB; int ret = sendCommand(cmd); showresp(WARN, HEX, "get AN", cmd, replystr); int val = an_; if (ret >= 5) { size_t p = replystr.rfind("K"); if (p != string::npos) val = replystr[p+3]; } if (an_ != val) an_ = val; static char anlabel[] = "AN "; anlabel[2] = '0' + an_; auto_notch_label(anlabel, an_ ? true : false); return an_; } */ void RIG_TT588::set_split(bool val) { cmd = TT588setSPLIT; cmd[2] = val == true ? 1 : 0; sendCommand(cmd); showresp(WARN, HEX, "set split", cmd, replystr); } int RIG_TT588::get_split() { cmd = TT588getSPLIT; int ret = waitN(3, 100, "get split"); if (ret == 3) return (replystr[1] == 0x01); return false; } /* int RIG_TT588::get_power_control(void) { cmd = TT588getPOWER; int ret = waitN(7, 100, "get pc"); if (ret == 7) { int pc = replystr[3] & 0x7F; return (int)ceil(pc / 1.27); } return 0; } void RIG_TT588::set_power_control(double val) { cmd = TT588setPOWER; cmd[4] = ((int)(val * 1.27) & 0x7f); sendCommand(cmd); showresp(WARN, HEX, "set pc", cmd, replystr); } int RIG_TT588::get_preamp() { cmd = TT588getPREAMP; int ret = waitN(5, 100, "get preamp"); if (ret == 5) return replystr[3]; return 0; } void RIG_TT588::set_preamp(int val) { cmd = TT588setPREAMP; cmd[4] = (val == 0 ? 0 : 1); sendCommand(cmd); showresp(WARN, HEX, "set preamp", cmd, replystr); } */ flrig-1.3.24/src/rigs/FT847.cxx0000644000175000017500000001120012562731647012667 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "FT847.h" #include "rig.h" static const char FT847name_[] = "FT-847"; static const char *FT847modes_[] = { "LSB", "USB", "CW", "CW-R", "AM", "FM", "CW-N", "CW-NR", "AM-N", "FM-N", NULL}; static const int FT847_mode_val[] = { 0x00, 0x01, 0x02, 0x03, 0x04, 0x08, 0x82, 0x83, 0x84, 0x88 }; static const char FT847_mode_type[] = { 'L', 'U', 'L', 'U', 'U', 'U', 'L', 'U', 'U', 'U' }; //static const int FT847_def_bw[] = { 2, 2, 1, 1, 3, 2, 2, 3 }; //static const char *FT847widths_[] = { "300", "500", "2400", "6000", NULL}; //static const int FT847_bw_val[] = { 0, 1, 2, 3 }; static const int sm[] = {0,2,4,6,8,11,14,16,19,22,25,28,31,34,37,40, 43,45,47,50,54,58,62,66,70,74,78,82,86,90,95,100}; static const int po[] = {0,2,3,4,5,6,7,8,9,10,11,12,14,16,18,20, 23,26,30,34,39,44,50,56,62,69,76,84,92,100,109,120}; RIG_FT847::RIG_FT847() { name_ = FT847name_; modes_ = FT847modes_; // bandwidths_ = FT847widths_; comm_baudrate = BR9600; stopbits = 2; comm_retries = 2; comm_wait = 5; comm_timeout = 50; comm_rtscts = false; comm_rtsplus = false; comm_dtrplus = true; comm_catptt = true; comm_rtsptt = false; comm_dtrptt = false; afreq = A.freq = B.freq = 14070000; amode = A.imode = B.imode = 1; precision = 10; ndigits = 8; has_smeter = has_power_out = has_get_info = // has_bandwidth_control = has_mode_control = has_ptt_control = true; } void RIG_FT847::init_cmd() { cmd = "00000"; for (size_t i = 0; i < 5; i++) cmd[i] = 0; } void RIG_FT847::initialize() { init_cmd(); sendCommand(cmd, 0); // CAT on cmd[4] = 0x8E; // satellite mode off replystr.clear(); sendCommand(cmd); showresp(WARN, HEX, "init", cmd, replystr); } bool RIG_FT847::get_info() { int ret = 0, i = 0; init_cmd(); cmd[4] = 0x03; ret = waitN(5, 100, "get info", HEX); if (ret >= 5) { afreq = fm_bcd(&replystr[ret - 5], 8)*10; amode = replystr[ret - 1]; for (i = 0; i < 10; i++) if (FT847_mode_val[i] == amode) break; if (i == 10) i = 1; amode = i; return true; } return false; } long RIG_FT847::get_vfoA () { if (get_info()) { A.freq = afreq; A.imode = amode; A.iBW = aBW; } return A.freq; } void RIG_FT847::set_vfoA (long freq) { A.freq = freq; freq /=10; // 847 does not support 1 Hz resolution cmd = to_bcd(freq, 8); cmd += 0x01; replystr.clear(); sendCommand(cmd); showresp(WARN, HEX, "set vfo A", cmd, replystr); } int RIG_FT847::get_modeA() { return A.imode; } void RIG_FT847::set_modeA(int val) { A.imode = val; init_cmd(); cmd[0] = FT847_mode_val[val]; cmd[4] = 0x07; replystr.clear(); sendCommand(cmd); showresp(WARN, HEX, "set mode A", cmd, replystr); } long RIG_FT847::get_vfoB() { if (get_info()) { B.freq = afreq; B.imode = amode; B.iBW = aBW; } return B.freq; } void RIG_FT847::set_vfoB(long freq) { B.freq = freq; freq /=10; // 847 does not support 1 Hz resolution cmd = to_bcd(freq, 8); cmd += 0x01; replystr.clear(); sendCommand(cmd); showresp(WARN, HEX, "set vfo B", cmd, replystr); } void RIG_FT847::set_modeB(int val) { B.imode = val; init_cmd(); cmd[0] = FT847_mode_val[val]; cmd[4] = 0x07; replystr.clear(); sendCommand(cmd); showresp(WARN, HEX, "set mode B", cmd, replystr); } int RIG_FT847::get_modeB() { return B.imode; } // Tranceiver PTT on/off void RIG_FT847::set_PTT_control(int val) { init_cmd(); if (val) cmd[4] = 0x08; else cmd[4] = 0x88; replystr.clear(); sendCommand(cmd); showresp(WARN, HEX, "set PTT", cmd, replystr); } int RIG_FT847::get_smeter() { init_cmd(); cmd[4] = 0xE7; int sval = 0; int ret = waitN(1, 100, "get smeter", HEX); if (ret >= 1) sval = sm[(replystr[ret - 1] & 0x1F)]; return sval; } int RIG_FT847::get_power_out() { init_cmd(); cmd[4] = 0xF7; fwdpwr = 0; int ret = waitN(1, 100, "get power", HEX); if (ret >= 1) fwdpwr = po[(replystr[ret - 1] & 0x1F)]; return fwdpwr; } flrig-1.3.24/src/rigs/IC735.cxx0000644000175000017500000000632712562731647012663 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "IC735.h" //============================================================================= // IC-735 // const char IC735name_[] = "IC-735"; const char *IC735modes_[] = { "LSB", "USB", "AM", "CW", "RTTY", "FM", NULL}; RIG_IC735::RIG_IC735() { name_ = IC735name_; modes_ = IC735modes_; comm_baudrate = BR1200; stopbits = 2; comm_retries = 2; comm_wait = 10; comm_timeout = 50; comm_echo = true; comm_rtscts = false; comm_rtsplus = true; comm_dtrplus = true; comm_catptt = false; comm_rtsptt = false; comm_dtrptt = false; modeA = 1; bwA = 0; has_mode_control = true; has_bandwidth_control = true; defaultCIV = 0x04; adjustCIV(defaultCIV); precision = 100; ndigits = 6; }; //============================================================================= void RIG_IC735::selectA() { cmd = pre_to; cmd += '\x07'; cmd += '\x00'; cmd.append(post); waitFB("select A"); } void RIG_IC735::selectB() { cmd = pre_to; cmd += '\x07'; cmd += '\x01'; cmd.append(post); waitFB("select B"); } long RIG_IC735::get_vfoA () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(10, "get vfo A")) { size_t p = replystr.rfind(resp); if (p != string::npos) freqA = fm_bcd_be(&replystr[p+5], 8); } return freqA; } void RIG_IC735::set_vfoA (long freq) { freqA = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 8 ) ); cmd.append( post ); waitFB("set vfo A"); } long RIG_IC735::get_vfoB () { string cstr = "\x03"; string resp = pre_fm; resp.append(cstr); cmd = pre_to; cmd.append(cstr); cmd.append( post ); if (waitFOR(10, "get vfo B")) { size_t p = replystr.rfind(resp); if (p != string::npos) freqB = fm_bcd_be(&replystr[p+5], 8); } return freqB; } void RIG_IC735::set_vfoB (long freq) { freqA = freq; cmd = pre_to; cmd += '\x05'; cmd.append( to_bcd_be( freq, 8 ) ); cmd.append( post ); waitFB("set vfo B"); } void RIG_IC735::set_modeA(int val) { modeA = val; cmd = pre_to; cmd += "\x06"; cmd += modeA; // set the mode byte cmd.append( post ); waitFB("set mode"); } int RIG_IC735::get_modeA() { cmd = pre_to; cmd += '\x04'; cmd.append(post); string resp = pre_fm; resp += '\x04'; if (waitFOR(7, "get mode")) { size_t p = replystr.rfind(resp); if (p != string::npos) { modeA = replystr[p+5]; } } return modeA; } flrig-1.3.24/src/graphics/0000755000175000017500000000000012650266613012303 500000000000000flrig-1.3.24/src/graphics/images.cxx0000644000175000017500000000324412562731647014225 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include "images.h" //#include "dbm.xbm" //#include "rev.xbm" //#include "swr.xbm" //#include "mvolts.xbm" //#include "smeter.xbm" #include "images/P25.xbm" #include "images/P50.xbm" #include "images/P100.xbm" #include "images/P200.xbm" #include "images/P200log.xbm" #include "images/S60.xbm" #include "images/SWR.xbm" #include "images/alc.xbm" Fl_Bitmap image_p25(P25_bits, P25_width, P25_height); Fl_Bitmap image_p50(P50_bits, P50_width, P50_height); Fl_Bitmap image_p100(P100_bits, P100_width, P100_height); Fl_Bitmap image_p200(P200_bits, P200_width, P200_height); Fl_Bitmap image_p200log(P200log_bits, P200log_width, P200log_height); Fl_Bitmap image_smeter(S60_bits, S60_width, S60_height); Fl_Bitmap image_swr(SWR_bits, SWR_width, SWR_height); Fl_Bitmap image_alc(alc_bits, alc_width, alc_height); flrig-1.3.24/src/graphics/icons.cxx0000644000175000017500000001502612562731647014074 00000000000000// ---------------------------------------------------------------------------- // icons.cxx // // Copyright (C) 2008 // Stelios Bounanos, M0GLD // // This file is part of flrig. // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // // ===================================================================== // ---------------------------------------------------------------------------- #include #include "icons.h" #include "util.h" #include #include #include #include #if USE_IMAGE_LABELS # include # include # include # include # include # include #endif using namespace std; namespace icons { #if USE_IMAGE_LABELS typedef map imap_t; static imap_t* imap = 0; #endif #define FL_EMPTY_LABEL FL_FREE_LABELTYPE static void draw_empty(const Fl_Label*, int, int, int, int, Fl_Align) { } static void measure_empty(const Fl_Label*, int& w, int& h) { w = h = 0; } // The following functions create image+text menu item labels. // You've had too much FLTK if you already know how to do that. // Return a multi_label pointer, cast to a string, for `text' and // `pixmap'. This goes into the label pointer of a widget or menu // item. The text label is copied if we are using multi labels. You must // call set_icon_label on the widget or menu item before its draw() // function is called for the first time. // // A NULL pixmap means that the caller wants an empty, transparent, icon. const char* make_icon_label(const char* text, const char** pixmap) { #if USE_IMAGE_LABELS static imap_t* imap_ = 0; if (unlikely(!imap_)) { imap = imap_ = new imap_t; Fl::set_labeltype(FL_EMPTY_LABEL, draw_empty, measure_empty); } // Create a multi label and associate it with an Fl_Image* array Fl_Multi_Label* mlabel = new Fl_Multi_Label; Fl_Image** images = new Fl_Image*[2]; images[0] = new Fl_Pixmap(pixmap ? pixmap : clear_row_icon); images[1] = 0; // we create this on demand // set_icon_label_ will set mlabel->labela later mlabel->typea = _FL_IMAGE_LABEL; if (!text) text = ""; size_t len = strlen(text); char* s = new char[len + 2]; s[0] = ' '; memcpy(s + 1, text, len + 1); mlabel->labelb = s; mlabel->typeb = FL_NORMAL_LABEL; (*imap)[mlabel] = images; return (const char*)mlabel; #else return text; #endif } #if USE_IMAGE_LABELS // Find the item's label, which should be something that was returned by // make_icon_label, and set the active or inactive image. template void set_icon_label_(T* item) { imap_t::iterator j = imap->find((Fl_Multi_Label*)(item->label())); if (j == imap->end()) return; Fl_Multi_Label* mlabel = j->first; Fl_Image** images = j->second; unsigned char i = !item->active(); if (!images[i]) { // create inactive version of other image images[i] = images[!i]->copy(); images[i]->inactive(); } if (mlabel->typea == _FL_IMAGE_LABEL) mlabel->labela = (const char*)images[i]; else mlabel->labelb = (const char*)images[i]; item->image(images[i]); mlabel->label(item); item->labeltype(_FL_MULTI_LABEL); } #endif void set_icon_label(Fl_Menu_Item* item) { #if USE_IMAGE_LABELS set_icon_label_(item); #else // this isn't needed but it simplifies fldigi's UI setup code if (item->labeltype() == _FL_MULTI_LABEL) item->labeltype(FL_NORMAL_LABEL); #endif } void set_icon_label(Fl_Widget* w) { #if USE_IMAGE_LABELS set_icon_label_(w); w->image(0); #else if (w->labeltype() == _FL_MULTI_LABEL) w->labeltype(FL_NORMAL_LABEL); #endif } void toggle_icon_labels(void) { #if USE_IMAGE_LABELS for (imap_t::iterator i = imap->begin(); i != imap->end(); ++i) { // swap sublabels const char* l = i->first->labela; i->first->labela = i->first->labelb; i->first->labelb = l; if (i->first->typea == _FL_IMAGE_LABEL) { i->first->typea = FL_NORMAL_LABEL; i->first->typeb = FL_EMPTY_LABEL; i->first->labela++; } else { i->first->typea = _FL_IMAGE_LABEL; i->first->typeb = FL_NORMAL_LABEL; i->first->labelb--; } } #endif } template const char* get_icon_label_text_(T* item) { #if USE_IMAGE_LABELS if (item->labeltype() == _FL_MULTI_LABEL) { imap_t::iterator i = imap->find((Fl_Multi_Label*)(item->label())); if (i == imap->end()) return 0; if (i->first->typeb == FL_NORMAL_LABEL) return i->first->labelb + 1; else // disabled icons return i->first->labela; } else #endif return item->label(); } const char* get_icon_label_text(Fl_Menu_Item* item) { return get_icon_label_text_(item); } const char* get_icon_label_text(Fl_Widget* w) { return get_icon_label_text_(w); } template void free_icon_label_(T* item) { #if USE_IMAGE_LABELS if (item->labeltype() == FL_NORMAL_LABEL) { delete [] item->label(); item->label(0); return; } imap_t::iterator i = imap->find((Fl_Multi_Label*)item->label()); if (i == imap->end()) return; item->label(0); // delete the images delete i->second[0]; delete i->second[1]; delete [] i->second; // delete the multi label delete [] ((i->first->typeb == FL_NORMAL_LABEL) ? i->first->labelb : i->first->labela-1); delete i->first; imap->erase(i); #endif } void free_icon_label(Fl_Menu_Item* item) { free_icon_label_(item); } void free_icon_label(Fl_Widget* w) { free_icon_label_(w); } template void set_active_(T* t, bool v) { if (v) t->activate(); else t->deactivate(); if (t->labeltype() == _FL_MULTI_LABEL) set_icon_label(t); } void set_active(Fl_Menu_Item* item, bool v) { set_active_(item, v); } void set_active(Fl_Widget* w, bool v) { set_active_(w, v); } static Fl_Image* msg_icon; void set_message_icon(const char** pixmap) { if (msg_icon && msg_icon->data() == pixmap) return; delete msg_icon; Fl_Widget* msg = fl_message_icon(); msg->label(""); msg->align(FL_ALIGN_TOP_LEFT | FL_ALIGN_INSIDE); msg->color(msg->parent()->color()); msg->box(FL_NO_BOX); msg->image(msg_icon = new Fl_Pixmap(pixmap)); } } // icons flrig-1.3.24/src/graphics/pixmaps.cxx0000644000175000017500000046356112562731647014455 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // ---------------------------------------------------------------------------- // This file contains pixmap versions of icons from the Tango base icon // theme: http://tango.freedesktop.org/Tango_Desktop_Project // // Licensed under the Creative Commons Attribution Share-Alike license: // http://creativecommons.org/licenses/by-sa/2.5/ // --------------------------------------------------------------------- // Tango icons // --------------------------------------------------------------------- #include /* XPM */ const char *address_book_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 124 2", " c #727E0A", ". c #785977", "X c #CC0000", "o c #EF2929", "O c #698373", "+ c #67837F", "@ c #9DB029", "# c #EDD400", "$ c #A2AB7B", "% c #FCE94F", "& c #6F6384", "* c #617296", "= c #5A7AA4", "- c #6C7CA0", "; c #7A88A7", ": c #7B8AA8", "> c #7E8CA8", ", c #7E8CAB", "< c #8F9E86", "1 c #99A580", "2 c #808DA9", "3 c #808DAA", "4 c #818FAB", "5 c #828EAA", "6 c #8290AC", "7 c #8390AC", "8 c #8B96AE", "9 c #8F9FB8", "0 c #9E9DBF", "q c #AB82AA", "w c #AA83AB", "e c #AC80A8", "r c #AC80A9", "t c #AC82AA", "y c #AA84AC", "u c #AA85AC", "i c #A986AD", "p c #A887AE", "a c #A987AE", "s c #A889AF", "d c #A789B0", "f c #A78AB1", "g c #A78BB1", "h c #A58DB3", "j c #A889B0", "k c #AC8BB1", "l c #A491B6", "z c #AB92B6", "x c #A7ADBD", "c c #A9ACB8", "v c #A8AEBC", "b c #ABB0BE", "n c #ABB1BE", "m c #ACB1BE", "M c #B5B5B6", "N c #B7B7B7", "B c #B9B9B9", "V c #9E9DC0", "C c #9D9EC0", "Z c #9D9FC1", "A c #9BA2C3", "S c #9CA1C3", "D c #9CA2C3", "F c #9BA3C4", "G c #9AA4C5", "H c #9AA5C5", "J c #99A7C7", "K c #9AA6C6", "L c #9FABC3", "P c #95AFCD", "I c #96AECC", "U c #95AFCE", "Y c #95B0CE", "T c #95B1CF", "R c #9DB7D2", "E c #AAACC9", "W c #AFB5C2", "Q c #A9B3CF", "! c #AFBAC9", "~ c #B4B9C4", "^ c #A5BDD7", "/ c #A8B8D0", "( c #A9B8D0", ") c #A9B9D0", "_ c #A9B9D1", "` c #A7BFD8", "' c #A8BFD8", "] c #A9C1D9", "[ c #ACC3DA", "{ c #B1C0D6", "} c #B4C9DE", "| c #BCC8D9", " . c #B7CAE0", ".. c #B7CBE0", "X. c #B8CBE0", "o. c #B9CBE0", "O. c #BACDE2", "+. c #BFCCE0", "@. c #C1C1C3", "#. c #DDDDDD", "$. c #DEDEDE", "%. c #C3CFE0", "&. c #C3D0E2", "*. c #C0D2E4", "=. c #C6D6E7", "-. c #CBD7E5", ";. c #CBD8E7", ":. c #C7D7E8", ">. c #CEDAE8", ",. c #CEDBE8", "<. c #CEDBE9", "1. c #CFDBE9", "2. c #CCDAEA", "3. c #CFDCE9", "4. c #CFDCEA", "5. c #CFDCEC", "6. c #D0DCEA", "7. c #D1DEEB", "8. c #D2DEEB", "9. c #D3DFEC", "0. c #D7E3F0", "q. c #D7E4F0", "w. c #D8E4F1", "e. c None", /* pixels */ "e.= = = = = = = = = = = = = e.e.", "= - 8.=.O.} ^ ^ ` ` ' ' R < # e.", "= | 6.&.5.] G d r u V T [ < % # ", "= %.4.{ 2.Q y F U J p A [ 1 % # ", "= -.3./ 2.z Z 0 q w J f [ $ % # ", "= 7.1./ 2.t I y C i P r [ O @ ", "= 0.<.( 2.r P r S a D s [ O @ ", "= w.,.) 2.k G l j h y K [ + @ ", "= w.,._ 2.E p J Y T T T [ & o X ", "= q.>.+.2.] H g e i T T [ & o X ", "= 0.9.5.:.*. .....X.X.X.o.& o X ", "= ;., 5 2 > ; : 4 6 7 3 * . X e.", "= L M N N N N N N N B ! = = e.e.", "= 9 @.#.#.#.#.#.$.$.$.~ = = e.e.", "= = 8 x W b b n n m m v c = e.e.", "e.= = = = = = = = = = = = = e.e." }; /* XPM */ const char *edit_undo_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 61 1", " c #BB9F15", ". c #BEA113", "X c #BCA114", "o c #BCA015", "O c #BDA116", "+ c #BBA11B", "@ c #BFA31B", "# c #C4A000", "$ c #C4A901", "% c #C8AC02", "& c #CBAA0E", "* c #C2A211", "= c #C1A313", "- c #C2A611", "; c #C1A314", ": c #C1A319", "> c #C0A41A", ", c #C5AB1B", "< c #C0A623", "1 c #D6C004", "2 c #DAC304", "3 c #D8C207", "4 c #DFC80A", "5 c #DFC80B", "6 c #DFC90F", "7 c #F7DD05", "8 c #E3CD16", "9 c #E8D21D", "0 c #F1DB29", "q c #F4DF2C", "w c #ECD936", "e c #FAE320", "r c #FBE425", "t c #F5E02F", "y c #F6E02F", "u c #F6E131", "i c #F7E232", "p c #F8E232", "a c #D8C543", "s c #DBC443", "d c #E1CD40", "f c #E3CE41", "g c #E9DA5D", "h c #EADB66", "j c #EBDC6F", "k c #EEE16E", "l c #F2E469", "z c #F3E56A", "x c #F6E769", "c c #F5E66D", "v c #F7E86C", "b c #F7E86E", "n c #F9EA69", "m c #FAEB6F", "M c #EFE276", "N c #FAEC73", "B c #FBED76", "V c #FBED79", "C c #F2E788", "Z c #FBF3AD", "A c None", /* pixels */ "AAAAAA#AAAAAAAAA", "AAAAA##AAAAAAAAA", "AAAA#Z#AAAAAAAAA", "AAA#Zr##. +AAAAA", "AA#ZueNmbvX;AAAA", "A#Zyi0t08wxf=AAA", "#Zypiit0999wdOAA", "A#Vpq1119995z,oA", "AA#B2Bnnnn743j@A", "AAA#BB####$k6l>A", "AAAA#B#AAAA#cM:A", "AAAAA##AAAAA%C*A", "AAAAAA#AAAAA&g c #B0C6DE", ", c #B1C7DF", "< c #B2C8E0", "1 c #B3C9E1", "2 c #EBEBEB", "3 c #ECECEC", "4 c #EEEEEE", "5 c #F0F0F0", "6 c #F2F2F2", "7 c #F4F4F4", "8 c #F5F5F5", "9 c #F6F6F6", "0 c #F7F7F7", "q c #F8F8F8", "w c #F9F9F9", "e c #FAFAFA", "r c #FBFBFB", "t c #FCFCFC", "y c #FDFDFD", "u c #FEFEFE", "i c None", /* pixels */ "io............Oi", "i.yuuyyttrreewXi", "i.y$%%&&*****qXi", "i.u%@@@@=@@@=qXi", "i.y&@@@@-----qXi", "i.y&@@@@-;;;2qXi", "i.t*@@@@;@@:3qXi", "i.t==-;::>>>4qXi", "i.t=-;::>>,,5qXi", "i.r=@@@@@@@<60Xi", "i.r-;:>> < 170Xi", "i.e-;:>,< 8990Xi", "i.w-####< 0q00Xi", "i.w-;:>,< 0wq0Xi", "i.qqqqqq q qqqXi", "iO............+i" }; /* XPM */ const char *edit_clear_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 108 2", " c #7B4A00", ". c #7C4B00", "X c #AB1B0D", "o c #A12400", "O c #A03600", "+ c #B8381D", "@ c #804E01", "# c #845201", "$ c #865203", "% c #AD4213", "& c #876400", "* c #A6690A", "= c #A96B0A", "- c #AB6D0B", "; c #B2760B", ": c #B2720C", "> c #BC7A0F", ", c #B06917", "< c #BB4A28", "1 c #C17D10", "2 c #C86D33", "3 c #9A8500", "4 c #9C8800", "5 c #9C8B00", "6 c #9D8C00", "7 c #9E8D00", "8 c #9F8D00", "9 c #9E8D01", "0 c #9F8D01", "q c #9F8E00", "w c #9F8E01", "e c #9F8E04", "r c #9F8F05", "t c #A18801", "y c #A08E01", "u c #A08F01", "i c #A08F05", "p c #A19008", "a c #A29009", "s c #A59411", "d c #AB9B1A", "f c #AE9E1B", "g c #B1A01D", "h c #BBA529", "j c #BEAE32", "k c #C0B02F", "l c #C6B530", "z c #C5B432", "x c #C6B633", "c c #C5B536", "v c #DAC203", "b c #DBC304", "n c #DCC407", "m c #DCC510", "M c #DCC610", "N c #DCC615", "B c #E3CB11", "V c #E5CD14", "C c #E7D018", "Z c #DFCA26", "A c #EED723", "S c #F3DB2A", "D c #F6DE2F", "F c #FBE437", "G c #FCE53C", "H c #FDE63C", "J c #CDBD41", "K c #CCBD43", "L c #CDBE45", "P c #D7B162", "I c #CFC149", "U c #D2C34F", "Y c #D8C84F", "T c #D6C856", "R c #DCCD58", "E c #DDCF5E", "W c #EDDA46", "Q c #E4D249", "! c #E4D34C", "~ c #E5D44E", "^ c #E6D656", "/ c #E1D35B", "( c #E7D75B", ") c #E7D85F", "_ c #FBE544", "` c #FDE952", "' c #FDEA5F", "] c #E2D467", "[ c #E7D96D", "{ c #ECDC68", "} c #E8DA6C", "| c #F6D861", " . c #EADC72", ".. c #EBDD77", "X. c #EBDE77", "o. c #F3E365", "O. c #FDEB61", "+. c #FDEA63", "@. c #FDEC6B", "#. c #FDEB6C", "$. c #FDEC6D", "%. c #FDEE7D", "&. c #FBEA84", "*. c #FDEF84", "=. c #F8EA88", "-. c #FBED8B", ";. c #FDEF8A", ":. c None", /* pixels */ ":.. :.:.:.:.:.:.:.:.:.:.:.:.:.", " * - :.:.:.:.:.:.:.:.:.:.:.:.", " : 1 = :.5 :.:.:.:.:.:.:.:.:.", ":.$ > 1 # 3 5 :.:.:.:.:.:.:.:.:.", ":. @ ; t j g :.:.:.:.:.:.:.:.:.", ":.:.& 4 J X., O u :.:.:.:.:.:.:.", ":.:.9 Y { 2 X P .K a w :.:.:.:.", ":.:.7 h < + | +.#.%.=.L r q :.:.", ":.:.:.o % &.@.*.$.` _ o...I f 6 ", ":.:.:.:.k ;.' O.` H S C M Q ] 0 ", ":.:.:.:.s -.G F D A V b v ^ x q ", ":.:.:.:.y E W C B n v v ! R e :.", ":.:.:.:.:.d } m v v N ( T i :.:.", ":.:.:.:.:.q c ) Z ~ [ z 7 :.:.:.", ":.:.:.:.:.:.7 U / l p 8 :.:.:.:.", ":.:.:.:.:.:.:.6 7 7 :.:.:.:.:.:." }; /* XPM */ const char *edit_copy_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 27 1", " c #888A85", ". c #898B86", "X c #8A8C87", "o c #8C8E89", "O c #8D8F8A", "+ c #989A95", "@ c #989A96", "# c #9A9B97", "$ c #C3C4C3", "% c #C7C7C6", "& c #D4D4D4", "* c #E3E3E2", "= c #E3E4E2", "- c #EEEEEE", "; c #F0F0EF", ": c #F3F3F3", "> c #F4F4F4", ", c #F6F6F5", "< c #F7F7F6", "1 c #F8F8F7", "2 c #FAFAF9", "3 c #FAFAFA", "4 c #FBFBFB", "5 c #FCFCFB", "6 c #FEFEFD", "7 c #FFFFFF", "8 c None", /* pixels */ "8888888888888888", "8888888888888888", "8888888888888888", "8888# O", "8888X7777777777 ", "8888.7;;;;;;;;7 ", "8888X7;%%%%%%;7 ", "8888.7;;;;;;;;7 ", "8888X7;%%%%%;;7 ", "8888.7;;;;;;;3: ", "8888X7;%%%%%-<$ ", "8888X7;;;;;oooo ", "8888.6;;;;3+31= ", "8888.2;;;33+3* ", "8888.><,54&@= 88", "8888o. 888" }; /* XPM */ const char *edit_cut_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 88 1", " c #A60101", ". c #A60202", "X c #A40502", "o c #A60606", "O c #A70606", "+ c #A80303", "@ c #A80403", "# c #A80606", "$ c #A80707", "% c #A90707", "& c #AA0808", "* c #AA0909", "= c #A90A0A", "- c #A90B0B", "; c #AA0B0B", ": c #AA0C0C", "> c #AA0D0D", ", c #AB0D0D", "< c #AA0E0E", "1 c #B50B0B", "2 c #B70F0E", "3 c #B80D0D", "4 c #AB1010", "5 c #AB1111", "6 c #AB1313", "7 c #AB1414", "8 c #AB1616", "9 c #AD1717", "0 c #AE1818", "q c #9C2F2C", "w c #C01513", "e c #C01514", "r c #C71A19", "t c #C91A1A", "y c #CA1B1A", "u c #CB1F1F", "i c #CD1D1C", "p c #CD1D1D", "a c #CE1D1D", "s c #CF1D1D", "d c #CE1E1E", "f c #D01F1F", "g c #D11F1F", "h c #D12020", "j c #D22020", "k c #D32121", "l c #D42222", "z c #D52323", "x c #D62323", "c c #DB2727", "v c #A34A45", "b c #898984", "n c #8A8C87", "m c #8B8D88", "M c #8C8E89", "N c #8D8F8A", "B c #8E908B", "V c #8F918C", "C c #90918D", "Z c #91938E", "A c #92948F", "S c #939590", "D c #9A9C97", "F c #9FA09C", "G c #A8A9A5", "H c #AAACA7", "J c #AEAFAB", "K c #B3B2AF", "L c #B3B5B0", "P c #B5B6B2", "I c #B5B6B3", "U c #B6B8B3", "Y c #B8BAB5", "T c #BABBB7", "R c #C5C6C3", "E c #C6C8C3", "W c #CCCEC9", "Q c #CDCECB", "! c #D2D3D0", "~ c #D2D4D0", "^ c #DBDCD9", "/ c #E1E1DF", "( c #E7E8E6", ") c #EFF0EF", "_ c #F5F6F5", "` c #F7F7F6", "' c #F7F7F7", "] c None", /* pixels */ "]]]]mS]]]]mV]]]]", "]]]B'm]]]]C!V]]]", "]]]m~)A]]]HEN]]]", "]]]NL`m]]BWJm]]]", "]]]]m^)ZMUQm]]]]", "]]]]NP'mFIYm]]]]", "]]]]]m/_DGm]]]]]", "]]]]]NT(HBn]]]]]", "]]]]]]bRKq]]]]]]", "]]]]08ov.r90]]]]", "]]]%jd2X@thu=]]]", "]]#f+e ]]iw+pO]]", "]7z]]a=]]+y]]h7]", "],s]1k:]]*x3]g5]", "]6cfa$]]]]&lsa6]", "]]<48]]]]]]>;-]]" }; /* XPM */ const char *edit_paste_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 77 1", " c #6A4200", ". c #6B4301", "X c #6C4301", "o c #6B4403", "O c #6C4401", "+ c #6D4401", "@ c #6E4502", "# c #6E4602", "$ c #6F4602", "% c #5C5C5B", "& c #5C5C5C", "* c #5E5E5E", "= c #5F5F5E", "- c #666864", "; c #676964", ": c #6E6C64", "> c #6E6D64", ", c #6A6C68", "< c #706D63", "1 c #706D64", "2 c #716F64", "3 c #736F64", "4 c #7E7E7B", "5 c #7F7F7C", "6 c #B37B22", "7 c #B97F23", "8 c #BA7F23", "9 c #A77D3B", "0 c #A37C3D", "q c #A47E3E", "w c #A17C40", "e c #C08424", "r c #C58726", "t c #C58727", "y c #C68827", "u c #C28628", "i c #80807D", "p c #959589", "a c #97978A", "s c #B1B2B2", "d c #B2B4B4", "f c #B3B5B5", "g c #B7B7B4", "h c #B8B9B5", "j c #B9B9B6", "k c #B9BAB6", "l c #BBBBBB", "z c #C1C2BE", "x c #CCCDCA", "c c #CDCECB", "v c #D8D8D5", "b c #D9D9D6", "n c #DADAD8", "m c #DBDBD9", "M c #E0E0E0", "N c #E7E7E4", "B c #E7E7E5", "V c #E8E8E6", "C c #E9E9E7", "Z c #EAEAE8", "A c #EBEBE9", "S c #EBEBEA", "D c #ECECEA", "F c #ECECEB", "G c #EDEDEB", "H c #EDEDEC", "J c #EDEEED", "K c #EEEEED", "L c #EFEFED", "P c #EFEFEE", "I c #F0F0EF", "U c #F1F1F1", "Y c #F2F2F2", "T c #FEFEFD", "R c #FEFEFE", "E c #FFFFFF", "W c None", /* pixels */ "WWWWW=&&&&=WWWWW", "WW+Oo%paap%oOOWW", "W+eq1*5ii4*:w7XW", "W$y2UMllllMY>t W", "W$y-EIIIIIIE;u W", "W$r-EIffffPE;u W", "W$r-EIIIILGE;u W", "W#r-EIffdsZE;u W", "W#r-EIPHSZmE;u W", "W#r-EKFACnxE;u W", "W#r-EDZVckhE;u W", "W@r-ECBbjEEE;u W", "W@r-ENvzgEE;tu W", "W@r c #6395CC", ", c #6496CC", "< c #6597CC", "1 c #6598CD", "2 c #6698CC", "3 c #6898CD", "4 c #6899CD", "5 c #6999CD", "6 c #6A9ACD", "7 c #6B9ACD", "8 c #6B9BCD", "9 c #6A9ACE", "0 c #6C9BCE", "q c #6D9CCE", "w c #6E9CCE", "e c #6E9DCE", "r c #709DCF", "t c #709ECE", "y c #729FCF", "u c #76A2D0", "i c #7CA6D2", "p c #969795", "a c #969992", "s c #9A9C98", "d c #A6A6A6", "f c #A7A9A4", "g c #A9ABA9", "h c #C0C0BF", "j c #81A9D4", "k c #85ACD5", "l c #88AED6", "z c #89AED6", "x c #89AFD7", "c c #8AAFD7", "v c #8BB0D7", "b c #8CB1D8", "n c #94B6DB", "m c #9BBBDD", "M c #9ABADE", "N c #9CBBDD", "B c #A6C2E0", "V c #ADC7E3", "C c #AEC7E3", "Z c #BED2E8", "A c #C6C6C5", "S c #C9C9C9", "D c #CCCCCA", "F c #CECECE", "G c #D8D8D7", "H c #C6D8EB", "J c #F5F5F4", "K c #FFFFFF", "L c None", /* pixels */ "L$$$$$@@LLLLLLLL", "$FFFFFFA+LLLLLLL", "#hppsfffffffffaL", "@SddfKKKKKKKKKfL", "ohppfKJJJJJJJKfL", "XSddfKJDDDDDJKfL", "XhppfKJJJJJJJKfL", ".SddfKJDDDGJJKfL", " h:************=", " S*HZZZZZZZZZZH*", " h*CbbbbbbbbbzB*", " S*VvbvclkjiuyN*", " h;mtrewq08954n*", " gx8765321<,>M-O", "&*************%L", "LLLLLLLLLLLLLLLL" }; /* XPM */ const char *format_indent_more_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 68 1", " c #555753", ". c #61635F", "X c #797B78", "o c #7A7B78", "O c #7A7C78", "+ c #888A85", "@ c #8B8D88", "# c #8C8E8A", "$ c #8D8F8A", "% c #929391", "& c #929491", "* c #939491", "= c #939492", "- c #939592", "; c #ABACAA", ": c #ACADAA", "> c #ACADAB", ", c #ADAEAB", "< c #C5C5C3", "1 c #C5C6C4", "2 c #C5C7C4", "3 c #C7C7C5", "4 c #C7C7C6", "5 c #D2D2D0", "6 c #D2D3D0", "7 c #D2D2D1", "8 c #D2D3D1", "9 c #D3D4D2", "0 c #D4D5D3", "q c #D6D6D4", "w c #D6D7D5", "e c #DBDBD9", "r c #E0E1E0", "t c #E7E7E7", "y c #EDEDEC", "u c #EEEDEC", "i c #EEEEED", "p c #EFEEED", "a c #EEEEEE", "s c #EFEEEE", "d c #EFEFEE", "f c #F0F0EF", "g c #F1F1F1", "h c #F2F1F0", "j c #F2F1F1", "k c #F2F2F0", "l c #F2F2F1", "z c #F3F2F1", "x c #F3F2F2", "c c #F3F3F2", "v c #F4F3F2", "b c #F4F3F3", "n c #F4F4F3", "m c #F4F4F4", "M c #F5F4F4", "N c #F4F5F4", "B c #F5F5F4", "V c #F5F6F4", "C c #F5F6F5", "Z c #F6F6F5", "A c #F7F6F5", "S c #F7F6F6", "D c #F7F7F6", "F c #F7F8F6", "G c #F8F8F7", "H c #FEFEFE", "J c #FFFFFF", "K c None", /* pixels */ "K$++++++++++++$K", "K+JJJJJJJJJJJJ@K", "K+JGGGGGFAZCBH@K", "K+JGGGG@@@@@MH@K", "K+JGGGDeZVmnnH@K", "K+JGGDZ.wNnbxH@K", "K+JGDSC. qvzjH@K", "K+t4,-O. 0ghH@K", "K+t3,=o. 9fH@K", "K+t2>*o. 8H@K", "K+t1:&o. 5dH@K", "K+t<;%X. 7sdH@K", "K+Jcchl. 6piuH@K", "K+Jckgf.6aiuyH@K", "K+JHHHHrHHHHHJ@K", "K$@@@@@@@@@@@@#K" }; /* XPM */ const char *left_arrow_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 98 2", " c #3A7304", ". c #3A7404", "X c #3B7404", "o c #3B7504", "O c #3A7405", "+ c #3B7604", "@ c #3C7604", "# c #3D7904", "$ c #3F790A", "% c #41790E", "& c #437A10", "* c #457C13", "= c #4E9A06", "- c #519E07", "; c #4D8419", ": c #52891E", "> c #55A409", ", c #56A609", "< c #58A90A", "1 c #59AC0B", "2 c #5AAD0B", "3 c #5CAD0E", "4 c #5EB30D", "5 c #5EA31D", "6 c #60B50D", "7 c #61B60E", "8 c #61B70E", "9 c #62AF17", "0 c #65B519", "q c #578927", "w c #598B29", "e c #5A8C2C", "r c #5D8D2E", "t c #60A420", "y c #66AF20", "u c #66AC22", "i c #65A827", "p c #68A92B", "a c #6BA236", "s c #6EA23D", "d c #70AD35", "f c #71B035", "g c #75B23C", "h c #67C111", "j c #69C211", "k c #6EC915", "l c #7CC833", "z c #7BB642", "x c #7AB742", "c c #7FB947", "v c #7DB549", "b c #7DA855", "n c #7FA956", "m c #80B64D", "M c #82B74F", "N c #85B954", "B c #87BB54", "V c #87BA57", "C c #87B65B", "Z c #88BB58", "A c #89BC59", "S c #8ABC5A", "D c #8BBD5C", "F c #90BF63", "G c #97BD72", "H c #8DC459", "J c #97DA54", "K c #91C064", "L c #96CA65", "P c #94C26A", "I c #9DC477", "U c #A5DC6E", "Y c #A0C37E", "T c #A3CA7E", "R c #A6CF7F", "E c #A3D572", "W c #A5D576", "Q c #A9D77D", "! c #A5C982", "~ c #A7CD84", "^ c #AACF88", "/ c #A9D480", "( c #ACD881", ") c #AEDB82", "_ c #B0DE83", "` c #B3D296", "' c #B5D497", "] c #B8D69B", "[ c #BDD9A3", "{ c #BFDAA6", "} c #C2DCAA", "| c #C4DDAC", " . c #C5DEAE", ".. c #C6DEAE", "X. c #C7DFB1", "o. c #C8DFB1", "O. c #CAE0B5", "+. c None", /* pixels */ "+.+.+.+.+.+.+.+.+.+.o +.+.+.+.+.", "+.+.+.+.+.+.+.+.X w +.+.+.+.+.", "+.+.+.+.+.+.+.. n o. +.+.+.+.+.", "+.+.+.+.+.+.& Y [ O. +.+.+.+.+.", "+.+.+.+.X r ` ^ K X.+ . ", "+.+.+.O b ' P V D | ... .| } ", "+.+.* G ~ m v M N Z A S A Z { ", "o e ! F d g z c x f i 5 t p ] ", "o q I B u y 9 3 1 < > - = = T ", "+.+.% C L 0 6 8 7 4 2 , - = T ", "+.+.+.o s W l j h ) ( / R T T ", "+.+.+.+.+ : E J k _ # . ", "+.+.+.+.+.+.$ H U _ +.+.+.+.+.", "+.+.+.+.+.+.+.@ a Q +.+.+.+.+.", "+.+.+.+.+.+.+.+.+ ; +.+.+.+.+.", "+.+.+.+.+.+.+.+.+.+.o +.+.+.+.+." }; /* XPM */ const char *log_out_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 184 2", " c #555753", ". c #565854", "X c #575955", "o c #585A56", "O c #595B57", "+ c #595959", "@ c #5B5D59", "# c #5C5E5A", "$ c #5D5D5D", "% c #645F5E", "& c #5F615D", "* c #61635F", "= c #606060", "- c #646562", "; c #656763", ": c #646464", "> c #656565", ", c #686966", "< c #686A67", "1 c #686868", "2 c #696B68", "3 c #6D6E6B", "4 c #6C6C6C", "5 c #6E6E6E", "6 c #6F6F6F", "7 c #7E6A6A", "8 c #707070", "9 c #737571", "0 c #757575", "q c #767676", "w c #797979", "e c #7E7E7E", "r c #7F7F7F", "t c #A50000", "y c #A50101", "u c #A60303", "i c #A60404", "p c #A20E0E", "a c #AA0B0B", "s c #A90C0C", "d c #A61111", "f c #A51413", "g c #A11616", "h c #AC1111", "j c #AC1515", "k c #B51B1B", "l c #B01E1E", "z c #AC2524", "x c #B02121", "c c #B12221", "v c #BC2424", "b c #B72828", "n c #BC3030", "m c #B93C3C", "M c #BC3E3E", "N c #CE0808", "B c #CE0C0C", "V c #CF0E0E", "C c #CF1010", "Z c #D11A1A", "A c #D21B1B", "S c #C42D2D", "D c #D32525", "F c #D52D2D", "G c #C53636", "H c #D33535", "J c #D73636", "K c #D63838", "L c #D43A3A", "P c #D23C3C", "I c #D23D3D", "U c #B64543", "Y c #BB4948", "T c #8A6464", "R c #8B7373", "E c #867979", "W c #D94141", "Q c #DB4848", "! c #DB4A4A", "~ c #DB4C4C", "^ c #DB4D4D", "/ c #C45151", "( c #DC5151", ") c #DD5656", "_ c #D55E5E", "` c #C76565", "' c #CD6161", "] c #C46C6B", "[ c #D26565", "{ c #E16969", "} c #E26E6E", "| c #7F817D", " . c #808080", ".. c #828282", "X. c #858585", "o. c #858685", "O. c #868686", "+. c #878886", "@. c #888888", "#. c #898989", "$. c #898A88", "%. c #8B8B8B", "&. c #8D8F8B", "*. c #8C8C8C", "=. c #8D8D8D", "-. c #8F8F8F", ";. c #919191", ":. c #929390", ">. c #929292", ",. c #939393", "<. c #949494", "1. c #959595", "2. c #969696", "3. c #979797", "4. c #989897", "5. c #989898", "6. c #999999", "7. c #9A9B98", "8. c #9A9A9A", "9. c #9C9C9C", "0. c #9D9D9D", "q. c #9E9E9E", "w. c #A28988", "e. c #A0A0A0", "r. c #A1A1A1", "t. c #A2A3A1", "y. c #A2A2A2", "u. c #A3A3A3", "i. c #A4A4A4", "p. c #A5A5A5", "a. c #A6A6A6", "s. c #A7A7A7", "d. c #A9A9A9", "f. c #AAAAAA", "g. c #ABABAB", "h. c #ADADAD", "j. c #AFAFAF", "k. c #BABABA", "l. c #BBBBBB", "z. c #BDBDBD", "x. c #A9A9A9", "c. c #C58886", "v. c #D79292", "b. c #E78888", "n. c #E88D8D", "m. c #E88E8E", "M. c #EA9595", "N. c #EA9696", "B. c #EB9A9A", "V. c #ECA7A7", "C. c #BEC1BB", "Z. c #C3C3C3", "A. c #C3C6C1", "S. c #C5C7C1", "D. c #C6C8C3", "F. c #C6C9C3", "G. c #C6C9C4", "H. c #C7C9C5", "J. c #D0D2D0", "K. c #D4D6D2", "L. c #D6D8D4", "P. c #D7D9D5", "I. c #D8DAD6", "U. c #D9DBD7", "Y. c #EDD4D3", "T. c #E4E5E3", "R. c #E5E6E4", "E. c #ECE3E1", "W. c #EDEEEC", "Q. c #EFEFED", "!. c #EFEFEE", "~. c #F0F0EE", "^. c #F1F1EF", "/. c #F3F1EF", "(. c #F3F3F2", "). c #F4F4F2", "_. c #F4F4F3", "`. c #F6F6F5", "'. c #F8F8F7", "]. c #F9F9F9", "[. c #FAFAFA", "{. c #FBFBFA", "}. c #FBFBFB", "|. c None", /* pixels */ "@ . # - , < ; 3 |.", " a.X.w 5 > $ + Q.^._.`.`.W.| |.", " h.*.r 0 4 : = Q.(.'.{.}.].7.|.", " k.1.#.e 0 5 1 !.).].v.M [.t.|.", " l.0.<.#.r q 8 ~./.` / j Y.w.|.", " z.e.3.-.O.e q E.m ' V.n b c y ", " x.y.8.;.@. .7 x [ b.m.M.N.B.y ", " x.i.9.,.%.T d _ { Q ! ~ ^ n.u ", " x.s.q.2.=.g G ) F D Z C A } i ", " x.d.r.5.-.R p S J N B B V ( y ", " x.f.u.8.>.#.E z v K W L P I t ", " x.f.p.0.1.-...% Y k H i l f a ", " x.f.d.r.6.6 $.J.T.] h s R.+.|.", " x.g.j.o.&.H.K.P.I.U.c.U L.9 |.", " Z.4.:.C.A.D.F.G.G.G.G.G.S.* |.", "@ 2 . X o o o o O O O O O o & |." }; /* XPM */ const char *minus_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 19 1", " c #3465A4", ". c #7DA6D7", "X c #7FA8D7", "o c #83AAD8", "O c #86ADD9", "+ c #90B3DA", "@ c #92B4DA", "# c #94B6DB", "$ c #95B7DB", "% c #9FBEE0", "& c #B4CCE5", "* c #B5CCE6", "= c #B6CCE6", "- c #B6CDE6", "; c #B7CEE6", ": c #BBD1E7", "> c #BCD1E7", ", c #C0D3E8", "< c None", /* pixels */ "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<", "<< <<", "<< ,:>;;;;-*= <<", "<< &$#@+OoX.% <<", "<< <<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<" }; /* XPM */ const char *net_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 160 2", " c #576F95", ". c #58749D", "X c #5A769F", "o c #5876A0", "O c #5977A0", "+ c #5877A2", "@ c #5978A2", "# c #5979A3", "$ c #5A79A3", "% c #5E7AA3", "& c #5A79A4", "* c #5A7AA4", "= c #5B7AA4", "- c #5D7DA6", "; c #5E7DA6", ": c #627BA3", "> c #627CA5", ", c #617FA6", "< c #617FA8", "1 c #637FA8", "2 c #4F80B6", "3 c #5685B7", "4 c #5686BA", "5 c #5988BC", "6 c #5C8ABD", "7 c #6983A6", "8 c #6380A8", "9 c #6984A9", "0 c #708AAD", "q c #6D90B7", "w c #7591B4", "e c #7591B5", "r c #7792B6", "t c #7994B6", "y c #7A95B7", "u c #7E97B9", "i c #628FC1", "p c #6B96C6", "a c #6C96C5", "s c #719BC9", "d c #759FCB", "f c #819ABA", "g c #839BBB", "h c #9DA6AE", "j c #AEB5BC", "k c #8BA7C7", "l c #84A6CA", "z c #83A7CE", "x c #93ABC7", "c c #94ACC8", "v c #9AB0CB", "b c #9CB2CB", "n c #9BB2CC", "m c #9DB3CD", "M c #9FB4CE", "N c #80A7D1", "B c #93B6DC", "V c #A4B5C9", "C c #A5B7C9", "Z c #A0B4CD", "A c #A3B6CE", "S c #BABFC4", "D c #B8BFC6", "F c #B5BEC8", "G c #A3B8D0", "H c #A9BCD1", "J c #ABBDD3", "K c #AABED3", "L c #AFBFD4", "P c #A2BDDA", "I c #9CBDE0", "U c #B7C2CD", "Y c #BCC4CC", "T c #B3C1D0", "R c #B1C0D5", "E c #B1C2D6", "W c #BEC7D0", "Q c #BCC8D4", "! c #BECAD6", "~ c #B5C5D8", "^ c #B4C7DC", "/ c #B7C8DC", "( c #BBC9DA", ") c #BECBDA", "_ c #B8C9DD", "` c #BCCDDF", "' c #ACCAE9", "] c #BECFE1", "[ c #B3CCE8", "{ c #B1CEEC", "} c #B5D1EE", "| c #BED4EB", " . c #BCD7F2", ".. c #C0C6CE", "X. c #C7CDD2", "o. c #C8CED4", "O. c #C8CFD5", "+. c #C6CFD8", "@. c #CED0D1", "#. c #CED1D3", "$. c #CAD5DF", "%. c #D1D1D1", "&. c #D3D3D3", "*. c #D7D9DB", "=. c #DCDDDF", "-. c #C3D2E3", ";. c #CCD7E2", ":. c #CFD9E2", ">. c #CCD9E7", ",. c #CEDBEA", "<. c #CCDDEF", "1. c #DBDEE0", "2. c #D4DDE9", "3. c #D5DFE9", "4. c #D6DFE9", "5. c #D5DFEB", "6. c #DFE1E3", "7. c #DCE1E5", "8. c #DEE2E7", "9. c #D9E1E9", "0. c #DCE3E9", "q. c #DBE4EF", "w. c #DCE4ED", "e. c #C9E1F9", "r. c #CCE3FA", "t. c #D4E5F6", "y. c #D2E5F9", "u. c #D5E8FC", "i. c #DAEAFA", "p. c #DEEDFB", "a. c #DAEBFC", "s. c #DEEEFF", "d. c #DFEFFF", "f. c #E0E0E0", "g. c #E2E2E2", "h. c #E0E3E4", "j. c #E3E4E5", "k. c #E2E4E6", "l. c #E0E5EB", "z. c #E4E6E8", "x. c #EDEEEF", "c. c #EFEFEF", "v. c #E6EBF0", "b. c #E6EBF4", "n. c #E0EFFF", "m. c #E2EFFE", "M. c #E1F0FF", "N. c #E2F1FF", "B. c #E3F1FF", "V. c #F1F2F3", "C. c #F4F4F5", "Z. c #F5F5F5", "A. c #F6F6F6", "S. c #F0F4F8", "D. c #F8F9F9", "F. c #F9F9F9", "G. c #FBFBFB", "H. c #FDFDFD", "J. c #FEFEFE", "K. c None", /* pixels */ "K.K.K.K.K.o = * @ + K.K.K.K.K.K.", "K.K.K.% g ( w.b.5.E u # K.K.K.K.", "K.K., R l.:.S ) | ! 9.A $ K.K.K.", "K.9 L 8.#.m.p.t.Q ..1.v.Z * K.K.", ": f S.j.$.N.B.i.+.*.C.G.3.t K.K.", "0 ~ h.<.n.M.M.a.X.W V F z.G * K.", "8 2.K r.s.d.d.,.H.J.H.k.=.` * K.", "= q.' .e.u.y.O.J.J.J.F.j -.* K.", "; >.U o.[ } { H D.V.J.c.@._ * K.", "1 J 7.J.6.P I B l k Z.g.h m * K.", "> y 4.J.J.x.z N d a f.&.C e K.K.", "K.< b 0.A.D s p i 5 %.Y c * K.K.", "K.K.- v ;.q 6 4 2 3 T x # K.K.K.", "K.K.K.7 r M / ] ^ n w O K.K.K.K.", "K.K.K.K. X $ & @ . K.K.K.K.K.K.", "K.K.K.K.K.K.K.K.K.K.K.K.K.K.K.K." }; /* XPM */ const char *plus_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 19 1", " c #3465A4", ". c #7DA6D7", "X c #7FA8D7", "o c #83AAD8", "O c #86ADD9", "+ c #90B3DA", "@ c #92B4DA", "# c #94B6DB", "$ c #95B7DB", "% c #9FBEE0", "& c #B4CCE5", "* c #B5CCE6", "= c #B6CCE6", "- c #B6CDE6", "; c #B7CEE6", ": c #BBD1E7", "> c #BCD1E7", ", c #C0D3E8", "< c None", /* pixels */ "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<< <<<<<<", "<<<<<< ;; <<<<<<", "<<<<<< ;; <<<<<<", "<<<<<< ;; <<<<<<", "<< ;; <<", "<< ,:>;;;;-*= <<", "<< &$#@+OoX.% <<", "<< OO <<", "<<<<<< ;O <<<<<<", "<<<<<< ;O <<<<<<", "<<<<<< ;; <<<<<<", "<<<<<< <<<<<<", "<<<<<<<<<<<<<<<<", "<<<<<<<<<<<<<<<<" }; /* XPM */ const char *process_stop_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 133 2", " c #860000", ". c #870000", "X c #880000", "o c #890000", "O c #880202", "+ c #890202", "@ c #890303", "# c #BD0000", "$ c #BF0000", "% c #BD0202", "& c #BD0303", "* c #BE0404", "= c #BE0505", "- c #BF0505", "; c #B01818", ": c #B11A1A", "> c #B11B1B", ", c #B41D1D", "< c #B41F1F", "1 c #BC1818", "2 c #BF1919", "3 c #AF2222", "4 c #B12222", "5 c #B72121", "6 c #B22424", "7 c #B32626", "8 c #B82323", "9 c #B82424", "0 c #C10000", "q c #C10101", "w c #C30000", "e c #C50000", "r c #C70000", "t c #C70303", "y c #CB0101", "u c #CC0F0F", "i c #C51A1A", "p c #C41B1B", "a c #C71D1D", "s c #D01010", "d c #D31111", "f c #D21F1F", "g c #C92929", "h c #CE2828", "j c #CC2F2F", "k c #CE2F2F", "l c #CF2F2F", "z c #D52323", "x c #D02F2F", "c c #D22F2F", "v c #D52F2F", "b c #DF2B2B", "n c #DF2C2C", "m c #DF2D2D", "M c #D13131", "N c #D23131", "B c #D53030", "V c #D53737", "C c #D63B3B", "Z c #D93B3B", "A c #DA3B3B", "S c #DB3C3C", "D c #E63434", "F c #E73737", "G c #E83737", "H c #E83B3B", "J c #EA3F3F", "K c #DB4040", "L c #DB4141", "P c #DC4242", "I c #D75757", "U c #D65858", "Y c #D75B5B", "T c #D65F5F", "R c #D75F5F", "E c #D85A5A", "W c #D85B5B", "Q c #D85C5C", "! c #DB5F5F", "~ c #EB4343", "^ c #E94545", "/ c #ED4747", "( c #EC4A4A", ") c #EB4C4C", "_ c #ED5252", "` c #EF5A5A", "' c #D76060", "] c #DA6464", "[ c #DA6767", "{ c #EC6161", "} c #ED6565", "| c #EE6868", " . c #EF6A6A", ".. c #F26969", "X. c #F06F6F", "o. c #F17575", "O. c #D89292", "+. c #DE9292", "@. c #D89999", "#. c #F38383", "$. c #F58383", "%. c #F58585", "&. c #F68787", "*. c #F68888", "=. c #F68989", "-. c #F68A8A", ";. c #F78B8B", ":. c #E39696", ">. c #DEACAC", ",. c #E5A5A5", "<. c #E6A5A5", "1. c #E9A5A5", "2. c #E4AAAA", "3. c #E6ABAB", "4. c #E8BCBC", "5. c #DACDCD", "6. c #DAD6D6", "7. c #DBDBDB", "8. c #DFDFDF", "9. c #E6D9D9", "0. c #E2DEDE", "q. c #E5DFDF", "w. c #E6DFDF", "e. c #E6E0E0", "r. c #E8E8E8", "t. c #ECECEC", "y. c #EDEDED", "u. c #F3EDED", "i. c #F1F1F1", "p. c #FCF7F7", "a. c #F9F9F9", "s. c #FEFEFE", "d. c None", /* pixels */ "d.d.d.d.o o d.d.d.d.", "d.d.d.o 3 *.;.;.-.&.$.8 o d.d.d.", "d.d.o 4 #.P v v v v S o.< o d.d.", "d.o 6 #.P V v v v v V A X.> o d.", "o 7 #.L I 5.R v v Q 9.! Z .; o ", "O =.K v O.7.6.' E e.y.,.c C | O ", "@ *.v v B @.8.0.w.t.3.N x k } + ", "@ *.v v v B >.r.t.4.M l k j { + ", "@ *.v v v W w.t.i.u.] k j g ^ + ", "@ %.v v Y q.t.2.<.a.p.[ i % G + ", "O ..z f +.t.2.x h 1.s.:.# & D + ", "o 9 ` d y U t e w q T % * b a . ", "d.o 5 _ s r e w 0 $ # = n p X d.", "d.d.o , ) u w 0 $ # - m 2 X d.d.", "d.d.d.o : ( / ~ J H F 1 X d.d.d.", "d.d.d.d.o X d.d.d.d." }; /* XPM */ const char *right_arrow_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 100 2", " c #3A7304", ". c #3A7404", "X c #3B7404", "o c #3B7504", "O c #3A7405", "+ c #3B7604", "@ c #3C7604", "# c #3C7804", "$ c #40790A", "% c #427A0E", "& c #437A10", "* c #467C14", "= c #4E9A06", "- c #4F9C06", "; c #4D8418", ": c #538B1E", "> c #52A007", ", c #54A408", "< c #57A709", "1 c #5AAC0B", "2 c #5BAE0B", "3 c #5EB30D", "4 c #5FB20E", "5 c #61B70E", "6 c #62B90E", "7 c #64BC0F", "8 c #64BA11", "9 c #66BF10", "0 c #66B817", "q c #6CBA1F", "w c #6CBF1C", "e c #568926", "r c #598C2A", "t c #5E8F30", "y c #5F8F31", "u c #68A92B", "i c #6BAC2F", "p c #6FBA26", "a c #6AA136", "s c #6EAC33", "d c #71A63E", "f c #74AF3B", "g c #78B63D", "h c #7FCB34", "j c #80BE44", "k c #82BE49", "l c #81AB5A", "z c #82AB5A", "x c #85B954", "c c #88BB58", "v c #8BBC5B", "b c #8BBB5D", "n c #8BBD5C", "m c #8CBE5C", "M c #84C249", "N c #88C44D", "B c #89C350", "V c #8AC255", "C c #8DC655", "Z c #8BC158", "A c #8CC358", "S c #8DC25A", "D c #8DC15C", "F c #92D352", "G c #8FC161", "H c #91C164", "J c #99C46F", "K c #9BCA6D", "L c #9CD267", "P c #9DC873", "I c #9EC976", "U c #9CC37A", "Y c #A0D56C", "T c #A3CA7E", "R c #A4CC7E", "E c #A5D773", "W c #A6D37B", "Q c #A7D17F", "! c #A8DA78", "~ c #A4C684", "^ c #AACE89", "/ c #AAD581", "( c #ABD681", ") c #ABD781", "_ c #AFD48C", "` c #B1D291", "' c #B7D49C", "] c #B9D79C", "[ c #BBD99F", "{ c #BDD9A3", "} c #C0DBA7", "| c #C2DCAA", " . c #C3DCAB", ".. c #C5DDAD", "X. c #C6DEAF", "o. c #C7DEB0", "O. c #CBE0B6", "+. c #CBE1B7", "@. c #CEE3BB", "#. c None", /* pixels */ "#.#.#.#.#.o #.#.#.#.#.#.#.#.#.#.", "#.#.#.#.#. r . #.#.#.#.#.#.#.#.", "#.#.#.#.#. +.z . #.#.#.#.#.#.#.", "#.#.#.#.#. @. .~ & #.#.#.#.#.#.", ". + O.J ` ' y X #.#.#.#.", " } | ..X.o.o.H G P [ l O #.#.#.", " { x c v n m D S V A _ U * #.#.", " ] f s u i g k B N M j K ^ t o ", " T = = = > < 2 4 0 q p C I e o ", " T = = - , 1 3 6 7 w L b % #.#.", " T T T R Q / 5 9 h ! d + #.#.#.", ". # ( 8 F E : @ #.#.#.#.", "#.#.#.#.#. ) Y Z $ #.#.#.#.#.#.", "#.#.#.#.#. W a @ #.#.#.#.#.#.#.", "#.#.#.#.#. ; + #.#.#.#.#.#.#.#.", "#.#.#.#.#.o #.#.#.#.#.#.#.#.#.#." }; /* XPM */ const char *save_as_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 95 2", " c #000000", ". c #4E6A7D", "X c #58787A", "o c #6E706B", "O c #6B716E", "+ c #72756B", "@ c #667173", "# c #627075", "$ c #38678B", "% c #3D698A", "& c #3B6B8F", "* c #3D6B8E", "= c #3F6C8E", "- c #4A6D85", "; c #436E88", ": c #4A7180", "> c #41749A", ", c #44789F", "< c #547D9B", "1 c #6B7F88", "2 c #5186AF", "3 c #5892BD", "4 c #688BA0", "5 c #6E99B6", "6 c #7798B0", "7 c #719FBF", "8 c #739FC0", "9 c #79A7CA", "0 c #92A6AC", "q c #95A9AF", "w c #9AAEB4", "e c #A2A4A1", "r c #A3A4A1", "t c #AEB0AD", "y c #AFB0AD", "u c #AEB0AE", "i c #AFB0AE", "p c #B7B8B6", "a c #C5CBBF", "s c #8FB3CE", "d c #92B7D3", "f c #96BBD8", "g c #9EBFD9", "h c #98BFDC", "j c #ACBCC3", "k c #9BC2DF", "l c #ABC8DF", "z c #ABCBE2", "x c #ACCBE3", "c c #B1CEE6", "v c #CACFC4", "b c #CED4C8", "n c #C9D6DD", "m c #DCDBDB", "M c #DBDCDB", "N c #DCDCDB", "B c #DCDBDC", "V c #DBDCDC", "C c #DCDCDC", "Z c #DDE1D6", "A c #DFE2DE", "S c #E2E6DD", "D c #C1D9EB", "F c #C5DBEC", "G c #D5DFE5", "H c #D0DFEF", "J c #E3E3E3", "K c #E4E4E4", "L c #E9E9EA", "P c #EAE9EA", "I c #EBECEC", "U c #ECECEC", "Y c #EDEDED", "T c #EDEEED", "R c #EDEDEE", "E c #EDEEEE", "W c #EEEEEE", "Q c #EEEFEE", "! c #EEEEEF", "~ c #EFEEEF", "^ c #EFEFEF", "/ c #F0F0F0", "( c #F1F1F1", ") c #F2F2F2", "_ c #F3F3F3", "` c #F3F4F3", "' c #F4F4F4", "] c #F7F7F7", "[ c #F9F9F9", "{ c #FAFAFA", "} c #FCFBFC", "| c #FCFCFC", " . c #FDFDFD", ".. c #FFFFFF", "X. c None", /* pixels */ "X.X.X.$ $ $ % : X X.X.X.X.X.X.X.", "X.X.X.c H F k 4 ; X.X.X.X.X.X.X.", "1 @ # - > , g D 2 . o o o o o o ", "O S ..Z n 5 $ z d < G ......' o ", "+ .W Y A 6 $ 9 s * j R E T ` o ", "o } I $ $ $ $ 9 3 $ $ $ $ U _ o ", "o { L v $ h 7 7 7 8 f $ q P ) o ", "o [ { K a $ h 8 8 l $ 0 K ' ( o ", "o [ W { K a $ x h & 0 K { W ( o ", "o ] J W { { b = $ w { | W J / o ", "o r e r r r r r r r r r r r r o ", "o C m N C B N B C M V N V C o ", "o ^ y u i t y y y y ~ Q ! ~ o ", "o ..p p p p p p p p .. ......o ", "o .................... ......o ", "o o o o o o o o o o o o o o o o " }; /* XPM */ const char *save_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 107 2", " c #4E6A7D", ". c #58787A", "X c #6E706B", "o c #6B716E", "O c #72756B", "+ c #667173", "@ c #627075", "# c #38678B", "$ c #3D698A", "% c #3B6B8F", "& c #3D6B8E", "* c #3F6C8E", "= c #4A6D85", "- c #436E88", "; c #4A7180", ": c #41749A", "> c #44789F", ", c #547D9B", "< c #6B7F88", "1 c #5186AF", "2 c #5892BD", "3 c #688BA0", "4 c #6E99B6", "5 c #7798B0", "6 c #719FBF", "7 c #739FC0", "8 c #79A7CA", "9 c #9F9F9F", "0 c #92A6AC", "q c #95A9AF", "w c #9AAEB4", "e c #A8A7A7", "r c #A8A7A8", "t c #A9A9A9", "y c #AAAAA9", "u c #AFAFAF", "i c #B4B4B4", "p c #B7B6B6", "a c #B9B9B9", "s c #BCBCBC", "d c #C5CBBF", "f c #8FB3CE", "g c #92B7D3", "h c #96BBD8", "j c #9EBFD9", "k c #98BFDC", "l c #ACBCC3", "z c #9BC2DF", "x c #ABC8DF", "c c #ABCBE2", "v c #ACCBE3", "b c #B1CEE6", "n c #C2C2C2", "m c #C3C3C3", "M c #C4C4C4", "N c #C5C5C5", "B c #CACFC4", "V c #C8C8C8", "C c #C9C9C9", "Z c #CACACA", "A c #CBCBCB", "S c #CDCDCD", "D c #CECECE", "F c #CFCFCF", "G c #CED4C8", "H c #C9D6DD", "J c #D0D0D0", "K c #D1D1D1", "L c #D2D2D2", "P c #D5D5D5", "I c #D6D6D6", "U c #DCDCDC", "Y c #DDDDDD", "T c #DDE1D6", "R c #DFE2DE", "E c #E2E6DD", "W c #C1D9EB", "Q c #C5DBEC", "! c #D5DFE5", "~ c #D0DFEF", "^ c #E3E3E3", "/ c #E4E4E4", "( c #E9E9EA", ") c #EAE9EA", "_ c #EBEBEB", "` c #EBECEC", "' c #ECECEC", "] c #EDEDED", "[ c #EDEEED", "{ c #EDEDEE", "} c #EDEEEE", "| c #EEEEEE", " . c #F0F0F0", ".. c #F1F1F1", "X. c #F2F2F2", "o. c #F3F3F3", "O. c #F3F4F3", "+. c #F4F4F4", "@. c #F7F7F7", "#. c #F9F9F9", "$. c #FAFAFA", "%. c #FCFBFC", "&. c #FCFCFC", "*. c #FDFDFD", "=. c #FEFEFE", "-. c #FFFFFF", ";. c None", /* pixels */ ";.;.;.# # # $ ; . ;.;.;.;.;.;.;.", ";.;.;.b ~ Q z 3 - ;.;.;.;.;.;.;.", "< + @ = : > j W 1 X X X X X X ", "o E -.T H 4 # c g , ! -.-.-.+.X ", "O *.| ] R 5 # 8 f & l { } [ O.X ", "X %.` # # # # 8 2 # # # # ' o.X ", "X $.( B # k 6 6 6 7 h # q ) X.X ", "X #.$./ d # k 7 7 x # 0 / +...X ", "X #.| $./ d # v k % 0 / $.| ..X ", "X @.^ | $.$.G * # w $.&.| ^ .X ", "X =.-.-.-.-.-.-.-.+.+._ _ ^ .X ", "X D C C C C N C C N N N N N I X ", "X D N 9 u s M V J t L t L a Z X ", "X S m y i n M V A r K e K p Z X ", "X Y U U U P P F F F F F F F Z X ", "X X X X X X X X X X X X X X X X " }; /* XPM */ const char *time_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 59 1", " c #2E3436", ". c #32383A", "X c #383E40", "o c #393E40", "O c #3B4042", "+ c #404648", "@ c #414748", "# c #4A5052", "$ c #4C5153", "% c #4D5254", "& c #555753", "* c #61635F", "= c #636561", "- c #646662", "; c #686A66", ": c #6E706C", "> c #7C7E79", ", c #818485", "< c #888A85", "1 c #939591", "2 c #959798", "3 c #9B9C9A", "4 c #A0A2A3", "5 c #AAABA8", "6 c #B0B1AE", "7 c #B0B2B3", "8 c #B8B9B7", "9 c #C2C3C1", "0 c #C3C4C2", "q c #C2C4C4", "w c #C5C6C6", "e c #C8C8C8", "r c #CACAC9", "t c #C8C9CA", "y c #C9C9CA", "u c #CACBCA", "i c #CDCECD", "p c #CECFCE", "a c #D2D2D2", "s c #D6D6D6", "d c #D9D9D9", "f c #DFDFDF", "g c #E0E0E0", "h c #E1E1E1", "j c #E2E2E2", "k c #E3E3E2", "l c #E3E3E3", "z c #E4E4E4", "x c #E6E6E6", "c c #E7E7E7", "v c #E9E9E9", "b c #ECECEC", "n c #EEEEEE", "m c #F1F1F1", "M c #F3F3F3", "N c #FBFBFA", "B c #FDFDFD", "V c #FFFFFF", "C c None", /* pixels */ "CC<Vxzt,j$+7ccxV>C", ">Vnx% f2e#xxpV>C", ">Vnxf fq@4xxrV>C", ";Vxxf f.ywxi9V;C", ";Vxxf fOoXxi9V;C", "=VxllglhhhaMBN=C", "-Vxvbnmxpu8M63-C", "-VVVVVVVVVVV5:-C", "=*************-C", "C <&&&&&&&&&& CC", "C CC" }; /* XPM */ const char *trash_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 130 2", " c #535A22", ". c #545B23", "X c #575E26", "o c #5B6129", "O c #5D6329", "+ c #61682A", "@ c #666D2D", "# c #6C732F", "$ c #6F7731", "% c #737B32", "& c #767F33", "* c #494D4C", "= c #5C5E59", "- c #5E605C", "; c #61635E", ": c #62645F", "> c #636561", ", c #646663", "< c #666863", "1 c #686A65", "2 c #686A66", "3 c #6A6C68", "4 c #6B6D68", "5 c #6D6F6B", "6 c #70726D", "7 c #70726E", "8 c #727470", "9 c #737571", "0 c #757773", "q c #767B77", "w c #787A75", "e c #797B77", "r c #788134", "t c #7A8235", "y c #798237", "u c #7F865E", "i c #81893A", "p c #8B943E", "a c #879042", "s c #899245", "d c #8B9348", "f c #8C9548", "g c #909946", "h c #929C4A", "j c #959E49", "k c #969F4A", "l c #919A4C", "z c #949D4F", "x c #8A9259", "c c #8A915C", "v c #939A59", "b c #98A247", "n c #96A04F", "m c #9CA64D", "M c #98A150", "N c #9AA252", "B c #9FA956", "V c #A5AE49", "C c #A0A956", "Z c #A6AF55", "A c #A8B154", "S c #ADB757", "D c #A9B259", "F c #ADB75C", "G c #AEB75D", "H c #B2BD50", "J c #B3BE50", "K c #B3BD5A", "L c #888E69", "P c #8C9162", "I c #9FA46B", "U c #A7AF67", "Y c #A1A76E", "T c #A9B260", "R c #AAB263", "E c #AAB264", "W c #B2BB64", "Q c #A3AB72", "! c #A5AC72", "~ c #A8AD75", "^ c #ADB17E", "/ c #ACB27E", "( c #B5C051", ") c #B8C257", "_ c #B9C35D", "` c #BBC55F", "' c #BBC561", "] c #BCC661", "[ c #BCC662", "{ c #BDC763", "} c #B8C065", "| c #BDC765", " . c #BBC469", ".. c #BAC36D", "X. c #BDC675", "o. c #C7D07E", "O. c #989A94", "+. c #B2B881", "@. c #B5BB82", "#. c #B7BE81", "$. c #B8BE84", "%. c #A9AD94", "&. c #B6BBA6", "*. c #B1B4AD", "=. c #BCC286", "-. c #BFC687", ";. c #C3CA89", ":. c #C7CC8B", ">. c #C9D181", ",. c #CAD184", "<. c #C9D18D", "1. c #CCD28E", "2. c #C3CA99", "3. c #C4CB9E", "4. c #CDD590", "5. c #CBD09E", "6. c #CCD29D", "7. c #CCD19F", "8. c #D0D691", "9. c #D1D793", "0. c #C8CEA5", "q. c #CDD2A1", "w. c #D2D7B9", "e. c #D3D8BB", "r. c #D3D9BB", "t. c #D4D9BB", "y. c #D4D9BC", "u. c #D6DBC8", "i. c #DBE0D7", "p. c None", /* pixels */ "p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.p.", "p.p.. . . . . . . . . . . . p.p.", "p.u i.i.i.i.i.i.i.i.i.i.i.i.L p.", ". i.q = - ; > < 2 4 5 6 8 *.i.. ", ". i.* : , 1 3 5 7 9 0 w e O.i.. ", ". &.i.i.i.i.i.i.i.i.i.i.i.i.%.. ", ". . v t r & % $ # @ + O o X . ", "p.. o.( ( J V Z E b p i y x . p.", "p.. o.( ( H } u.u.5.C j f c . p.", "p.. >.( ( 6...W 7.q.B N z I . p.", "p.. ,.) ] t.u.F D T #.M l ! . p.", "p.. 8.| { r.X.G 0.R w.n d ~ . p.", "p.. 9.[ ' .q.2.y.e.U h s Q . p.", "p.. 4.` _ K S A 3.m k g a Y . p.", "p.. ^ 1.<.:.;.-.=.$.@.+./ P . p.", "p.p.. . . . . . . . . . . . p.p." }; /* XPM */ const char *image_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 86 1", " c #233659", ". c #384151", "X c #2F4262", "o c #374762", "O c #33476A", "+ c #34486A", "@ c #3B4C6B", "# c #384C6E", "$ c #3D4E6D", "% c #3D4F6D", "& c #3F516F", "* c #3D5071", "= c #515151", "- c #45546E", "; c #435470", ": c #455672", "> c #475773", ", c #405374", "< c #415474", "1 c #485773", "2 c #495973", "3 c #67758F", "4 c #5072A3", "5 c #5475A4", "6 c #5778A6", "7 c #5B7BA8", "8 c #5F7EAA", "9 c #617FAB", "0 c #7A8698", "q c #7D899D", "w c #6180AD", "e c #6381AD", "r c #6583AF", "t c #6884AA", "y c #718DA7", "u c #6986B1", "i c #6D89B3", "p c #728DB6", "a c #738EB6", "s c #7590B7", "d c #7892B9", "f c #888A85", "g c #818A9A", "h c #818DA2", "j c #8691A3", "k c #819AB8", "l c #8099BD", "z c #839ABE", "x c #869CBF", "c c #8FA6AF", "v c #9CA7B9", "b c #9EA8BA", "n c #9EA9BA", "m c #9FA9BB", "M c #A4B8A9", "N c #B6C5B2", "B c #B3C2B7", "V c #C4D1AF", "C c #C5D1B1", "Z c #D1DCB1", "A c #DCE5B9", "S c #E2EBBE", "D c #889EC1", "F c #8CA1C1", "G c #8EA3C4", "H c #93A6C6", "J c #95A8C7", "K c #9DAFC7", "L c #96A9C8", "P c #98ABC9", "I c #9AACCA", "U c #A1B3C3", "Y c #A2B3CE", "T c #A5B5D0", "R c #A6B6D1", "E c #A7B7D1", "W c #A8B7D1", "Q c #A8B8D2", "! c #EEF3CB", "~ c #F7FADF", "^ c #FCFDEE", "/ c #F6F6F6", "( c #FEFEF9", ") c #FDFDFD", "_ c #FEFEFE", "` c #FFFFFE", /* pixels */ "ffffffffffffffff", "f______________f", "f)0oooooooooo0/f", "f_&9ety876554o/f", "f);acA!Miurrwo/f", "f):lV(`Skdsspo/f", "f)>GN~^ZFDxxzo/f", "f)1IKBCUPLqJHo/f", "f)2WQQWERT=jYo/f", "f)-mmmmnbv==go/f", "f)o$%%$@X ==.o/f", "f)o<,*#+O====o/f", "f)oh333333333o/f", "f)0oooooooooo0/f", "f_////////////)f", "ffffffffffffffff" }; /* XPM */ const char *weather_clear_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 76 1", " c #FCAF3E", ". c #FBB13E", "X c #FBB13F", "o c #FCB03E", "O c #FCB13E", "+ c #FCB23E", "@ c #FCB33E", "# c #FCB23F", "$ c #FCB33F", "% c #FAB43F", "& c #FBB43F", "* c #FCB43F", "= c #FAB545", "- c #FBB94A", "; c #FCB953", ": c #FBBA57", "> c #FCBC57", ", c #FBBD5B", "< c #FBD349", "1 c #FCD549", "2 c #FCE34E", "3 c #FCE956", "4 c #FCEA57", "5 c #FCE459", "6 c #FCE55D", "7 c #FCE959", "8 c #FCEA5A", "9 c #FCC66D", "0 c #FCD964", "q c #FBDB6C", "w c #FCC470", "e c #FCC570", "r c #FCEB65", "t c #FCE768", "y c #FCEC68", "u c #FCE86E", "i c #FCED71", "p c #FCCC82", "a c #FDCD83", "s c #FCCD84", "d c #FCEF81", "f c #FCEF82", "g c #FCEF84", "h c #FCEF87", "j c #FDF089", "k c #FDF08B", "l c #FDF08C", "z c #FDEAAD", "x c #FDF3A1", "c c #FDF0A2", "v c #FDF3A2", "b c #FDF1AA", "n c #FCF4AB", "m c #FDF4AC", "M c #FCF4AD", "N c #FDF4AE", "B c #FDECB4", "V c #FDE6BF", "C c #FDF4B0", "Z c #FDF5B1", "A c #FDF6BE", "S c #FDE6C1", "D c #FEF8CE", "F c #FEF9CF", "G c #FEF8D0", "H c #FEF9D0", "J c #FEF9DF", "K c #FEFAE3", "L c #FEF8E7", "P c #FEF9E7", "I c #FEFCEF", "U c #FEFCF0", "Y c #FEFDF0", "T c #FEFCF1", "R c #FEFEFB", "E c None", /* pixels */ "EEEEEEEEEEEEEEEE", "EEEEEEEoOEEEEEEE", "EEEEEEEOOEEEEEEE", "EEE #Eapw;E+ EEE", "EEE+9VPUJz:$#EEE", "EEEESRIDCMc=EEEE", "EEEaLYYFmjh0@EEE", "EOOsTGHAxdyt.OoE", "EoOeKZNvli75XOOE", "EEE>Bnkfi84<#EEE", "EEEE,bgr342%EEEE", "EEE#*-qu61&@+EEE", "EEE +E#X.@E# EEE", "EEEEEEEOOEEEEEEE", "EEEEEEEOoEEEEEEE", "EEEEEEEEEEEEEEEE" }; /* XPM */ const char *start_here_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 52 1", " c #204A87", ". c #204A88", "X c #204B88", "o c #214B88", "O c #214B89", "+ c #214C89", "@ c #234E8B", "# c #234F8C", "$ c #244F8C", "% c #24508D", "& c #25508E", "* c #25518F", "= c #285593", "- c #295694", "; c #2A5896", ": c #2C5B99", "> c #2D5C9A", ", c #2F5F9D", "< c #2F5F9E", "1 c #30609F", "2 c #31619F", "3 c #3162A0", "4 c #3465A4", "5 c #3566A4", "6 c #3566A5", "7 c #3667A5", "8 c #3667A6", "9 c #3768A6", "0 c #3868A6", "q c #3869A7", "w c #3A6AA8", "e c #3D6EAA", "r c #4070AC", "t c #4272AD", "y c #4474AF", "u c #4575B0", "i c #4E7DB6", "p c #507FB7", "a c #5080B8", "s c #5180B8", "d c #5483BA", "f c #5B8ABF", "g c #5D8BC0", "h c #5E8CC1", "j c #6492C5", "k c #6593C6", "l c #6795C7", "z c #6895C8", "x c #6996C8", "c c #6B98CA", "v c #729FCF", "b c None", /* pixels */ "bbbbbbbbbb. obbb", "bb750bbbbb@2;Xbb", "bbexd8bbbX144#bb", "b7lvvrbbbX444- b", "b7vvva5bb%444>Ob", "btvvvhqb -4443 b", "4svvvc6bb-4441Xb", "bpvvvz7bb&444:Ob", "byvvvfqbb+444=bb", "bwvvvibbb bb", "b44444bbbbbbbbbb", "bbbbbbbbb bb", "b64444bbbo>4,obb", "b0gvj9bbbb$<*Xbb", "bbrku7bbbb Xbbb", "bb668bbbbbbbbbbb" }; /* XPM */ const char *help_browser_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 153 2", " c #204A87", ". c #214B88", "X c #224B88", "o c #224C88", "O c #234C89", "+ c #234D89", "@ c #244E8A", "# c #254F8A", "$ c #254F8B", "% c #264F8B", "& c #27508B", "* c #2A538E", "= c #2C548D", "- c #2D558D", "; c #2D558E", ": c #2E558F", "> c #2F578F", ", c #2D5690", "< c #2F5891", "1 c #315891", "2 c #365C93", "3 c #325B94", "4 c #335B94", "5 c #335C94", "6 c #345C95", "7 c #345D95", "8 c #385E94", "9 c #386097", "0 c #3B6096", "q c #386098", "w c #3A6299", "e c #3B639A", "r c #3C649A", "t c #40679D", "y c #42699F", "u c #436A9F", "i c #47699C", "p c #4B6E9F", "a c #456CA1", "s c #466DA1", "d c #496FA3", "f c #4D6FA0", "g c #4B72A5", "h c #4C72A5", "j c #4D73A6", "k c #5176A7", "l c #5878A5", "z c #5978A6", "x c #5B7AA7", "c c #5C7BA7", "v c #5278A9", "b c #547AAC", "n c #567CAD", "m c #597AA8", "M c #5D7CA8", "N c #5A7FB0", "B c #617EAA", "V c #5E83B2", "C c #6381AB", "Z c #6482AC", "A c #6582AC", "S c #6482AD", "D c #6A86AF", "F c #6284B2", "G c #6587B3", "H c #6085B4", "J c #6286B4", "K c #6387B6", "L c #6987B1", "P c #6589B7", "I c #6B88B2", "U c #6B89B3", "Y c #6C88B0", "T c #6D8BB5", "R c #6C8DB7", "E c #678BB9", "W c #6A8EBA", "Q c #6B8FBB", "! c #718DB5", "~ c #728FB7", "^ c #6F92BD", "/ c #7191BB", "( c #7093BF", ") c #7594BD", "_ c #7296C1", "` c #7396C1", "' c #7497C1", "] c #7999C1", "[ c #789BC5", "{ c #829DC1", "} c #86A1C3", "| c #89A1C2", " . c #8CA1C1", ".. c #8CA2C1", "X. c #8BA5C7", "o. c #8FA8C8", "O. c #90A5C3", "+. c #94A9C6", "@. c #94ADCC", "#. c #9BAFCB", "$. c #9BB2D1", "%. c #9FB7D5", "&. c #9DB7D6", "*. c #A0B4CF", "=. c #A0B5D0", "-. c #A7B8D0", ";. c #A6B9D3", ":. c #A0B9D7", ">. c #A9B9D0", ",. c #AABAD1", "<. c #ADBCD3", "1. c #B7C6DA", "2. c #BDC9DB", "3. c #BAC9DD", "4. c #BDCADC", "5. c #C0CCDD", "6. c #C2CEDE", "7. c #C6D2E1", "8. c #C8D4E4", "9. c #CAD6E5", "0. c #CBD6E5", "q. c #C9D7E7", "w. c #CCD7E6", "e. c #CDDAE9", "r. c #D1DBE8", "t. c #D6DEE9", "y. c #E3E8F0", "u. c #E4E9F0", "i. c #E5EAF1", "p. c #E6EAF1", "a. c #E6EBF2", "s. c #E7EBF2", "d. c #E8ECF3", "f. c #E8EDF3", "g. c #E9EDF3", "h. c #E9EEF3", "j. c #EBEFF4", "k. c #EDF0F5", "l. c #EDF1F7", "z. c #EFF2F6", "x. c #EFF3F7", "c. c #EFF3F8", "v. c #F0F3F7", "b. c #F0F3F8", "n. c #F1F4F8", "m. c #F1F5F9", "M. c #F2F5F9", "N. c #F9FBFC", "B. c #FBFCFD", "V. c #FDFDFE", "C. c #FEFEFE", "Z. c #FFFFFF", "A. c None", /* pixels */ "A.A.A.A.A. A.A.A.A.A.", "A.A.A.A.= .2.j.j.2...= A.A.A.A.", "A.A. x y.>.A 0 0 A ,.u.c A.A.", "A.A.B s.z i 6.v.p.-.f S f.M A.A.", "A.; i.l Y V.t.z.Z.4.q U a.- A.", " O.>. p f 3 m Z.B.s u 1.+. ", " 5.A & , 6 w | Z.d.g j } 7.O ", " k.2 # , 7 e T N.C.{ b n R x.. ", " k.8 * 4 w y f.Z.=.N V H ) b.X ", " 5.D < 9 t k 8.9.J K E W $.w.@ ", " O.<.5 r a v o.@.P Q ( ` q.*.. ", "A.; a.L t d F Z.Z.^ _ [ &.l.> A.", "A.A.C h.~ h G Z.Z.' [ :.m.I A.A.", "A.A. Z g.3.X./ ] %.e.c.! % A.A.", "A.A.A.A.: #.0.n.M.r.;.1 A.A.A.A.", "A.A.A.A.A. + o o $ . A.A.A.A.A." }; /* XPM */ const char *system_software_update_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 165 2", " c #364878", ". c #774861", "X c #6E5471", "o c #6F5674", "O c #705472", "+ c #9E080B", "@ c #991116", "# c #A40000", "$ c #931821", "% c #843345", "& c #405583", "* c #4E648F", "= c #516790", "- c #506A96", "; c #576F95", ": c #5A6B93", "> c #5B6D94", ", c #546E98", "< c #597199", "1 c #58749D", "2 c #5A769F", "3 c #686284", "4 c #656588", "5 c #6B7B9F", "6 c #5877A2", "7 c #5C77A1", "8 c #5978A2", "9 c #5979A3", "0 c #5A79A3", "q c #5A79A4", "w c #5A7AA4", "e c #5D7DA6", "r c #607AA3", "t c #617FA8", "y c #4F80B6", "u c #5685B7", "i c #5686BA", "p c #5988BC", "a c #5C8ABD", "s c #6983A6", "d c #768BAD", "f c #6D90B7", "g c #7591B4", "h c #7792B6", "j c #7994B6", "k c #7A95B7", "l c #7E97B9", "z c #628FC1", "x c #6B96C6", "c c #6C96C5", "v c #719BC9", "b c #759FCB", "n c #8593B1", "m c #9DA6AE", "M c #AEB5BC", "N c #8BA7C7", "B c #84A6CA", "V c #83A7CE", "C c #95A7C2", "Z c #93ABC7", "A c #9EADC5", "S c #94ACC8", "D c #9AB0CB", "F c #9CB2CB", "G c #9BB2CC", "H c #9DB3CD", "J c #9FB4CE", "K c #80A7D1", "L c #93B6DC", "P c #A4B5C9", "I c #A5B7C9", "U c #A0B4CD", "Y c #A3B6CE", "T c #AFB8CB", "R c #ADB9CE", "E c #BABFC4", "W c #B8BFC6", "Q c #B5BEC8", "! c #B4BCCD", "~ c #A3B8D0", "^ c #A9BCD1", "/ c #AABED3", "( c #A2BDDA", ") c #9CBDE0", "_ c #B7C2CD", "` c #BCC4CC", "' c #B3C1D0", "] c #B1C2D6", "[ c #BEC7D0", "{ c #BCC8D4", "} c #BECAD6", "| c #B4C7DC", " . c #B7C8DC", ".. c #BECBDA", "X. c #B8C9DD", "o. c #BCCDDF", "O. c #ACCAE9", "+. c #BECFE1", "@. c #B3CCE8", "#. c #B1CEEC", "$. c #B5D1EE", "%. c #BED4EB", "&. c #BCD7F2", "*. c #C0C6CE", "=. c #C7CDD2", "-. c #C4CAD6", ";. c #C8CED4", ":. c #C8CFD5", ">. c #C6CFD8", ",. c #CED0D1", "<. c #CED1D3", "1. c #CAD5DF", "2. c #D1D1D1", "3. c #D3D3D3", "4. c #D7D9DB", "5. c #D9DCDF", "6. c #DCDDDF", "7. c #C3D2E3", "8. c #CCD7E2", "9. c #CFD9E2", "0. c #CEDBEA", "q. c #CCDDEF", "w. c #DBDEE0", "e. c #D5DFE9", "r. c #D6DFE9", "t. c #D5DFEB", "y. c #DFE1E3", "u. c #DCE1E5", "i. c #D9E1E9", "p. c #DCE3E9", "a. c #DCE4ED", "s. c #C9E1F9", "d. c #CCE3FA", "f. c #D4E5F6", "g. c #D2E5F9", "h. c #D5E8FC", "j. c #DAEAFA", "k. c #DEEDFB", "l. c #DAEBFC", "z. c #DEEEFF", "x. c #DFEFFF", "c. c #E0E0E0", "v. c #E2E2E2", "b. c #E3E4E5", "n. c #E2E4E6", "m. c #E4E6E8", "M. c #EDEEEF", "N. c #EFEFEF", "B. c #E6EBF0", "V. c #E6EBF4", "C. c #E0EFFF", "Z. c #E2EFFE", "A. c #E1F0FF", "S. c #E2F1FF", "D. c #E3F1FF", "F. c #F1F2F3", "G. c #F4F4F5", "H. c #F5F5F5", "J. c #F6F6F6", "K. c #F8F9F9", "L. c #F9F9F9", "P. c #FBFBFB", "I. c #FDFDFD", "U. c #FEFEFE", "Y. c None", /* pixels */ "Y. 8 6 Y.Y.Y.Y.Y.Y.", "Y.Y. 5 a.V.t.] l 9 Y.Y.Y.Y.", "Y.Y., : ! 9.E ..%.} i.Y 0 Y.Y.Y.", "Y.< : -.<.Z.k.f.{ *.w.B.U w Y.Y.", "* T b.1.S.D.j.>.4.G.P.e.j Y.Y.", "= > 5.q.C.A.A.l.=.[ P Q m.~ w Y.", "& n / d.z.x.x.0.I.U.I.n.6.o.3 Y.", " R O.&.s.h.g.:.U.U.U.L.M 7.O Y.", "- A _ ;.@.$.#.^ K.F.U.N.,.X.o Y.", "7 C u.U.y.( ) L B N H.v.m H % # ", "r k r.U.U.M.V K b c c.3.I d @ # ", "Y.t F p.J.W v x z p 2.` S . # Y.", "Y.Y.e D 8.f a i y u ' Z 4 + Y.Y.", "Y.Y.Y.s h J .+.| G g X + Y.Y.Y.", "Y.Y.Y.Y.; 2 0 q 8 1 $ # # # Y.Y.", "Y.Y.Y.Y.Y.Y.Y.Y.# # # # # # # Y." }; /* XPM */ const char *utilities_terminal_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 163 2", " c #000000", ". c #010201", "X c #020302", "o c #060606", "O c #060706", "+ c #070706", "@ c #070806", "# c #080807", "$ c #090908", "% c #0A0B09", "& c #0B0C0A", "* c #0D0E0C", "= c #0F100D", "- c #131412", "; c #181F11", ": c #182011", "> c #192011", ", c #273019", "< c #273119", "1 c #26311A", "2 c #27311A", "3 c #27321A", "4 c #27321B", "5 c #28321A", "6 c #28331B", "7 c #28341B", "8 c #29331D", "9 c #29341C", "0 c #29351C", "q c #232423", "w c #2F312D", "e c #343633", "r c #364323", "t c #364423", "y c #364523", "u c #374523", "i c #374525", "p c #3B4A26", "a c #3B4A27", "s c #3C4B27", "d c #3C4C27", "f c #46562B", "g c #46572C", "h c #4E5E36", "j c #4C563D", "k c #4C5A3A", "l c #4E6132", "z c #4F6232", "x c #4F6332", "c c #536537", "v c #545851", "b c #555952", "n c #5A5E57", "m c #5F625B", "M c #616E4D", "N c #657C41", "B c #616A55", "V c #62655E", "C c #647151", "Z c #657152", "A c #697850", "S c #6A7559", "D c #636660", "F c #646860", "G c #656961", "H c #6A6E66", "J c #6F736B", "K c #737D64", "L c #747772", "P c #747870", "I c #767972", "U c #777A73", "Y c #787C74", "T c #797D75", "R c #7D7F79", "E c #758954", "W c #73825F", "Q c #768560", "! c #798764", "~ c #7B8865", "^ c #7C8967", "/ c #7A846C", "( c #7E8B69", ") c #7F8C6B", "_ c #7D8079", "` c #7E807A", "' c #7E817A", "] c #808D6D", "[ c #859869", "{ c #828E70", "} c #81837D", "| c #81837E", " . c #82857E", ".. c #83867E", "X. c #849071", "o. c #849074", "O. c #8C9D72", "+. c #8E9F74", "@. c #90A076", "#. c #92A279", "$. c #94A27D", "%. c #95A47F", "&. c #848681", "*. c #868782", "=. c #878983", "-. c #878A82", ";. c #888B83", ":. c #8A8C87", ">. c #8B8C87", ",. c #8C8F87", "<. c #8D8F8A", "1. c #8D9088", "2. c #8F918C", "3. c #91928D", "4. c #92958D", "5. c #939590", "6. c #969893", "7. c #979A92", "8. c #989995", "9. c #989996", "0. c #9A9B97", "q. c #999C94", "w. c #97A681", "e. c #99A38A", "r. c #9DA098", "t. c #A2B387", "y. c #A4B58A", "u. c #A5B68D", "i. c #A8B88E", "p. c #A0A19D", "a. c #A2A59C", "s. c #A3A69D", "d. c #A3A69E", "f. c #A9B990", "g. c #AABA92", "h. c #ACBC94", "j. c #AEBD97", "k. c #AFBE98", "l. c #B1BF9B", "z. c #B0B1AE", "x. c #B2B4B1", "c. c #B4B6B1", "v. c #B7B9B4", "b. c #C0C1BE", "n. c #CCCDCB", "m. c #CDCECC", "M. c #CDD2C6", "N. c #CED1C8", "B. c #CFD3CB", "V. c #D3D6CD", "C. c #D6D7D5", "Z. c #D7D7D5", "A. c #D7D8D6", "S. c #D7D8D7", "D. c #D9DED4", "F. c #DBDBD9", "G. c #DDDDDC", "H. c #DDDEDC", "J. c #DDDEDD", "K. c #E0E3DB", "L. c #ECEDEA", "P. c #F2F3F1", "I. c None", /* pixels */ "I.r.q.4.1.;...' T P J H G V n I.", "s.c.Z.J.H.G.G.G.G.G.G.F.n.x.L b ", "s.C.e # # # # # # # # + + w 9.b ", "a.S.= l.k.j.h.g.f.i.u.y.t. 0.v ", "a.S.* o.X.{ ] ) ( ^ ~ ! Q 6.v ", "a.S.& w.%.$.#.@.+.O.[ E N 5.v ", "a.S.% S D./ Z C M h f f g 3.v ", "a.S.$ W e.K.M.A c l z z x <.v ", "a.S.@ j B B.V.i r t t y u :.v ", "a.S.+ k N.K a p p p s s d =.v ", "a.S.+ 8 2 , < P.P.P.L.5 5 &.v ", "a.S.O 1 3 4 4 6 6 7 9 9 0 } v ", "a.S.o ; ; ; ; ; ; ; : > > ` v ", "s.A.q X . . . . . . . . . - I b ", "d.v.m.b.z.p.8.5.2.>.*.| R U D b ", "I.r.7.4.,.-. ._ Y P J H F m n I." }; /* XPM */ const char *emblem_symbolic_link_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 70 1", " c #888A85", ". c #AAABA8", "X c #B6B7B4", "o c #BFC0BE", "O c #C0C1BF", "+ c #C1C2C0", "@ c #C7C8C6", "# c #E3E3E3", "$ c #E4E3E4", "% c #E4E4E4", "& c #E4E5E4", "* c #E4E4E5", "= c #E5E5E5", "- c #E5E6E5", "; c #E6E6E6", ": c #E6E7E6", "> c #E7E7E6", ", c #E8E8E8", "< c #E9E8E8", "1 c #E8E8E9", "2 c #E8E9E9", "3 c #E9E9E9", "4 c #EAE9E9", "5 c #E9E9EA", "6 c #EAEAEA", "7 c #EBEAEA", "8 c #EAEBEA", "9 c #EAEBEB", "0 c #EBEBEB", "q c #ECECEB", "w c #ECEBEC", "e c #ECECEC", "r c #EDEDED", "t c #EDEEED", "y c #EDEDEE", "u c #EEEEEE", "i c #EFEFEE", "p c #EFEEEF", "a c #EFEFEF", "s c #EFF0EF", "d c #F0F0F0", "f c #F1F1F1", "g c #F2F1F1", "h c #F1F2F1", "j c #F2F2F1", "k c #F2F1F2", "l c #F2F2F2", "z c #F3F3F3", "x c #F3F3F4", "c c #F4F4F4", "v c #F5F5F4", "b c #F4F5F5", "n c #F5F5F5", "m c #F6F5F6", "M c #F5F6F6", "N c #F6F6F6", "B c #F7F6F6", "V c #F8F8F8", "C c #F9F9F9", "Z c #F9FAF9", "A c #FAFAFA", "S c #FBFAFB", "D c #FBFBFB", "F c #FCFBFB", "G c #FCFCFC", "H c #FDFDFC", "J c #FDFDFD", "K c #FEFEFE", "L c #FFFFFF", "P c None", /* pixels */ "P P", " LLLLLLLLLLLLLL ", " L############J ", " L############J ", " L###%=;:;-*$#J ", " L#%oX..O42.;&D ", " L%@<6...+..3>D ", " L;10ri.....q5V ", " L,9rahz....uwN ", " L4eajc.....dra ", " L8yfx......gpa ", " L0ukvVDHFCmzsa ", " L9uknVDKGCMzaa ", " L7tfcBCSZVblaa ", " LGGGGGGAAANNNa ", "P P" }; /* XPM */ const char *emblems_system_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 17 1", " c #676965", ". c #71736F", "X c #777975", "o c #888A84", "O c #888A85", "+ c #898B87", "@ c #8D8F8A", "# c #8F918C", "$ c #979993", "% c #A2A3A0", "& c #B8BAB4", "* c #BDBFB9", "= c #C0C0BE", "- c #C7CAC3", "; c #D3D7CF", ": c #EEEEEC", "> c None", /* pixels */ ">>>>>>>>>>>>>>>>", ">>>>>>OOO>>>>>>>", ">>>OO>O:O>OO>>>>", ">>O:=O%;%O=:O>>>", ">>O=;;;;;;;=O>>>", ">>>O;&o$o*;O>>>>", ">OO%;o.> +;%OO>>", ">O:;;$>>>$;;:O>>", ">OO%;@#>Xo;%OO>>", ">>>O:&@$o-;O>>>>", ">>O=;;;;;;;=O>>>", ">>O:=O%;%O=:O>>>", ">>>OO>O:O>OO>>>>", ">>>>>>OOO>>>>>>>", ">>>>>>>>>>>>>>>>", ">>>>>>>>>>>>>>>>" }; /* XPM */ const char *dialog_information_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 116 2", " c #303030", ". c #393936", "X c #5E5E3E", "o c #3A4A77", "O c #3A4B77", "+ c #3B4B77", "@ c #3D4C76", "# c #3D4D76", "$ c #384978", "% c #384A79", "& c #394A79", "* c #394B7A", "= c #3A4B7A", "- c #3B4C78", "; c #3C4D78", ": c #3E4E79", "> c #464646", ", c #435177", "< c #40507A", "1 c #41517B", "2 c #45547E", "3 c #46557F", "4 c #4A577A", "5 c #80805C", "6 c #8A8B66", "7 c #475780", "8 c #485883", "9 c #4B5B83", "0 c #495985", "q c #4A5A86", "w c #546083", "e c #586383", "r c #5E6880", "t c #4B7EB2", "y c #5E8DBA", "u c #608EBC", "i c #7E91B1", "p c #7E90B2", "a c #779DC5", "s c #789DC4", "d c #A8AA84", "f c #A6AC98", "g c #A7AD98", "h c #ABB198", "j c #8C9BB8", "k c #8D9CB8", "l c #98A4BD", "z c #9AA5BE", "x c #DDDFAB", "c c #D3D5B0", "v c #E3E6BA", "b c #87A8CC", "n c #91AECD", "m c #9BAEC8", "M c #9DB9D6", "N c #A4ADC3", "B c #A5BED8", "V c #A6BED8", "C c #A9C0D9", "Z c #AAC1D9", "A c #B7C2D5", "S c #B9C4D6", "D c #B5C6DA", "F c #B5C7DB", "G c #B5CAE0", "H c #C1CCD7", "J c #EBEDC1", "K c #F3F6C9", "L c #F5F8CA", "P c #C2D0E0", "I c #C0D0E3", "U c #C5D2E1", "Y c #C1D2E4", "T c #C2D3E4", "R c #C3D3E4", "E c #C5D5E5", "W c #C7D6E5", "Q c #C9D6E7", "! c #C8D7E8", "~ c #CBD9E8", "^ c #CCD9E8", "/ c #CEDBE9", "( c #D0D5E0", ") c #D2DAE2", "_ c #D0DDEB", "` c #D3DFEB", "' c #D4E0EC", "] c #D4E0ED", "[ c #D6E1ED", "{ c #D8E2ED", "} c #D9E3EE", "| c #DEE7F1", " . c #DFE7F2", ".. c #DFE8F2", "X. c #E0E5ED", "o. c #E0E6EC", "O. c #E2E7EF", "+. c #E0E9F2", "@. c #E2EAF3", "#. c #E8EFF4", "$. c #E8EFF5", "%. c #EDEFF4", "&. c #EBF0F5", "*. c #EBF0F6", "=. c #ECF1F7", "-. c #EFF3F7", ";. c #EEF3F8", ":. c #F3F7FA", ">. c #F4F7FA", ",. c #F5F8FA", "<. c #F7F9FB", "1. c #FAFBFD", "2. c #FAFCFD", "3. c #FCFCFD", "4. c #FFFFFF", "5. c None", /* pixels */ "5.5.5.5.5.+ o $ % O @ 5.5.5.5.5.", "5.5.5.5.- N %.3.<.O.z : 5.5.5.5.", "5.5.5.; ( ,.#.@.} ` { S 1 5.5.5.", "5.5.# N ,.-.>.*...] T E k , 5.5.", "5.5.< %.$.:.2.=. ._ Y s U 3 5.5.", "5.5.& 1.+.;.4.4.4.4.H 5./ * 5.5.", "5.5.= >.[ | 4.&.o.) n 5.Q * 5.5.", "5.5.2 X.~ ! 4.I G M 5.u F 8 5.5.", "5.5.4 l ' V 4.B b 5.t Z i w 5.5.", "5.5.5.7 A R a 4.5.y C m 0 5.5.5.", "5.5.5.5.7 j P ^ W D p q 5.5.5.5.", "5.5.5.5.5.e 9 f g h r 5.5.5.5.5.", "5.5.5.5.5.5.X J L x X 5.5.5.5.5.", "5.5.5.5.5.5.X 5 d 6 X 5.5.5.5.5.", "5.5.5.5.5.5.X v K c X 5.5.5.5.5.", "5.5.5.5.5.5.5.. > 5.5.5.5.5.5." }; /* XPM */ const char *executable_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 67 1", " c #364878", ". c #486490", "X c #516A96", "o c #566F99", "O c #5F7A9F", "+ c #7182AA", "@ c #7382AB", "# c #7483AB", "$ c #7584AC", "% c #7786AD", "& c #7A87AF", "* c #7A88AE", "= c #7B88AF", "- c #7C89B0", "; c #7D89B1", ": c #7C8CB0", "> c #7C8EB0", ", c #7F90B1", "< c #858EB5", "1 c #858FB5", "2 c #8790B6", "3 c #8394B4", "4 c #8991B7", "5 c #8895B7", "6 c #8F9BBB", "7 c #8E9CBB", "8 c #8D9EBA", "9 c #8D9FBA", "0 c #9197BC", "q c #9099BC", "w c #949ABE", "e c #95A2BF", "r c #9D9FC3", "t c #98A2C1", "y c #99A3C2", "u c #9BABC3", "i c #9FAEC6", "p c #A1AAC6", "a c #A0AFC6", "s c #A2AEC7", "d c #A3B1C8", "f c #A5B0C8", "g c #A7B1C9", "h c #A4B2C8", "j c #A5B2C9", "k c #A7B2CA", "l c #A7B4CA", "z c #A9B3CB", "x c #A8B4CB", "c c #A9B5CB", "v c #ACB0CC", "b c #ABB5CD", "n c #AAB6CC", "m c #ABB6CC", "M c #ACB7CD", "N c #ADB8CE", "B c #AEB9CE", "V c #AFB9CF", "C c #B0BACF", "Z c #B1BBD0", "A c #B2BBD1", "S c #B3BCD1", "D c #BFC4D8", "F c #C1C5D9", "G c #C3C7DA", "H c #C8CADD", "J c None", /* pixels */ "JJJJJJJ JJJJJJJJ", "JJJJJJ G JJJJJJJ", "JJJJJ GuO JJJJJJ", "JJJJ Gia9. JJJJJ", "JJJ Gdhj8Xo JJJJ", "JJ Glxcn>3,o JJJ", "J GmMNBs:ez+o JJ", " GVCZAk7bS%@$o J", "J Ggf65#py=;o JJ", "JJ G*&-tDq1o JJJ", "JJJ G<24Fwo JJJJ", "JJJJ G0vHo JJJJJ", "JJJJJ Gro JJJJJJ", "JJJJJJ o JJJJJJJ", "JJJJJJJ JJJJJJJJ", "JJJJJJJJJJJJJJJJ" }; /* XPM */ const char *other_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 82 1", " c #CE5C00", ". c #DF8D14", "X c #DF8E17", "o c #DE901E", "O c #E18F16", "+ c #E29018", "@ c #E29119", "# c #E39119", "$ c #E4931B", "% c #E5941D", "& c #E69721", "* c #E69825", "= c #E59828", "- c #EFA231", "; c #EAA238", ": c #EAA33A", "> c #F1A332", ", c #E5A444", "< c #EBA847", "1 c #EFAA45", "2 c #EBAB4C", "3 c #E9AA4F", "4 c #EFAE4D", "5 c #F5AD43", "6 c #F2AF4F", "7 c #EFB35C", "8 c #F1B55C", "9 c #E8B365", "0 c #EAB566", "q c #EDB665", "w c #EEBA6D", "e c #EEBB6F", "r c #F1BA69", "t c #EFC17E", "y c #F6C47B", "u c #FAC579", "i c #F3C889", "p c #F2CA8E", "a c #F4CA8D", "s c #F4CB8F", "d c #F4CC8F", "f c #F8CC8B", "g c #FACD8B", "h c #EFCB96", "j c #F3CB90", "k c #F3CC91", "l c #F4CC91", "z c #F4CD92", "x c #F5CE93", "c c #F1CC97", "v c #F1CD97", "b c #F6CE94", "n c #F6CE95", "m c #F2CE9B", "M c #F1CE9C", "N c #F1CE9D", "B c #F1CF9E", "V c #F7D095", "C c #F7D096", "Z c #F8D197", "A c #F8D198", "S c #F9D299", "D c #F9D399", "F c #FBD49C", "G c #FBD59C", "H c #FDD79F", "J c #F8D1A0", "K c #F8D1A1", "L c #F7D7AF", "P c #F4D8AE", "I c #F3D9B4", "U c #F5DBB8", "Y c #F9DCB9", "T c #F8DDBD", "R c #F8DEBD", "E c #FAE0BF", "W c #F5DFC2", "Q c #F8DFC0", "! c #FAE1C1", "~ c #FBEAD3", "^ c #F9EAD5", "/ c None", /* pixels */ "////////////////", "/////// ///////", "////// WI //////", "///// U9oh /////", "//// N,0X.c ////", "/// MO3t=#+v ///", "// m@$e<&2wqP //", "/ B#%;i7rsljp^ /", "/ R*:a48bbxzkQ /", "// Ld16yZCVnQ //", "/// Y->fDSA! ///", "//// K5gGF! ////", "///// JuH~ /////", "////// TE //////", "/////// ///////", "////////////////" }; /* XPM */ const char *folder_open_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 69 1", " c #555753", ". c #595B57", "X c #5D5F5B", "o c #61635F", "O c #455D79", "+ c #636561", "@ c #676965", "# c #6A6C68", "$ c #6D6F6B", "% c #3F6086", "& c #3E6089", "* c #3465A4", "= c #436B9D", "- c #537196", "; c #58769B", ": c #4E7AB1", "> c #5C84B7", ", c #6D85A4", "< c #7C8EA4", "1 c #6395CC", "2 c #6496CC", "3 c #6597CC", "4 c #6598CD", "5 c #6698CC", "6 c #6898CD", "7 c #6899CD", "8 c #6999CD", "9 c #6A9ACD", "0 c #6B9ACD", "q c #6B9BCD", "w c #6A9ACE", "e c #6C9BCE", "r c #6D9CCE", "t c #6E9CCE", "y c #6E9DCE", "u c #7D9DC6", "i c #709DCF", "p c #709ECE", "a c #729FCF", "s c #76A2D0", "d c #7CA6D2", "f c #969795", "g c #A6A6A6", "h c #A7A7A7", "j c #A8A8A8", "k c #A9ABA9", "l c #C0C0BF", "z c #81A9D4", "x c #85ACD5", "c c #88AED6", "v c #89AED6", "b c #89AFD7", "n c #8AAFD7", "m c #8BB0D7", "M c #8CB1D8", "N c #94B6DB", "B c #9ABADE", "V c #9CBBDD", "C c #9EBDDE", "Z c #A6C2E0", "A c #A7C3E0", "S c #AEC7E3", "D c #AFC8E3", "F c #B1CAE4", "G c #B9CFE7", "H c #C6C6C5", "J c #C9C9C9", "K c #CECECE", "L c None", /* pixels */ "L$$$$$@@LLLLLLLL", "$KKKKKKH+LLLLLLL", "#lfffffff LL", "@Jggggggggghj LL", "olfffffffffff LL", "XJggggggggghj LL", "Xlf************=", ".Jg*SDDDDDDDDDG*", " lf:AMMMMMMMMMS*", " J<>AMMMMMMMMMS*", " l,uAMMMMMMMMvZ*", " J*FmMmncxzdsaV*", " l;Cpiytreqw87N*", " kbq098654321B-O", "&*************%L", "LLLLLLLLLLLLLLLL" }; /* XPM */ const char *waterfall_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 5 1", " c None", ". c #124188", "+ c #788D9B", "@ c #ABCBE2", "# c #204A87", " ", " ..+..@@@@..+.. ", " ..+..@@@@..+.. ", " ..+..@@@@..+.. ", " ..+..@##@..+.. ", " ..+..@@@@..+.. ", " ..+..@@@@..+.. ", " ..+..@@@@..+.. ", " ..+..@@@@..+.. ", " ..+..@##@..+.. ", " ..+..@@@@..+.. ", " ..+..@@@@..+.. ", " ..+..@##@..+.. ", " ..+..@@@@..+.. ", " ..+..@##@..+.. ", " "}; /* XPM */ const char *dice_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 5 1", " c None", ". c #888A85", "+ c #FDF2D2", "@ c #740404", "# c #A50101", "................", ".++++++++++++++.", ".++@@#++++@@#++.", ".++@##++++@##++.", ".++###++++###++.", ".++++++++++++++.", ".++@@#++++@@#++.", ".++@##++++@##++.", ".++###++++###++.", ".++++++++++++++.", ".++@@#++++@@#++.", ".++@##++++@##++.", ".++###++++###++.", ".++++++++++++++.", "................", " "} ; /* XPM */ const char *preferences_system_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 44 1", " c #204A87", ". c #7D8385", "X c #748AA2", "o c #788DA4", "O c #728BAE", "+ c #7D91A7", "@ c #7C93B3", "# c #7A95B4", "$ c #7A95B5", "% c #888A85", "& c #8A8C87", "* c #A0A19E", "= c #869CB8", "- c #92A5BE", "; c #A4A4A3", ": c #ABACA9", "> c #ADADAA", ", c #B8B7B5", "< c #B9B8B7", "1 c #BAB9B6", "2 c #BFBEBD", "3 c #ADBBCC", "4 c #BDC8D4", "5 c #C4C3C2", "6 c #C6C4C2", "7 c #CAC9C8", "8 c #D2D1D0", "9 c #D4D3D2", "0 c #D4D3D3", "q c #E4E3E2", "w c #E5E3E2", "e c #ECEBE9", "r c #ECECEA", "t c #EEEEEC", "y c #EEEEED", "u c #EFEFEE", "i c #F0F0EE", "p c #F0F0EF", "a c #F0F0F0", "s c #F3F3F3", "d c #F6F6F5", "f c #F7F7F7", "g c #FAFAFA", "h c None", /* pixels */ "hhhhhhhhhhhhhhhh", "hhhh%hhhhhhhh%hh", "hhh%e%hhhhhh%u%h", "hhhh%i%hhhh%a%hh", "h%hh%g%hhhh%&hhh", "%d:%fw>thh%hhhhh", "h%spyr1%h%hhhhhh", "hh%%%%8;%%hhhhhh", "hhhhhh,%<%hhhhhh", "hhh .>72%hhhhh", "hh 33@ %%02%hhhh", "h 4oo- hh%q6%%hh", " 3oX#@ hhh%95%hh", " 3+$O hhhhh%*%hh", " -== hhhhhh%%%hh", "h hhhhhhhhhhhh" }; /* XPM */ const char *preferences_desktop_font_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 78 1", " c #000000", ". c #010101", "X c #040404", "o c #050505", "O c #060606", "+ c #202020", "@ c #222222", "# c #2C2C2C", "$ c #2E2E2E", "% c #2F2F2F", "& c #343434", "* c #474747", "= c #484848", "- c #494949", "; c #4A4A4A", ": c #4B4B4B", "> c #4D4D4D", ", c #565656", "< c #5F5F5F", "1 c #626262", "2 c #666666", "3 c #747474", "4 c #767676", "5 c #797979", "6 c #7C7C7C", "7 c #828282", "8 c #888A85", "9 c #A7A7A7", "0 c #ADADAD", "q c #B1B1B1", "w c #B8B9B8", "e c #BFBFBF", "r c #CECECE", "t c #D3D3D3", "y c #DBDBDB", "u c #E2E2E2", "i c #E3E3E3", "p c #E4E3E4", "a c #E4E4E4", "s c #E4E5E4", "d c #E4E4E5", "f c #E5E6E5", "g c #E6E6E6", "h c #E6E7E6", "j c #E7E7E6", "k c #E8E7E7", "l c #E8E8E8", "z c #E8E9E9", "x c #E9E9E9", "c c #EAE9E9", "v c #E9E9EA", "b c #EBEAEA", "n c #EAEBEA", "m c #EAEBEB", "M c #EBEBEB", "N c #ECECEB", "B c #ECEBEC", "V c #ECECEC", "C c #ECEDEC", "Z c #EDEDED", "A c #EEEEEE", "S c #EFEFEF", "D c #F0F0F0", "F c #F1F1F1", "G c #F2F2F2", "H c #F3F3F3", "J c #F4F4F4", "K c #F5F5F5", "L c #F6F6F6", "P c #F7F7F7", "I c #F8F8F8", "U c #F9F9F9", "Y c #FAFAFA", "T c #FBFBFB", "R c #FCFCFC", "E c #FDFDFD", "W c #FFFFFF", "Q c None", /* pixels */ "Q88888888888888Q", "8WWWWWWWWWWWWWW8", "8Wi97%%iggggiiE8", "8Wiuyr%ilxlliiE8", "8Wiq%3%ghgfdpiE8", "8Wi%te%xxczkgsT8", "8Wa%%%w:%CBmxjT8", "8WgVZAS*#DSANvI8", "8WlZSDF=+& .1GL8", "8WcSDGH= 4G2 qS8", "8WnDGHK-oHUy 6S8", "8WMFHJL-OFTt 4S8", "8WmGJLP; 5P< 0S8", "8WbGJLI,$@X >PS8", "8WRRRRRRYYYLLLS8", "Q88888888888888Q" }; /* XPM */ const char *system_search_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 127 2", " c #646662", ". c #666864", "X c #676965", "o c #686966", "O c #696B66", "+ c #6A6B68", "@ c #6B6B6B", "# c #6A6C68", "$ c #6B6D69", "% c #6C6E69", "& c #6C6D6A", "* c #6C6E6A", "= c #6D6F6A", "- c #6C6E6B", "; c #6D6E6B", ": c #6D6F6C", "> c #6E706B", ", c #6F706C", "< c #6F716C", "1 c #70716D", "2 c #747672", "3 c #767875", "4 c #7A7C78", "5 c #7F807D", "6 c #5980AD", "7 c #5C85B3", "8 c #618AB9", "9 c #6690BF", "0 c #6893C2", "q c #6994C5", "w c #6D97C5", "e c #6E9AC9", "r c #6F9BCA", "t c #6F9CCD", "y c #729DCF", "u c #719ECE", "i c #729ECE", "p c #729FCE", "a c #739FCE", "s c #729ECF", "d c #729FCF", "f c #739FCF", "g c #76A0CD", "h c #75A1CF", "j c #78A1CD", "k c #838580", "l c #828481", "z c #848682", "x c #858784", "c c #868785", "v c #888A85", "b c #898B88", "n c #898A89", "m c #8F908F", "M c #919291", "N c #939592", "B c #A3A4A1", "V c #A7A8A6", "C c #A8A9A8", "Z c #B7B7B5", "A c #B8B8B7", "S c #8AA6C5", "D c #8EA8C5", "F c #81A3CA", "G c #85A6CA", "H c #89A9CB", "J c #96A9C1", "K c #9BADC2", "L c #9EAFC4", "P c #80A7D4", "I c #8FB1D9", "U c #96B3D2", "Y c #97B4D3", "T c #97B8DB", "R c #ADBACA", "E c #A2BEDF", "W c #B9CADC", "Q c #ACC6E2", "! c #AEC8E3", "~ c #B4CCE6", "^ c #B6CDE6", "/ c #C2C2C2", "( c #C4C4C4", ") c #C7C7C7", "_ c #C9C9C8", "` c #CACAC9", "' c #CBCBCA", "] c #CBCCCA", "[ c #C5CCD2", "{ c #D6D6D6", "} c #D1D5D9", "| c #D4D6D9", " . c #D7D8DA", ".. c #D9D9D8", "X. c #DADAD9", "o. c #D8DADB", "O. c #DADADA", "+. c #DADBDB", "@. c #DBDBDB", "#. c #DADBDC", "$. c #DEDEDE", "%. c #DFDFDF", "&. c #C0D3E9", "*. c #C7D8EB", "=. c #C7D9EC", "-. c #CBDBEC", ";. c #CEDDED", ":. c #D1D9E1", ">. c #D2D9E0", ",. c #D5DCE4", "<. c #DBE2E9", "1. c #D1E0F0", "2. c #D3E1F0", "3. c #D5E2F0", "4. c #D6E2F1", "5. c #D7E4F1", "6. c #D9E4F1", "7. c #DFE9F3", "8. c #E2E2E2", "9. c #E0E9F3", "0. c #E0E9F4", "q. c #E3EBF4", "w. c #E2EBF5", "e. c #E3EBF5", "r. c #E7EEF7", "t. c #ECF2F8", "y. c None", /* pixels */ "y.y.y.y.3 , 1 > = 4 y.y.y.y.y.y.", "y.y.y.: ] #.| } .` - y.y.y.y.y.", "y.y.< +.J w h p 0 K $.> y.y.y.y.", "y.* O.S d *.w.7.! p D @.$ y.y.y.", "y.V L p 4.r.t.e.1.T u R B y.y.y.", "O X.9 Q 6.0.q.9.;.P s F ..O y.y.", "> o.u ~ -.2.5.3.y.y.y u 8.> y.y.", "% %.g I ^ =.&.E y.y.f e @.% y.y.", "k ( G q y y.y.y.y.y.8 H _ z y.y.", "y.l :.p t y.y.i y.y.p >.X y.y.y.", "y.# C W p 7 y.r 6 a [ N c o y.y.", "y.y.% M <.U j p Y ,.+ A x 2 . y.", "y.y.y.# 5 m / %.n y.; Z b ) & ", "y.y.y.y.y.v % % v y.y.@ & ' { & ", "y.y.y.y.y.y.y.y.y.y.y.y.y.& & y.", "y.y.y.y.y.y.y.y.y.y.y.y.y.y.y.y." }; /* XPM */ const char *utilities_system_monitor_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 115 2", " c #7D7D7A", ". c #7E7E7B", "X c #829B7A", "o c #829C7C", "O c #849E7C", "+ c #BBC774", "@ c #204A87", "# c #265987", "$ c #2C5D8E", "% c #2C6090", "& c #2C6292", "* c #2C6294", "= c #2F6697", "- c #316696", "; c #316697", ": c #316A99", "> c #316A9A", ", c #346A9A", "< c #316C9B", "1 c #346E9D", "2 c #346E9E", "3 c #34709E", "4 c #3772A1", "5 c #3772A2", "6 c #3A74A3", "7 c #3D77A6", "8 c #3D77A7", "9 c #3D79A7", "0 c #3D7BA8", "q c #3D7CAA", "w c #407EAB", "e c #4280AC", "r c #4280AD", "t c #4283AE", "y c #4284AF", "u c #4584B1", "i c #4587B1", "p c #4887B3", "a c #488AB5", "s c #4A8DB7", "d c #4D8DB7", "f c #4D8EB9", "g c #4D8FBA", "h c #5294BE", "j c #5495BF", "k c #7792B5", "l c #85A180", "z c #85A280", "x c #87A481", "c c #89A483", "v c #89A584", "b c #8BA785", "n c #8BAA86", "m c #8CAA86", "M c #8EAC89", "N c #90AE8B", "B c #90AF8B", "V c #91B08C", "C c #93B28E", "Z c #94B48F", "A c #96B590", "S c #96B691", "D c #97B893", "F c #8199BA", "G c #B4B6B1", "H c #B4B7B1", "J c #B6C496", "K c #B7C699", "L c #BACA9C", "P c #BECE9F", "I c #BFCFA0", "U c #EEE788", "Y c #D3D9A5", "T c #D5DBA7", "R c #E7E8B0", "E c #EDEAB0", "W c #98C0D9", "Q c #BAD1E1", "! c #C9CCC6", "~ c #CBCEC9", "^ c #CCCFCA", "/ c #D0D2CE", "( c #D3D6D1", ") c #D5D7D3", "_ c #D7D9D5", "` c #DADCD8", "' c #DBDCD9", "] c #DCDDDB", "[ c #DEE0DD", "{ c #DFE1DD", "} c #D6E3ED", "| c #D6E4ED", " . c #D7E5EF", ".. c #D8E6EF", "X. c #E2E3E0", "o. c #E4E5E2", "O. c #E5E7E4", "+. c #E9EAE8", "@. c #EEEEED", "#. c #E9F1F6", "$. c #EFF4F8", "%. c #F4F5F3", "&. c #F6F7F6", "*. c #F0F5F8", "=. c #F0F5F9", "-. c #F1F6F9", ";. c #F5F8FA", ":. c #F6F8FB", ">. c #F8F9F8", ",. c #F9F9F8", "<. c #F9FAF9", "1. c #FAFBFA", "2. c #FEFEFE", "3. c #FFFFFF", "4. c None", /* pixels */ ". . . . . . . . . . . . . . . ", ". ,.>.3.3.3.3.3.3.3.3.2.1.1.1.. ", ". ,.k @ @ @ @ @ @ @ @ @ @ k ] . ", ". 2.@ # $ * X o < > : - & @ O.. ", ". 2.@ % ; O E z 6 6 5 3 , @ X.. ", ". 2.@ = 2 J $.K b q 0 7 4 @ [ . ", ". 2.@ 1 x Y Q | M u t w 9 @ ' . ", ". 2.@ l v } L .V + B M n @ _ . ", ". 2.@ ;.:.T V ..P U -.=.*.@ ( . ", ". 2.@ c m N C I #.W Z V M @ / . ", ". 2.@ 8 r p f S R D A d u @ ^ . ", ". 2.@ 7 e i s Z j h g a y @ ! . ", ". ,.F @ @ @ @ @ @ @ @ @ @ k G . ", ". ,.&.<.%.@.+.o.{ ` ) / ~ H H . ", ". . . . . . . . . . . . . . . ", "4.4.4.4.4.4.4.4.4.4.4.4.4.4.4.4." }; /* XPM */ const char *system_users_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 146 2", " c #6C3F3B", ". c #624F0D", "X c #6D4A0A", "o c #685D14", "O c #616B09", "+ c #616519", "@ c #687214", "# c #6E771D", "$ c #596921", "% c #6A692B", "& c #6A6A2B", "* c #6D712F", "= c #6F7131", "- c #767B35", "; c #797F37", ": c #55315F", "> c #5C3B59", ", c #723C51", "< c #5A3464", "1 c #5C3566", "2 c #465440", "3 c #7E6040", "4 c #614D7E", "5 c #645370", "6 c #864F06", "7 c #815107", "8 c #885106", "9 c #8E5105", "0 c #955104", "q c #9F5203", "w c #9E5807", "e c #A35403", "r c #B85410", "t c #BA5C11", "y c #BF6C10", "u c #815330", "i c #965435", "p c #90563F", "a c #AA7722", "s c #AF7D2E", "d c #BC7625", "f c #CD5C00", "g c #CC5E01", "h c #CC5E04", "j c #C16404", "k c #C4680A", "l c #D56402", "z c #D16604", "x c #C16710", "c c #C77D28", "v c #844240", "b c #895443", "n c #905841", "m c #8B6B58", "M c #AF8033", "N c #B68134", "B c #B88530", "V c #B98633", "C c #C2893C", "Z c #DF8E3A", "A c #E0992A", "S c #E09B2D", "D c #E3A23C", "F c #E1A23E", "G c #868F41", "H c #B78940", "J c #BC8E43", "K c #B99355", "L c #C38F44", "P c #D08F4A", "I c #C29142", "U c #C0934B", "Y c #D8994A", "T c #C49A52", "R c #CB9A51", "E c #CF9D51", "W c #DDA053", "Q c #DCA552", "! c #D1A55F", "~ c #DDAB5E", "^ c #E3A340", "/ c #E5A746", "( c #E6AA4D", ") c #E6A251", "_ c #E3A256", "` c #E5A255", "' c #E6AD54", "] c #E5AE5C", "[ c #EBAA5B", "{ c #E8AA5C", "} c #C99C66", "| c #D9AC64", " . c #DAAE6D", ".. c #E2B369", "X. c #ECB868", "o. c #F1BD6F", "O. c #EBBC74", "+. c #ECBD74", "@. c #F3BE71", "#. c #EFC075", "$. c #3D538B", "%. c #3E558E", "&. c #30609D", "*. c #32629E", "=. c #32629F", "-. c #3263A1", ";. c #3264A1", ":. c #3364A2", ">. c #3364A3", ",. c #3466A4", "<. c #3466A5", "1. c #3467A7", "2. c #3568A8", "3. c #3568A9", "4. c #366AAC", "5. c #366BAD", "6. c #3B6EAE", "7. c #386DB1", "8. c #485F99", "9. c #4F649A", "0. c #4071AF", "q. c #4172AF", "w. c #4576B2", "e. c #4A78B2", "r. c #547FB5", "t. c #5680B5", "y. c #5E83B2", "u. c #5981B4", "i. c #5F86B7", "p. c #5A85B9", "a. c #6B8BB4", "s. c #6087B9", "d. c #A9A3B9", "f. c #F3C680", "g. c #F9C780", "h. c #F6CB8A", "j. c #F0CE99", "k. c #829FC5", "l. c #8BA6C9", "z. c #8DA7C8", "x. c #A6ACC4", "c. c #B0B6CB", "v. c #A0B6D1", "b. c #B4C1D3", "n. c #D6DBE3", "m. c None", /* pixels */ "m.m.m.m.6 0 9 e m.m.m.m.m.m.m.m.", "m.m.m.z Y ! E L q m.m.m.m.m.m.m.", "m.m.w W T U V d x f g f m.m.m.m.", "m.m.8 R J K c k ) h.@.{ f m.m.m.", "m.m.7 I B H y [ f.O.( #.Z f m.m.", "m.m.. C M a l g.+.j.' D ] f m.m.", "m.m. u N s j o./ ..S F Q f m.m.", "m.2 * + 3 X o ` X.A ^ | P r m.m.", "2 - # G G % , n _ ~ .} p v m.m.", "2 - @ G & 1 l.5 m h t i b s.1 1 ", "2 - @ @ 1 z.4.7.c.4 d.x.2.;.s.1 ", "2 - $ O > s.1.5.v.n.p.k.<.&.6.1 ", "2 - ; = 1 i.>.1.3.b.u.,.-.-.6.1 ", "m.2 2 2 1 y.>.%.:.a.-.*.$.=.6.1 ", "m.m.m.m.1 t.r.9.e.0.0.0.8.q.w.1 ", "m.m.m.m.: 1 1 1 1 1 1 1 1 1 1 < " }; /* XPM */ const char *multimedia_player_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 78 1", " c #535551", ". c #555753", "X c #5B5B58", "o c #626460", "O c #666864", "+ c #676964", "@ c #686A65", "# c #696B66", "$ c #6A6C67", "% c #696968", "& c #6C6E69", "* c #6E6F6C", "= c #6E706B", "- c #70726D", "; c #747671", ": c #747672", "> c #767874", ", c #787A75", "< c #787A76", "1 c #7A7B77", "2 c #7A7C77", "3 c #7B7D78", "4 c #7C7D79", "5 c #7C7E79", "6 c #7C7D7A", "7 c #7D7F7A", "8 c #7E7F7B", "9 c #7E807B", "0 c #80817D", "q c #80827D", "w c #B3BC78", "e c #838581", "r c #858782", "t c #888A85", "y c #898A87", "u c #8A8C89", "i c #91928E", "p c #92948F", "a c #939592", "s c #969893", "d c #989996", "f c #9B9D9A", "g c #9FA09D", "h c #A2A49F", "j c #B2B796", "k c #A4A6A2", "l c #A4A6A3", "z c #A5A6A3", "x c #A5A7A3", "c c #A6A7A3", "v c #A8AAA5", "b c #ADAEAB", "n c #AEAEAB", "m c #B6BAA6", "M c #B4B5A8", "N c #B8BCA8", "B c #B8BCAA", "V c #B6B6B4", "C c #B8B9B6", "Z c #B9B9B6", "A c #BBC286", "S c #BDC58D", "D c #BBC291", "F c #BBC096", "G c #BEC496", "H c #BFC59B", "J c #C3C996", "K c #C3CA96", "L c #C3C79F", "P c #C5CB9A", "I c #C4CAA3", "U c #C5C9A4", "Y c #C9CEAB", "T c #CBCFAC", "R c #C9D0A3", "E c #CBD0A5", "W c #D1D6AE", "Q c #CFD4B0", /* pixels */ " ...............", ".>cccxxxxxxzlk>.", ".di1114444480td.", ".dajLUYTIHGDQud.", ".dhFKPREJSAwWsd.", ".dpMBNNNNNNmmrd.", ".d=&&$&=&$$&$$d.", ".d#+@++#@++#+@d.", ".d,nfvb:;:-XoOd.", ".dyCkVZ777<%6*d.", ".d777777777eq9d.", ".d555555555555d.", ".d3g3g33333333d.", ".d222222222222d.", ".>dddddddddddd>.", "................" }; /* XPM */ const char *chat_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 15 1", " c #888A85", ". c #9D9D9D", "X c #C6C6C4", "o c #E9E9E9", "O c #EAEAEA", "+ c #EBEBEB", "@ c #ECECEC", "# c #EDEDED", "$ c #EEEEEE", "% c #EFEFEF", "& c #F0F0F0", "* c #F1F1F1", "= c #F2F2F2", "- c #FFFFFF", "; c None", /* pixels */ ";;;; ;", ";;; ----------- ", ";;; -ooooooooo- ", "; Xo- ", " ----------- o- ", " -ooooooooo- o- ", " -ooooooo@@- o- ", " -ooooo@@@@- -- ", " -ooo@@@&&&- - ;", " -o@@@&@@&&- - ;", " -o@@&@&&&&- ;", " --&@------- ; ;", "; -@- .;;;", "; -- ;;;;;;;;;;;", "; ;;;;;;;;;;;;", "; ;;;;;;;;;;;;;;" }; /* XPM */ const char * dialog_information_48_icon[] = { "48 48 606 2", " c None", ". c #616673", "+ c #626779", "@ c #616777", "# c #626473", "$ c #626472", "% c #616776", "& c #626778", "* c #626574", "= c #6B7287", "- c #8798B9", "; c #9FB3D8", "> c #ABC0E2", ", c #B8C9EB", "' c #BBCBEB", ") c #B3C5E3", "! c #AABCDA", "~ c #90A0BC", "{ c #6D758A", "] c #626576", "^ c #626675", "/ c #727B94", "( c #9DB1DB", "_ c #ACC1EB", ": c #98B4E2", "< c #85A7DA", "[ c #7CA1D5", "} c #759CD0", "| c #749CCE", "1 c #7EA4D2", "2 c #89ABD6", "3 c #A5BFE1", "4 c #C5D5EE", "5 c #B6C5E1", "6 c #7A8399", "7 c #626777", "8 c #90A4CD", "9 c #A7BEEB", "0 c #87A8DE", "a c #7197D3", "b c #84A7D6", "c c #9AB7DB", "d c #AAC3DF", "e c #B3C9E2", "f c #B4CBE2", "g c #B1C8E2", "h c #A3BEDC", "i c #8CAED3", "j c #749DC9", "k c #94B3D8", "l c #CAD8EF", "m c #ADBCD6", "n c #656978", "o c #676D81", "p c #9BB0DC", "q c #94B0E5", "r c #7198D6", "s c #93B2DD", "t c #BACEE6", "u c #C5D6E9", "v c #C7D8EA", "w c #C7D8E9", "x c #C7D7EA", "y c #C8D8E9", "z c #C6D6E8", "A c #C5D6E8", "B c #C3D4E7", "C c #C0D2E6", "D c #91B2D5", "E c #769ECA", "F c #B3C8E4", "G c #C4D2E8", "H c #6C7283", "I c #63687A", "J c #99B0DE", "K c #88A8E2", "L c #7BA0D9", "M c #B3C9E6", "N c #C5D6EA", "O c #C6D7E9", "P c #C8D8EB", "Q c #C9D8E9", "R c #C9D9EA", "S c #C8D8EA", "T c #C7D7E9", "U c #C6D6E9", "V c #C3D4E8", "W c #C0D2E7", "X c #85A9CF", "Y c #779FCA", "Z c #A3BDDD", "` c #C6D4E9", " . c #666B7A", ".. c #62687A", "+. c #8EA4D1", "@. c #8DACE4", "#. c #7EA2DA", "$. c #BDD0EA", "%. c #CADAEA", "&. c #C8D9EB", "*. c #C6D8EA", "=. c #C3D5E8", "-. c #AEC5E0", ";. c #7CA3CC", ">. c #79A0CB", ",. c #B8C6DD", "'. c #7382A2", "). c #96B2E7", "!. c #749BD8", "~. c #BBCFE9", "{. c #C3D5E9", "]. c #C9D8EA", "^. c #CADAEB", "/. c #CBDAEB", "(. c #CCDAEB", "_. c #CCDBEB", ":. c #CBDBEA", "<. c #CBDAEA", "[. c #C9D9E9", "}. c #C4D6E9", "|. c #C2D4E7", "1. c #8AACD1", "2. c #80A4CE", "3. c #7CA1CC", "4. c #CADAEE", "5. c #8391A7", "6. c #626877", "7. c #95AFE0", "8. c #789CDC", "9. c #A1BCE2", "0. c #C2D4E9", "a. c #CCDBEC", "b. c #CDDCEB", "c. c #CEDCEB", "d. c #CDDBEB", "e. c #CDDBEC", "f. c #C8D9EA", "g. c #C4D5E7", "h. c #9AB8D8", "i. c #84A8CF", "j. c #8EAFD5", "k. c #D0DAEE", "l. c #626876", "m. c #717B94", "n. c #94B1E6", "o. c #749AD6", "p. c #BDD0E8", "q. c #C1D3E7", "r. c #CCDCEB", "s. c #CFDCEC", "t. c #D0DDED", "u. c #D0DEED", "v. c #CFDDEC", "w. c #CEDCEC", "x. c #CEDBEB", "y. c #CCDAEA", "z. c #C9D9EB", "A. c #A3BDDC", "B. c #8AACD2", "C. c #85A9D0", "D. c #80A5CE", "E. c #CFDAF0", "F. c #838D9F", "G. c #616878", "H. c #869AC3", "I. c #83A5DE", "J. c #8AABD9", "K. c #BED1E6", "L. c #C1D3E8", "M. c #C4D6E8", "N. c #CAD9EB", "O. c #D1DEEE", "P. c #D2E0EE", "Q. c #D1DFED", "R. c #D0DEEC", "S. c #A4BEDB", "T. c #8FB1D4", "U. c #ACC4E1", "V. c #B5C1D5", "W. c #626979", "X. c #98ADDA", "Y. c #92B2D8", "Z. c #BDD1E6", "`. c #CEDDEC", " + c #D4E1EE", ".+ c #D3E1EE", "++ c #D4E0EF", "@+ c #D3E0EE", "#+ c #9EBBD9", "$+ c #95B4D6", "%+ c #90B0D4", "&+ c #91B3D5", "*+ c #DBE2F2", "=+ c #626878", "-+ c #9EB6E1", ";+ c #6F98D0", ">+ c #93B2D6", ",+ c #BDD2E6", "'+ c #C1D4E7", ")+ c #C4D5E9", "!+ c #D0DEEE", "~+ c #D5E2EF", "{+ c #D7E2F0", "]+ c #D6E1EF", "^+ c #D6E1ED", "/+ c #D5E1EF", "(+ c #D3E0EF", "_+ c #D0DFEE", ":+ c #9FBBDA", "<+ c #9AB7D8", "[+ c #8FB0D4", "}+ c #8AABD1", "|+ c #E7ECFA", "1+ c #626775", "2+ c #646775", "3+ c #9EB8E4", "4+ c #6F99CC", "5+ c #8BACD2", "6+ c #BFD0E6", "7+ c #C5D7E9", "8+ c #D2DFED", "9+ c #D7E2EF", "0+ c #D8E3F0", "a+ c #DAE5F1", "b+ c #D9E4EF", "c+ c #D8E4EF", "d+ c #D1E0EE", "e+ c #AFC6DF", "f+ c #A4C0DC", "g+ c #99B8D7", "h+ c #92B3D5", "i+ c #8DAED3", "j+ c #E7EBFA", "k+ c #666976", "l+ c #A1B9E1", "m+ c #6F99C8", "n+ c #7AA1CB", "o+ c #BDD0E6", "p+ c #C7D6E9", "q+ c #DBE6F2", "r+ c #DCE5F2", "s+ c #DCE5F1", "t+ c #D8E4F0", "u+ c #C3D4E9", "v+ c #AEC7E0", "w+ c #ABC3DE", "x+ c #9EBADA", "y+ c #98B6D6", "z+ c #92B1D3", "A+ c #E8EDFB", "B+ c #656876", "C+ c #A0B7DA", "D+ c #739BC8", "E+ c #7AA1CC", "F+ c #A2BEDB", "G+ c #C4D5E8", "H+ c #CFDEED", "I+ c #DAE4F0", "J+ c #DDE8F3", "K+ c #DFE9F2", "L+ c #DFEAF4", "M+ c #E0E8F2", "N+ c #DDE7F2", "O+ c #B8CDE3", "P+ c #B4CAE1", "Q+ c #AFC6E0", "R+ c #AAC2DE", "S+ c #A2BDDB", "T+ c #9DB9D9", "U+ c #E8ECFA", "V+ c #636777", "W+ c #96ACCA", "X+ c #7EA3CD", "Y+ c #7DA3CD", "Z+ c #86AAD0", "`+ c #BACDE5", " @ c #CCDCEC", ".@ c #D4E1EF", "+@ c #D8E2EF", "@@ c #DEE7F3", "#@ c #E0EAF4", "$@ c #E1E9F2", "%@ c #E3EAF3", "&@ c #DDE8F2", "*@ c #CAD8EB", "=@ c #C1D4E6", "-@ c #B9CEE5", ";@ c #A8C1DD", ">@ c #A0BCD9", ",@ c #A5C1DE", "'@ c #DEE3F3", ")@ c #636877", "!@ c #8291A8", "~@ c #92B3D7", "{@ c #88ABD1", "]@ c #95B3D6", "^@ c #B0C7E0", "/@ c #FAFCFD", "(@ c #EEF3F7", "_@ c #DFE7F2", ":@ c #DCE6F1", "<@ c #DEEAF2", "[@ c #DFE8F1", "}@ c #DCE6F2", "|@ c #D5E0EE", "1@ c #D4D8DD", "2@ c #DFDFDF", "3@ c #BFD1E5", "4@ c #BACDE3", "5@ c #B3C8E2", "6@ c #ABC3DD", "7@ c #C5D3EB", "8@ c #B8C0D1", "9@ c #676D7D", "0@ c #A8BFDD", "a@ c #85AAD0", "b@ c #9BB8D8", "c@ c #F0F4FA", "d@ c #F5F9FC", "e@ c #FCFDFD", "f@ c #F0F4F7", "g@ c #E3E9EF", "h@ c #D9E1EA", "i@ c #D5DEE5", "j@ c #D6DDE3", "k@ c #DFE3E7", "l@ c #E9ECEC", "m@ c #F1F2F2", "n@ c #E4E6E9", "o@ c #B6CCE4", "p@ c #AEC6DF", "q@ c #E0E6F6", "r@ c #818493", "s@ c #8794A9", "t@ c #A6C0DE", "u@ c #8DAED2", "v@ c #9EBAD9", "w@ c #A6C0DC", "x@ c #D1DFEE", "y@ c #EEF2F8", "z@ c #C6D6E7", "A@ c #E2E9F0", "B@ c #EFF2F5", "C@ c #F3F4F5", "D@ c #F3F4F4", "E@ c #F2F2F3", "F@ c #EAECEE", "G@ c #DFE3E6", "H@ c #EFEFF3", "I@ c #E5EBF3", "J@ c #BACEE5", "K@ c #B4C9E2", "L@ c #CAD8ED", "M@ c #CCD4E3", "N@ c #656977", "O@ c #646978", "P@ c #A6B3C7", "Q@ c #A8C2E0", "R@ c #A9C2DD", "S@ c #B5CBE3", "T@ c #F0F3F9", "U@ c #C9DBEA", "V@ c #F9FAFC", "W@ c #C6D5E7", "X@ c #C8D9EC", "Y@ c #E7EBF8", "Z@ c #717481", "`@ c #666C7A", " # c #B1BBCF", ".# c #B2C9E3", "+# c #A2BDDA", "@# c #ACC2DE", "## c #B3C9E1", "$# c #E0E9F3", "%# c #F1F5F9", "&# c #F2F5FA", "*# c #CFDEEE", "=# c #EAEDFA", "-# c #7F8490", ";# c #686C7B", "># c #BBC5D7", ",# c #ACC4DF", "'# c #B5CBE2", ")# c #E0E7F0", "!# c #F1F3F4", "~# c #D0E0EF", "{# c #EAEEFA", "]# c #818592", "^# c #707683", "/# c #CAD7EA", "(# c #C1D1E6", "_# c #D0D6DD", ":# c #D8D9DB", "<# c #E5EAF8", "[# c #ACB0BC", "}# c #646976", "|# c #C7CFDE", "1# c #AFC7E0", "2# c #B9CCE4", "3# c #BFD4E7", "4# c #BDC5CF", "5# c #BDC4CD", "6# c #E8ECF9", "7# c #868895", "8# c #B5BCCB", "9# c #B9C4CF", "0# c #9DA3A9", "a# c #939595", "b# c #EAEDF8", "c# c #767B88", "d# c #8A8F9D", "e# c #D0DDEF", "f# c #B2C5D8", "g# c #B0C0CA", "h# c #B0BBBB", "i# c #80837C", "j# c #A5AB94", "k# c #B1B494", "l# c #ADB08A", "m# c #9C9D7A", "n# c #757567", "o# c #E3E6F3", "p# c #666977", "q# c #656A78", "r# c #C6CEDC", "s# c #B4BEC5", "t# c #A3AF9F", "u# c #A8B19D", "v# c #888B7B", "w# c #929683", "x# c #BBBEA1", "y# c #C1C2A0", "z# c #999A7D", "A# c #949477", "B# c #B3B48C", "C# c #A3A584", "D# c #A1A591", "E# c #E2E7EF", "F# c #9B9FAC", "G# c #6E717D", "H# c #CACFD7", "I# c #C0C8C8", "J# c #AEB7AD", "K# c #9CA296", "L# c #7E8174", "M# c #BFC2AC", "N# c #C5C8AC", "O# c #92937E", "P# c #B9BB9E", "Q# c #D5D8B7", "R# c #D1D5B9", "S# c #DBDEDD", "T# c #C3C6CE", "U# c #656776", "V# c #555744", "W# c #6E737A", "X# c #BFC4CC", "Y# c #D8DDE2", "Z# c #C9CFCA", "`# c #C2C7B9", " $ c #C3C7B4", ".$ c #C7CBB2", "+$ c #CED2BB", "@$ c #DADBC8", "#$ c #E4E6DE", "$$ c #EEF0F5", "%$ c #B9BDBF", "&$ c #62666E", "*$ c #666635", "=$ c #A1A262", "-$ c #6E7276", ";$ c #82868E", ">$ c #B9BDC0", ",$ c #D5D8DB", "'$ c #E1E4E7", ")$ c #E6E9ED", "!$ c #E3E5E8", "~$ c #D9DBDC", "{$ c #BABCBC", "]$ c #757780", "^$ c #686A68", "/$ c #4E4E2F", "($ c #595A30", "_$ c #A3A456", ":$ c #D3D58E", "<$ c #BEC19D", "[$ c #92968B", "}$ c #73767C", "|$ c #686B75", "1$ c #626571", "2$ c #6B6E77", "3$ c #76797A", "4$ c #8C8D7B", "5$ c #999772", "6$ c #8E8C5C", "7$ c #4D4D28", "8$ c #4C4C28", "9$ c #83834C", "0$ c #D8D9A1", "a$ c #F2F4D6", "b$ c #ECEEC0", "c$ c #EBEFBE", "d$ c #E9ECBB", "e$ c #E8EAB7", "f$ c #DCDEAB", "g$ c #CDCE99", "h$ c #BCBB87", "i$ c #9D9B6C", "j$ c #696740", "k$ c #4B4B28", "l$ c #636334", "m$ c #B3B35F", "n$ c #EFF0D4", "o$ c #FFFFFF", "p$ c #F8FADD", "q$ c #F4F7C6", "r$ c #F1F3C1", "s$ c #E9EBB8", "t$ c #DDDFAC", "u$ c #C8C997", "v$ c #A3A376", "w$ c #8F8D61", "x$ c #67663D", "y$ c #4C4C29", "z$ c #5B5C32", "A$ c #A9A959", "B$ c #DBDDA0", "C$ c #F4F6DA", "D$ c #F3F6C7", "E$ c #F4F7C5", "F$ c #EDF0BF", "G$ c #DADCAD", "H$ c #C6C89A", "I$ c #B8B989", "J$ c #B8B683", "K$ c #A6A471", "L$ c #8E8B5E", "M$ c #7E7E49", "N$ c #DADBA2", "O$ c #F2F3D7", "P$ c #EDEFC2", "Q$ c #ECF0BE", "R$ c #E9EBBA", "S$ c #E6E8B5", "T$ c #CDCD99", "U$ c #BCBB86", "V$ c #A09E6E", "W$ c #707048", "X$ c #616132", "Y$ c #B2B260", "Z$ c #CACB97", "`$ c #A8A778", " % c #9B996C", ".% c #949161", "+% c #54542F", "@% c #5D5D31", "#% c #ACAC5A", "$% c #DBDCA1", "%% c #F0F3C1", "&% c #DDDFB0", "*% c #C8C89C", "=% c #B9BA8C", "-% c #BDBE8A", ";% c #ACAA76", ">% c #898658", ",% c #52522E", "'% c #474726", ")% c #5C5C32", "!% c #969660", "~% c #C4C790", "{% c #D8D9A5", "]% c #D8DBAB", "^% c #D2D4A5", "/% c #C8C899", "(% c #B4B586", "_% c #9C9D6F", ":% c #86865A", "<% c #66653F", "[% c #4E4E29", "}% c #444424", "|% c #404022", "1% c #4C4C2F", "2% c #505031", "3% c #535331", "4% c #4F4F2C", "5% c #525232", "6% c #4F4F31", "7% c #4B4B31", "8% c #3A3A1F", "9% c #3D3D3D", "0% c #636363", "a% c #B9B9B9", "b% c #C0C0C0", "c% c #AFAFAF", "d% c #8D8D8D", "e% c #565656", "f% c #383838", "g% c #555555", "h% c #848484", "i% c #B8B8B8", "j% c #A8A8A8", "k% c #707070", "l% c #525252", "m% c #5A5A5A", "n% c #595959", "o% c #4F4F4F", " ", " ", " . + @ # $ % & * ", " % = - ; > , ' ) ! ~ { ] ", " ^ / ( _ : < [ } | 1 2 3 4 5 6 7 ", " 7 8 9 0 a b c d e f g h i j k l m n ", " o p q r s t u v w x y z A B C D E F G H ", " I J K L M N O w P Q R S S T U V W X Y Z ` . ", " ..+.@.#.$.N U x Q %.R R R R &.*.u =.-.;.>.F ,.+ ", " '.).!.~.{.A T y ].^./.(._.:.<.[.T }.|.1.2.3.4.5. ", " 6.7.8.9.0.V U w R /.a.b.c.c.d.e.(.f.O g.h.i.2.j.k.l. ", " m.n.o.p.q.=.A S /.:.r.s.t.u.v.w.x.y.z.A A.B.C.D.E.F. ", " G.H.I.J.K.L.M.O N.<.b.t.O.P.Q.Q.u.R.s._.w S.T.B.C.U.V.7 ", " W.X.o.Y.Z.|.=.x ^.d.`.Q.Q. + +.+++@+t.r.z.#+$+%+B.&+*+=+ ", " 7 -+;+>+,+'+)+R _.`.!+@+~+~+{+]+^+/+(+_+L.:+<+$+[+}+|+1+ ", " 2+3+4+5+6+|.7+N.r.v.8+++9+0+a+b+c+c+ +d+e+f+:+g+h+i+j+k+ ", " 1+l+m+n+o+B p+/.w.8+++9+a+a+q+r+s+a+t+u+v+w+f+x+y+z+A+B+ ", " & C+D+E+F+G+y %.H+@+^+c+I+J+K+L+M+N+%.O+P+Q+R+S+T+$+U+V+ ", " + W+X+Y+Z+`+v @H+.@+@q+@@#@$@%@&@*@=@Z.-@P+-.;@>@,@'@)@ ", " !@~@2.{@]@^@u /@(@_@:@<@[@}@|@ 1@2@3@4@5@6@f+7@8@ ", " 9@0@a@B.>+b@S+c@d@e@f@g@h@i@j@k@l@m@n@V o+o@p@;@q@r@ ", " s@t@u@]@v@w@x@y@z@A@B@C@D@E@F@G@H@I@ =@J@K@L@M@N@ ", " O@P@Q@y+>@R@S@T@U@ V@ W@o+X@Y@Z@ ", " `@ #.#+#@###$#:@ %#&# *#=#-# ", " ;#>#S@,#'#v.)# !# ~#{#]# ", " ^#/#v+o@(#_# :# <#[# ", " }#|#1#2#3#4#5# 6#7# ", " 8#t O+=@9#0# a# b#c# ", " d#e#f#g#h#i#j#k#l#m#n# o#p# ", " q#r#s#t#u#v#w#x#y#z#A#B#C#D#E#F# ", " G#H#I#J#K#L#M#N#O#P#Q#R#S#T#U# ", " V#W#X#Y#Z#`# $.$+$@$#$$$%$&$ ", " *$=$-$;$>$,$'$)$!$~${$]$^$/$ ", " ($_$:$<$[$}$|$1$2$3$4$5$6$7$ ", " 8$9$0$a$b$c$d$e$f$g$h$i$j$k$ ", " l$m$n$o$p$q$r$s$t$u$v$w$x$y$ ", " z$A$B$C$D$E$F$G$H$I$J$K$L$7$ ", " 8$M$N$O$P$Q$R$S$f$T$U$V$W$8$ ", " X$Y$n$o$p$q$r$s$t$Z$`$ %.%+% ", " @%#%$%C$D$q$%%&%*%=%-%;%>%,% ", " '%)%!%~%{%]%^%/%(%_%:%<%[%}% ", " |%1%2%3%4%4%5%6%7%8% ", " 9%0%a%b%c%d%e%f% ", " g%h%i%j%k%l% ", " l%m%n%o% ", " ", " ", " " }; /* XPM */ const char * dialog_warning_48_icon[] = { "48 48 305 2", " c None", ". c #A10000", "+ c #A00000", "@ c #A20000", "# c #B72323", "$ c #DE6868", "% c #DF6969", "& c #BC2828", "* c #A70B0B", "= c #E16F6F", "- c #D22020", "; c #D11A1A", "> c #E16C6C", ", c #A90E0E", "' c #CE4C4C", ") c #D94040", "! c #CC0000", "~ c #D73939", "{ c #CF4A4A", "] c #AA1414", "^ c #E26F6F", "/ c #CD0707", "( c #CD0505", "_ c #E06666", ": c #AF1717", "< c #A30000", "[ c #D25252", "} c #D73636", "| c #D52F2F", "1 c #D44F4F", "2 c #B01A1A", "3 c #CD0404", "4 c #D03A3A", "5 c #D14040", "6 c #CC0202", "7 c #DF5E5E", "8 c #B31C1C", "9 c #D55858", "0 c #D63030", "a c #D8B6B6", "b c #DAC1C1", "c c #CC0606", "d c #D42626", "e c #D75353", "f c #B32020", "g c #E16767", "h c #D25050", "i c #DCDCDC", "j c #D36060", "k c #CC0101", "l c #DD5555", "m c #B92222", "n c #D85E5E", "o c #D42828", "p c #CC0404", "q c #DABFBF", "r c #DBC9C9", "s c #CD0A0A", "t c #D21D1D", "u c #D85555", "v c #A20202", "w c #B72828", "x c #DF6060", "y c #D35B5B", "z c #DDDDDD", "A c #D56B6B", "B c #DB4C4C", "C c #BC2727", "D c #A10101", "E c #DB6363", "F c #D32121", "G c #CD0808", "H c #DBC5C5", "I c #DEDEDE", "J c #DDD1D1", "K c #CE1010", "L c #D01616", "M c #DA5656", "N c #A20303", "O c #BC2D2D", "P c #DE5959", "Q c #D36565", "R c #DFDFDF", "S c #D67676", "T c #D94242", "U c #C02C2C", "V c #DC6767", "W c #CD0C0C", "X c #DCCCCC", "Y c #DED6D6", "Z c #CE1616", "` c #CF1010", " . c #DB5656", ".. c #A30505", "+. c #BF3333", "@. c #DC5252", "#. c #D56F6F", "$. c #E0E0E0", "%. c #D88484", "&. c #C43030", "*. c #DE6A6A", "=. c #D01515", "-. c #CD1111", ";. c #DCD1D1", ">. c #949494", ",. c #777777", "'. c #959595", "). c #E1DCDC", "!. c #CF1D1D", "~. c #CE0A0A", "{. c #DB5252", "]. c #A50909", "^. c #C53A3A", "/. c #DB4B4B", "(. c #D57878", "_. c #454545", ":. c #000000", "<. c #E1E1E1", "[. c #D98F8F", "}. c #D63131", "|. c #C83333", "1. c #A50808", "2. c #E06B6B", "3. c #CD1717", "4. c #DCD5D5", "5. c #505050", "6. c #515151", "7. c #E2E0E0", "8. c #D02727", "9. c #CD0606", "0. c #DB4E4E", "a. c #A90C0C", "b. c #C84040", "c. c #DA4444", "d. c #D68383", "e. c #5C5C5C", "f. c #5D5D5D", "g. c #E2E2E2", "h. c #DC9C9C", "i. c #D42929", "j. c #CA3636", "k. c #A70C0C", "l. c #E06A6A", "m. c #CE0B0B", "n. c #CE1E1E", "o. c #DEDADA", "p. c #696969", "q. c #6A6A6A", "r. c #E3E3E3", "s. c #E4E3E3", "t. c #D13131", "u. c #DB4949", "v. c #AB1010", "w. c #CC4646", "x. c #D83C3C", "y. c #D78D8D", "z. c #757575", "A. c #E4E4E4", "B. c #DFAAAA", "C. c #CD3838", "D. c #A81111", "E. c #E06969", "F. c #CE0808", "G. c #CF2626", "H. c #DEDCDC", "I. c #818181", "J. c #E5E5E5", "K. c #D23C3C", "L. c #B01414", "M. c #D04A4A", "N. c #D73535", "O. c #D89797", "P. c #8C8C8C", "Q. c #8E8E8E", "R. c #E6E6E6", "S. c #E0B4B4", "T. c #AC1616", "U. c #E06767", "V. c #D02F2F", "W. c #DFDEDE", "X. c #989898", "Y. c #999999", "Z. c #E7E7E7", "`. c #D44949", " + c #D83B3B", ".+ c #B31818", "++ c #DAA3A3", "@+ c #A4A4A4", "#+ c #A5A5A5", "$+ c #E3C1C1", "%+ c #D01414", "&+ c #D23B3B", "*+ c #A00101", "=+ c #B11C1C", "-+ c #E06262", ";+ c #CD0303", ">+ c #D13838", ",+ c #C7C7C7", "'+ c #E8E8E8", ")+ c #E9E9E9", "!+ c #D75555", "~+ c #D63333", "{+ c #B81B1B", "]+ c #D55656", "^+ c #DBADAD", "/+ c #B0B0B0", "(+ c #B1B1B1", "_+ c #E6CCCC", ":+ c #CF0E0E", "<+ c #D43939", "[+ c #B52222", "}+ c #DF5D5D", "|+ c #D14242", "1+ c #595959", "2+ c #636363", "3+ c #EAEAEA", "4+ c #D96262", "5+ c #D52C2C", "6+ c #BB1D1D", "7+ c #D85B5B", "8+ c #D32222", "9+ c #DDB7B7", "0+ c #0B0B0B", "a+ c #0D0D0D", "b+ c #EBEBEB", "c+ c #E8D4D4", "d+ c #CD0909", "e+ c #D53838", "f+ c #A40404", "g+ c #BB2828", "h+ c #DD5656", "i+ c #D24C4C", "j+ c #323232", "k+ c #313131", "l+ c #ECECEC", "m+ c #DB6F6F", "n+ c #D32525", "o+ c #BF1E1E", "p+ c #A10202", "q+ c #DB5F5F", "r+ c #D11B1B", "s+ c #DDBFBF", "t+ c #CCCCCC", "u+ c #626262", "v+ c #616161", "w+ c #CACACA", "x+ c #EBDDDD", "y+ c #CE0E0E", "z+ c #D53535", "A+ c #A40505", "B+ c #BD2E2E", "C+ c #DC4F4F", "D+ c #D45757", "E+ c #EDEDED", "F+ c #EEEEEE", "G+ c #DD7B7B", "H+ c #D21F1F", "I+ c #C32020", "J+ c #A20404", "K+ c #DD6262", "L+ c #DEC7C7", "M+ c #EEE5E5", "N+ c #D53131", "O+ c #A60707", "P+ c #960000", "Q+ c #C02D2D", "R+ c #D03636", "S+ c #E1DFDF", "T+ c #EFEFEF", "U+ c #D95858", "V+ c #C41E1E", "W+ c #9E0000", "X+ c #9F0000", "Y+ c #D21C1C", "Z+ c #D42E2E", "`+ c #9F0101", " @ c #9D0000", ".@ c #D85757", "+@ c #D12C2C", "@@ c #830000", "#@ c #B01B1B", "$@ c #DA5757", "%@ c #E06464", "&@ c #E06363", "*@ c #DF6161", "=@ c #DF5F5F", "-@ c #DE5C5C", ";@ c #DE5A5A", ">@ c #DD5757", ",@ c #DD5454", "'@ c #DC5050", ")@ c #DB4D4D", "!@ c #DB4A4A", "~@ c #DA4848", "{@ c #DA4747", "]@ c #DA4545", "^@ c #D94343", "/@ c #D83E3E", "(@ c #D83D3D", "_@ c #D73838", ":@ c #D02A2A", "<@ c #B00F0F", "[@ c #920000", "}@ c #860000", "|@ c #900000", " ", " ", " ", " ", " ", " . + + @ ", " @ # $ % & @ ", " * = - ; > , ", " . ' ) ! ! ~ { @ ", " ] ^ / ! ! ( _ : ", " < [ } ! ! ! ! | 1 . ", " 2 > 3 ! 4 5 ! 6 7 8 ", " @ 9 0 ! 6 a b c ! d e . ", " f g 6 ! h i i j ! k l m ", " . n o ! p q i i r s ! t u v ", " w x ! ! y i z z z A ! ! B C . ", " D E F ! G H z z z I J K ! L M N ", " O P ! ! Q z z z I I R S ! ! T U + ", " N V ; ! W X z z I I R R Y Z ! ` ... ", " . +.@.! ! #.z z I I R R R $.%.! ! ~ &.@ ", " ..*.=.! -.;.z I >.,.,.'.$.$.).!.! ~.{.]. ", " < ^./.! ! (.z I I _.:.:._.$.<.<.[.! ! }.|.. ", " 1.2.` ! 3.4.I I R 5.:.:.6.<.<.<.7.8.! 9.0.a. ", " @ b.c.! ! d.I I R R e.:.:.f.<.<.g.g.h.! ! i.j.@ ", " k.l.m.! n.o.I R R R p.:.:.q.<.g.g.r.s.t.! 3 u.v. ", " . w.x.! ! y.I R R R $.z.:.:.z.g.g.r.A.A.B.! ! F C.. ", " D.E.F.! G.H.R R R $.$.I.:.:.I.r.r.A.A.J.J.K.! 6 T L. ", " < M.N.! ! O.R R R $.$.<.P.:.:.Q.r.A.A.J.J.R.S.k ! ; 4 . ", " T.U.( ! V.W.R R $.$.<.<.X.:.:.Y.A.A.J.J.R.R.Z.`.! ! +.+ ", " . h | ! ! ++R R $.$.<.<.<.@+:.:.#+A.J.J.R.R.Z.Z.$+6 ! %+&+*+ ", " =+-+;+! >+R R $.$.<.<.g.g.,+q.q.,+J.J.R.R.Z.'+'+)+!+! ! ~+{+. ", " . ]+o ! ! ^+R $.$.<.<.g.g.r.g./+(+A.J.R.R.Z.'+'+)+)+_+9.! :+<+v ", " [+}+k ! |+$.$.$.<.<.g.g.r.r.1+:.:.2+R.R.Z.'+'+)+)+3+3+4+! ! 5+6+< ", " D 7+8+! 6 9+$.$.<.<.g.g.r.r.A.0+:.:.a+R.Z.'+'+)+)+3+3+b+c+d+! ~.e+f+ ", " g+h+! ! i+$.$.<.<.g.g.r.r.A.A.j+:.:.k+Z.'+'+)+)+3+3+b+b+l+m+! ! n+o+@ ", " p+q+r+! 3 s+$.<.<.g.g.r.r.A.A.J.t+u+v+w+'+'+)+)+3+3+b+b+l+l+x+y+! / z+A+ ", " + B+C+! ! D+$.<.<.g.g.r.r.A.A.J.J.R.R.Z.'+'+)+)+3+3+b+b+l+l+E+F+G+! ! H+I+@ ", " J+K+L ! c L+<.<.g.g.r.r.A.A.J.J.R.R.Z.'+'+)+)+3+3+b+b+l+l+E+F+F+M+L ! 3 N+O+ ", " P+Q+B ! ! R+S+<.g.g.r.r.A.A.J.J.R.R.Z.'+'+)+)+3+3+b+b+l+l+E+F+F+T+T+U+! ! ; V+W+ ", " X+U+Y+! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! 3 Z+`+ ", " @.@n+( ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! 6 m.+@*+ ", " @@#@$@-+_ %@&@*@=@7 -@;@P >@l ,@@.'@C+)@B !@~@{@]@^@T ) /@(@ +~ _@} N.~+| :@<@[@ ", " }@X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+X+|@ ", " ", " ", " ", " ", " " }; /* XPM */ const char *refresh_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 94 2", " c #3465A4", ". c #3565A4", "X c #3566A4", "o c #3566A5", "O c #3667A5", "+ c #3767A5", "@ c #3767A6", "# c #3768A5", "$ c #3768A6", "% c #3868A6", "& c #3869A6", "* c #3969A6", "= c #3969A7", "- c #3A69A7", "; c #3A6AA6", ": c #3A6AA7", "> c #3B6BA7", ", c #3C6BA8", "< c #3C6BA9", "1 c #3C6CA9", "2 c #3D6DA9", "3 c #4170AB", "4 c #4371AB", "5 c #4774AD", "6 c #4B77AF", "7 c #4C77AF", "8 c #4C78AF", "9 c #4C78B0", "0 c #4D79B0", "q c #4E7AB1", "w c #4F7CB6", "e c #537FB7", "r c #5580B5", "t c #5B84B7", "y c #5D85B7", "u c #5F87B9", "i c #6188B9", "p c #6890C0", "a c #6990C0", "s c #6D94C2", "d c #6891C7", "f c #6C95C9", "g c #7298C5", "h c #82A5CE", "j c #84A6CE", "k c #88A7CE", "l c #88ABD2", "z c #8AACD3", "x c #8FACD0", "c c #8CADD3", "v c #8FADD2", "b c #8EAED3", "n c #8FB0D3", "m c #93B1D4", "M c #95B2D4", "N c #9CB7D7", "B c #97B6D8", "V c #99B9DB", "C c #9DBDDC", "Z c #A1BBD9", "A c #A1BEDD", "S c #A0BEDE", "D c #A8C1DE", "F c #A8C2DF", "G c #B0C9E3", "H c #B4CAE3", "J c #B4CBE5", "K c #BCD1E7", "L c #BFD2E7", "P c #BFD3E9", "I c #C1D2E6", "U c #C7D7E9", "Y c #C4D7EB", "T c #C6D8EB", "R c #C8D8EA", "E c #C9D9EA", "W c #CDDBEB", "Q c #C9DAEC", "! c #CCDCED", "~ c #CCDDEE", "^ c #D5E2F0", "/ c #D8E4F1", "( c #DBE6F2", ") c #DDE8F3", "_ c #E0E9F4", "` c #E2EBF5", "' c #E3ECF5", "] c #E4ECF5", "[ c #E4EDF5", "{ c #E5EDF5", "} c #E5EDF6", "| c #E6EEF6", " . c #E7EEF6", ".. c None", /* pixels */ "........% % % % , ..............", "......% a n F F m u % ......O ..", "....% c C A J P ~ ^ L 0 # 4 ..", "..% a g 1 # % y Z / / ) k E % ..", "..% 4 1 % ......% i W ` | | % ..", "..O % d % .......... U T ' % ..", "..O ..............% x | / | , ..", "................ O 6 8 8 8 O ..", ".. O O ................", ".. | ' ` N O ..............O ..", "..O | U E ..........O f r ..", "..O | ` | I 0 % ......< w % # ..", "..% / M ` ) ! c 9 O % % 1 0 : ..", "..O y O 0 J Q K G A z h b % ....", ".. O ....% r h B V z s % ......", "..O ..........: # O : : ........" }; /* XPM */ const char *text_editor_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 52 1", " c #000000", ". c #4C4226", "X c #6B5736", "o c #705B39", "O c #636363", "+ c #717171", "@ c #757575", "# c #8F5902", "$ c #C4A000", "% c #EBB13D", "& c #A18355", "* c #A08356", "= c #A38555", "- c #A08457", "; c #A48757", ": c #C89F64", "> c #CEA668", ", c #CFAA69", "< c #D2AC6A", "1 c #CFAD71", "2 c #868686", "3 c #888A85", "4 c #8C8C8C", "5 c #8F8F8F", "6 c #9D9D9D", "7 c #AEAEAE", "8 c #B1B1B1", "9 c #B2B2B2", "0 c #B7B7B7", "q c #B8B8B8", "w c #BCBCBC", "e c #C2AB8A", "r c #C4C4C4", "t c #CACACA", "y c #CBCBCB", "u c #CCCCCC", "i c #D3D3D3", "p c #D6D6D6", "a c #DADADA", "s c #DBDBDB", "d c #EDE5C4", "f c #EDE6C5", "g c #EEEAC6", "h c #EFEBC7", "j c #F9E8C6", "k c #E9E9E9", "l c #EAEAEA", "z c #EBEBEB", "x c #ECECEC", "c c #EEEEEE", "v c #FFFFFF", "b c None", /* pixels */ "bbbbbbbbbbbbbbbb", "bbb$b$b$b$b$bbbb", "bb$j$j$j$j$j$bbb", "b3$%$%$%$%$%$##b", "b3z$w$q$q$0$#h1#", "b3vxxxxxxxi#h<&#", "b3vsuuuuu0#h<;#b", "b3vxxxxxi#h,&#bb", "b3vsuuu0#f>-#3bb", "b3vxxxz#f:=#+3bb", "b3vsut+oe=#523bb", "b3vxzz#.X#6p73bb", "b3vstr #O4ts93bb", "b3vxzzzzzzzx93bb", "b3x99999999993bb", "b3333333333333bb" }; /* XPM */ const char *text_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 21 1", " c #818181", ". c #959595", "X c #999999", "o c #C4C4C4", "O c #C5C5C5", "+ c #C6C6C6", "@ c #C7C7C7", "# c #C8C8C8", "$ c #EDEDE5", "% c #EDEDE6", "& c #EAEAEA", "* c #EBEBEB", "= c #ECECEC", "- c #EDEDED", "; c #EEEEEE", ": c #EFEFEF", "> c #F0F0F0", ", c #F1F1F1", "< c #F2F2F2", "1 c #FFFFFF", "2 c None", /* pixels */ "X 222", " 111111111111 22", " 1=&==&====>1 22", " 1&oooo#oo#>1 22", " 1&=&=====>>1 22", " 1=o#oo##o#>1 22", " 1&=====%==>1 22", " 1=oo#o>:%=>1 22", " 1====>=>:>>1 22", " 1=##o#####>1 22", " 1===>=>>>><1 22", " 1=o#####>><1 22", " 1===>>>>>>>1 22", " 111111111111 22", ". .22", "2222222222222222" }; /* XPM */ const char *shutdown_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 66 1", " c #272727", ". c #282828", "X c #2B2B2B", "o c #2D2D2D", "O c #515151", "+ c #555555", "@ c #5F5F5F", "# c #606060", "$ c #616161", "% c #656565", "& c #6C6C6C", "* c #6D6D6D", "= c #6F6F6F", "- c #7A7A7A", "; c #7D7D7D", ": c #808080", "> c #848484", ", c #858585", "< c #888A85", "1 c #8E8E8E", "2 c #8F8F8F", "3 c #A0A0A0", "4 c #A2A2A2", "5 c #A6A6A6", "6 c #A9A9A9", "7 c #ABABAB", "8 c #B3B3B3", "9 c #B9B9B9", "0 c #BBBBBB", "q c #BCBCBC", "w c #C1C1C1", "e c #C2C2C2", "r c #C3C3C3", "t c #C5C5C5", "y c #C7C7C7", "u c #C9C9C9", "i c #CCCCCC", "p c #D2D2D2", "a c #D4D4D4", "s c #D8D8D8", "d c #DEDEDE", "f c #DFDFDF", "g c #E0E0E0", "h c #E1E1E1", "j c #E2E2E2", "k c #E3E3E3", "l c #E4E4E4", "z c #E5E5E5", "x c #E6E6E6", "c c #E7E7E7", "v c #E8E8E8", "b c #E9E9E9", "n c #EAEAEA", "m c #EBEBEB", "M c #ECECEC", "N c #EDEDED", "B c #EEEEEE", "V c #EFEFEF", "C c #F0F0F0", "Z c #F1F1F1", "A c #F3F3F3", "S c #F4F4F4", "D c #F5F5F5", "F c #F6F6F6", "G c #F7F7F7", "H c None", /* pixels */ "H<<<<<<<<<<<<<>>>1AAAl<", "3rr9;addV<", " c None", /* pixels */ ">>>>>>>>>>>>>>>>", ">>>>>>OOO>>>>>>>", ">>>OO>O:O>OO>>>>", ">>O:=O%;%O=:O>>>", ">>O=;;;;;;;=O>>>", ">>>O;&o$o*;O>>>>", ">OO%;o.> +;%OO>>", ">O:;;$>>>$;;:O>>", ">OO%;@#>Xo;%OO>>", ">>>O:&@$o-;O>>>>", ">>O=;;;;;;;=O>>>", ">>O:=O%;%O=:O>>>", ">>>OO>O:O>OO>>>>", ">>>>>>OOO>>>>>>>", ">>>>>>>>>>>>>>>>", ">>>>>>>>>>>>>>>>" }; // --------------------------------------------------------------------- // End Tango icons // --------------------------------------------------------------------- // audio-card from gnome icon theme /* XPM */ const char *audio_card_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 102 2", " c #3A3E00", ". c #3A3F00", "X c #3B3F00", "o c #2F3536", "O c #303634", "+ c #303735", "@ c #303637", "# c #363D32", "$ c #323835", "% c #313836", "& c #333936", "* c #323937", "= c #343936", "- c #383E31", "; c #3B4000", ": c #3D4104", "> c #3E4206", ", c #657000", "< c #677300", "1 c #687400", "2 c #687502", "3 c #687505", "4 c #6B7704", "5 c #6B7901", "6 c #6C7900", "7 c #6C7801", "8 c #6D7A00", "9 c #6C7A02", "0 c #6F7D01", "q c #707E02", "w c #707E07", "e c #404630", "r c #3D5B50", "t c #38595E", "y c #38595F", "u c #395A5F", "i c #365761", "p c #405C4F", "a c #545650", "s c #545652", "d c #555753", "f c #565852", "g c #565853", "h c #565854", "j c #575955", "k c #585A56", "l c #5A5C58", "z c #5D5E5B", "x c #5E5F5C", "c c #426050", "v c #426251", "b c #646662", "n c #656663", "m c #666864", "M c #676965", "N c #696A67", "B c #696B67", "V c #6E6F6D", "C c #6E706C", "Z c #6F716D", "A c #758201", "S c #748202", "D c #798708", "F c #7F8839", "G c #A3B31A", "H c #A4B31A", "J c #A4B419", "K c #AABA1A", "L c #858E39", "P c #848D3B", "I c #878F3D", "U c #87903B", "Y c #8A9539", "T c #8C9638", "R c #919C38", "E c #949E39", "W c #959F3A", "Q c #959F3B", "! c #929D3C", "~ c #939E3C", "^ c #959F3D", "/ c #95A03C", "( c #96A03C", ") c #97A03C", "_ c #97A13C", "` c #97A23D", "' c #D8EB31", "] c #DBEF33", "[ c #DFF234", "{ c #E0F338", "} c #E4F839", "| c #E8FB38", " . c #EBFF39", ".. c #EFFF65", "X. c #B7B9B5", "o. c #C4C6C2", "O. c #C6C8C4", "+. c #C7C9C5", "@. c #C8CAC6", "#. c #D0D2CE", "$. c #D4D6D2", "%. c None", /* pixels */ "%.%.%.%.%.%.%.%.%.%.%.%.j k j %.", "%.%.%.%.%.%.%.%.%.%.%.d O.#.X.d ", "X a $.d d %.", " E W W W Q Q ( ( ( ^ f $.d %.%.", " ` e * * % % + # c v f $.d l x ", " ` + V Z Z Z C & y u f $.d o.d ", " ` + Z d d d N = 3 8 f $.d h g ", " _ + B M m n b $ p t f $.d %.%.", " ) - @ o o o o O r i f $.d k z ", " / A q 0 9 5 2 1 < , f $.d @.d ", " ~ K S J 6 H 7 G U I f $.d d h ", " ! { D ' 4 ] w [ P : a $.d %.%.", " T ..R } L | Y .F > s $.d %.%.", "; X X X X X X . . . . s +.d %.%.", "%.%.%.%.%.%.%.%.%.%.%.d d d %.%.", "%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%." }; // help-about from gnome /* XPM */ const char *help_about_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 76 1", " c #C4A001", ". c #C5A101", "X c #C5A102", "o c #C6A202", "O c #C6A203", "+ c #C7A403", "@ c #C7A404", "# c #C7A405", "$ c #C7A406", "% c #C7A407", "& c #C7A507", "* c #C8A508", "= c #C9A70B", "- c #C9A80D", "; c #CAA80C", ": c #C9A810", "> c #CCAC12", ", c #CCAC14", "< c #CDAE1B", "1 c #CFB11C", "2 c #D0B11F", "3 c #CFB021", "4 c #D2B522", "5 c #D3B62C", "6 c #D2B62F", "7 c #F6E132", "8 c #F6E235", "9 c #F5E038", "0 c #F7E23A", "q c #F8E33C", "w c #F8E43E", "e c #D9C04A", "r c #E4CE4C", "t c #E4CE4F", "y c #E7D041", "u c #E7D247", "i c #EBD755", "p c #EBD756", "a c #ECD85A", "s c #F8E441", "d c #F9E644", "f c #F6E349", "g c #FBE74A", "h c #F9E74D", "j c #F7E75F", "k c #F8E75A", "l c #FBE95C", "z c #E9D668", "x c #EAD86C", "c c #F6E664", "v c #F6E667", "b c #F8E864", "n c #F8E865", "m c #F9E96B", "M c #FAEB71", "N c #F9EB73", "B c #F8EA7B", "V c #FAEC7C", "C c #F9EC7F", "Z c #EEDF83", "A c #EEDF85", "S c #F7E981", "D c #F8EC88", "F c #F9ED89", "G c #FAED8B", "H c #F8EB8F", "J c #F9EE9B", "K c #FBF097", "L c #FCF2A6", "P c #FCF3AA", "I c #FDF6BC", "U c #FCF7CF", "Y c #FDF8D1", "T c #FDF9DF", "R c #FEFCEE", "E c None", /* pixels */ "EEEEEEE.EEEEEEEE", "EEEEEE@e@EEEEEEE", "EEEEEE3TEEEEEEE", "EEEEEE&4&EEEEEEE", "EEEEEEE EEEEEEEE", "EEEEEEEEEEEEEEEE" }; // insert link icon from gnome /* XPM */ const char *insert_link_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 97 2", " c #2E3436", ". c #2F3536", "X c #363C3D", "o c #373D3E", "O c #464A48", "+ c #464B4C", "@ c #4F524F", "# c #545652", "$ c #555753", "% c #575955", "& c #585A56", "* c #595B57", "= c #5A5B57", "- c #5A5C58", "; c #5B5D58", ": c #5C5D59", "> c #62645F", ", c #656763", "< c #6B6D69", "1 c #6E6F6B", "2 c #6F716D", "3 c #71726F", "4 c #767773", "5 c #777875", "6 c #7C7E79", "7 c #7C7F79", "8 c #CF5F04", "9 c #D06106", "0 c #D86605", "q c #D86706", "w c #F47A03", "e c #F47A04", "r c #F47D0B", "t c #E97910", "y c #E97911", "u c #7E807D", "i c #EA9D4C", "p c #F4B15E", "a c #F5B364", "s c #FDC97D", "d c #838580", "f c #8A8C87", "g c #979B96", "h c #989B95", "j c #9FA19D", "k c #B3B4B0", "l c #B4B7B0", "z c #B7B7B1", "x c #B5B7B2", "c c #B5B8B2", "v c #BABDB6", "b c #BBBEB7", "n c #BBBEB8", "m c #BDBEBB", "M c #C0C0BC", "N c #C2C3BF", "B c #FBD7AA", "V c #FBD9AE", "C c #C4C6C0", "Z c #C5C7C1", "A c #CBCEC8", "S c #CCCEC9", "D c #D0D1CE", "F c #D1D3CE", "G c #D4D4D0", "H c #D6D7D6", "J c #D9DAD8", "K c #DBDCDB", "L c #DEDEDA", "P c #DFDFDD", "I c #FDE6C4", "U c #FEE9CA", "Y c #FEEACC", "T c #E0E0DC", "R c #E0E0DD", "E c #E2E3E2", "W c #E4E4E1", "Q c #E6E6E4", "! c #E7E8E6", "~ c #E9E9E6", "^ c #E8E9E8", "/ c #EDEDEB", "( c #EDEDEC", ") c #EDEEED", "_ c #EEEEEC", "` c #EFF0EE", "' c #F1F1F0", "] c #F3F3F1", "[ c #F3F3F2", "{ c #F4F5F4", "} c #F5F5F4", "| c #F6F6F5", " . c #F6F6F6", ".. c #F8F8F7", "X. c #F9F9F9", "o. c #FDFDFD", "O. c None", /* pixels */ "O.# # # # ; O.O.O.O.O.O.O.O.; # ", "O. .{ [ ` J u - O.O.O.O.- H ) o.", "O.v v v b C F < # $ $ # 5 / A n ", "O.# * $ * 7 b h 1 m m 1 x Z 6 % ", "O.O.& R Q 2 $ $ $ $ $ $ $ $ 3 K ", "O.O.: z L ] } ...X.| ' ( ^ ! E ", "O.O @ 4 M G T W ~ _ P D N k j f ", "O.S c d , = $ $ $ $ $ $ $ $ & > ", "O.v v v l g + X O.O.O.O.X + g l ", "O. . o O.O.O.O.O.O.O.O.o . ", "O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.O.", "O.O.O.O.O.w e r r r r r e w O.O.", "O.O.O.O.O.O.y V Y I U B t O.O.O.", "O.O.O.O.O.O.O.q a s p 0 O.O.O.O.", "O.O.O.O.O.O.O.O.9 i 9 O.O.O.O.O.", "O.O.O.O.O.O.O.O.O.8 O.O.O.O.O.O." }; // close icon from default gtk theme /* XPM */ const char *close_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 74 1", " c #5A5C58", ". c #5C5E5B", "X c #5C5F5B", "o c #5D5F5B", "O c #5E5F5B", "+ c #5E5F5C", "@ c #5D605A", "# c #5D605B", "$ c #5C615B", "% c #5F605A", "& c #5E615B", "* c #5E605C", "= c #5F605C", "- c #5E615C", "; c #5F615C", ": c #5E605D", "> c #5E615D", ", c #5F625C", "< c #5F625D", "1 c #5F615E", "2 c #5F625E", "3 c #60615B", "4 c #60625D", "5 c #60615E", "6 c #60625E", "7 c #61625E", "8 c #61645F", "9 c #7D807A", "0 c #7E817B", "q c #80827B", "w c #80837E", "e c #82847D", "r c #82857E", "t c #838680", "y c #848681", "u c #848781", "i c #868983", "p c #878983", "a c #868984", "s c #888A85", "d c #898C86", "f c #898D86", "g c #8A8C86", "h c #8A8D88", "j c #8D9089", "k c #8E908A", "l c #8E918B", "z c #8F928C", "x c #8F928D", "c c #91938E", "v c #92948F", "b c #949590", "n c #949691", "m c #959892", "M c #959992", "N c #969994", "B c #979B95", "V c #B1B4AC", "C c #B4B7AF", "Z c #B8BBB3", "A c #B9BCB4", "S c #BABDB5", "D c #BDC0B8", "F c #BDC1B9", "G c #BFC3BB", "H c #C1C4BC", "J c #C3C6BE", "K c #C3C7BF", "L c #C4C8C0", "P c #C5C9C1", "I c #CACEC6", "U c #CBCEC6", "Y c #CDD1C9", "T c None", /* pixels */ "TTTTTTTTTTTTTTTT", "TTTTTTTTTTTTTTTT", "TT681TTTTTT ,5TT", "TT5Ll2TTTT=wZ:TT", "TT4fUx7TT4aDu;TT", "TTT3jYz<;dHs+TTT", "TTTT>kINmJh=TTTT", "TTTTT>BPKM*TTTTT", "TTTTT-vHGc+TTTTT", "TTTT-uFnbSr.TTTT", "TTT=eAg%#iCq$TTT", "TT:9Cp@TTXyV0;TT", "TT;Vp@TTTTOtVoTT", "TT44&TTTTTT&O4TT", "TTTTTTTTTTTTTTTT", "TTTTTTTTTTTTTTTT" }; // enter key icon from KDE's crystal theme /* XPM */ const char *enter_key_icon[] = { /* columns rows colors chars-per-pixel */ "16 16 91 1", " c #5C5C5C", ". c #626262", "X c #666666", "o c #696969", "O c #6B6B6B", "+ c #6C6C6C", "@ c #6E6E6E", "# c #6F6F6F", "$ c #717171", "% c #737373", "& c #747474", "* c #838383", "= c #8D8D8D", "- c #92928F", "; c #939393", ": c #A3A3A2", "> c #A7A7A5", ", c #A7A7A6", "< c #A7A7A7", "1 c #A9A9A8", "2 c #A9A9A9", "3 c #AEAEAD", "4 c #B0B0AE", "5 c #B1B1AF", "6 c #B2B2B0", "7 c #B4B4B2", "8 c #B5B5B3", "9 c #B7B7B6", "0 c #B7B7B7", "q c #B9B9B7", "w c #BABAB9", "e c #BBBBBB", "r c #BCBCBB", "t c #BEBEBC", "y c #C2C2C1", "u c #C4C4C0", "i c #C4C4C4", "p c #C5C5C5", "a c #C6C6C4", "s c #C7C7C7", "d c #C9C9C6", "f c #CBCBC8", "g c #CACACA", "h c #CFCFCD", "j c #D0D0CE", "k c #D1D1CF", "l c #D0D0D0", "z c #D1D1D1", "x c #D2D2D0", "c c #D3D3D1", "v c #D2D2D2", "b c #D3D3D2", "n c #D3D3D3", "m c #D4D4D3", "M c #D4D4D4", "N c #D5D5D5", "B c #D7D7D6", "V c #D7D7D7", "C c #D8D8D8", "Z c #D9D9D8", "A c #D9D9D9", "S c #DADAD9", "D c #DADADA", "F c #DCDCDC", "G c #DDDDDD", "H c #DEDEDE", "J c #DFDFDF", "K c #E0E0E0", "L c #E2E2E2", "P c #E3E3E3", "I c #E4E4E4", "U c #E5E5E5", "Y c #E7E7E7", "T c #E8E8E8", "R c #E9E9E9", "E c #EBEBEB", "W c #ECECEC", "Q c #EDEDED", "! c #EFEFEF", "~ c #F0F0F0", "^ c #F3F3F3", "/ c #F4F4F4", "( c #F5F5F5", ") c #F6F6F6", "_ c #F7F7F7", "` c #F8F8F8", "' c #F9F9F9", "] c #FAFAFA", "[ c #FCFCFC", "{ c #FDFDFD", "} c None", /* pixels */ "}}}}}}}}}}}}}}}}", "}}}}}}fSFFFFFSd}", "}}}}}}c{[[[[['a}", "}}}}}}x]_`'`_`t}", "}}}}}}x)^(p`^/r}", "}}}}}}k^!!%'!!w}", "}}}}}}j~WQ#`EWq}", "}}}}}}yWTR@(TR9}", "}Z)))_/YIU+~PI8}", "}BLHKH,,,,,,,,,:-}", "}}}}}}}}}}}}}}}}" }; // question icon from default gtk theme /* XPM */ const char *dialog_question_48_icon[] = { "48 48 215 2", " c None", ". c #3768A6", "+ c #3968A7", "@ c #3A6AA7", "# c #386BA6", "$ c #3968A5", "% c #A7BEDA", "& c #F4F7FB", "* c #F4F8FB", "= c #A5BDD9", "- c #3769A6", "; c #3869A6", "> c #BBCEE4", ", c #FFFFFF", "' c #FEFEFF", ") c #BBCDE3", "! c #F9FBFD", "~ c #98B9DC", "{ c #99B9DC", "] c #729FCF", "^ c #97B8DB", "/ c #BACDE3", "( c #719ECE", "_ c #709DCD", ": c #709DCE", "< c #6F9CCD", "[ c #6F9CCC", "} c #95B6DA", "| c #B9CDE3", "1 c #6E9CCC", "2 c #6E9BCC", "3 c #6D9BCC", "4 c #6D9ACB", "5 c #94B5D9", "6 c #B9CCE3", "7 c #78A2D0", "8 c #709CCC", "9 c #6C9ACB", "0 c #6C99CA", "a c #6B99CA", "b c #93B4D8", "c c #B9CCE2", "d c #739FCE", "e c #A1BEDE", "f c #C9DAEC", "g c #EBF1F8", "h c #FAFCFD", "i c #E7EEF6", "j c #B7CDE6", "k c #759FCE", "l c #6B98CA", "m c #6A98C9", "n c #6A97C9", "o c #92B3D8", "p c #B9CBE2", "q c #80A8D3", "r c #E8EFF7", "s c #6997C9", "t c #6996C8", "u c #6896C8", "v c #91B2D7", "w c #B8CBE2", "x c #7FA7D2", "y c #FDFDFE", "z c #E9F0F7", "A c #EFF4F9", "B c #BBD0E7", "C c #6895C8", "D c #6795C7", "E c #6794C7", "F c #8FB1D6", "G c #B8CBE1", "H c #7EA6D1", "I c #F2F6FA", "J c #ADC6E1", "K c #749FCD", "L c #6A98CA", "M c #AFC7E2", "N c #E1EAF4", "O c #6694C7", "P c #6694C6", "Q c #6593C6", "R c #8EAFD5", "S c #B7CBE1", "T c #96B7DA", "U c #6C99CB", "V c #709CCB", "W c #719DCC", "X c #7FA5D0", "Y c #6693C6", "Z c #6592C6", "` c #6492C5", " . c #6391C5", ".. c #8DAFD4", "+. c #B0C7E2", "@. c #CBDBEC", "#. c #6391C4", "$. c #6290C4", "%. c #8CADD3", "&. c #B7CAE1", "*. c #3768A5", "=. c #396AA7", "-. c #A4BCD8", ";. c #96B6D8", ">. c #FDFEFE", ",. c #85A9D2", "'. c #6290C3", "). c #618FC3", "!. c #608EC3", "~. c #8BADD3", "{. c #A0B8D6", "]. c #3768A7", "^. c #FEFFFF", "/. c #99B8DA", "(. c #A4BFDD", "_. c #608EC2", ":. c #5F8DC2", "<. c #5F8DC1", "[. c #8AABD2", "}. c #3868A6", "|. c #396AA6", "1. c #87AAD2", "2. c #FBFCFE", "3. c #A1BDDC", "4. c #5F8EC2", "5. c #5E8DC1", "6. c #5E8CC1", "7. c #89AAD1", "8. c #3767A6", "9. c #3969A6", "0. c #92B4D8", "a. c #D0DEEE", "b. c #B1C8E2", "c. c #5D8CC1", "d. c #5D8BC0", "e. c #87AAD1", "f. c #F9FAFD", "g. c #79A0CC", "h. c #5C8BC0", "i. c #87A9D0", "j. c #F9FAFC", "k. c #B6C9E0", "l. c #3767A5", "m. c #90B2D6", "n. c #6B97C7", "o. c #6C97C8", "p. c #6C97C7", "q. c #6C96C7", "r. c #5C8AC0", "s. c #5B8ABF", "t. c #87A8D0", "u. c #3668A4", "v. c #8FB0D6", "w. c #5C8ABF", "x. c #5B89BF", "y. c #86A8D0", "z. c #B6CAE1", "A. c #8DAFD5", "B. c #ECF1F8", "C. c #5A89BF", "D. c #5A89BE", "E. c #85A7CF", "F. c #F8FAFC", "G. c #B6CAE0", "H. c #BACDE2", "I. c #8BADD4", "J. c #F6F8FB", "K. c #5A88BE", "L. c #5988BE", "M. c #5987BD", "N. c #84A7CE", "O. c #89ABD3", "P. c #EBF1F7", "Q. c #5887BD", "R. c #84A6CE", "S. c #88ABD1", "T. c #5886BD", "U. c #5786BC", "V. c #83A6CE", "W. c #82A5CE", "X. c #3667A4", "Y. c #85A8D0", "Z. c #5785BC", "`. c #5685BC", " + c #82A4CD", ".+ c #B6C8E0", "++ c #3767A3", "@+ c #85A8CF", "#+ c #5685BB", "$+ c #5584BB", "%+ c #3667A3", "&+ c #B8CAE1", "*+ c #5684BB", "=+ c #81A4CC", "-+ c #B5C8E0", ";+ c #3566A2", ">+ c #82A5CD", ",+ c #5483BA", "'+ c #B7C9E0", ")+ c #81A4CD", "!+ c #5382BA", "~+ c #80A3CB", "{+ c #B5C8DF", "]+ c #80A3CC", "^+ c #5382B9", "/+ c #7FA2CB", "(+ c #B4C8DF", "_+ c #9DB5D3", ":+ c #F1F5F9", "<+ c #F0F4F9", "[+ c #9CB4D3", "}+ c #3565A1", "|+ c #305D95", "1+ c #3666A3", "2+ c #305D96", " ", " ", " . + @ # ", " $ % & * = - ", " ; > , ' ' , ) ; ", " ; > , ! ~ { ! , ) ; ", " ; > , ! ~ ] ] ~ ! , ) ; ", " ; > , ! ~ ] ] ] ] ~ ! , ) ; ", " ; > , ! ~ ] ] ] ] ] ] ~ ! , ) ; ", " ; > , ! ~ ] ] ] ] ] ] ] ] ~ ! , ) - ", " ; > , ! ~ ] ] ] ] ] ] ] ] ] ] ^ ! , / - ", " ; > , ! ~ ] ] ] ] ] ] ] ] ] ( ( _ ^ ! , / - ", " ; > , ! ~ ] ] ] ] ] ] ] ( ( : _ < < [ } ! , | - ", " ; > , ! ~ ] ] ] ] ] ] ( ( _ _ < < 1 2 3 4 5 ! , 6 - ", " ; > , ! ~ ] ] ] ] ( ( : _ < 7 8 2 2 4 4 9 0 a b ! , c - ", " ; > , ! ~ ] ] ] ( ( d e f g h , ' i j k a a l m n o ! , p - ", " ; > , ! ~ ] ( ( : _ < q , , , , , , , , r k n n s t u v ! , w - ", " ; > , ! ~ ( ( _ _ < < 1 x , , y z A , , , , B t u u C D E F ! , G - ", " ; > , ! ^ : _ < < [ 2 2 4 H I J K l L M , , , N C D D O P Q Q R ! , S - ", " ; > , ! T _ < < 1 2 3 4 9 U V W l m n s X , , , i E O Y Q Z ` ` ...! , S - ", " $ > , ! } < [ 2 2 4 4 9 0 a l L n n s t u +., , , @.Q Q Z ` ` .#.$.$.%.! , &.*. ", " =.-., ! } 1 2 3 4 9 U 0 a l m n s t u u C ;.>., , >.,.` ` .#.$.$.'.).).!.~.! , {.]. ", " . & ^.} 2 4 4 9 0 a l L n n s t u C D D /.y , , ^.(.` .#.$.$.).).)._._.:.<.[.' I }. ", " |.& ^.5 9 U 0 a l m n s t u u C D E O 1.2., , ^.3.#.$.$.'.).).!._.4.:.5.6.6.7.' I 8. ", " 9.-., ! 0.l L n n s t u C D D O P Q Q a., , , b.$.$.).).)._._.:.<.6.6.c.d.e.f., {.8. ", " *./ , ! v s t u u C D E O Y Q Q ` ` r , , , g.).).!._.4.:.5.6.6.d.d.h.i.j., k.l. ", " - ) , ! m.C D D O P Q Q Z ` ` .#.n.o.p.q.'._._.:.<.6.6.c.d.h.r.s.t.j., k.u. ", " - ) , ! v.O Y Q Q ` ` .#.$.$.'.).).!._.4.:.5.6.6.d.d.h.w.s.x.y.j., z.u. ", " - / , ! A.Z ` ` .#.$.$.'.).).B.& & & 6.6.c.d.h.r.s.x.C.D.E.F., G.u. ", " - H., ! I.#.$.$.'.).).!._.4.J., , , d.d.h.w.s.x.C.D.K.E.F., k.u. ", " - c , ! ~.'.).)._._.:.<.6.J., , , r.s.x.x.D.K.L.M.N.F., k.u. ", " - c , ! O._.4.:.5.6.6.d.P.& & & x.C.D.K.L.M.Q.R.F., k.u. ", " - p , ! S.5.6.c.d.h.r.s.x.x.D.K.L.M.Q.T.U.V.F., k.u. ", " l.w , f.i.d.h.w.s.x.C.D.K.L.M.Q.T.U.U.W.F., k.X. ", " l.G , f.Y.x.x.D.K.L.M.Q.T.U.U.Z.`. +F., .+X. ", " ++G , j.@+K.L.M.Q.T.U.U.`.#+$+ +F., .+%+ ", " %+&+, F.V.T.U.U.Z.`.*+$+$+=+F., -+%+ ", " ;+&., F.>+`.#+$+$+,+,+=+F., -+;+ ", " ;+'+, F.)+$+,+,+!+~+F., {+;+ ", " ;+k., F.]+!+^+/+F., {+;+ ", " ;+k., F./+~+F., (+;+ ", " %+k., ^.^., (+%+ ", " ;+_+:+<+[+}+ ", " |+}+1+2+ ", " ", " ", " ", " " }; /* XPM */ const char *clear_sq_icon[] = { "16 16 1 1", " c None", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " " }; const char *clear_row_icon[] = { "16 1 1 1", " c None", " " }; // The lightning bolt icons are based on gmfsk's rx.xpm and tx.xpm /* XPM */ const char *rx1_icon[] = { "16 16 4 1", " c None", ". c #0F1F01", "+ c #4E9A06", "@ c #888A85", " ", " ......... ", " .++++++.@ ", " .++++++.@ ", " .+++++.@ ", " .+++++.@ ", " .++++..... ", " .++++++++.@ ", " .....+++.@ ", " @@.+++.@ ", " .++.@ ", " .++.@ ", " .+.@ ", " .+.@ ", " ..@ ", " " }; /* XPM */ const char *tx1_icon[] = { "16 16 4 1", " c None", ". c #210000", "+ c #A40000", "@ c #888A85", " ", " ......... ", " .++++++.@ ", " .++++++.@ ", " .+++++.@ ", " .+++++.@ ", " .++++..... ", " .++++++++.@ ", " .....+++.@ ", " @@.+++.@ ", " .++.@ ", " .++.@ ", " .+.@ ", " .+.@ ", " ..@ ", " " }; /* XPM */ const char *rx2_icon[] = { "16 16 3 1", " c None", ". c #0F1F01", "+ c #4E9A06", " ", " ......... ", " .++++++. ", " .++++++. ", " .+++++. ", " .+++++. ", " .++++..... ", " .++++++++. ", " .....+++. ", " .+++. ", " .++. ", " .++. ", " .+. ", " .+. ", " .. ", " " }; /* XPM */ const char *tx2_icon[] = { "16 16 3 1", " c None", ". c #210000", "+ c #A40000", " ", " ......... ", " .++++++. ", " .++++++. ", " .+++++. ", " .+++++. ", " .++++..... ", " .++++++++. ", " .....+++. ", " .+++. ", " .++. ", " .++. ", " .+. ", " .+. ", " .. ", " " }; /* XPM */ const char *rx_icon[] = { "16 16 38 1", " c None", ". c #0F1F01", "+ c #64B517", "@ c #62B315", "# c #61B014", "$ c #5EAE12", "% c #5CAC11", "& c #5AA90F", "* c #68BA1B", "= c #66B719", "- c #65B517", "; c #63B315", "> c #60B014", ", c #5EAD13", "' c #6ABD1C", ") c #69BA1A", "! c #66B718", "~ c #64B418", "{ c #6FC11F", "] c #6CBF1E", "^ c #6ABC1C", "/ c #70C421", "( c #6CBE1E", "_ c #6BBC1C", ": c #75C824", "< c #72C622", "[ c #6EC11F", "} c #6CBE1D", "| c #67B819", "1 c #6DBF1E", "2 c #73C622", "3 c #70C321", "4 c #74C924", "5 c #72C522", "6 c #79CD27", "7 c #76CA26", "8 c #7ACF28", "9 c #7FD42B", " ", " ......... ", " .+@#$%&. ", " .*=-;>,. ", " .')!~@. ", " .{]^)=. ", " ./{(_..... ", " .: c #B90C0B", ", c #C81313", "' c #C10F10", ") c #CC1617", "! c #CA1515", "~ c #C71313", "{ c #CF1818", "] c #CC1616", "^ c #D41A1A", "/ c #D11819", "( c #CF1718", "_ c #C71414", ": c #CA1514", "< c #C81413", "[ c #D21919", "} c #CF1817", "| c #CD1616", "1 c #D11818", "2 c #D81D1D", "3 c #D61B1B", "4 c #DB1E1E", "5 c #E02121", " ", " ......... ", " .+@#$%&. ", " .*=-@;>. ", " .,*='@. ", " .)!~*=. ", " .{]!,..... ", " .^/(]!_*=. ", " .....]:<. ", " .[}|. ", " .^1. ", " .23. ", " .4. ", " .5. ", " .. ", " "}; // pskreporter.info "favicon" /* XPM */ const char *pskr_icon[] = { "16 16 3 1", " c None", ". c #FF0000", "+ c #FFFF00", " .. ", " ... ", " ..... ", " .....+.. ", ". ...++++... ", ".. ..+++++. .. ", "....++++++..+. ", "..+++++++++++.. ", "..+++++++.++++. ", "....+++++..++.. ", ".. ..+++++.... ", ". ..+++++.. ", " ...+... ", " .... ", " .. ", " . "}; /* XPM */ const char *fldigi_icon[] = { "48 48 215 2", " c None", ". c #000000", "+ c #BFBFBF", "@ c #050505", "# c #1A1A1A", "$ c #1F1F1F", "% c #C5C5C5", "& c #FEC1C1", "* c #FDC5C5", "= c #FEC2C2", "- c #FFBFBF", "; c #D5C4C4", "> c #0C0C0C", ", c #FE0303", "' c #FB0C0C", ") c #FD0606", "! c #FE0000", "~ c #4F0909", "{ c #D1BFBF", "] c #2F2F2F", "^ c #303030", "/ c #3C3C3C", "( c #838383", "_ c #C7C7C7", ": c #D9D9D9", "< c #D7D7D7", "[ c #C2C2C2", "} c #C4C4C4", "| c #C9C9C9", "1 c #9F9F9F", "2 c #DDDDDD", "3 c #DBDBDB", "4 c #CDCDCD", "5 c #8F8F8F", "6 c #414141", "7 c #343434", "8 c #313131", "9 c #010101", "0 c #292929", "a c #8A8A8A", "b c #A8A8A8", "c c #B6B6B6", "d c #CFCFCF", "e c #DEDEDE", "f c #DFDFDF", "g c #E5E5E5", "h c #E2E2E2", "i c #A0A0A0", "j c #7D7D7D", "k c #1D1D1D", "l c #767676", "m c #888888", "n c #9B9B9B", "o c #D3D3D3", "p c #C6C6C6", "q c #EBEBEB", "r c #DADADA", "s c #AAAAAA", "t c #858585", "u c #747474", "v c #232323", "w c #171717", "x c #818181", "y c #979797", "z c #AEAEAE", "A c #E4E4E4", "B c #D4D4D4", "C c #B5B5B5", "D c #E1E1E1", "E c #BABABA", "F c #9A9A9A", "G c #989898", "H c #030303", "I c #070707", "J c #242424", "K c #C1C1C1", "L c #E0E0E0", "M c #B2B2B2", "N c #363636", "O c #060606", "P c #020202", "Q c #929292", "R c #959595", "S c #C8C8C8", "T c #CECECE", "U c #B0B0B0", "V c #999999", "W c #040404", "X c #151515", "Y c #606060", "Z c #A2A2A2", "` c #CBCBCB", " . c #919191", ".. c #A4A4A4", "+. c #AFAFAF", "@. c #737373", "#. c #181818", "$. c #131313", "%. c #393939", "&. c #C3C3C3", "*. c #454545", "=. c #3A3A3A", "-. c #222222", ";. c #333333", ">. c #484848", ",. c #A1A1A1", "'. c #616161", "). c #0F0F0F", "!. c #C0C0C0", "~. c #808080", "{. c #404040", "]. c #121212", "^. c #191919", "/. c #BDBDBD", "(. c #7E7E7E", "_. c #3F3F3F", ":. c #161616", "<. c #090909", "[. c #212121", "}. c #777777", "|. c #BBBBBB", "1. c #3B3B3B", "2. c #5D5D5D", "3. c #A5A5A5", "4. c #727272", "5. c #272727", "6. c #101010", "7. c #9C9C9C", "8. c #B7B7B7", "9. c #B3B3B3", "0. c #080808", "a. c #262626", "b. c #ADADAD", "c. c #CCCCCC", "d. c #E9E9E9", "e. c #E8E8E8", "f. c #ACACAC", "g. c #2A2A2A", "h. c #323232", "i. c #DCDCDC", "j. c #D1D1D1", "k. c #E7E7E7", "l. c #D2D2D2", "m. c #0E0E0E", "n. c #0D0D0D", "o. c #4A4A4A", "p. c #8C8C8C", "q. c #B9B9B9", "r. c #7A7A7A", "s. c #525252", "t. c #373737", "u. c #7B7B7B", "v. c #E6E6E6", "w. c #A9A9A9", "x. c #6B6B6B", "y. c #141414", "z. c #757575", "A. c #D6D6D6", "B. c #E3E3E3", "C. c #6E6E6E", "D. c #0B0B0B", "E. c #1E1E1E", "F. c #EAEAEA", "G. c #B4B4B4", "H. c #D8D8D8", "I. c #9E9E9E", "J. c #444444", "K. c #ABABAB", "L. c #A6A6A6", "M. c #505050", "N. c #B1B1B1", "O. c #3E3E3E", "P. c #0A0A0A", "Q. c #878787", "R. c #EFEFEF", "S. c #8B8B8B", "T. c #4B4B4B", "U. c #4F4F4F", "V. c #CACACA", "W. c #EEEEEE", "X. c #434343", "Y. c #D5D5D5", "Z. c #7F7F7F", "`. c #5B5B5B", " + c #515151", ".+ c #868686", "++ c #8E8E8E", "@+ c #575757", "#+ c #707070", "$+ c #636363", "%+ c #B8B8B8", "&+ c #909090", "*+ c #252525", "=+ c #8D8D8D", "-+ c #969696", ";+ c #282828", ">+ c #A3A3A3", ",+ c #BCBCBC", "'+ c #A7A7A7", ")+ c #3D3D3D", "!+ c #2E2E2E", "~+ c #353535", "{+ c #D0D0D0", "]+ c #595959", "^+ c #BEBEBE", "/+ c #111111", "(+ c #5E5E5E", "_+ c #383838", ":+ c #939393", "<+ c #464646", "[+ c #2C2C2C", "}+ c #717171", "|+ c #898989", "1+ c #494949", "2+ c #555555", ". . . . . . . . + @ . . . . . . . . . . . . . . . . . . . . . . . + . . . . . . . . . . . . . . ", ". . . . . . . . + # . . . . . . . . . . . . . . . . . . . . . . . + . . . . . . . . . . . . . . ", ". . . . . . . . + $ . . . . . . . . . . . . . . . . . . . . . . . + . . . . . . . . . . . . . . ", "% % % % % % % % % % % % % % % % % % % % % & * * * = - - - ; % % % % % % % % % % % % % % % % % % ", "> > > > > > > > > > > > > > > > > > > > > , ' ' ' ) ! ! ! ~ > > > > > > > > > > > > > > > > > > ", "+ + + + + + + + + + + + + + + + + + + + + - - - - - - - - { + + + + + + + + + + + + + + + + + + ", "] ] ] ] ] ] ] ] ] ] ] ] ] ] ^ ] ] ] / ( _ : < [ } | 1 2 3 4 5 6 ^ ] ] ] 7 8 ] ] ] ] ] ] ] ] ] ] ", ". . . . . . . . . . . . . . 9 . . . 0 a b c d e f g 2 h } i j 0 9 . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . . k l m n o p 3 q h r s t u v . . . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . 9 w x y z : _ A B C D E F G 0 . . H 9 . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . I 9 . J t z % D K L d d r | M ( N 9 . O H . . . . . . . . . . . . ", ". . . . . . . . . . . . . . P > 9 . ] Q R S f D L T 4 e } U V 7 9 . H 9 . . . . . . . . . . . . ", ". . . . . P P . . . . . . 9 P W . . X Y Z e ` + .( ..d 3 +.@.#.. . . . O H . . . . . . . . . . ", ". . . . . @ @ . . . . . . W P . . . P $.%.&.*.=.-.k ;.>.,.'.X @ . . . . ).O . . . . . . . . . . ", ". . . . . @ @ . . . . . . P 9 . . . . 9 . !.P . . . . . ~.{.. . . . . . ].I . . . . . . . . . . ", ". . . . . O O . . . . . . . . . . . P O ^./.$.H H H H W (._.P . . . . . :.<.. . . . . . . . . . ", ". . . . . H H . . . . . . . . . . . O [.}.|.Y 1.6 6 1.2.3.4.5.P . . . . 6.I . . . . . . . . . . ", ". . . . . . . . . . . . . . 9 9 . . ).u } A 4 7.8.9.7.: D d ~.W . . . 9 H 9 . . . . . . . . . . ", ". . . . . . . . . . . . . . H 0.. . a.b.&.c.d.o D L L e._ + f.g.9 . 0.@ . . . . . . . . . . . . ", ". . . . . . . . . . . . . . 9 0.9 . h.F c ` i.j.A e.k.2 l.C Q / 9 9 m.@ . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . n.P . o.p.f.% q.A g e.q e e Z r.s.@ @ m.P . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . 9 . . t.u.+ v.B i.Z w.: L d.|.x.7 O 9 P . I 9 . . . . . . . . . . ", ". . . . . . . . . . . . . H O @ . . y.z.c.v.A.+ b b ,.B.e.[ C.D.9 . . 9 <.9 . . . . . . . . . . ", ". . . . . . . . . . . . . H D.n.. . E.,.o B.e.A.!.z ..F.L 3 Z [.9 . W H . . . . . . . . . . . . ", ". . . . . . . . . . . . . . P n.9 . 1.c G.H.g F.k.g e.A ` 9.I.J.W . O W . . . . . . . . . . . . ", ". . . . . . . . . . . . . . W m.. W t.K.1 L.i.2 h i.v.D ..1 +.^ O 9 0.D.. . . . . . . . . . . . ", ". . . . . . . . . . . . . . H O P > M.5 t p.< g g D d.i.1 Q N.O.O @ ).D.. . . . . . . . . . . . ", ". . . . . . . . . . . . . . 9 P.H W o.Q.C p l.v.q R.i.i.d 1 S.T.I 9 P . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . O H . U.t +.l.V.V.e.W.k.r } S }.X.<.P W . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . 9 . 1.x U g 2 Y.g g g D 3 l.Z.v H . 9 . D.H . . . . . . . . . . ", ". . . . . 9 9 . . . . . . 9 9 . . . O -.> 4 @.C.`. +C.}.!..+W 0.. . . . w <.. . . . . . . . . . ", ". . . . . W W . . . . . . P 9 . . . . P 9 % y.<.<.0.I m.++@+@ . . . . . :.<.. . . . . . . . . . ", ". . . . . 9 9 . . . . . . H 9 . . . O t.S.f ,.#+j u.$+n c.z +I 9 . . . > @ . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . . X ( | H.v.%+D 4 &+v.` d n *+W . 9 9 9 . . . . . . . . . . . ", ". . . . . . . . . . . . . . . . . . y.=+G.G.h [ F.d.j.A b +.-+;+P . 9 . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . H . . ] >+C U L B.k.e.h k.s b i *.O . 9 W . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . D.P . %.M -+,+o d.i.A q 2 /.3.s +0.W n.0.. . . . . . . . . . . . ", ". . . . . . . . . . . . . . H @ 9 . ] '+c V.L e.A 2 D B.S C i )+O 9 H 9 . . . . . . . . . . . . ", ". . . . . . . . . . . . . . O O . . !+f._ l.e.d.g 2 D e.S &.K.s.P.. . . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . P . 9 ~+f.E {+h d.e.g g L % !.R ]+D.9 P . . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . O 9 O h.7.9.l.v.k.L B T 2 T ^+3.J.0.. 9 9 . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . /+I D.X.Q L.e g q v.B.v.D B &.i (+P.W P.9 . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . D.I O _+b /.A.2 d.v.F.d.A : %+L.T.0.O /+H . . . . . . . . . . . . ", ". . . . . . . . . . . . . . . m.P . ;.Q + 3 f A h F.q d : } :+<+W H m.W . . . . . . . . . . . . ", ". . . . . . . . . . . . . H 9 I 9 . [+a p v.g k.o % e i.B.j.p.J.O . H 9 W P . . . . . . . . . . ", ". . . . . . . . . . . . . I H . . . O 5.}+o |+t 1+X.C..+,+p.8 ).9 . . . y.0.. . . . . . . . . . ", ". . . . . 9 9 . . . . . . P 9 . . . . . . p X D.9 P O <.~.2+. . . . . . :.<.. . . . . . . . . . ", ". . . . . @ @ . . . . . . . . . . . . . . &.I . . . . . ~.T.. . . . . . #.P.. . . . . . . . . . "}; /* XPM */ const char *flarq_icon[] = { /* columns rows colors chars-per-pixel */ "48 35 924 2", " c None", ". c #5B1E0E", "+ c #7F381B", "@ c #A7624B", "# c #A8624E", "$ c #652012", "% c #90555F", "& c #AA7A86", "* c #D4B5BE", "= c #5E231C", "- c #540900", "; c #AC5D55", "> c #B4644F", ", c #CF7F58", "' c #FCAD85", ") c #FBB18F", "! c #BA7057", "~ c #965140", "{ c #4F1509", "] c #3B1314", "^ c #45151B", "/ c #895156", "( c #AB8687", "_ c #D7C6C1", ": c #FFFFFD", "< c #FFFFFE", "[ c #A58088", "} c #945D68", "| c #642D34", "1 c #AC6352", "2 c #A45C49", "3 c #A35B46", "4 c #CC8C74", "5 c #F4B8A0", "6 c #FAC5A8", "7 c #FFD4B3", "8 c #FFD8B8", "9 c #FFDCBD", "0 c #FFCFAC", "a c #E7A380", "b c #A2563C", "c c #984D37", "d c #A2787A", "e c #997474", "f c #AA8B91", "g c #D1C0C6", "h c #CAB3BD", "i c #FBE6F1", "j c #F9FFFF", "k c #F8FAFA", "l c #FEFFFF", "m c #F3F2EF", "n c #E9D7D9", "o c #AC9092", "p c #AC8C8D", "q c #926A6E", "r c #9A737B", "s c #9B747C", "t c #9E573C", "u c #98543D", "v c #9A5F47", "w c #BF8469", "x c #E9AE90", "y c #FFCAA8", "z c #FFD9B6", "A c #FFDFBA", "B c #FDE1BA", "C c #FDDEB8", "D c #FEDBBB", "E c #FBDBC3", "F c #F8DBC5", "G c #FFDCC3", "H c #FFD1AF", "I c #FBB891", "J c #E79B74", "K c #9A4E30", "L c #9B5644", "M c #7D4F54", "N c #D0BCBE", "O c #F5EDE7", "P c #FCF4EE", "Q c #FFFAFC", "R c #FFFFFF", "S c #C7BDC6", "T c #C4B0BD", "U c #F4F3F8", "V c #FDFCFF", "W c #FFFDFF", "X c #F7FFFF", "Y c #DEDCDC", "Z c #E6E1E1", "` c #FFFAF9", " . c #FFF3F5", ".. c #FFF4F7", "+. c #E2D9DA", "@. c #C1AEB5", "#. c #C5A3AF", "$. c #7B5057", "%. c #7D2F24", "&. c #C87559", "*. c #EA9464", "=. c #FFA873", "-. c #FFB886", ";. c #FFC193", ">. c #FBBD92", ",. c #FBBE92", "'. c #F9B98A", "). c #FAB784", "!. c #F8AE77", "~. c #F9AC76", "{. c #F3A97B", "]. c #F3BB97", "^. c #FDD7BD", "/. c #FEDCC3", "(. c #FFDBB4", "_. c #FED2A6", ":. c #FEBF94", "<. c #E89574", "[. c #D07355", "}. c #C06F4F", "|. c #C09581", "1. c #F0F1E9", "2. c #E8FBF4", "3. c #EEF9F3", "4. c #FDFDFE", "5. c #FDF8FE", "6. c #EFE7ED", "7. c #A6969F", "8. c #F2E9EF", "9. c #F7F9F9", "0. c #FEFDFF", "a. c #B2A3AC", "b. c #CBBFC7", "c. c #FCFBFE", "d. c #F9F6F8", "e. c #F5F8F7", "f. c #F6FFFF", "g. c #69302D", "h. c #5D0100", "i. c #A0402C", "j. c #CC7D59", "k. c #BF6F4E", "l. c #C16645", "m. c #F6996A", "n. c #FCA264", "o. c #F8995F", "p. c #F3925E", "q. c #F29968", "r. c #F29F71", "s. c #E79469", "t. c #C26640", "u. c #CF6A43", "v. c #FD9366", "w. c #FF9B68", "x. c #F99B63", "y. c #F19F6E", "z. c #EEAB80", "A. c #F8C59B", "B. c #FBD3AB", "C. c #FCD2AA", "D. c #FCD9B1", "E. c #F8D1AA", "F. c #F9C596", "G. c #FFB371", "H. c #FEAC6B", "I. c #D69B78", "J. c #EAD5D1", "K. c #ECF6FA", "L. c #F1FAFB", "M. c #FFFBFF", "N. c #FDF4FB", "O. c #FDFAFB", "P. c #D3CACE", "Q. c #D8C7CE", "R. c #F6FAF8", "S. c #FEFCFF", "T. c #C4B4C0", "U. c #D3C8D3", "V. c #FAFBFF", "W. c #FBFBFF", "X. c #FBFDFF", "Y. c #F7FEFF", "Z. c #F8DEDA", "`. c #B76C57", " + c #D76E4E", ".+ c #F89463", "++ c #F9A36A", "@+ c #FFB783", "#+ c #F5A27A", "$+ c #D0744E", "%+ c #EB9060", "&+ c #E68655", "*+ c #EA8855", "=+ c #F1935B", "-+ c #F0975D", ";+ c #D27B43", ">+ c #E18450", ",+ c #E98B5A", "'+ c #DD7C50", ")+ c #D07242", "!+ c #F9A06A", "~+ c #FFA771", "{+ c #F6A26B", "]+ c #EE9D67", "^+ c #EEA26D", "/+ c #F2AA77", "(+ c #ECA776", "_+ c #EDAC7B", ":+ c #EEB17D", "<+ c #F1A55D", "[+ c #FFA45C", "}+ c #DC855E", "|+ c #D9A3A2", "1+ c #F5F0FC", "2+ c #E9F7FA", "3+ c #F6FDFE", "4+ c #FDFBFE", "5+ c #F8F9F9", "6+ c #D1CFD0", "7+ c #CCB9C0", "8+ c #F9FAF9", "9+ c #FBFAFC", "0+ c #F7F0F5", "a+ c #D7C6D1", "b+ c #E7E0EB", "c+ c #EAF4FB", "d+ c #F1F9FD", "e+ c #F9FEFF", "f+ c #F2FCFB", "g+ c #F6F5F5", "h+ c #CA9E8E", "i+ c #F4A27A", "j+ c #FAA77A", "k+ c #F6B280", "l+ c #F5C896", "m+ c #FED8AD", "n+ c #FFCFAB", "o+ c #FFCCA8", "p+ c #F8C39B", "q+ c #F5BC9C", "r+ c #F2B48F", "s+ c #ECA878", "t+ c #F3A86C", "u+ c #FCAA68", "v+ c #FAA664", "w+ c #F9A76A", "x+ c #EC9B65", "y+ c #D38048", "z+ c #E69056", "A+ c #E0874E", "B+ c #FAA26B", "C+ c #FAA470", "D+ c #F5A06F", "E+ c #F59E6A", "F+ c #FA9C62", "G+ c #F99A5D", "H+ c #F49E6C", "I+ c #F89E63", "J+ c #FF9D5E", "K+ c #ED8F64", "L+ c #B67466", "M+ c #F5EBF0", "N+ c #E4F6F9", "O+ c #EAFCFA", "P+ c #FDFFFF", "Q+ c #F5F8F8", "R+ c #E6E6E7", "S+ c #BEAAB2", "T+ c #E9E2E6", "U+ c #FCF9FB", "V+ c #DFCFD2", "W+ c #C4AEB7", "X+ c #FAF0F9", "Y+ c #EAF0F6", "Z+ c #F3F8FC", "`+ c #FBFEFF", " @ c #F8F9F8", ".@ c #EADFDD", "+@ c #B47A60", "@@ c #E99560", "#@ c #F3BB8E", "$@ c #FDD8B6", "%@ c #FFDDC1", "&@ c #FDCFB2", "*@ c #FECEAD", "=@ c #FBD0A7", "-@ c #F7D3A7", ";@ c #FAD1AA", ">@ c #F9CAA1", ",@ c #F8C392", "'@ c #FAB179", ")@ c #F9A468", "!@ c #F9A166", "~@ c #F69F67", "{@ c #F9A470", "]@ c #FDA56E", "^@ c #F69A5A", "/@ c #D37536", "(@ c #D1753D", "_@ c #EF9868", ":@ c #F8A67A", "<@ c #F39F71", "[@ c #FB9E68", "}@ c #FF9D60", "|@ c #FA9C65", "1@ c #FAA06B", "2@ c #FA9C63", "3@ c #FDA26C", "4@ c #D5926E", "5@ c #F2DFDA", "6@ c #F0F3FD", "7@ c #EDF3F8", "8@ c #FEFCFC", "9@ c #F9FAFA", "0@ c #F3F4F6", "a@ c #A2929B", "b@ c #C0B1BA", "c@ c #C4B0B0", "d@ c #AC9398", "e@ c #FEF1F8", "f@ c #EEF2F7", "g@ c #F2F3F8", "h@ c #FEF9FB", "i@ c #FBF2F0", "j@ c #EFD9D8", "k@ c #E09D81", "l@ c #F0A268", "m@ c #F9CCA1", "n@ c #FDD3B7", "o@ c #F2B094", "p@ c #F3A377", "q@ c #F5A66E", "r@ c #F4A873", "s@ c #F3A476", "t@ c #F4A66D", "u@ c #F6A367", "v@ c #F9A269", "w@ c #FBA169", "x@ c #FD9F69", "y@ c #FC9F69", "z@ c #FC9F68", "A@ c #F99F65", "B@ c #F4A471", "C@ c #F9B385", "D@ c #F6A36E", "E@ c #F19359", "F@ c #D1743D", "G@ c #E3905E", "H@ c #F5A370", "I@ c #F59F69", "J@ c #FAA062", "K@ c #FBA05E", "L@ c #F8A26B", "M@ c #F9A46F", "N@ c #FAA160", "O@ c #EA9C62", "P@ c #C3998A", "Q@ c #F7EBFA", "R@ c #EEEAF8", "S@ c #F6F4F6", "T@ c #FCFEFF", "U@ c #F4F4F7", "V@ c #E4DCE3", "W@ c #D4C1CD", "X@ c #F2F5FA", "Y@ c #AEA19F", "Z@ c #C2B0B5", "`@ c #F9F8FC", " # c #E5F2F8", ".# c #EAF5FB", "+# c #F0F5F5", "@# c #F9F7F7", "## c #D3B3A9", "$# c #DF916B", "%# c #FAA76E", "&# c #F3B787", "*# c #F0AE84", "=# c #EE9D6B", "-# c #F6A15D", ";# c #F7A559", "># c #F9A160", ",# c #FE9B68", "'# c #FD9D67", ")# c #FC9F67", "!# c #FA9F69", "~# c #F9A06C", "{# c #F69F6A", "]# c #F5A067", "^# c #F9A464", "/# c #F5A35C", "(# c #E9A779", "_# c #F8D5C1", ":# c #FFCEAA", "<# c #FAB079", "[# c #E1884B", "}# c #CD713A", "|# c #F39961", "1# c #FAA56C", "2# c #F8A668", "3# c #FFA864", "4# c #EF9965", "5# c #E59462", "6# c #FBA360", "7# c #F49958", "8# c #BE8469", "9# c #E7DAE0", "0# c #EFF2FB", "a# c #EBF0F3", "b# c #FBFEFE", "c# c #F6F6FA", "d# c #FAF3FA", "e# c #B7A0AF", "f# c #C4C0C8", "g# c #D4CECD", "h# c #DED5DD", "i# c #EEF5FC", "j# c #E4F0FD", "k# c #E6F2FC", "l# c #EBF5FB", "m# c #EAE0E9", "n# c #B67A69", "o# c #ED8F5B", "p# c #FCA368", "q# c #F59E66", "r# c #F9A067", "s# c #F9A165", "t# c #F99F66", "u# c #FAA069", "v# c #FAA169", "w# c #FAA166", "x# c #F8A264", "y# c #F7A262", "z# c #F9A162", "A# c #F59E5E", "B# c #FCA464", "C# c #F0A172", "D# c #F8C7AA", "E# c #FFDFBE", "F# c #F7D7AF", "G# c #F7C497", "H# c #F19C6B", "I# c #DC7947", "J# c #E48552", "K# c #DD8553", "L# c #BF6033", "M# c #E28B60", "N# c #E99B6D", "O# c #F2A367", "P# c #FA9F60", "Q# c #E89874", "R# c #E2CBBF", "S# c #E9F6F7", "T# c #EAF1FA", "U# c #F6F6FB", "V# c #FAF9FC", "W# c #F9F1FA", "X# c #BBABB5", "Y# c #BDAEB7", "Z# c #DDCBCC", "`# c #FBF1F9", " $ c #EFEAF7", ".$ c #E9EFFC", "+$ c #EAF0FC", "@$ c #F1F6FE", "#$ c #E2CDCB", "$$ c #D28869", "%$ c #FFA26B", "&$ c #F99F64", "*$ c #FAA065", "=$ c #FAA167", "-$ c #FAA168", ";$ c #F9A066", ">$ c #F7A168", ",$ c #F7A167", "'$ c #F7A165", ")$ c #F9A163", "!$ c #FB9F63", "~$ c #FA9E65", "{$ c #F89D64", "]$ c #FEA667", "^$ c #F4B072", "/$ c #FBD2AB", "($ c #FBDFCB", "_$ c #F9DECA", ":$ c #FBCBAA", "<$ c #EFA579", "[$ c #D3764B", "}$ c #AE4621", "|$ c #EA865A", "1$ c #F8A674", "2$ c #F8A16F", "3$ c #FAA66A", "4$ c #E38A65", "5$ c #D5AFA0", "6$ c #F1FDFF", "7$ c #E9EFFF", "8$ c #EEEDFC", "9$ c #F5F4FD", "0$ c #F0EDF6", "a$ c #F5E9EF", "b$ c #C6AFB4", "c$ c #A28385", "d$ c #FFF7FE", "e$ c #F1E8F9", "f$ c #EBEFF9", "g$ c #EBEFFA", "h$ c #F0EFF8", "i$ c #D5B09E", "j$ c #ED9B6E", "k$ c #FDA168", "l$ c #F89F66", "m$ c #F89F65", "n$ c #F6A066", "o$ c #F5A166", "p$ c #F6A065", "q$ c #F8A065", "r$ c #F9A167", "s$ c #FCA06A", "t$ c #F99B68", "u$ c #DA7F51", "v$ c #E88B52", "w$ c #F9A15D", "x$ c #F1AF7D", "y$ c #F8D0B1", "z$ c #FBDCC7", "A$ c #FDDEC9", "B$ c #FED4B9", "C$ c #FBBC9A", "D$ c #E58C65", "E$ c #DB794C", "F$ c #F69F61", "G$ c #FF9F61", "H$ c #FD9D60", "I$ c #FAA163", "J$ c #F79C6E", "K$ c #DCA289", "L$ c #EAE3E3", "M$ c #ECF2FF", "N$ c #E7F0FB", "O$ c #E7F3FA", "P$ c #E7EFF2", "Q$ c #FEF7F9", "R$ c #B49DA0", "S$ c #C0A5A8", "T$ c #F7F6FB", "U$ c #E9EAFB", "V$ c #E9F0F8", "W$ c #E9F0FA", "X$ c #F5F1FA", "Y$ c #DBAD8E", "Z$ c #EF975E", "`$ c #FBA16A", " % c #F7A065", ".% c #F6A165", "+% c #F6A067", "@% c #F6A570", "#% c #F4A673", "$% c #EC9A6C", "%% c #D1794A", "&% c #E68752", "*% c #FDA26F", "=% c #F2A374", "-% c #F9C29B", ";% c #FFE0C1", ">% c #FDDDBC", ",% c #F4C29D", "'% c #E09266", ")% c #D67F46", "!% c #FB9E5C", "~% c #FF9D63", "{% c #FBA972", "]% c #CE805C", "^% c #C8A39D", "/% c #F2F5FD", "(% c #EAF1F4", "_% c #E6F2F3", ":% c #E6F5F4", "<% c #E7F1F1", "[% c #EAEDED", "}% c #E6E0E3", "|% c #E7F3F7", "1% c #DEF1FD", "2% c #E7F2FB", "3% c #EBF3FB", "4% c #E7D7DC", "5% c #D5916A", "6% c #FCA265", "7% c #F89E68", "8% c #F8A066", "9% c #F29F67", "0% c #EFA56E", "a% c #FBC490", "b% c #F6BC8A", "c% c #E9A26E", "d% c #D8834F", "e% c #E58456", "f% c #FF9B6E", "g% c #FAA16D", "h% c #EDB075", "i% c #F3C790", "j% c #FCD7AD", "k% c #FED4B6", "l% c #F6BB94", "m% c #CE8350", "n% c #D6854A", "o% c #FBA16F", "p% c #F39F6D", "q% c #F1A86D", "r% c #E89568", "s% c #D79F8D", "t% c #F4EDEE", "u% c #F0EEF8", "v% c #ECEEF6", "w% c #ECEFF9", "x% c #ECEDF7", "y% c #F1F0FC", "z% c #F0F4FA", "A% c #E6F2F5", "B% c #DCF5FD", "C% c #E3EBF7", "D% c #F9FBFF", "E% c #C19A96", "F% c #D57E55", "G% c #FDA366", "H% c #F99F67", "I% c #F99F63", "J% c #FA9F63", "K% c #F99E64", "L% c #F8A86F", "M% c #F1A66F", "N% c #F8B985", "O% c #FDD4A2", "P% c #F2BD89", "Q% c #F5A971", "R% c #E28955", "S% c #D97847", "T% c #F69962", "U% c #F4A66A", "V% c #E9A46A", "W% c #F2AA79", "X% c #F9AE84", "Y% c #F6AB7C", "Z% c #EA9B63", "`% c #E49159", " & c #FFA572", ".& c #FBA36B", "+& c #F8A363", "@& c #FFA66F", "#& c #CE7F5A", "$& c #E9CAC3", "%& c #F2F3FF", "&& c #EBEDFD", "*& c #F1EFFF", "=& c #F8F1FF", "-& c #FAEFFE", ";& c #FDF8FF", ">& c #FCF4F9", ",& c #F4F9FA", "'& c #F9F7FF", ")& c #FDE9EB", "!& c #D99781", "~& c #F59668", "{& c #F8A165", "]& c #F8A164", "^& c #F7A063", "/& c #F9A164", "(& c #FBA069", "_& c #D98350", ":& c #DA8954", "<& c #E79A68", "[& c #FAB887", "}& c #F6B181", "|& c #F5A46D", "1& c #F4A15F", "2& c #E6914E", "3& c #D37D41", "4& c #EA9569", "5& c #F8A078", "6& c #FC9E6C", "7& c #FE9D5C", "8& c #FF9F5B", "9& c #FFA46B", "0& c #E58B5F", "a& c #F09769", "b& c #F39562", "c& c #F09762", "d& c #EF9A6A", "e& c #D67F58", "f& c #BB8678", "g& c #F6F6FF", "h& c #F7F4FF", "i& c #EADFE9", "j& c #D8C4CE", "k& c #DABEC8", "l& c #E3C8DB", "m& c #E9CAD1", "n& c #ECD7D4", "o& c #EEDFE4", "p& c #B98787", "q& c #D9805B", "r& c #F9A266", "s& c #F6A360", "t& c #F79E64", "u& c #F6A466", "v& c #F6A465", "w& c #F9A065", "x& c #FD9E67", "y& c #DC7E4D", "z& c #C7693C", "A& c #ED9167", "B& c #F4976B", "C& c #FBA160", "D& c #FFAC67", "E& c #F49B60", "F& c #D6784A", "G& c #E5895F", "H& c #F09662", "I& c #FFA866", "J& c #FFAD6E", "K& c #E07F5D", "L& c #7B2B1B", "M& c #853D24", "N& c #963E27", "O& c #8D472B", "P& c #824730", "Q& c #843A2A", "R& c #712A23", "S& c #BA9092", "T& c #DABABA", "U& c #8B6E6B", "V& c #4D3232", "W& c #5D2D3D", "X& c #68353A", "Y& c #734744", "Z& c #6A4A4C", "`& c #663235", " * c #934833", ".* c #DF8766", "+* c #F99766", "@* c #FB9E61", "#* c #FFA66E", "$* c #FCA16D", "%* c #F99E69", "&* c #F7A169", "** c #F3A266", "=* c #F4A365", "-* c #FB9F68", ";* c #F6A16A", ">* c #F6A16B", ",* c #FCA06C", "'* c #FC9D69", ")* c #FF9D6B", "!* c #FF9E6C", "~* c #F69563", "{* c #D67949", "]* c #D47348", "^* c #F79567", "/* c #FA9F68", "(* c #F9A265", "_* c #FFA166", ":* c #FC9B65", "<* c #E98D5B", "[* c #C4683A", "}* c #BE6339", "|* c #B06D4E", "1* c #732F25", "2* c #64201E", "3* c #8B463B", "4* c #B6573A", "5* c #D06B39", "6* c #D37A42", "7* c #F4986B", "8* c #FC9C73", "9* c #F99F6C", "0* c #F4A766", "a* c #F1A561", "b* c #F49E63", "c* c #FB9E6B", "d* c #F7A069", "e* c #F9A16A", "f* c #FCA16C", "g* c #FE9F6C", "h* c #FFA06C", "i* c #FBA468", "j* c #F49D5F", "k* c #ED925B", "l* c #C86A3A", "m* c #DF8653", "n* c #FBA26F", "o* c #F9A369", "p* c #FFA673", "q* c #F6936D", "r* c #7C1705", "s* c #7C3625", "t* c #C76E51", "u* c #DE7B53", "v* c #CA693D", "w* c #BF633B", "x* c #E88C57", "y* c #E98E54", "z* c #F9A267", "A* c #FEA86F", "B* c #F4A167", "C* c #F6A362", "D* c #F19C5B", "E* c #DD8848", "F* c #E89255", "G* c #E68F53", "H* c #F49D63", "I* c #FEA76D", "J* c #FCA36A", "K* c #FAA466", "L* c #F29B5B", "M* c #EC8E5C", "N* c #DB8154", "O* c #D6874F", "P* c #E79659", "Q* c #FFA778", "R* c #D07B64", "S* c #6E1913", "T* c #6C1F18", "U* c #963729", "V* c #EC9366", "W* c #FFB374", "X* c #E98F56", "Y* c #B24C23", "Z* c #ED8661", "`* c #E78B58", " = c #FAA561", ".= c #F8A262", "+= c #F6A164", "@= c #F7A466", "#= c #E49459", "$= c #C16E36", "%= c #E08C58", "&= c #E1895C", "*= c #EF9265", "== c #FFA372", "-= c #FEA36A", ";= c #F5A268", ">= c #F6AA6A", ",= c #DC8545", "'= c #D47440", ")= c #C87153", "!= c #69241A", "~= c #AB5E46", "{= c #E88666", "]= c #E37B53", "^= c #D26E43", "/= c #F4996C", "(= c #CC6C39", "_= c #E5834A", ":= c #F39462", "<= c #FA9F6F", "[= c #F6A16D", "}= c #F49F6B", "|= c #F69E6D", "1= c #DD7F55", "2= c #C7653C", "3= c #E7825E", "4= c #E4895D", "5= c #F1A364", "6= c #FFAC66", "7= c #FEA067", "8= c #CD7151", "9= c #6E2215", "0= c #7F2427", "a= c #902F20", "b= c #E5895A", "c= c #FFB175", "d= c #F2915D", "e= c #B7522B", "f= c #C05D34", "g= c #D67649", "h= c #F69E68", "i= c #FDA46B", "j= c #FCA069", "k= c #FFA46E", "l= c #F49460", "m= c #EB8E5D", "n= c #D06F41", "o= c #C9683C", "p= c #D67D55", "q= c #A55135", "r= c #682616", "s= c #8F4C2E", "t= c #DE8C68", "u= c #CA6E51", "v= c #C4654C", "w= c #FFA579", "x= c #F09360", "y= c #CC7345", "z= c #DA844C", "A= c #EE9556", "B= c #F59D5E", "C= c #FFB174", "D= c #FFB075", "E= c #FFB073", "F= c #FFA472", "G= c #B85D49", "H= c #6C1515", "I= c #8B5446", "J= c #73251B", "K= c #95402C", "L= c #E48F68", "M= c #FFAA79", "N= c #F59D70", "O= c #EB9061", "P= c #E48A59", "Q= c #C57046", "R= c #B26340", "S= c #B16947", "T= c #B36943", "U= c #A65D40", "V= c #7B3629", "W= c #6A230D", "X= c #BA6848", "Y= c #D57C5E", "Z= c #D1745E", "`= c #CE7260", " - c #923C2D", ".- c #84382F", "+- c #813F39", "@- c #7B423B", " ", " ", " ", " ", " . + @ # $ % & * ", " = - ; > , ' ) ! ~ { ] ^ / ( _ : < ", "[ } | 1 2 3 4 5 6 7 8 9 0 a b c d e f g h i j k l ", "m n o p q r s t u v w x y z A B C D E F G H I J K L M N O P Q R S T U V W ", "X Y Z ` ...+.@.#.$. %.&.*.=.-.;.>.,.'.).!.~.{.].^./.9 (._.:.<.[.}.|.1.2.3.4.5.6.7.8.9.0.", "R a.b.c.d.e.f.R W g.h.i.j.k.l.m.n.o.p.q.r.s.t.u.v.w.x.y.z.A.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R.S.", "R T.U.V.W.X.Y.V Z.`. +.+++@+#+$+%+&+*+=+-+;+>+,+'+)+!+~+{+]+^+/+(+_+:+<+[+}+|+1+2+3+4+5+6+7+8+9+", "0+a+b+c+d+e+f+g+h+i+j+k+l+m+n+o+p+q+r+s+t+u+v+w+x+y+z+A+B+C+D+E+F+G+H+I+J+K+L+M+N+O+P+Q+R+S+T+U+", "V+W+X+Y+Z+`+ @.@+@@@#@$@%@&@*@=@-@;@>@,@'@)@!@~@{@]@^@/@(@_@:@<@[@}@|@1@2@3@4@5@6@7@8@9@0@a@b@R ", "c@d@e@f@g@h@i@j@k@l@m@n@o@p@q@r@s@t@u@v@w@x@y@z@A@B@C@D@E@F@G@H@I@J@K@L@M@N@O@P@Q@R@S@T@U@V@W@X@", "Y@Z@`@ #.#+#@###$#%#&#*#=#-#;#>#,#'#)#!#~#{#]#^#/#(#_#:#<#[#}#|#1#2#3#4#5#6#7#8#9#0#a#b#c#d#e#f#", "g#h#i#j#k#l#m#n#o#p#~@q#r#s#s#s#t#u#v#w#x#y#z#A#B#C#D#E#F#G#H#I#J#K#L#M#N#O#P#Q#R#S#T#U#V#W#X#Y#", "Z#`# $.$+$@$#$$$%$&$&$*$=$-$r#r#;$>$,$'$)$)$!$~${$]$^$/$($_$:$<$[$}$|$1$2$~@3$4$5$6$7$8$9$0$a$b$", "c$d$e$f$g$h$i$j$k$A@;$=$;$;$l$m$m$n$o$p$q$r$s$t$u$v$w$x$y$z$A$B$C$D$E$F$G$H$I$J$K$L$M$N$O$P$Q$R$", "S$T$U$V$W$X$Y$Z$`$;$=$;$=$=$;$;$;$ % %.% %+%@%#%$%%%&%*%=%-%D ;%>%,%'%)%!%~%t#{%]%^%/%(%_%:%<%[%", "}%|%1%2%3%4%5%6%7%r#=$m$;$;$=$;$8%&$&$q$+%9%0%a%b%c%d%e%f%g%h%i%j%k%l%m%n%o%p%q%r%s%t%u%v%w%x%y%", "z%A%B%C%D%E%F%G%H%=$=$;$;$;$=$;$m$I%J%K%v@L%M%N%O%P%Q%R%S%T%U%V%W%X%Y%Z%`% &.&+&@&#&$&%&&&*&=&-&", ";&>&,&'&)&!&~&{&]&;$;$;$;$;$;$;$;$^&/&K%(&_&:&<&[&}&|&1&2&3&4&5&6&7&8&9&0&a&b&c&d&e&f&g&h&i&j&k&", "l&m&n&o&p&q&=.r&s&t&t&r$;$;$m$;$r$u&v&w&x&t$y&z&A&B&x@C&D&E&F&G&H&I&J&K&L&M&N&O&P&Q&R&S&T&U&V& ", "W&X&Y&Z&`& *.*+*@*#*$*%*&***=*A@-*;*>*,*'*)*!*~*{*]*^*/*(*_*:*<*[*}*|*1* 2* ", " 3*4*5*6*7*8*9*0*a*b*c*d*e*f*g*h*z@i*j*k*l*m*n*8%o*p*q*r* ", " s*t*u*v*w*x*y*z*A*B*C*D*E*F*G*H*I*J*K*L*M*N*O*P*Q*R*S* ", " T*U*V*W*X*Y*Z*`* =.=+=@=#=$=%=&=*===-=;=>=,='=)=!= ", " ~={=]=^=/=(=_=:=<=n*[=}=|=1=2=3=4=5=6=7=8=9= ", " 0=a=b=c=d=e=f=g=o%h=i=j=k=l=m=n=o=p=q=r= ", " s=t=u=v=w=x=y=z=A=B=C=D=E=F=G=H= ", " I=J=K=L=M=N=O=P=Q=R=S=T=U=V= ", " W=X=Y=Z=`= -.-+-@- ", " ", " ", " "}; flrig-1.3.24/src/support/0000755000175000017500000000000012650266613012217 500000000000000flrig-1.3.24/src/support/xml_io.cxx0000644000175000017500000003546412646444222014165 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include "xml_io.h" #include "support.h" #include "debug.h" #include "rig.h" #include "rigs.h" #include "rigbase.h" #include "threads.h" #include "XmlRpc.h" using namespace std; using XmlRpc::XmlRpcValue; extern char *print(FREQMODE); extern queue queA; extern queue queB; extern queue quePTT; queue qfreq; static const double TIMEOUT = 1.0; // these are get only static const char* main_get_trx_state = "main.get_trx_state"; // these are set only static const char* main_set_tx = "main.tx"; static const char* main_set_rx = "main.rx"; static const char* rig_set_name = "rig.set_name"; static const char* rig_set_modes = "rig.set_modes"; static const char* rig_set_bandwidths = "rig.set_bandwidths"; static const char* rig_take_control = "rig.take_control"; static const char* rig_release_control = "rig.release_control"; // these are get/set static const char* main_get_frequency = "main.get_frequency"; static const char* main_set_wf_sideband = "main.set_wf_sideband"; static const char* rig_set_frequency = "rig.set_frequency"; static const char *rig_set_smeter = "rig.set_smeter"; static const char *rig_set_pwrmeter = "rig.set_pwrmeter"; static const char* rig_set_mode = "rig.set_mode"; static const char* rig_get_mode = "rig.get_mode"; static const char* rig_set_bandwidth = "rig.set_bandwidth"; static const char* rig_get_bandwidth = "rig.get_bandwidth"; static const char* rig_set_notch = "rig.set_notch"; static const char* rig_get_notch = "rig.get_notch"; static XmlRpc::XmlRpcClient* client; static XmlRpcValue* status_query; #define RIG_UPDATE_INTERVAL 100 // milliseconds #define CHECK_UPDATE_COUNT (2000 / RIG_UPDATE_INTERVAL) bool run_digi_loop = true; bool fldigi_online = false; bool rig_reset = false; int err_count = 5; bool ptt_on = false; int ignore = 0; // skip next "ignore" read loops int try_count = CHECK_UPDATE_COUNT; int xml_notch_val = 0; bool xml_notch_on = false; //===================================================================== // socket ops //===================================================================== void open_rig_xmlrpc() { int server_port = atoi(progStatus.server_port.c_str()); client = new XmlRpc::XmlRpcClient( progStatus.server_addr.c_str(), server_port ); // XmlRpc::setVerbosity(5); // Create a value suitable for the system.multicall method, which // accepts a single argument: an array of struct { methodName, params } // where methodName is a string and params is an array of method // arguments. The params member is mandatory so we use a single-element // array containing nil. XmlRpcValue nil(XmlRpc::nil); status_query = new XmlRpcValue; const char* status_methods[] = { main_get_trx_state, main_get_frequency, rig_get_mode, rig_get_bandwidth }; for (size_t i = 0; i < sizeof(status_methods)/sizeof(*status_methods); i++) { (*status_query)[0][i]["methodName"] = status_methods[i]; (*status_query)[0][i]["params"][0] = nil; }; } void close_rig_xmlrpc() { guard_lock gl_xmlclose(&mutex_xmlrpc, 100); delete client; client = NULL; delete status_query; status_query = NULL; } static inline void execute(const char* name, const XmlRpcValue& param, XmlRpcValue& result) { if (client) if (!client->execute(name, param, result, TIMEOUT)) throw XmlRpc::XmlRpcException(name); } // -------------------------------------------------------------------- // send functions // -------------------------------------------------------------------- void send_modes() { if (!selrig->modes_ || !fldigi_online) return; XmlRpcValue modes, res; int i = 0; for (const char** mode = selrig->modes_; *mode; mode++, i++) { modes[0][i] = *mode; } try { execute(rig_set_modes, modes, res); ignore = 2; err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } void send_bandwidths() { if (!selrig->bandwidths_ || !fldigi_online) { return; } XmlRpcValue bandwidths, res; int i = 0; for (const char** bw = selrig->bandwidths_; *bw; bw++, i++) { bandwidths[0][i] = *bw; } try { execute(rig_set_bandwidths, bandwidths, res); ignore = 2; err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } void send_name() { if (!fldigi_online) return; try { XmlRpcValue res; execute(rig_set_name, XmlRpcValue(selrig->name_), res); ignore = 2; err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } void send_ptt_changed(bool PTT) { if (!fldigi_online) return; try { XmlRpcValue res; execute((PTT ? main_set_tx : main_set_rx), XmlRpcValue(), res); ignore = 2; err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } void send_new_freq(long freq) { if (!fldigi_online) return; try { xmlvfo.freq = freq; XmlRpcValue f((double)freq), res; execute(rig_set_frequency, f, res); ignore = 2; err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } void send_smeter_val(int val) { if (!fldigi_online) return; try { XmlRpcValue mval((int)val), res; execute(rig_set_smeter, mval, res); ignore = 2; err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } void send_pwrmeter_val(int val) { if (!fldigi_online) return; try { XmlRpcValue mval((int)val), res; execute(rig_set_pwrmeter, mval, res); ignore = 2; err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } void send_new_notch(int freq) { if (!fldigi_online) return; try { XmlRpcValue i(freq), res; execute(rig_set_notch, i, res); ignore = 2; err_count = 5; if (freq == 0) xml_notch_on = false; else { xml_notch_on = true; xml_notch_val = freq; } } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } void send_xml_freq(long freq) { if (!fldigi_online) return; if (xcvr_name == rig_FT950.name_ && freq > 5300000 && freq < 5500000) freq -= 1500; qfreq.push(freq); } void send_queue() { if (!fldigi_online) return; while (!qfreq.empty()) { send_new_freq(qfreq.front()); qfreq.pop(); } } void send_new_mode(int md) { if (!selrig->modes_ || !fldigi_online) return; try { xmlvfo.imode = md; XmlRpcValue mode(selrig->modes_[md]), res; execute(rig_set_mode, mode, res); ignore = 2; err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } void send_new_bandwidth(int bw) { if (!selrig->bandwidths_ || !fldigi_online) return; try { xmlvfo.iBW = bw; int selbw = (bw > 0x80) ? (bw >> 8 & 0x7F) : bw; XmlRpcValue bandwidth(selrig->bandwidths_[selbw]), res; execute(rig_set_bandwidth, bandwidth, res); ignore = 2; err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } void send_sideband() { if (!fldigi_online) return; try { XmlRpcValue sideband(selrig->get_modetype(vfo.imode) == 'U' ? "USB" : "LSB"), res; execute(main_set_wf_sideband, sideband, res); ignore = 2; err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); } } // -------------------------------------------------------------------- // receive functions // -------------------------------------------------------------------- bool xmlvfo_changed = false; static void check_for_ptt_change(const XmlRpcValue& trx_state) { bool nuptt = (trx_state == "TX"); if (nuptt != ptt_on) { if (XML_DEBUG) { string txstate = trx_state; LOG_ERROR("%s", txstate.c_str()); } ptt_on = nuptt; Fl::awake(setPTT, (void*)ptt_on); } } static void check_for_frequency_change(const XmlRpcValue& freq) { double f = freq; long newfreq = (long)f; if (newfreq != xmlvfo.freq) { xmlvfo.freq = newfreq; xmlvfo_changed = true; } } static bool xmlmode_changed = false; static void check_for_mode_change(const XmlRpcValue& new_mode) { if (!selrig->modes_) return; string smode = new_mode; xmlmode_changed = false; if (smode != selrig->modes_[xmlvfo.imode]) { int imode = 0; while (selrig->modes_[imode] != NULL && smode != selrig->modes_[imode]) imode++; if (selrig->modes_[imode] != NULL && imode != xmlvfo.imode) { xmlvfo.imode = imode; xmlvfo_changed = true; xmlmode_changed = true; } } } static void check_for_bandwidth_change(const XmlRpcValue& new_bw) { if (xmlmode_changed) { xmlvfo.iBW = selrig->def_bandwidth(xmlvfo.imode); if (XML_DEBUG) LOG_ERROR("default BW %d: %s", xmlvfo.iBW, print(xmlvfo)); return; } if (!selrig->bandwidths_ || vfo.iBW == -1 ) return; string sbw = new_bw; if (selrig->has_dsp_controls) { int currlo = xmlvfo.iBW & 0x7F; int currhi = (xmlvfo.iBW >> 8) & 0x7F; string currbw = selrig->bwtable(xmlvfo.imode)[currhi]; if (sbw != currbw) { int ibw = 0; const char **bwt = selrig->bwtable(xmlvfo.imode); while ((bwt[ibw] != NULL) && (sbw != bwt[ibw])) ibw++; if (bwt[ibw] != NULL) { // && ibw != (xmlvfo.iBW & 0x7F)) { xmlvfo.iBW = (ibw << 8) | 0x8000 | currlo; xmlvfo_changed = true; } } } else { if (sbw != selrig->bwtable(xmlvfo.imode)[xmlvfo.iBW]) { int ibw = 0; const char **bwt = &selrig->bwtable(xmlvfo.imode)[0]; while ((bwt[ibw] != NULL) && (sbw != bwt[ibw])) ibw++; if (bwt[ibw] != NULL && ibw != xmlvfo.iBW) { xmlvfo.iBW = ibw; xmlvfo_changed = true; } } } } static void check_for_notch_change(const XmlRpcValue& new_notch) { int ntch = new_notch; if (ntch == 0 && xml_notch_on) xml_notch_on = false; else if (ntch != xml_notch_val ) { xml_notch_on = true; xml_notch_val = ntch; Fl::awake(setNotchControl, (void *)ntch); } } static void push2que() { if (useB) { if (!queB.empty()) { if (XML_DEBUG) LOG_ERROR("B not empty %s", print(xmlvfo)); return; } if (XML_DEBUG) LOG_ERROR("pushed to B %s", print(xmlvfo)); guard_lock gl_xmlqueB(&mutex_queB, 101); queB.push(xmlvfo); } else { if (!queA.empty()) { if (XML_DEBUG) LOG_ERROR("A not empty %s", print(xmlvfo)); return; } if (XML_DEBUG) LOG_ERROR("pushed to A %s", print(xmlvfo)); guard_lock gl_xmlqueA(&mutex_queA, 102); queA.push(xmlvfo); } } void set_fldigi_connect (void *d) { bool b = (long *)d; box_fldigi_connect->color(b ? FL_RED : FL_BACKGROUND2_COLOR); box_fldigi_connect->redraw(); } static void send_rig_info() { XmlRpcValue res; try { execute(rig_take_control, XmlRpcValue(), res); } catch (const XmlRpc::XmlRpcException& e) { throw e; } try { fldigi_online = true; if (!useB) xmlvfo = vfoA; else xmlvfo = vfoB; send_name(); send_modes(); send_new_mode(xmlvfo.imode); send_sideband(); MilliSleep(500); send_bandwidths(); send_new_bandwidth(xmlvfo.iBW); send_new_freq(xmlvfo.freq); rig_reset = false; LOG_ERROR("Connected"); Fl::awake(set_fldigi_connect, (void *)1); err_count = 5; ignore = 2; } catch (const XmlRpc::XmlRpcException& e) { throw e; } } void send_no_rig() { if (!fldigi_online) return; try { XmlRpcValue res; execute(rig_set_name, szNORIG, res); send_bandwidths(); send_modes(); execute(rig_set_mode, "USB", res); XmlRpcValue sideband("USB"); execute(main_set_wf_sideband, sideband, res); execute(rig_release_control, XmlRpcValue(), res); } catch (const XmlRpc::XmlRpcException& e) { throw e; } } static void get_fldigi_status() { if (ignore) { --ignore; return; } XmlRpcValue status; XmlRpcValue param((int)0); string xmlcall; try { xmlcall = "system.multicall"; execute(xmlcall.c_str(), *status_query, status); check_for_ptt_change(status[0][0]); if (!ptt_on) { xmlvfo.src = XML; xmlvfo_changed = false; check_for_frequency_change(status[1][0]); check_for_mode_change(status[2][0]); check_for_bandwidth_change(status[3][0]); if (xmlvfo_changed) push2que(); } err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); if (err_count <= 0) throw e; } if (selrig->has_notch_control) { try { xmlcall = rig_get_notch; execute(xmlcall.c_str(), param, status); check_for_notch_change(status); err_count = 5; } catch (const XmlRpc::XmlRpcException& e) { err_count--; // LOG_ERROR("err count %d: %s", err_count, e.getMessage().c_str()); if (err_count <= 0) throw e; } } } void * digi_loop(void *d) { for (;;) { MilliSleep(RIG_UPDATE_INTERVAL); if (!run_digi_loop) { LOG_ERROR("Exiting digi loop"); try { send_no_rig(); } catch (const XmlRpc::XmlRpcException& e) { break; } break; } if (rig_reset || (!fldigi_online && (--try_count == 0))) { try { guard_lock gl_xmloop(&mutex_xmlrpc, 103); send_rig_info(); } catch (const XmlRpc::XmlRpcException& e) { fldigi_online = false; rig_reset = false; err_count = 5; try_count = CHECK_UPDATE_COUNT; Fl::awake(set_fldigi_connect, (void *)0); } } if (fldigi_online) { try { if (qfreq.empty()) { guard_lock gl_xmloop(&mutex_xmlrpc, 104); get_fldigi_status(); } else { guard_lock gl_xmloop(&mutex_xmlrpc, 105); send_queue(); } } catch (const XmlRpc::XmlRpcException& e) { LOG_ERROR("%s", e.getMessage().c_str()); fldigi_online = false; rig_reset = false; err_count = 5; try_count = CHECK_UPDATE_COUNT; Fl::awake(set_fldigi_connect, (void *)0); } } } return NULL; } flrig-1.3.24/src/support/threads.cxx0000644000175000017500000000375312562731646014332 00000000000000// ---------------------------------------------------------------------------- // threads.cxx // // Copyright (C) 2014 // Stelios Bounanos, M0GLD // David Freese, W1HKJ // // This file is part of fldigi. // // fldigi is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // fldigi is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include "threads.h" /// This ensures that a mutex is always unlocked when leaving a function or block. extern pthread_mutex_t mutex_rcv_socket; extern pthread_mutex_t mutex_serial; extern pthread_mutex_t mutex_xmlrpc; extern pthread_mutex_t mutex_queA; extern pthread_mutex_t mutex_queB; extern pthread_mutex_t mutex_ptt; // Change to 1 to observe guard lock/unlock processing on stdout #define DEBUG_GUARD_LOCK 0 guard_lock::guard_lock(pthread_mutex_t* m, int h) : mutex(m), how(h) { pthread_mutex_lock(mutex); if (how != 0 && DEBUG_GUARD_LOCK) printf("lock %s : %d\n", name(mutex), how); } guard_lock::~guard_lock(void) { pthread_mutex_unlock(mutex); if (how != 0 && DEBUG_GUARD_LOCK) printf("unlock %s : %d\n", name(mutex), how); } const char * guard_lock::name(pthread_mutex_t *m) { if (m == &mutex_ptt) return "PTT"; if (m == &mutex_queA) return "QueA"; if (m == &mutex_queB) return "QueB"; if (m == &mutex_rcv_socket) return "Rcv Socket"; if (m == &mutex_serial) return "Serial"; return "Unknown"; } flrig-1.3.24/src/support/debug.cxx0000644000175000017500000001205412562731646013760 00000000000000// ---------------------------------------------------------------------------- // debug.cxx // // Copyright (C) 2014 // Stelios Bounanos, M0GLD // David Freese, W1HKJ // // This file is part of fldigi. // // fldigi is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // fldigi is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "debug.h" #include "icons.h" #include "gettext.h" #include "rig.h" using namespace std; #define MAX_LINES 65536 static FILE* wfile; static FILE* rfile; static int rfd; static bool tty; static Fl_Double_Window* window; static Fl_Browser* btext; static string buffer; debug* debug::inst = 0; debug::level_e debug::level = debug::ERROR_LEVEL; uint32_t debug::mask = ~0u; const char* prefix[] = { _("Quiet"), _("Error"), _("Warning"), _("Info"), _("Debug") }; static void slider_cb(Fl_Widget* w, void*); static void clear_cb(Fl_Widget *w, void*); void debug::start(const char* filename) { if (debug::inst) return; inst = new debug(filename); window = new Fl_Double_Window(600, 256, _("Event log")); int pad = 2; Fl_Slider* slider = new Fl_Slider(pad, pad, 128, 20, prefix[level]); slider->tooltip(_("Change log level")); slider->align(FL_ALIGN_RIGHT); slider->type(FL_HOR_NICE_SLIDER); slider->range(0.0, LOG_NLEVELS - 1); slider->step(1.0); slider->value(level); slider->callback(slider_cb); Fl_Button* clearbtn = new Fl_Button(window->w() - 60, pad, 60, 20, "clear"); clearbtn->callback(clear_cb); btext = new Fl_Browser(pad, slider->h()+pad, window->w()-2*pad, window->h()-slider->h()-2*pad, 0); window->resizable(btext); buffer.clear(); window->end(); } void debug::stop(void) { delete inst; inst = 0; delete window; } static char fmt[1024]; static char sztemp[1024]; static string estr = ""; bool debug_in_use = false; void debug::log(level_e level, const char* func, const char* srcf, int line, const char* format, ...) { if (!inst) return; if (level > debug::level) return; snprintf(fmt, sizeof(fmt), "%c: %s: %s\n", *prefix[level], func, format); while(debug_in_use) MilliSleep(1); va_list args; va_start(args, format); vsnprintf(sztemp, sizeof(sztemp), fmt, args); estr.append(sztemp); //printf("%s", sztemp); fprintf(wfile, "%s", sztemp); va_end(args); fflush(wfile); Fl::awake(sync_text, 0); } void debug::slog(level_e level, const char* func, const char* srcf, int line, const char* format, ...) { if (!inst) return; if (level > debug::level) return; snprintf(fmt, sizeof(fmt), "%c:%s\n", *prefix[level], format); while(debug_in_use) MilliSleep(1); va_list args; va_start(args, format); vsnprintf(sztemp, sizeof(sztemp), fmt, args); estr.append(sztemp); //printf("%s\n", sztemp); fprintf(wfile, "%s", sztemp); va_end(args); fflush(wfile); Fl::awake(sync_text, 0); } void debug::elog(const char* func, const char* srcf, int line, const char* text) { if (level > debug::level) return; log(ERROR_LEVEL, func, srcf, line, "%s: %s", text, strerror(errno)); } void debug::show(void) { window->show(); } void debug::sync_text(void* arg) { debug_in_use = true; size_t p0 = 0, p1 = estr.find('\n'); while (p1 != string::npos) { btext->insert(1, estr.substr(p0,p1-p0).c_str()); buffer.append(estr.substr(p0, p1 - p0)).append("\n"); p0 = p1 + 1; p1 = estr.find('\n', p0); } estr = ""; debug_in_use = false; } debug::debug(const char* filename) { if ((wfile = fopen(filename, "w")) == NULL) throw strerror(errno); setvbuf(wfile, (char*)NULL, _IOLBF, 0); set_cloexec(fileno(wfile), 1); if ((rfile = fopen(filename, "r")) == NULL) throw strerror(errno); rfd = fileno(rfile); set_cloexec(rfd, 1); #ifndef __WIN32__ int f; if ((f = fcntl(rfd, F_GETFL)) == -1) throw strerror(errno); if (fcntl(rfd, F_SETFL, f | O_NONBLOCK) == -1) throw strerror(errno); #endif tty = isatty(fileno(stderr)); } debug::~debug() { fclose(wfile); fclose(rfile); } static void slider_cb(Fl_Widget* w, void*) { debug::level = (debug::level_e)((Fl_Slider*)w)->value(); w->label(prefix[debug::level]); w->parent()->redraw(); } static void clear_cb(Fl_Widget* w, void*) { btext->clear(); buffer.clear(); } flrig-1.3.24/src/support/util.cxx0000644000175000017500000001373712562731646013660 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include "util.h" #ifdef __MINGW32__ # include "compat.h" #endif /* Return the smallest power of 2 not less than n */ uint32_t ceil2(uint32_t n) { --n; n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; return n + 1; } /* Return the largest power of 2 not greater than n */ uint32_t floor2(uint32_t n) { n |= n >> 1; n |= n >> 2; n |= n >> 4; n |= n >> 8; n |= n >> 16; return n - (n >> 1); } #include unsigned long ver2int(const char* version) { unsigned long v; char* p; v = (unsigned long)(strtod(version, &p) * 1e7 + 0.5); while (*p) v += *p++; return v; } /* #if !HAVE_STRCASESTR # include // from git 1.6.1.2 compat/strcasestr.c char *strcasestr(const char *haystack, const char *needle) { int nlen = strlen(needle); int hlen = strlen(haystack) - nlen + 1; int i; for (i = 0; i < hlen; i++) { int j; for (j = 0; j < nlen; j++) { unsigned char c1 = haystack[i+j]; unsigned char c2 = needle[j]; if (toupper(c1) != toupper(c2)) goto next; } return (char *) haystack + i; next: ; } return NULL; } #endif // !HAVE_STRCASESTR */ #if !HAVE_STRLCPY // from git 1.6.1.2 compat/strcasestr.c size_t strlcpy(char *dest, const char *src, size_t size) { size_t ret = strlen(src); if (size) { size_t len = (ret >= size) ? size - 1 : ret; memcpy(dest, src, len); dest[len] = '\0'; } return ret; } #endif // !HAVE_STRLCPY #ifdef __WIN32__ int set_cloexec(int fd, unsigned char v) { return 0; } #else # include # include int set_cloexec(int fd, unsigned char v) { int f = fcntl(fd, F_GETFD); return f == -1 ? f : fcntl(fd, F_SETFD, (v ? f | FD_CLOEXEC : f & ~FD_CLOEXEC)); } #endif // __WIN32__ int set_nonblock(int fd, unsigned char v) { #ifndef __WIN32__ int f = fcntl(fd, F_GETFL); return f == -1 ? f : fcntl(fd, F_SETFL, (v ? f | O_NONBLOCK : f & ~O_NONBLOCK)); #else // __WIN32__ u_long v_ = (u_long)v; errno = 0; if (ioctlsocket(fd, FIONBIO, &v_) == SOCKET_ERROR) { errno = WSAGetLastError(); return -1; } else return 0; #endif // __WIN32__ } #ifndef __WIN32__ # include # include # include # include #endif int set_nodelay(int fd, unsigned char v) { int val = v; return setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const char*)&val, sizeof(val)); } #ifdef __WIN32__ # include #endif int get_bufsize(int fd, int dir, int* len) { socklen_t optlen = sizeof(*len); return getsockopt(fd, SOL_SOCKET, (dir == 0 ? SO_RCVBUF : SO_SNDBUF), (char*)len, &optlen); } int set_bufsize(int fd, int dir, int len) { return setsockopt(fd, SOL_SOCKET, (dir == 0 ? SO_RCVBUF : SO_SNDBUF), (const char*)&len, sizeof(len)); } #ifndef __WIN32__ #include #include #ifndef NSIG # define NSIG 64 #endif static size_t nsig = 0; static struct sigaction* sigact = 0; static pthread_mutex_t sigmutex = PTHREAD_MUTEX_INITIALIZER; #endif void save_signals(void) { #ifndef __WIN32__ pthread_mutex_lock(&sigmutex); if (!sigact) sigact = new struct sigaction[NSIG]; for (nsig = 1; nsig <= NSIG; nsig++) if (sigaction(nsig, NULL, &sigact[nsig-1]) == -1) break; pthread_mutex_unlock(&sigmutex); #endif } void restore_signals(void) { #ifndef __WIN32__ pthread_mutex_lock(&sigmutex); for (size_t i = 1; i <= nsig; i++) sigaction(i, &sigact[i-1], NULL); delete [] sigact; sigact = 0; nsig = 0; pthread_mutex_unlock(&sigmutex); #endif } uint32_t simple_hash_data(const unsigned char* buf, size_t len, uint32_t code) { for (size_t i = 0; i < len; i++) code = ((code << 4) | (code >> (32 - 4))) ^ (uint32_t)buf[i]; return code; } uint32_t simple_hash_str(const unsigned char* str, uint32_t code) { while (*str) code = ((code << 4) | (code >> (32 - 4))) ^ (uint32_t)*str++; return code; } #include #include static const char hexsym[] = "0123456789ABCDEF"; static std::vector* hexbuf; const char* str2hex(const unsigned char* str, size_t len) { if (unlikely(len == 0)) return ""; if (unlikely(!hexbuf)) { hexbuf = new std::vector; hexbuf->reserve(192); } if (unlikely(hexbuf->size() < len * 3)) hexbuf->resize(len * 3); char* p = &(*hexbuf)[0]; size_t i; for (i = 0; i < len; i++) { *p++ = hexsym[str[i] >> 4]; *p++ = hexsym[str[i] & 0xF]; *p++ = ' '; } *(p - 1) = '\0'; return &(*hexbuf)[0]; } const char* str2hex(const char* str, size_t len) { return str2hex((const unsigned char*)str, len ? len : strlen(str)); } static std::vector* binbuf; const char* uint2bin(unsigned u, size_t len) { if (unlikely(len == 0)) len = sizeof(u) * CHAR_BIT; if (unlikely(!binbuf)) { binbuf = new std::vector; binbuf->reserve(sizeof(u) * CHAR_BIT); } if (unlikely(binbuf->size() < len + 1)) binbuf->resize(len + 1); for (size_t i = 0; i < len; i++) { (*binbuf)[len - i - 1] = '0' + (u & 1); u >>= 1; } (*binbuf)[len] = '\0'; return &(*binbuf)[0]; } void MilliSleep(long msecs) { #ifndef __WIN32__ struct timespec tv; tv.tv_sec = msecs / 1000; tv.tv_nsec = (msecs - tv.tv_sec * 1000) * 1000000L; nanosleep(&tv, NULL); #else Sleep(msecs); #endif } flrig-1.3.24/src/support/mingw.c0000644000175000017500000001720412562731646013435 00000000000000// ---------------------------------------------------------------------------- // mingw.c // // The following routines were copied from git-1.6.1.2/compat/mingw.c: // git_vsnprintf git_snprintf sleep mingw_getcwd mingw_getenv mingw_rename // // The uname routine was adapted from libgw32c 0.4. // // The rest: // Copyright (C) 2009 // Stelios Bounanos, M0GLD // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include "compat.h" #include "util.h" /* default mode for stdin, stdout and stderr */ unsigned int _CRT_fmode = _O_BINARY; /******************************************************************************/ #if SNPRINTF_RETURNS_BOGUS /* * The size parameter specifies the available space, i.e. includes * the trailing NUL byte; but Windows's vsnprintf expects the * number of characters to write without the trailing NUL. */ #define SNPRINTF_SIZE_CORR 1 #undef vsnprintf int git_vsnprintf(char *str, size_t maxsize, const char *format, va_list ap) { char *s; int ret = -1; if (maxsize > 0) { ret = vsnprintf(str, maxsize-SNPRINTF_SIZE_CORR, format, ap); if (ret == maxsize-1) ret = -1; /* Windows does not NUL-terminate if result fills buffer */ str[maxsize-1] = 0; } if (ret != -1) return ret; s = NULL; if (maxsize < 128) maxsize = 128; while (ret == -1) { maxsize *= 4; str = (char *)realloc(s, maxsize); if (! str) break; s = str; ret = vsnprintf(str, maxsize-SNPRINTF_SIZE_CORR, format, ap); if (ret == maxsize-1) ret = -1; } free(s); return ret; } int git_snprintf(char *str, size_t maxsize, const char *format, ...) { va_list ap; int ret; va_start(ap, format); ret = git_vsnprintf(str, maxsize, format, ap); va_end(ap); return ret; } #endif /* SNPRINTF_RETURNS_BOGUS */ unsigned sleep(unsigned seconds) { Sleep(seconds*1000); return 0; } #undef getcwd char *mingw_getcwd(char *pointer, int len) { int i; char *ret = getcwd(pointer, len); if (!ret) return ret; for (i = 0; pointer[i]; i++) if (pointer[i] == '\\') pointer[i] = '/'; return ret; } #undef getenv char *mingw_getenv(const char *name) { char *result = getenv(name); if (!result && !strcmp(name, "TMPDIR")) { /* on Windows it is TMP and TEMP */ result = getenv("TMP"); if (!result) result = getenv("TEMP"); } return result; } #undef rename int mingw_rename(const char *pold, const char *pnew) { DWORD attrs; /* * Try native rename() first to get errno right. * It is based on MoveFile(), which cannot overwrite existing files. */ if (!rename(pold, pnew)) return 0; if (errno != EEXIST) return -1; if (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING)) return 0; /* TODO: translate more errors */ if (GetLastError() == ERROR_ACCESS_DENIED && (attrs = GetFileAttributes(pnew)) != INVALID_FILE_ATTRIBUTES) { if (attrs & FILE_ATTRIBUTE_DIRECTORY) { errno = EISDIR; return -1; } if ((attrs & FILE_ATTRIBUTE_READONLY) && SetFileAttributes(pnew, attrs & ~FILE_ATTRIBUTE_READONLY)) { if (MoveFileEx(pold, pnew, MOVEFILE_REPLACE_EXISTING)) return 0; /* revert file attributes on failure */ SetFileAttributes(pnew, attrs); } } errno = EACCES; return -1; } /******************************************************************************/ __attribute__((constructor)) static void wsa_init(void) { WSADATA wsa; static int wsa_init_ = 0; if (wsa_init_) return; if (WSAStartup(MAKEWORD(2, 2), &wsa)) { fprintf(stderr, "unable to initialize winsock: error %d", WSAGetLastError()); exit(EXIT_FAILURE); } atexit((void(*)(void)) WSACleanup); wsa_init_ = 1; } int socketpair(int family, int type, int protocol, int *sv) { struct sockaddr_in addr; SOCKET sfd; int err, len = sizeof(addr); if (sv == NULL || family != AF_INET || type != SOCK_STREAM || protocol) { WSASetLastError(WSAEINVAL); return SOCKET_ERROR; } sv[0] = sv[1] = INVALID_SOCKET; if ((sfd = socket(family, type, 0)) == INVALID_SOCKET) return SOCKET_ERROR; memset(&addr, 0, sizeof(addr)); addr.sin_family = family; addr.sin_addr.s_addr = inet_addr("127.0.0.1"); addr.sin_port = 0; /* any port */ if ((err = bind(sfd, (const struct sockaddr*)&addr, sizeof(addr))) == SOCKET_ERROR) { err = WSAGetLastError(); closesocket(sfd); WSASetLastError(err); return SOCKET_ERROR; } if ((err = getsockname(sfd, (struct sockaddr*)&addr, &len)) == SOCKET_ERROR) { err = WSAGetLastError(); closesocket(sfd); WSASetLastError(err); return SOCKET_ERROR; } do { if (listen(sfd, 1) == SOCKET_ERROR) break; if ((sv[0] = WSASocket(family, type, 0, NULL, 0, 0)) == INVALID_SOCKET) break; if (connect(sv[0], (const struct sockaddr*)&addr, sizeof(addr)) == SOCKET_ERROR) break; if ((sv[1] = accept(sfd, NULL, NULL)) == INVALID_SOCKET) break; closesocket(sfd); return 0; } while (0); /* error */ err = WSAGetLastError(); closesocket(sfd); closesocket(sv[0]); closesocket(sv[1]); WSASetLastError(err); return SOCKET_ERROR; } /******************************************************************************/ int nanosleep(const struct timespec *req, struct timespec *rem) { if (unlikely(req->tv_nsec < 0 || req->tv_nsec < 0L || req->tv_nsec > 999999999L)) { errno = EINVAL; return -1; } Sleep(req->tv_sec * 1000 + req->tv_nsec / 1000000L); if (unlikely(rem)) { rem->tv_sec = 0; rem->tv_nsec = 0L; } return 0; } /* BOOL GetOsInfo(LPSTR OsName, LPSTR Release, LPSTR Version); BOOL GetMachInfo(LPSTR MachineName, LPSTR ProcessorName); int uname(struct utsname *name) { char processor[1024]; if (name == NULL) { errno = EINVAL; return -1; } if (gethostname(name->nodename, sizeof(name->nodename)) < 0) { name->nodename[0] = '\0'; errno = ENOSYS; return -1; } if (!GetOsInfo(name->sysname, name->release, name->version)) { strncpy (name->sysname, "win32", sizeof (name->sysname)); strncpy (name->release, "unknown", sizeof (name->release)); strncpy (name->version, "unknown", sizeof (name->version)); } // "windows32" is as yet the only universal windows description allowed // by config.guess and config.sub strncpy(name->sysname, "windows32", sizeof (name->sysname)); if (!GetMachInfo(name->machine, processor)) strncpy(name->machine, "i386", sizeof (name->machine)); return 0; } int getrusage(int who, struct rusage *usage) { FILETIME ct, et, kt, ut; ULARGE_INTEGER uli; if (who != RUSAGE_SELF) { errno = EINVAL; return -1; } if (!usage) { errno = EFAULT; return -1; } if (!GetProcessTimes(GetCurrentProcess(), &ct, &et, &kt, &ut)) { errno = ENOENT; return -1; } // FILETIMEs use 100-ns units memcpy(&uli, &kt, sizeof(FILETIME)); usage->ru_stime.tv_sec = uli.QuadPart / 10000000L; usage->ru_stime.tv_usec = uli.QuadPart % 10000000L; memcpy(&uli, &ut, sizeof(FILETIME)); usage->ru_utime.tv_sec = uli.QuadPart / 10000000L; usage->ru_utime.tv_usec = uli.QuadPart % 10000000L; return 0; } */ flrig-1.3.24/src/support/ptt.cxx0000644000175000017500000000412212562731646013476 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include "threads.h" #include "ptt.h" #include "debug.h" #include "rig_io.h" #include "rig.h" #include "support.h" using namespace std; // used for transceivers with a single vfo, called only by rigPTT static void fake_split(int on) { if (on) { selrig->set_vfoA(vfoB.freq); selrig->set_modeA(vfoB.imode); selrig->set_bwA(vfoB.iBW); } else { selrig->set_vfoA(vfoA.freq); selrig->set_modeA(vfoA.imode); selrig->set_bwA(vfoA.iBW); } } // add fake rit to this function and to set_vfoA ?? void rigPTT(bool on) { // wait_query = true; guard_lock gl_serial(&mutex_serial, 300); if (on && progStatus.split && !selrig->can_split()) fake_split(on); if (progStatus.comm_catptt) { selrig->set_PTT_control(on); } else if (progStatus.comm_dtrptt || progStatus.comm_rtsptt) RigSerial.SetPTT(on); else if (SepSerial.IsOpen() && (progStatus.sep_dtrptt || progStatus.sep_rtsptt) ) SepSerial.SetPTT(on); else LOG_INFO("No PTT i/o connected"); if (!on && progStatus.split && !selrig->can_split()) fake_split(on); // wait_query = false; } flrig-1.3.24/src/support/rig_io.cxx0000644000175000017500000002110612646444222014132 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include "rig.h" #include "support.h" #include "util.h" #include "debug.h" #include "status.h" #include "rigbase.h" #include "rig_io.h" #include "socket_io.h" using namespace std; extern bool test; const char *nuline = "\n"; static int iBaudRates[] = { 300, 600, 1200, 2400, 4800, 9600, 19200, 38400, 57600, 115200, 230400, 460800 }; const char *szBaudRates[] = { "300", "600", "1200", "2400", "4800", "9600", "19200", "38400", "57600", "115200", "230400", "460800", NULL }; int BaudRate(int n) { if (n > (int)sizeof(iBaudRates)) return 1200; return (iBaudRates[n]); } bool startXcvrSerial() { debug::level_e level = debug::level; debug::level = debug::DEBUG_LEVEL; bypass_serial_thread_loop = true; // setup commands for serial port if (progStatus.xcvr_serial_port == "NONE") { bypass_serial_thread_loop = false; return false; } RigSerial.Device(progStatus.xcvr_serial_port); RigSerial.Baud(BaudRate(progStatus.comm_baudrate)); RigSerial.Stopbits(progStatus.stopbits); RigSerial.Retries(progStatus.comm_retries); RigSerial.Timeout(progStatus.comm_timeout); RigSerial.RTSptt(progStatus.comm_rtsptt); RigSerial.DTRptt(progStatus.comm_dtrptt); RigSerial.RTSCTS(progStatus.comm_rtscts); RigSerial.RTS(progStatus.comm_rtsplus); RigSerial.DTR(progStatus.comm_dtrplus); if (!RigSerial.OpenPort()) { LOG_ERROR("Cannot access %s", progStatus.xcvr_serial_port.c_str()); return false; } else { LOG_DEBUG("\n\ Serial port:\n\ Port : %s\n\ Baud : %d\n\ Stopbits : %d\n\ Retries : %d\n\ Timeout : %d\n\ Loop : %d\n\ RTSCTS : %d\n\ CATptt : %d\n\ RTSptt : %d\n\ DTRptt : %d\n\ RTS+ : %d\n\ DTR+ : %d\n", progStatus.xcvr_serial_port.c_str(), progStatus.comm_baudrate, progStatus.stopbits, progStatus.comm_retries, progStatus.comm_timeout, progStatus.serloop_timing, progStatus.comm_rtscts, progStatus.comm_catptt, progStatus.comm_rtsptt, progStatus.comm_dtrptt, progStatus.comm_rtsplus, progStatus.comm_dtrplus ); } RigSerial.FlushBuffer(); debug::level = level; return true; } bool startAuxSerial() { if (progStatus.aux_serial_port == "NONE") return false; AuxSerial.Device(progStatus.aux_serial_port); AuxSerial.Baud(1200); AuxSerial.RTS(progStatus.aux_rts); AuxSerial.DTR(progStatus.aux_dtr); if (!AuxSerial.OpenPort()) { LOG_ERROR("Cannot access %s", progStatus.aux_serial_port.c_str()); return false; } return true; } bool startSepSerial() { if (progStatus.sep_serial_port == "NONE") return false; SepSerial.Device(progStatus.sep_serial_port); SepSerial.Baud(1200); SepSerial.RTSCTS(false); SepSerial.RTS(progStatus.sep_rtsplus); SepSerial.RTSptt(progStatus.sep_rtsptt); SepSerial.DTR(progStatus.sep_dtrplus); SepSerial.DTRptt(progStatus.sep_dtrptt); if (!SepSerial.OpenPort()) { LOG_ERROR("Cannot access %s", progStatus.sep_serial_port.c_str()); return false; } return true; } char replybuff[RXBUFFSIZE+1]; string replystr; int readResponse() { int numread = 0; replystr.clear(); memset(replybuff, 0, RXBUFFSIZE + 1); if (progStatus.use_tcpip) numread = read_from_remote(replystr); else { numread = RigSerial.ReadBuffer(replybuff, RXBUFFSIZE); for (int i = 0; i < numread; replystr += replybuff[i++]); } if (numread) LOG_DEBUG("rsp:%3d, %s", numread, str2hex(replystr.c_str(), replystr.length())); //LOG_WARN("rsp:%3d, %s", numread, str2hex(replystr.c_str(), replystr.length())); return numread; } int sendCommand (string s, int nread) { int numwrite = (int)s.size(); if (progStatus.use_tcpip) { readResponse(); send_to_remote(s, progStatus.byte_interval); int timeout = progStatus.comm_wait + progStatus.tcpip_ping_delay + (int)((nread + progStatus.comm_echo ? numwrite : 0)*11000.0/RigSerial.Baud() ); while (timeout > 0) { if (timeout > 10) MilliSleep(10); else MilliSleep(timeout); timeout -= 10; Fl::awake(); } if (nread == 0) return 0; return readResponse(); } if (RigSerial.IsOpen() == false) { replystr.clear(); return 0; } LOG_DEBUG("cmd:%3d, %s", (int)s.length(), str2hex(s.data(), s.length())); clearSerialPort(); RigSerial.WriteBuffer(s.c_str(), numwrite); int timeout = progStatus.comm_wait + (int)((nread + progStatus.comm_echo ? numwrite : 0)*11000.0/RigSerial.Baud()); while (timeout > 0) { if (timeout > 10) MilliSleep(10); else MilliSleep(timeout); timeout -= 10; Fl::awake(); } if (nread == 0) return 0; return readResponse(); } bool waitCommand( string command, int nread, string info, int msec, char term, int how, int level ) { int numwrite = (int)command.length(); if (nread == 0) LOG_DEBUG("cmd:%3d, %s", numwrite, how == ASC ? command.c_str() : str2hex(command.data(), numwrite)); if (progStatus.use_tcpip) { send_to_remote(command, progStatus.byte_interval); if (nread == 0) return 0; } else { if (RigSerial.IsOpen() == false) { LOG_DEBUG("cmd: %s", how == ASC ? command.c_str() : str2hex(command.data(), command.length())); return 0; } replystr.clear(); clearSerialPort(); RigSerial.WriteBuffer(command.c_str(), numwrite); if (nread == 0) return 0; } // minimimum time to wait for a response int timeout = (int)((nread + progStatus.comm_echo ? numwrite : 0)*11000.0/RigSerial.Baud() + progStatus.use_tcpip ? progStatus.tcpip_ping_delay : 0); while (timeout > 0) { if (timeout > 10) MilliSleep(10); else MilliSleep(timeout); timeout -= 10; Fl::awake(); } // additional wait for xcvr processing string returned = ""; static char sztemp[100]; int waited = 0; while (waited < msec) { if (readResponse()) returned.append(replystr); if ( ((int)returned.length() >= nread) || (returned.find(term) != string::npos) ) { replystr = returned; snprintf(sztemp, sizeof(sztemp), "%s rcvd in %d msec", info.c_str(), waited + timeout); showresp(level, how, sztemp, command, returned); return true; } waited += 10; MilliSleep(10); Fl::awake(); } replystr = returned; snprintf(sztemp, sizeof(sztemp), "%s TIMED OUT in %d ms", info.c_str(), waited + timeout); showresp(ERR, how, sztemp, command, returned); return false; } int waitResponse(int timeout) { int n = 0; if (!progStatus.use_tcpip && RigSerial.IsOpen() == false) return 0; MilliSleep(10); if (!(n = readResponse())) while (timeout > 0) { if (timeout > 10) MilliSleep(10); else MilliSleep(timeout); timeout -= 10; Fl::awake(); } return n; } void clearSerialPort() { if (RigSerial.IsOpen() == false) return; RigSerial.FlushBuffer(); replystr.clear(); } void showresp(int level, int how, string s, string tx, string rx) { time_t now; time(&now); struct tm *local = localtime(&now); char sztm[20]; strftime(sztm, sizeof(sztm), "%H:%M:%S", local); string s1 = how == HEX ? str2hex(tx.c_str(), tx.length()) : tx; string s2 = how == HEX ? str2hex(rx.c_str(), rx.length()) : rx; if (how == ASC) { size_t p; while((p = s1.find('\r')) != string::npos) s1.replace(p, 1, ""); while((p = s1.find('\n')) != string::npos) s1.replace(p, 1, ""); while((p = s2.find('\r')) != string::npos) s2.replace(p, 1, ""); while((p = s2.find('\n')) != string::npos) s2.replace(p, 1, ""); } switch (level) { case QUIET: SLOG_QUIET("%s: %10s\ncmd %s\nans %s", sztm, s.c_str(), s1.c_str(), s2.c_str()); break; case ERR: SLOG_ERROR("%s: %10s\ncmd %s\nans %s", sztm, s.c_str(), s1.c_str(), s2.c_str()); break; case WARN: SLOG_WARN("%s: %10s\ncmd %s\nans %s", sztm, s.c_str(), s1.c_str(), s2.c_str()); break; case INFO: SLOG_INFO("%s: %10s\ncmd %s\nans %s", sztm, s.c_str(), s1.c_str(), s2.c_str()); break; default: SLOG_DEBUG("%s: %10s\ncmd %s\nans %s", sztm, s.c_str(), s1.c_str(), s2.c_str()); } } flrig-1.3.24/src/support/socket.cxx0000644000175000017500000004460012562731646014164 00000000000000// ---------------------------------------------------------------------------- // socket.cxx // // Copyright (C) 2008-2009 // Stelios Bounanos, M0GLD // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #ifndef __MINGW32__ # include # include # include # include # include # include #else # include "compat.h" #endif #include #include #include #include #include #include #include #include #include #include "debug.h" #include "socket.h" #if HAVE_GETADDRINFO && !defined(AI_NUMERICSERV) # define AI_NUMERICSERV 0 #endif using namespace std; // // utility functions // #if HAVE_GETADDRINFO static void copy_addrinfo(struct addrinfo** info, const struct addrinfo* src) { struct addrinfo* p = *info; for (const struct addrinfo* rp = src; rp; rp = rp->ai_next) { if (p) { p->ai_next = new struct addrinfo; p = p->ai_next; } else { p = new struct addrinfo; if (!*info) *info = p; } p->ai_flags = rp->ai_flags; p->ai_family = rp->ai_family; p->ai_socktype = rp->ai_socktype; p->ai_protocol = rp->ai_protocol; p->ai_addrlen = rp->ai_addrlen; if (rp->ai_addr) { p->ai_addr = reinterpret_cast(new struct sockaddr_storage); memcpy(p->ai_addr, rp->ai_addr, rp->ai_addrlen); } else p->ai_addr = NULL; if (rp->ai_canonname) p->ai_canonname = strdup(rp->ai_canonname); else p->ai_canonname = NULL; p->ai_next = NULL; } } static void free_addrinfo(struct addrinfo* ai) { for (struct addrinfo *next, *p = ai; p; p = next) { next = p->ai_next; delete reinterpret_cast(p->ai_addr); free(p->ai_canonname); delete p; } } #else static void copy_charpp(char*** dst, const char* const* src) { if (src == NULL) { *dst = NULL; return; } size_t n = 0; for (const char* const* s = src; *s; s++) n++; *dst = new char*[n+1]; for (size_t i = 0; i < n; i++) (*dst)[i] = strdup(src[i]); (*dst)[n] = NULL; } static void copy_hostent(struct hostent* dst, const struct hostent* src) { if (src->h_name) dst->h_name = strdup(src->h_name); else dst->h_name = NULL; copy_charpp(&dst->h_aliases, src->h_aliases); dst->h_length = src->h_length; if (src->h_addr_list) { size_t n = 0; for (const char* const* p = src->h_addr_list; *p; p++) n++; dst->h_addr_list = new char*[n+1]; for (size_t i = 0; i < n; i++) { dst->h_addr_list[i] = new char[src->h_length]; memcpy(dst->h_addr_list[i], src->h_addr_list[i], src->h_length); } dst->h_addr_list[n] = NULL; } else dst->h_addr_list = NULL; } static void copy_servent(struct servent* dst, const struct servent* src) { if (src->s_name) dst->s_name = strdup(src->s_name); else dst->s_name = NULL; copy_charpp(&dst->s_aliases, src->s_aliases); dst->s_port = src->s_port; if (src->s_proto) dst->s_proto = strdup(src->s_proto); else dst->s_proto = NULL; } static void free_charpp(char** pp) { if (!pp) return; for (char** p = pp; *p; p++) free(*p); delete [] pp; } static void free_hostent(struct hostent* hp) { free(const_cast(hp->h_name)); free_charpp(hp->h_aliases); if (hp->h_addr_list) { for (char** p = hp->h_addr_list; *p; p++) delete [] *p; delete [] hp->h_addr_list; } } static void free_servent(struct servent* sp) { free(const_cast(sp->s_name)); free_charpp(sp->s_aliases); free(sp->s_proto); } #endif // HAVE_GETADDRINFO // // Address class // Address::Address(const char* host, int port, const char* proto_name) : node(host), copied(false) { #if HAVE_GETADDRINFO info = NULL; #else memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); #endif if (node.empty() && port == 0) return; ostringstream s; s << port; service = s.str(); lookup(proto_name); } Address::Address(const char* host, const char* port_name, const char* proto_name) : node(host), service(port_name), copied(false) { #if HAVE_GETADDRINFO info = NULL; #else memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); #endif lookup(proto_name); } Address::Address(const Address& addr) { #if HAVE_GETADDRINFO info = NULL; #else memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); #endif *this = addr; } Address::~Address() { #if HAVE_GETADDRINFO if (info) { if (!copied) freeaddrinfo(info); else free_addrinfo(info); } #else free_hostent(&host_entry); free_servent(&service_entry); #endif } Address& Address::operator=(const Address& rhs) { if (this == &rhs) return *this; node = rhs.node; service = rhs.service; #if HAVE_GETADDRINFO if (info) { if (!copied) freeaddrinfo(info); else free_addrinfo(info); } copy_addrinfo(&info, rhs.info); #else free_hostent(&host_entry); free_servent(&service_entry); copy_hostent(&host_entry, &rhs.host_entry); copy_servent(&service_entry, &rhs.service_entry); addr.ai_protocol = rhs.addr.ai_protocol; addr.ai_socktype = rhs.addr.ai_socktype; #endif copied = true; return *this; } void Address::lookup(const char* proto_name) { int proto; if (!strcasecmp(proto_name, "tcp")) proto = IPPROTO_TCP; else if (!strcasecmp(proto_name, "udp")) proto = IPPROTO_UDP; else { throw SocketException("Bad protocol name"); } #if HAVE_GETADDRINFO struct addrinfo hints; memset(&hints, 0, sizeof(hints)); # ifdef AI_ADDRCONFIG hints.ai_flags = AI_ADDRCONFIG; # endif hints.ai_family = AF_UNSPEC; hints.ai_socktype = (proto == IPPROTO_TCP ? SOCK_STREAM : SOCK_DGRAM); if (service.find_first_not_of("0123456789") == string::npos) hints.ai_flags |= AI_NUMERICSERV; int r; if ((r = getaddrinfo(node.empty() ? NULL : node.c_str(), service.c_str(), &hints, &info)) < 0) { string errstr = "getaddrinfo: "; errstr.append(node).append(" : ").append(service); throw SocketException(r, errstr.c_str()); } #else // use gethostbyname etc. memset(&host_entry, 0, sizeof(host_entry)); memset(&service_entry, 0, sizeof(service_entry)); if (node.empty()) node = "0.0.0.0"; struct hostent* hp; if ((hp = gethostbyname(node.c_str())) == NULL) { #ifdef __WIN32__ string errstr = "gethostbyname: "; errstr.append(node).append(" not found"); throw SocketException(0, errstr.c_str()); #else throw SocketException(hstrerror(HOST_NOT_FOUND)); #endif } copy_hostent(&host_entry, hp); int port; struct servent* sp; if ((sp = getservbyname(service.c_str(), NULL)) == NULL) { // if a service name string could not be looked up by name, it must be numeric if (service.find_first_not_of("0123456789") != string::npos) { throw SocketException("Unknown service name"); } port = htons(atoi(service.c_str())); sp = getservbyport(port, NULL); } if (!sp) service_entry.s_port = port; else copy_servent(&service_entry, sp); memset(&addr, 0, sizeof(addr)); addr.ai_protocol = proto; addr.ai_socktype = (proto == IPPROTO_TCP ? SOCK_STREAM : SOCK_DGRAM); #endif } /// /// Returns the number of addresses available for /// the node and service /// size_t Address::size(void) const { size_t n = 0; #if HAVE_GETADDRINFO if (!info) return 0; for (struct addrinfo* p = info; p; p = p->ai_next) n++; #else if (!host_entry.h_addr_list) return 0; for (char** p = host_entry.h_addr_list; *p; p++) n++; #endif return n; } /// /// Returns an address from the list of those available /// for the node and service /// const addr_info_t* Address::get(size_t n) const { #if HAVE_GETADDRINFO if (!info) return NULL; struct addrinfo* p = info; for (size_t i = 0; i < n; i++) p = p->ai_next; LOG_DEBUG("Found address %s", get_str(p).c_str()); return p; #else if (!host_entry.h_addr_list) return NULL; memset(&saddr, 0, sizeof(saddr)); saddr.sin_family = AF_INET; saddr.sin_addr = *(struct in_addr*)host_entry.h_addr_list[n]; saddr.sin_port = service_entry.s_port; addr.ai_family = saddr.sin_family; addr.ai_addrlen = sizeof(saddr); addr.ai_addr = (struct sockaddr*)&saddr; LOG_DEBUG("Found address %s", get_str(&addr).c_str()); return &addr; #endif } /// /// Returns the string representation of an address /// string Address::get_str(const addr_info_t* addr) { if (!addr) return ""; #if HAVE_GETADDRINFO char host[NI_MAXHOST], port[NI_MAXSERV]; memset(host, 0, sizeof(host)); if (getnameinfo(addr->ai_addr, sizeof(struct sockaddr_storage), host, sizeof(host), port, sizeof(port), NI_NUMERICHOST | NI_NUMERICSERV) == 0) return string("[").append(host).append("]:").append(port); else return ""; #else char* host, port[8]; host = inet_ntoa(((struct sockaddr_in*)addr->ai_addr)->sin_addr); snprintf(port, sizeof(port), "%u", htons(((struct sockaddr_in*)addr->ai_addr)->sin_port)); return string("[").append(host).append("]:").append(port); #endif } // // Socket class // /// Constructs a Socket object and associates the address addr with it. /// This address will be used by subsequent calls to the bind() or connect() /// methods /// /// @param addr An Address object /// Socket::Socket(const Address& addr) { buffer = new char[BUFSIZ]; memset(&timeout, 0, sizeof(timeout)); anum = 0; autoclose = true; open(addr); set_nonblocking(false); } /// Constructs a Socket object from a file descriptor /// /// @param fd A file descriptor /// Socket::Socket(int fd) : sockfd(fd) { buffer = new char[BUFSIZ]; anum = 0; memset(&timeout, 0, sizeof(timeout)); if (sockfd == -1) return; #ifndef __MINGW32__ int r = fcntl(sockfd, F_GETFL); if (r == -1) throw SocketException(errno, "fcntl"); nonblocking = r & O_NONBLOCK; #else set_nonblocking(false); #endif autoclose = true; } /// /// Constructs a Socket object by copying another instance /// Socket::Socket(const Socket& s) : sockfd(s.sockfd), address(s.address), anum(s.anum), nonblocking(s.nonblocking), autoclose(true) { buffer = new char[BUFSIZ]; ainfo = address.get(anum); memcpy(&timeout, &s.timeout, sizeof(timeout)); s.set_autoclose(false); } Socket::~Socket() { delete [] buffer; if (autoclose) close(); } Socket& Socket::operator=(const Socket& rhs) { if (this == &rhs) return *this; sockfd = rhs.sockfd; address = rhs.address; anum = rhs.anum; ainfo = address.get(anum); memcpy(&timeout, &rhs.timeout, sizeof(timeout)); nonblocking = rhs.nonblocking; autoclose = rhs.autoclose; rhs.set_autoclose(false); return *this; } /// /// Associates the Socket with an address /// /// This address will be used by subsequent calls to the bind() or connect /// methods. /// /// @params addr An address object /// void Socket::open(const Address& addr) { address = addr; size_t n = address.size(); for (anum = 0; anum < n; anum++) { ainfo = address.get(anum); LOG_DEBUG("Trying %s", address.get_str(ainfo).c_str()); if ((sockfd = socket(ainfo->ai_family, ainfo->ai_socktype, ainfo->ai_protocol)) != -1) break; } if (sockfd == -1) throw SocketException(errno, "socket"); set_close_on_exec(true); } /// /// Shuts down the socket /// void Socket::close(void) { ::close(sockfd); sockfd = -1; } /// /// Waits for the socket file descriptor to become ready for I/O /// /// @params dir Specifies the I/O direction. 0 is input, 1 is output. /// /// @return True if the file descriptor became ready within the timeout /// period, false otherwise. @see Socket::set_timeout bool Socket::wait(int dir) { fd_set fdset; FD_ZERO(&fdset); FD_SET((unsigned)sockfd, &fdset); struct timeval t = { timeout.tv_sec, timeout.tv_usec }; int r; if (dir == 0) r = select(sockfd + 1, &fdset, NULL, NULL, &t); else if (dir == 1) r = select(sockfd + 1, NULL, &fdset, NULL, &t); else throw SocketException(EINVAL, "Socket::wait"); if (r == -1) throw SocketException(errno, "select"); return r; } /// /// Binds the socket to the address associated with the object /// @see Socket::open /// void Socket::bind(void) { int r = 1; if (setsockopt(sockfd, SOL_SOCKET, SO_REUSEADDR, (const char*)&r, sizeof(r)) == -1) perror("setsockopt SO_REUSEADDR"); if (::bind(sockfd, ainfo->ai_addr, ainfo->ai_addrlen) == -1) throw SocketException(errno, "bind"); } /// /// Calls listen(2) on the socket file desriptor /// /// The socket must already have been bound to an address via a call to the bind /// method. /// /// @params backlog The maximum number of pending connections (default SOMAXCONN) /// void Socket::listen(int backlog) { if (::listen(sockfd, backlog) == -1) throw SocketException(errno, "listen"); } /// /// Accepts a connection /// /// The socket must already have been bound to an address via a call to the bind /// method. /// /// @return A Socket instance for the accepted connection /// Socket Socket::accept(void) { listen(); // wait for fd to become readable if (nonblocking && (timeout.tv_sec > 0 || timeout.tv_usec > 0)) if (!wait(0)) throw SocketException(ETIMEDOUT, "select"); int r; if ((r = ::accept(sockfd, NULL, 0)) == -1) throw SocketException(errno, "accept"); set_close_on_exec(true, r); return Socket(r); } /// /// Accepts a single connection and then closes the listening socket /// @see Socket::accept /// /// @return A Socket instance for the accepted connection /// Socket Socket::accept1(void) { bind(); Socket s = accept(); close(); s.set_close_on_exec(true); return s; } /// /// Connects the socket to the address that is associated with the object /// void Socket::connect(void) { LOG_DEBUG("Connecting to %s", address.get_str(ainfo).c_str()); if (::connect(sockfd, ainfo->ai_addr, ainfo->ai_addrlen) == -1) throw SocketException(errno, "connect"); } /// /// Connects the socket to an address /// /// @param addr The address to connect to /// void Socket::connect(const Address& addr) { close(); open(addr); connect(); } /// /// Sends a buffer /// /// @param buf /// @param len /// /// @return The amount of data that was sent. This may be less than len /// if the socket is non-blocking. /// size_t Socket::send(const void* buf, size_t len) { // if we have a nonblocking socket and a nonzero timeout, // wait for fd to become writeable if (nonblocking && (timeout.tv_sec > 0 || timeout.tv_usec > 0)) if (!wait(1)) return 0; ssize_t r = ::send(sockfd, (const char*)buf, len, 0); if (r == 0) shutdown(sockfd, SHUT_WR); else if (r == -1) { if (errno != EAGAIN) throw SocketException(errno, "send"); r = 0; } return r; } /// /// Sends a string /// /// @param buf /// /// @return The amount of data that was sent. This may be less than len /// if the socket is non-blocking. /// size_t Socket::send(const string& buf) { return send(buf.data(), buf.length()); } /// /// Receives data into a buffer /// /// @arg buf /// @arg len The maximum number of bytes to write to buf. /// /// @return The amount of data that was received. This may be less than len /// if the socket is non-blocking. size_t Socket::recv(void* buf, size_t len) { // if we have a nonblocking socket and a nonzero timeout, // wait for fd to become writeable if (nonblocking && (timeout.tv_sec > 0 || timeout.tv_usec > 0)) if (!wait(0)) { return 0; } ssize_t r = ::recv(sockfd, (char*)buf, len, 0); if (r == 0) { shutdown(sockfd, SHUT_RD); } else if (r == -1) { if (errno != EAGAIN) throw SocketException(errno, "recv"); r = 0; } return r; } /// /// Receives all available data and appends it to a string. /// /// @arg buf /// /// @return The amount of data that was received. /// size_t Socket::recv(string& buf) { size_t n = 0; ssize_t r; while ((r = recv(buffer, BUFSIZ)) > 0) { buf.reserve(buf.length() + r); buf.append(buffer, r); n += r; } return n; } /// /// Retrieves the socket's receive or send buffer size /// /// @param dir Specifies the I/O direction. 0 is input, 1 is output. /// int Socket::get_bufsize(int dir) { int len; if (::get_bufsize(sockfd, dir, &len) == -1) throw SocketException(errno, "get_bufsize"); return len; } /// /// Sets the socket's receive or send buffer size /// /// @param dir Specifies the I/O direction. 0 is input, 1 is output. /// @param len Specifies the new buffer size /// void Socket::set_bufsize(int dir, int len) { if (::set_bufsize(sockfd, dir, len) == -1) throw SocketException(errno, "set_bufsize"); } /// /// Sets the socket's blocking mode /// /// @param v If true, the socket is set to non-blocking /// void Socket::set_nonblocking(bool v) { if (set_nonblock(sockfd, v) == -1) throw SocketException(errno, "set_nonblock"); nonblocking = v; } /// /// Enables the use of Nagle's algorithm for the socket /// /// @param v If true, Nagle's algorithm is disabled. /// void Socket::set_nodelay(bool v) { if (::set_nodelay(sockfd, v) == -1) throw SocketException(errno, "set_nodelay"); } /// /// Sets the timeout associated with non-blocking operations /// /// @param t /// void Socket::set_timeout(const struct timeval& t) { timeout.tv_sec = t.tv_sec; timeout.tv_usec = t.tv_usec; } void Socket::set_timeout(double t) { timeout.tv_sec = (time_t)floor(t); timeout.tv_usec = (suseconds_t)((t - timeout.tv_sec) * 1e6); } /// /// Sets the socket's autoclose mode. /// /// If autoclose is disabled, the socket file descriptor will not be closed when /// the Socket object is destructed. /// /// @param v If true, the socket will be closed by the destructor /// void Socket::set_autoclose(bool v) const { autoclose = v; } /// /// Sets the socket's close-on-exec flag /// void Socket::set_close_on_exec(bool v, int fd) { if (fd == -1) fd = sockfd; if (set_cloexec(fd, v) == -1) throw SocketException(errno, "set_cloexec"); } /// /// Returns the Socket's file descriptor. /// /// The descriptor should only be used for reading and writing. /// /// @return the socket file descriptor /// int Socket::fd(void) { return sockfd; } flrig-1.3.24/src/support/status.cxx0000644000175000017500000007524412646444222014221 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include "status.h" #include "util.h" #include "rig.h" #include "rigs.h" #include "support.h" #include "config.h" #include "rigpanel.h" #include "ui.h" string xcvr_name = "NONE"; int current_ui_size = -1; status progStatus = { 50, // int mainX; 50, // int mainY; 735, // int mainW; 150, // int mainH; small_ui, // UISIZE, UIsize; false, // UIchanged; "NONE", // string xcvr_serial_port; 0, // int comm_baudrate; 2, // int stopbits; 2, // int comm_retries; 5, // int comm_wait; 50, // int comm_timeout; false, // bool comm_echo; false, // bool comm_catptt; false, // bool comm_rtsptt; false, // bool comm_dtrptt; false, // bool comm_rtscts; false, // bool comm_rtsplus; false, // bool comm_dtrplus; 200, // int serloop_timing; 0, // int byte_interval; "NONE", // string aux_serial_port; false, // bool aux_rts; false, // bool aux_dtr; "NONE", // string sep_serial_port; false, // bool sep_rtsptt; false, // bool sep_dtrptt; false, // bool sep_rtsplus; false, // bool sep_dtrplus; 0, // int CIV; false, // bool USBaudio; 1, // bool poll_smeter; 1, // bool poll_frequency; 1, // bool poll_mode; 1, // bool poll_bandwidth; 0, // bool poll_volume; 0, // bool poll_auto_notch; 0, // bool poll_notch; 0, // bool poll_ifshift; 0, // bool poll_power_control; 0, // bool poll_pre_att; 0, // bool poll_micgain; 0, // bool poll_squelch; 0, // bool poll_rfgain; 1, // bool poll_pout; 1, // bool poll_swr; 1, // bool poll_alc; 0, // bool poll_split; 0, // bool poll_noise; 0, // bool poll_nr; 0, // int poll_vfoAorB; 4, // int poll_all; -1, // int iBW_A; 1, // int imode_A; 7070000, // long freq_A; -1, // int iBW_B; 1, // int imode_B; 7070000, // long freq_B; false, // bool use_rig_data; false, // bool restore_rig_data; false, // bool spkr_on; 20, // int volume; 0, // int power_level; 10, // int mic_gain; false, // bool notch; 0, // int notch_val; false, // bool shift; 0, // int shift_val; 100, // int rfgain; 10, // int squelch; 0, // int schema; true, // bool hrd_buttons 0, // int line_out; false, // bool data_port; 1, // int agc_level; 18, // int cw_wpm; 3.0, // double cw_weight; 0, // int cw_vol; 0, // int cw_spot; false, // bool spot_onoff; 700, // int cw_spot_tone; false, // bool enable_keyer; false, // bool break_in; 15, // double cw_qsk; 200, // double cw_delay; false, // int vox_onoff; 10, // int vox_gain; 10, // int vox_anti; 100, // int vox_hang; FT950 default true, // bool vox_on_dataport; 0, // int compression; false, // bool compON; 0, // bool noise_reduction; 0, // int noise_reduction_val; 0, // int nb_level; false, // bool noise; 0, // int attenuator 0, // int preamp; 0, // int auto_notch; 0, // int split; true, // bool key_fldigi; 5, // int rx_avg; 5, // int rx_peak; 5, // int pwr_avg; 5, // int pwr_peak; 4, // int pwr_scale ==> Autoselect //tt550 controls 80, // tt550_line_out; 1, // tt550_agc_level; 24, // tt550_cw_wpm; 1.0, // tt550_cw_weight; 10, // tt550_cw_vol; 10, // tt550_cw_spot; false, // tt550_cw_spot_onoff; 20, // tt550_cw_qsk; true, // tt550_enable_keyer; false, // tt550_vox_onoff; 0, // tt550_vox_gain; 0, // tt550_vox_anti; 0, // tt550_vox_hang; 0, // tt550_mon_vol; 0, // tt550_squelch_level; 0, // tt550_compression; 1, // tt550_nb_level; false, // tt550_bool compON; false, // tt550_tuner_bypass; true, // tt550_enable_xmtr; false, // tt550_enable_tloop; true, // tt550_use_line_in; 14, // tt550_xmt_bw; false, // tt550_use_xmt_bw; 25, // tt550_AM_level; 0, // tt550_encoder_step; 1, // tt550_encoder_sensitivity; 2000, // tt550_keypad_timeout; 0, // tt550_F1_func; 0, // tt550_F2_func; 0, // tt550_F3_func; 0.0, // vfo_adj; 600, // bfo_freq; 0, // rit_freq; 0, // xit_freq; 1500, // bpf_center; true, // use_bpf_center; 232, // int bg_red; 255, // int bg_green; 232, // int bg_blue; 0, // int fg_red; 0, // int fg_green; 0, // int fg_blue; 148, // int swrRed; 0, // int swrGreen; 148, // int swrBlue; 180, // int pwrRed; 0, // int pwrGreen; 0, // int pwrBlue; 0, // int smeterRed; 180, // int smeterGreen; 0, //int smeterBlue; 255, // int peakRed; 0, // int peakGreen; 0, // int peakBlue; 0, // int fg_sys_red; 0, // int fg_sys_green; 0, // int fg_sys_blue; 0xc0, // int bg_sys_red; 0xc0, // int bg_sys_green; 0xc0, // int bg_sys_blue; 255, // int bg2_sys_red; 255, // int bg2_sys_green; 255, // int bg2_sys_blue; 232, // int slider_red; 255, // int slider_green; 232, // int slider_blue; 0, // int slider_btn_red; 0, // int slider_btn_green; 128, // int slider_btn_blue; 255, // int lighted_btn_red; 255, // int lighted_btn_green; 0, // int lighted_btn_blue; FL_COURIER, // Fl_Font fontnbr; false, // bool tooltips; "gtk+", // string ui_scheme "7362", // string server_port "127.0.0.1",// string server_address "4001", // string tcpip_port "127.0.0.1",// string tcpip_address 50, // int tcpip_ping_delay 10, // int tcpip_reconnect_after in seconds 10, // int tcpip_drops_allowed; false, // bool use_tcpip false, // bool xcvr auto on false, // bool xcvr auto off false, // bool external_tuner false // bool fldigi_is_server }; void status::saveLastState() { xcvr_name = selrig->name_; Fl_Preferences xcvrpref(RigHomeDir.c_str(), "w1hkj.com", PACKAGE_TARNAME); xcvrpref.set("xcvr_name", xcvr_name.c_str()); int mX = mainwindow->x(); int mY = mainwindow->y(); int mW = mainwindow->w(); int mH = mainwindow->h(); if (mX >= 0 && mX >= 0) { mainX = mX; mainY = mY; if (UIsize != small_ui) { mainW = mW; mainH = mH; } } Fl_Preferences spref(RigHomeDir.c_str(), "w1hkj.com", xcvr_name.c_str()); spref.set("version", PACKAGE_VERSION); spref.set("mainx", mainX); spref.set("mainy", mainY); spref.set("mainw", mainW); spref.set("mainh", mainH); spref.set("uisize", UIsize); spref.set("xcvr_serial_port", xcvr_serial_port.c_str()); spref.set("comm_baudrate", comm_baudrate); spref.set("comm_stopbits", stopbits); spref.set("comm_retries", comm_retries); spref.set("comm_wait", comm_wait); spref.set("comm_timeout", comm_timeout); spref.set("serloop_timing", serloop_timing); spref.set("byte_interval", byte_interval); spref.set("comm_echo", comm_echo); spref.set("ptt_via_cat", comm_catptt); spref.set("ptt_via_rts", comm_rtsptt); spref.set("ptt_via_dtr", comm_dtrptt); spref.set("rts_cts_flow", comm_rtscts); spref.set("rts_plus", comm_rtsplus); spref.set("dtr_plus", comm_dtrplus); spref.set("civadr", CIV); spref.set("usbaudio", USBaudio); spref.set("aux_serial_port", aux_serial_port.c_str()); spref.set("aux_rts", aux_rts); spref.set("aux_dtr", aux_dtr); spref.set("sep_serial_port", sep_serial_port.c_str()); spref.set("sep_rtsptt", sep_rtsptt); spref.set("sep_dtrptt", sep_dtrptt); spref.set("sep_rtsplus", sep_rtsplus); spref.set("set_dtrplus", sep_dtrplus); spref.set("key_fldigi", key_fldigi); spref.set("poll_smeter", poll_smeter); spref.set("poll_frequency", poll_frequency); spref.set("poll_mode", poll_mode); spref.set("poll_bandwidth", poll_bandwidth); spref.set("poll_volume", poll_volume); spref.set("poll_auto_notch", poll_auto_notch); spref.set("poll_notch", poll_notch); spref.set("poll_ifshift", poll_ifshift); spref.set("poll_power_control", poll_power_control); spref.set("poll_pre_att", poll_pre_att); spref.set("poll_micgain", poll_micgain); spref.set("poll_squelch", poll_squelch); spref.set("poll_rfgain", poll_rfgain); spref.set("poll_pout", poll_pout); spref.set("poll_swr", poll_swr); spref.set("poll_alc", poll_alc); spref.set("poll_split", poll_split); spref.set("poll_noise", poll_noise); spref.set("poll_nr", poll_nr); spref.set("poll_all", poll_all); spref.set("bw_A", iBW_A); spref.set("mode_A", imode_A); spref.set("freq_A", freq_A); spref.set("bw_B", iBW_B); spref.set("mode_B", imode_B); spref.set("freq_B", freq_B); spref.set("use_rig_data", use_rig_data); spref.set("restore_rig_data", restore_rig_data); spref.set("bool_spkr_on", spkr_on); spref.set("int_volume", volume); spref.set("dbl_power", power_level); spref.set("int_mic", mic_gain); spref.set("bool_notch", notch); spref.set("int_notch", notch_val); spref.set("bool_shift", shift); spref.set("int_shift", shift_val); spref.set("rfgain", rfgain); spref.set("squelch", squelch); spref.set("schema", schema); spref.set("rx_avg", rx_avg); spref.set("rx_peak", rx_peak); spref.set("pwr_avg", pwr_avg); spref.set("pwr_peak", pwr_peak); spref.set("pwr_scale", pwr_scale); if (selrig->name_ == rig_TT550.name_) { spref.set("tt550_line_out", tt550_line_out); spref.set("tt550_agc_level", tt550_agc_level); spref.set("tt550_cw_wpm", tt550_cw_wpm); spref.set("tt550_cw_weight", tt550_cw_weight); spref.set("tt550_cw_vol", tt550_cw_vol); spref.set("tt550_cw_spot", tt550_cw_spot); spref.set("tt550_spot_onoff", tt550_spot_onoff); spref.set("tt550_cw_qsk", tt550_cw_qsk); spref.set("enable_keyer", enable_keyer); spref.set("break_in", break_in); spref.set("cw_delay", cw_delay); spref.set("tt550_vox_onoff", tt550_vox_onoff); spref.set("tt550_vox_gain", tt550_vox_gain); spref.set("tt550_vox_anti", tt550_vox_anti); spref.set("tt550_vox_hang", tt550_vox_hang); spref.set("tt550_mon_vol", tt550_mon_vol); spref.set("tt550_squelch_level", tt550_squelch_level); spref.set("tt550_compression", tt550_compression); spref.set("tt550_nb_level", tt550_nb_level); spref.set("tt550_compON", tt550_compON); spref.set("tt550_tuner_bypass", tt550_tuner_bypass); spref.set("tt550_enable_xmtr", tt550_enable_xmtr); spref.set("tt550_enable_tloop", tt550_enable_tloop); spref.set("tt550_xmt_bw", tt550_xmt_bw); spref.set("tt550_use_xmt_bw", tt550_use_xmt_bw); spref.set("tt550_AM_level", tt550_AM_level); spref.set("tt550_use_line_in", tt550_use_line_in); spref.set("tt550_encoder_step", tt550_encoder_step); spref.set("tt550_encoder_sensitivity", tt550_encoder_sensitivity); spref.set("tt550_keypad_timeout", tt550_keypad_timeout); spref.set("tt550_F1_func", tt550_F1_func); spref.set("tt550_F2_func", tt550_F2_func); spref.set("tt550_F3_func", tt550_F3_func); } else { spref.set("line_out", line_out); spref.set("data_port", data_port); spref.set("vox_on_dataport", vox_on_dataport); spref.set("agc_level", agc_level); spref.set("cw_wpm", cw_wpm); spref.set("cw_weight", cw_weight); spref.set("cw_vol", cw_vol); spref.set("cw_spot", cw_spot); spref.set("spot_onoff", spot_onoff); spref.set("cw_spot_tone", cw_spot_tone); spref.set("cw_qsk", cw_qsk); spref.set("enable_keyer", enable_keyer); spref.set("vox_onoff", vox_onoff); spref.set("vox_gain", vox_gain); spref.set("vox_anti", vox_anti); spref.set("vox_hang", vox_hang); spref.set("compression", compression); spref.set("compON", compON); } spref.set("noise_reduction", noise_reduction); spref.set("noise_red_val", noise_reduction_val); spref.set("nb_level", nb_level); spref.set("bool_noise", noise); spref.set("int_preamp", preamp); spref.set("int_att", attenuator); spref.set("vfo_adj", vfo_adj); spref.set("bfo_freq", bfo_freq); spref.set("rit_freq", rit_freq); spref.set("xit_freq", xit_freq); spref.set("bpf_center", bpf_center); spref.set("use_bpf_center", use_bpf_center); spref.set("fg_red", fg_red); spref.set("fg_green", fg_green); spref.set("fg_blue", fg_blue); spref.set("bg_red", bg_red); spref.set("bg_green", bg_green); spref.set("bg_blue", bg_blue); spref.set("smeter_red", smeterRed); spref.set("smeter_green", smeterGreen); spref.set("smeter_blue", smeterBlue); spref.set("power_red", pwrRed); spref.set("power_green", pwrGreen); spref.set("power_blue", pwrBlue); spref.set("swr_red", swrRed); spref.set("swr_green", swrGreen); spref.set("swr_blue", swrBlue); spref.set("peak_red", peakRed); spref.set("peak_green", peakGreen); spref.set("peak_blue", peakBlue); spref.set("fg_sys_red", fg_sys_red); spref.set("fg_sys_green", fg_sys_green); spref.set("fg_sys_blue", fg_sys_blue); spref.set("bg_sys_red", bg_sys_red); spref.set("bg_sys_green", bg_sys_green); spref.set("bg_sys_blue", bg_sys_blue); spref.set("bg2_sys_red", bg2_sys_red); spref.set("bg2_sys_green", bg2_sys_green); spref.set("bg2_sys_blue", bg2_sys_blue); spref.set("slider_red", slider_red); spref.set("slider_green", slider_green); spref.set("slider_blue", slider_blue); spref.set("slider_btn_red", slider_btn_red); spref.set("slider_btn_green", slider_btn_green); spref.set("slider_btn_blue", slider_btn_blue); spref.set("lighted_btn_red", lighted_btn_red); spref.set("lighted_btn_green", lighted_btn_green); spref.set("lighted_btn_blue", lighted_btn_blue); spref.set("fontnbr", fontnbr); spref.set("tooltips", tooltips); spref.set("ui_scheme", ui_scheme.c_str()); spref.set("server_port", server_port.c_str()); spref.set("server_addr", server_addr.c_str()); spref.set("tcpip_port", tcpip_port.c_str()); spref.set("tcpip_addr", tcpip_addr.c_str()); spref.set("tcpip_ping_delay", tcpip_ping_delay); spref.set("tcpip_tcpip_reconnect_after", tcpip_reconnect_after); spref.set("tcpip_drops_allowed", tcpip_drops_allowed); spref.set("use_tcpip", use_tcpip); spref.set("xcvr_auto_on", xcvr_auto_on); spref.set("xcvr_auto_off", xcvr_auto_off); spref.set("external_tuner", external_tuner); spref.set("fldigi_is_server", fldigi_is_server); spref.set("hrd_buttons", hrd_buttons); } bool status::loadXcvrState(string xcvr) { Fl_Preferences spref(RigHomeDir.c_str(), "w1hkj.com", xcvr.c_str()); if (spref.entryExists("version")) { int i; char defbuffer[200]; spref.get("mainx", mainX, mainX); spref.get("mainy", mainY, mainY); spref.get("mainw", mainW, mainW); spref.get("mainh", mainH, mainH); spref.get("uisize", UIsize, UIsize); if (current_ui_size != -1) { UIsize = current_ui_size; } current_ui_size = UIsize; if (UIsize == wide_ui) { if (mainW < WIDE_MAINW) mainW = WIDE_MAINW; } if (UIsize == touch_ui) { if (mainW < TOUCH_MAINW) mainW = TOUCH_MAINW; } spref.get("xcvr_serial_port", defbuffer, "NONE", 199); xcvr_serial_port = defbuffer; if (xcvr_serial_port.find("tty") == 0) xcvr_serial_port.insert(0, "/dev/"); i = 0; selrig = rigs[i]; while (rigs[i] != NULL) { if (xcvr == rigs[i]->name_) { selrig = rigs[i]; break; } i++; } spref.get("comm_baudrate", comm_baudrate, comm_baudrate); spref.get("comm_stopbits", stopbits, stopbits); spref.get("comm_retries", comm_retries, comm_retries); spref.get("comm_wait", comm_wait, comm_wait); spref.get("comm_timeout", comm_timeout, comm_timeout); spref.get("serloop_timing", serloop_timing, serloop_timing); if (serloop_timing < 10) serloop_timing = 10; // minimum loop delay of 10 msec spref.get("byte_interval", byte_interval, byte_interval); if (spref.get("comm_echo", i, i)) comm_echo = i; if (spref.get("ptt_via_cat", i, i)) comm_catptt = i; if (spref.get("ptt_via_rts", i, i)) comm_rtsptt = i; if (spref.get("ptt_via_dtr", i, i)) comm_dtrptt = i; if (spref.get("rts_cts_flow", i, i)) comm_rtscts = i; if (spref.get("rts_plus", i, i)) comm_rtsplus = i; if (spref.get("dtr_plus", i, i)) comm_dtrplus = i; spref.get("civadr", CIV, CIV); if (spref.get("usbaudio", i, i)) USBaudio = i; spref.get("aux_serial_port", defbuffer, "NONE", 199); aux_serial_port = defbuffer; if (spref.get("aux_rts", i, i)) aux_rts = i; if (spref.get("aux_dtr", i, i)) aux_dtr = i; spref.get("sep_serial_port", defbuffer, "NONE", 199); sep_serial_port = defbuffer; if (spref.get("sep_rtsptt", i, i)) sep_rtsptt = i; if (spref.get("sep_dtrptt", i, i)) sep_dtrptt = i; if (spref.get("sep_rtsplus", i, i)) sep_rtsplus = i; if (spref.get("sep_dtrplus", i, i)) sep_dtrplus = i; if (spref.get("key_fldigi", i, key_fldigi)) key_fldigi = i; spref.get("poll_smeter", poll_smeter, poll_smeter); spref.get("poll_frequency", poll_frequency, poll_frequency); spref.get("poll_mode", poll_mode, poll_mode); spref.get("poll_bandwidth", poll_bandwidth, poll_bandwidth); spref.get("poll_volume", poll_volume, poll_volume); spref.get("poll_auto_notch", poll_auto_notch, poll_auto_notch); spref.get("poll_notch", poll_notch, poll_notch); spref.get("poll_ifshift", poll_ifshift, poll_ifshift); spref.get("poll_power_control", poll_power_control, poll_power_control); spref.get("poll_pre_att", poll_pre_att, poll_pre_att); spref.get("poll_micgain", poll_micgain, poll_micgain); spref.get("poll_squelch", poll_squelch, poll_squelch); spref.get("poll_rfgain", poll_rfgain, poll_rfgain); spref.get("poll_pout", poll_pout, poll_pout); spref.get("poll_swr", poll_swr, poll_swr); spref.get("poll_alc", poll_alc, poll_alc); spref.get("poll_split", poll_split, poll_split); spref.get("poll_noise", poll_noise, poll_noise); spref.get("poll_nr", poll_nr, poll_nr); spref.get("poll_all", poll_all, poll_all); spref.get("bw_A", iBW_A, iBW_A); spref.get("mode_A", imode_A, imode_A); spref.get("freq_A", freq_A, freq_A); spref.get("bw_B", iBW_B, iBW_B); spref.get("mode_B", imode_B, imode_B); spref.get("freq_B", freq_B, freq_B); if (spref.get("use_rig_data", i, i)) use_rig_data = i; if (spref.get("restore_rig_data", i, i)) restore_rig_data = i; if (spref.get("bool_spkr_on", i, i)) spkr_on = i; spref.get("int_volume", volume, volume); spref.get("dbl_power", power_level, power_level); spref.get("int_mic", mic_gain, mic_gain); if (spref.get("bool_notch", i, i)) notch = i; spref.get("int_notch", notch_val, notch_val); if (spref.get("bool_shift", i, i)) shift = i; spref.get("int_shift", shift_val, shift_val); spref.get("rfgain", rfgain, rfgain); spref.get("squelch", squelch, squelch); spref.get("schema", schema, schema); spref.get("rx_avg", rx_avg, rx_avg); spref.get("rx_peak", rx_peak, rx_peak); spref.get("pwr_avg", pwr_avg, pwr_avg); spref.get("pwr_peak", pwr_peak, pwr_peak); spref.get("pwr_scale", pwr_scale, pwr_scale); if (selrig->name_ == rig_TT550.name_) { spref.get("tt550_line_out", tt550_line_out, tt550_line_out); spref.get("tt550_agc_level", tt550_agc_level, tt550_agc_level); spref.get("tt550_cw_wpm", tt550_cw_wpm, tt550_cw_wpm); spref.get("tt550_cw_weight", tt550_cw_weight, tt550_cw_weight); spref.get("tt550_cw_vol", tt550_cw_vol, tt550_cw_vol); spref.get("tt550_cw_spot", tt550_cw_spot, tt550_cw_spot); if (spref.get("tt550_spot_onoff", i, i)) tt550_spot_onoff = i; spref.get("tt550_cw_qsk", tt550_cw_qsk, tt550_cw_qsk); if (spref.get("tt550_enable_keyer", i, i)) tt550_enable_keyer = i; if (spref.get("break_in", i, i)) break_in = i; if (spref.get("vox_onoff", i, i)) vox_onoff = i; if (spref.get("tt550_vox_onoff", i, i)) tt550_vox_onoff = i; spref.get("tt550_vox_gain", tt550_vox_gain, tt550_vox_gain); spref.get("tt550_vox_anti", tt550_vox_anti, tt550_vox_anti); spref.get("tt550_vox_hang", tt550_vox_hang, tt550_vox_hang); spref.get("tt550_mon_vol", tt550_mon_vol, tt550_mon_vol); spref.get("tt550_squelch_level", tt550_squelch_level, tt550_squelch_level); spref.get("tt550_compression", tt550_compression, tt550_compression); spref.get("tt550_nb_level", tt550_nb_level, tt550_nb_level); if (spref.get("tt550_compON", i, i)) tt550_compON = i; if (spref.get("tt550_tuner_bypass", i, i)) tt550_tuner_bypass = i; if (spref.get("tt550_enable_xmtr", i, i)) tt550_enable_xmtr = i; if (spref.get("tt550_enable_tloop", i, i)) tt550_enable_tloop = i; spref.get("tt550_xmt_bw", tt550_xmt_bw, tt550_xmt_bw); if (spref.get("tt550_use_xmt_bw", i, i)) tt550_use_xmt_bw = i; if (spref.get("tt550_use_line_in", i, i)) tt550_use_line_in = i; spref.get("tt550_AM_level", tt550_AM_level, tt550_AM_level); spref.get("tt550_encoder_step", tt550_encoder_step, tt550_encoder_step); spref.get("tt550_encoder_sensitivity", tt550_encoder_sensitivity, tt550_encoder_sensitivity); spref.get("tt550_keypad_timeout", tt550_keypad_timeout, tt550_keypad_timeout); spref.get("tt550_F1_func", tt550_F1_func, tt550_F1_func); spref.get("tt550_F2_func", tt550_F2_func, tt550_F2_func); spref.get("tt550_F3_func", tt550_F3_func, tt550_F3_func); } else { spref.get("line_out", line_out, line_out); spref.get("data_port", i, data_port); data_port = i; spref.get("vox_on_dataport", i, vox_on_dataport); vox_on_dataport = i; spref.get("agc_level", agc_level, agc_level); spref.get("cw_wpm", cw_wpm, cw_wpm); spref.get("cw_weight", cw_weight, cw_weight); spref.get("cw_vol", cw_vol, cw_vol); spref.get("cw_spot", cw_spot, cw_spot); if (spref.get("spot_onoff", i, i)) spot_onoff = i; spref.get("cw_spot_tone", cw_spot_tone, cw_spot_tone); spref.get("cw_qsk", cw_qsk, cw_qsk); if (spref.get("enable_keyer", i, i)) enable_keyer = i; if (spref.get("vox_onoff", i, i)) vox_onoff = i; spref.get("vox_gain", vox_gain, vox_gain); spref.get("vox_anti", vox_anti, vox_anti); spref.get("vox_hang", vox_hang, vox_hang); spref.get("compression", compression, compression); if (spref.get("compON", i, i)) compON = i; } if (spref.get("noise_reduction", i, i)) noise_reduction = i; spref.get("noise_red_val", noise_reduction_val, noise_reduction_val); spref.get("nb_level", nb_level, nb_level); if (spref.get("bool_noise", i, i)) noise = i; spref.get("int_preamp", preamp, preamp); spref.get("int_att", attenuator, attenuator); spref.get("vfo_adj", vfo_adj, vfo_adj); spref.get("bfo_freq", bfo_freq, bfo_freq); spref.get("rit_freq", rit_freq, rit_freq); spref.get("xit_freq", xit_freq, xit_freq); spref.get("bpf_center", bpf_center, bpf_center); spref.get("use_bpf_center", i, i); use_bpf_center = i; spref.get("fg_red", fg_red, fg_red); spref.get("fg_green", fg_green, fg_green); spref.get("fg_blue", fg_blue, fg_blue); spref.get("bg_red", bg_red, bg_red); spref.get("bg_green", bg_green, bg_green); spref.get("bg_blue", bg_blue, bg_blue); spref.get("smeter_red", smeterRed, smeterRed); spref.get("smeter_green", smeterGreen, smeterGreen); spref.get("smeter_blue", smeterBlue, smeterBlue); spref.get("power_red", pwrRed, pwrRed); spref.get("power_green", pwrGreen, pwrGreen); spref.get("power_blue", pwrBlue, pwrBlue); spref.get("swr_red", swrRed, swrRed); spref.get("swr_green", swrGreen, swrGreen); spref.get("swr_blue", swrBlue, swrBlue); spref.get("peak_red", peakRed, peakRed); spref.get("peak_green", peakGreen, peakGreen); spref.get("peak_blue", peakBlue, peakBlue); spref.get("fg_sys_red", fg_sys_red, fg_sys_red); spref.get("fg_sys_green", fg_sys_green, fg_sys_green); spref.get("fg_sys_blue", fg_sys_blue, fg_sys_blue); spref.get("bg_sys_red", bg_sys_red, bg_sys_red); spref.get("bg_sys_green", bg_sys_green, bg_sys_green); spref.get("bg_sys_blue", bg_sys_blue, bg_sys_blue); spref.get("bg2_sys_red", bg2_sys_red, bg2_sys_red); spref.get("bg2_sys_green", bg2_sys_green, bg2_sys_green); spref.get("bg2_sys_blue", bg2_sys_blue, bg2_sys_blue); spref.get("slider_red", slider_red, slider_red); spref.get("slider_green", slider_green, slider_green); spref.get("slider_blue", slider_blue, slider_blue); spref.get("slider_btn_red", slider_btn_red, slider_btn_red); spref.get("slider_btn_green", slider_btn_green, slider_btn_green); spref.get("slider_btn_blue", slider_btn_blue, slider_btn_blue); spref.get("lighted_btn_red", lighted_btn_red, lighted_btn_red); spref.get("lighted_btn_green", lighted_btn_green, lighted_btn_green); spref.get("lighted_btn_blue", lighted_btn_blue, lighted_btn_blue); i = (int)fontnbr; spref.get("fontnbr", i, i); fontnbr = (Fl_Font)i; i = 0; if (spref.get("tooltips", i, i)) tooltips = i; spref.get("ui_scheme", defbuffer, "gtk+", 199); ui_scheme = defbuffer; spref.get("server_port", defbuffer, "7362", 199); server_port = defbuffer; spref.get("server_addr", defbuffer, "127.0.0.1", 199); server_addr = defbuffer; spref.get("tcpip_port", defbuffer, "4001", 199); tcpip_port = defbuffer; spref.get("tcpip_addr", defbuffer, "127.0.0.1", 199); tcpip_addr = defbuffer; spref.get("tcpip_ping_delay", tcpip_ping_delay, tcpip_ping_delay); spref.get("tcpip_tcpip_reconnect_after", tcpip_reconnect_after, tcpip_reconnect_after); spref.get("tcpip_drops_allowed", tcpip_drops_allowed, tcpip_drops_allowed); if (spref.get("use_tcpip", i, i)) use_tcpip = i; if (spref.get("xcvr_auto_on", i, i)) xcvr_auto_on = i; if (spref.get("xcvr_auto_off", i, i)) xcvr_auto_off = i; if (spref.get("external_tuner", i,i)) external_tuner = i; if (spref.get("fldigi_is_server", i,i)) fldigi_is_server = i; if (spref.get("hrd_buttons", i, i)) hrd_buttons = i; } return true; } void status::loadLastState() { Fl_Preferences xcvrpref(RigHomeDir.c_str(), "w1hkj.com", PACKAGE_TARNAME); if (xcvrpref.entryExists("xcvr_name")) { char defbuffer[200]; xcvrpref.get("xcvr_name", defbuffer, "NONE", 199); xcvr_name = defbuffer; // for backward compatability } else if (xcvrpref.entryExists("last_xcvr_used")) { char defbuffer[200]; xcvrpref.get("last_xcvr_used", defbuffer, "NONE", 199); xcvr_name = defbuffer; } loadXcvrState(xcvr_name.c_str()); } void status::UI_laststate() { Fl_Color bgclr = fl_rgb_color(bg_red, bg_green, bg_blue); Fl_Color fgclr = fl_rgb_color(fg_red, fg_green, fg_blue); Fl::background( bg_sys_red, bg_sys_green, bg_sys_blue); Fl::background2( bg2_sys_red, bg2_sys_green, bg2_sys_blue); Fl::foreground( fg_sys_red, fg_sys_green, fg_sys_blue); FreqDispA->SetONOFFCOLOR( fgclr, bgclr ); FreqDispA->font(fontnbr); FreqDispB->SetONOFFCOLOR( fgclr, fl_color_average(bgclr, FL_BLACK, 0.87)); FreqDispB->font(fontnbr); scaleSmeter->color(bgclr); scaleSmeter->labelcolor(fgclr); scalePower->color(bgclr); scalePower->labelcolor(fgclr); btnALC_SWR->color(bgclr); btnALC_SWR->labelcolor(fgclr); sldrFwdPwr->color(fl_rgb_color (pwrRed, pwrGreen, pwrBlue), bgclr); sldrFwdPwr->PeakColor(fl_rgb_color(peakRed, peakGreen, peakBlue)); sldrRcvSignal->color(fl_rgb_color (smeterRed, smeterGreen, smeterBlue), bgclr); sldrRcvSignal->PeakColor(fl_rgb_color(peakRed, peakGreen, peakBlue)); sldrALC->color(fl_rgb_color (swrRed, swrGreen, swrBlue), bgclr); sldrALC->PeakColor(fl_rgb_color(peakRed, peakGreen, peakBlue)); sldrSWR->color(fl_rgb_color (swrRed, swrGreen, swrBlue), bgclr); sldrSWR->PeakColor(fl_rgb_color(peakRed, peakGreen, peakBlue)); if (UIsize != small_ui) meter_fill_box->color(bgclr); grpMeters->color(bgclr); grpMeters->labelcolor(fgclr); Fl_Color btn_lt_color = fl_rgb_color(lighted_btn_red, lighted_btn_green, lighted_btn_blue); if (btnVol) btnVol->selection_color(btn_lt_color); if (btnNR) btnNR->selection_color(btn_lt_color); if (btnIFsh) btnIFsh->selection_color(btn_lt_color); if (btnNotch) btnNotch->selection_color(btn_lt_color); if (btnA) btnA->selection_color(btn_lt_color); if (btnB) btnB->selection_color(btn_lt_color); if (btnSplit) btnSplit->selection_color(btn_lt_color); if (btnAttenuator) btnAttenuator->selection_color(btn_lt_color); if (btnPreamp) btnPreamp->selection_color(btn_lt_color); if (btnNOISE) btnNOISE->selection_color(btn_lt_color); if (btnAutoNotch) btnAutoNotch->selection_color(btn_lt_color); if (btnTune) btnTune->selection_color(btn_lt_color); if (btnPTT) btnPTT->selection_color(btn_lt_color); if (btnAuxRTS) btnAuxRTS->selection_color(btn_lt_color); if (btnAuxDTR) btnAuxDTR->selection_color(btn_lt_color); if (btnSpot) btnSpot->selection_color(btn_lt_color); if (btn_vox) btn_vox->selection_color(btn_lt_color); if (btnCompON) btnCompON->selection_color(btn_lt_color); if (btnSpecial) btnSpecial->selection_color(btn_lt_color); if (btn_tt550_vox) btn_tt550_vox->selection_color(btn_lt_color); if (btn_tt550_CompON) btn_tt550_CompON->selection_color(btn_lt_color); Fl_Color bg_slider = fl_rgb_color(slider_red, slider_green, slider_blue); Fl_Color btn_slider = fl_rgb_color(slider_btn_red, slider_btn_green, slider_btn_blue); if (sldrVOLUME) sldrVOLUME->color(bg_slider); if (sldrVOLUME) sldrVOLUME->selection_color(btn_slider); if (sldrRFGAIN) sldrRFGAIN->color(bg_slider); if (sldrRFGAIN) sldrRFGAIN->selection_color(btn_slider); if (sldrSQUELCH) sldrSQUELCH->color(bg_slider); if (sldrSQUELCH) sldrSQUELCH->selection_color(btn_slider); if (sldrNR) sldrNR->color(bg_slider); if (sldrNR) sldrNR->selection_color(btn_slider); if (sldrIFSHIFT) sldrIFSHIFT->color(bg_slider); if (sldrIFSHIFT) sldrIFSHIFT->selection_color(btn_slider); if (sldrNOTCH) sldrNOTCH->color(bg_slider); if (sldrNOTCH) sldrNOTCH->selection_color(btn_slider); if (sldrMICGAIN) sldrMICGAIN->color(bg_slider); if (sldrMICGAIN) sldrMICGAIN->selection_color(btn_slider); if (sldrPOWER) sldrPOWER->color(bg_slider); if (sldrPOWER) sldrPOWER->selection_color(btn_slider); if (spnrPOWER) spnrPOWER->color(bg_slider); if (spnrPOWER) spnrPOWER->selection_color(btn_slider); if (spnrVOLUME) spnrVOLUME->color(bg_slider); if (spnrVOLUME) spnrVOLUME->selection_color(btn_slider); if (spnrRFGAIN) spnrRFGAIN->color(bg_slider); if (spnrRFGAIN) spnrRFGAIN->selection_color(btn_slider); if (spnrSQUELCH) spnrSQUELCH->color(bg_slider); if (spnrSQUELCH) spnrSQUELCH->selection_color(btn_slider); if (spnrNR) spnrNR->color(bg_slider); if (spnrNR) spnrNR->selection_color(btn_slider); if (spnrIFSHIFT) spnrIFSHIFT->color(bg_slider); if (spnrIFSHIFT) spnrIFSHIFT->selection_color(btn_slider); if (spnrNOTCH) spnrNOTCH->color(bg_slider); if (spnrNOTCH) spnrNOTCH->selection_color(btn_slider); if (spnrMICGAIN) spnrMICGAIN->color(bg_slider); if (spnrMICGAIN) spnrMICGAIN->selection_color(btn_slider); if (use_rig_data) mnuKeepData->set(); else mnuKeepData->clear(); if (restore_rig_data) mnuRestoreData->set(); else mnuRestoreData->clear(); Fl::scheme(ui_scheme.c_str()); } flrig-1.3.24/src/support/support.cxx0000644000175000017500000032516612646444222014413 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include "icons.h" #include "support.h" #include "debug.h" #include "gettext.h" #include "rig_io.h" #include "dialogs.h" #include "rigbase.h" #include "ptt.h" #include "socket_io.h" #include "ui.h" #include "rig.h" #include "rigs.h" #include "K3_ui.h" #include "KX3_ui.h" #include "rigpanel.h" using namespace std; rigbase *selrig = rigs[0]; extern bool test; bool flrig_abort = false; int freqval = 0; FREQMODE vfoA = {14070000, 0, 0, UI}; FREQMODE vfoB = {7070000, 0, 0, UI}; FREQMODE vfo = {0, 0, 0, UI}; FREQMODE transceiverA; FREQMODE transceiverB; FREQMODE xmlvfo = vfoA; enum {VOL, MIC, PWR, SQL, IFSH, NOTCH, RFGAIN, NR }; struct SLIDER { int which; float value; int button; SLIDER(int a, float f, int b = 0) {which = a; value = f; button = b;} }; queue sliders; queue queA; queue queB; queue quePTT; bool useB = false; bool changed_vfo = false; bool pushedB = false; bool volume_changed = false; bool mic_changed = false; bool power_changed = false; bool squelch_changed = false; bool if_shift_changed = false; bool notch_changed = false; bool rfgain_changed = false; bool noise_reduction_changed = false; const char **old_bws = NULL; // Add alpha-tag to FREQMODE; struct ATAG_FREQMODE { long freq; int imode; int iBW; int src; char alpha_tag[ATAGSIZE]; }; ATAG_FREQMODE oplist[LISTSIZE]; int numinlist = 0; vector rigmodes_; vector rigbws_; Cserial RigSerial; Cserial AuxSerial; Cserial SepSerial; bool using_buttons = false; enum { SWR_IMAGE, ALC_IMAGE }; int meter_image = SWR_IMAGE; //============================================================================= // loop for serial i/o thread // runs continuously until program is closed // only accesses the serial port if it has been successfully opened //============================================================================= bool bypass_serial_thread_loop = true; bool run_serial_thread = true; bool PTT = false; int powerlevel = 0; char *print(FREQMODE data) { static char str[100]; const char **bwt = selrig->bwtable(data.imode); const char **dsplo = selrig->lotable(data.imode); const char **dsphi = selrig->hitable(data.imode); snprintf(str, sizeof(str), "%3s,%10ld, %4s, %x => %5s %5s", data.src == XML ? "xml" : data.src == UI ? "ui" : "srvr", data.freq, selrig->modes_ ? selrig->modes_[data.imode] : "modes n/a", data.iBW, (data.iBW > 256 && selrig->has_dsp_controls) ? (dsplo ? dsplo[data.iBW & 0x7F] : "??") : (bwt ? bwt[data.iBW] : "lo n/a"), (data.iBW > 256 && selrig->has_dsp_controls) ? (dsphi ? dsphi[(data.iBW >> 8) & 0x7F] : "??") : "hi n/a" ); return str; } // the following functions are ONLY CALLED by the serial loop // read any data stream sent by transceiver // support for the K3 and KX3 read of VFO, MODE and BW are // in the K3_ui and KX3_ui source files void read_info() { guard_lock serial_lock(&mutex_serial, 1); selrig->get_info(); } // read current vfo frequency void read_vfo() { // transceiver changed ? guard_lock serial_lock(&mutex_serial, 2); long freq; if (!useB) { // vfo-A freq = selrig->get_vfoA(); if (freq != vfoA.freq) { vfoA.freq = freq; Fl::awake(setFreqDispA, (void *)vfoA.freq); vfo = vfoA; } if ( selrig->twovfos() ) { freq = selrig->get_vfoB(); if (freq != vfoB.freq) { vfoB.freq = freq; Fl::awake(setFreqDispB, (void *)vfoB.freq); } } } else { // vfo-B freq = selrig->get_vfoB(); if (freq != vfoB.freq) { vfoB.freq = freq; Fl::awake(setFreqDispB, (void *)vfoB.freq); vfo = vfoB; } if ( selrig->twovfos() ) { freq = selrig->get_vfoA(); if (freq != vfoA.freq) { vfoA.freq = freq; Fl::awake(setFreqDispA, (void *)vfoA.freq); } } } } void update_vfoAorB(void *d) { long val = (long)d; if (val) { // could use cb_selectB() here, but that switches off split mode guard_lock serial_lock(&mutex_serial, 95); changed_vfo = true; vfoB.src = UI; vfoB.freq = FreqDispB->value(); guard_lock queB_lock(&mutex_queB, 96); queB.push(vfoB); useB = true; highlight_vfo((void *)0); } else { // could use cb_selectA() here, but that switches off split mode guard_lock serial_lock(&mutex_serial, 97); changed_vfo = true; vfoA.src = UI; vfoA.freq = FreqDispA->value(); guard_lock queA_lock(&mutex_queA, 98); queA.push(vfoA); useB = false; highlight_vfo((void *)0); } } void read_vfoAorB() { int val; if (selrig->has_getvfoAorB) { { guard_lock serial_lock(&mutex_serial, 99); val = selrig->get_vfoAorB(); } if (val != useB) { Fl::awake(update_vfoAorB, reinterpret_cast(val)); } } } void setModeControl(void *) { opMODE->index(vfo.imode); // enables/disables the IF shift control, depending on the mode. // the IF Shift function, is ONLY valid in CW modes, with the 870S. if (xcvr_name == rig_TS870S.name_) { if (vfo.imode == RIG_TS870S::tsCW || vfo.imode == RIG_TS870S::tsCWR) { btnIFsh->activate(); if (sldrIFSHIFT) sldrIFSHIFT->activate(); if (spnrIFSHIFT) spnrIFSHIFT->activate(); } else { btnIFsh->deactivate(); if (sldrIFSHIFT) sldrIFSHIFT->deactivate(); if (spnrIFSHIFT) spnrIFSHIFT->deactivate(); } } } // mode and bandwidth void read_mode() { guard_lock serial_lock(&mutex_serial, 3); int nu_mode; int nu_BW; if (!useB) { nu_mode = selrig->get_modeA(); if (nu_mode != vfoA.imode) { { vfoA.imode = vfo.imode = nu_mode; selrig->adjust_bandwidth(vfo.imode); nu_BW = selrig->get_bwA(); vfoA.iBW = vfo.iBW = nu_BW; } // Fl::awake(setModeControl); set_bandwidth_control(); Fl::awake(setModeControl); } } else { nu_mode = selrig->get_modeB(); if (nu_mode != vfoB.imode) { { vfoB.imode = vfo.imode = nu_mode; selrig->adjust_bandwidth(vfo.imode); nu_BW = selrig->get_bwB(); vfoB.iBW = vfo.iBW = nu_BW; } // Fl::awake(setModeControl); set_bandwidth_control(); Fl::awake(setModeControl); } } } void setBWControl(void *) { if (selrig->has_dsp_controls) { if (vfo.iBW > 256) { opBW->index(0); opBW->hide(); opDSP_hi->index((vfo.iBW >> 8) & 0x7F); opDSP_hi->hide(); opDSP_lo->index(vfo.iBW & 0xFF); opDSP_lo->show(); btnDSP->label(selrig->SL_label); btnDSP->redraw_label(); btnDSP->show(); } else { opDSP_lo->index(0); opDSP_hi->index(0); opDSP_lo->hide(); opDSP_hi->hide(); btnDSP->hide(); opBW->index(vfo.iBW); opBW->show(); } } else { opDSP_lo->hide(); opDSP_hi->hide(); btnDSP->hide(); opBW->index(vfo.iBW); opBW->show(); } } void read_bandwidth() { guard_lock serial_lock(&mutex_serial, 5); int nu_BW; if (!useB) { nu_BW = selrig->get_bwA(); if (nu_BW != vfoA.iBW) { vfoA.iBW = vfo.iBW = nu_BW; Fl::awake(setBWControl); } } else { nu_BW = selrig->get_bwB(); if (nu_BW != vfoB.iBW) { vfoB.iBW = vfo.iBW = nu_BW; Fl::awake(setBWControl); } } } // read current signal level int mval = 0; void read_smeter() { if (!selrig->has_smeter) return; int sig; { guard_lock serial_lock(&mutex_serial, 7); sig = selrig->get_smeter(); } if (sig == -1) return; mval = sig; Fl::awake(updateSmeter, reinterpret_cast(sig)); } // read power out void read_power_out() { if (!selrig->has_power_out) return; int sig; { guard_lock serial_lock(&mutex_serial, 8); sig = selrig->get_power_out(); } if (sig == -1) return; mval = sig; Fl::awake(updateFwdPwr, reinterpret_cast(sig)); } // read swr void read_swr() { if ((meter_image != SWR_IMAGE) || !selrig->has_swr_control) return; int sig; { guard_lock serial_lock(&mutex_serial, 9); sig = selrig->get_swr(); } if (sig > -1) Fl::awake(updateSWR, reinterpret_cast(sig)); } // alc void read_alc() { if ((meter_image != ALC_IMAGE) || !selrig->has_alc_control) return; int sig; { guard_lock serial_lock(&mutex_serial, 10); sig = selrig->get_alc(); } if (sig > -1) Fl::awake(updateALC, reinterpret_cast(sig)); } // notch void update_auto_notch(void *d) { btnAutoNotch->value(progStatus.auto_notch); } void read_auto_notch() { if (!selrig->has_auto_notch || notch_changed) return; { guard_lock serial_lock(&mutex_serial, 11); progStatus.auto_notch = selrig->get_auto_notch(); } Fl::awake(update_auto_notch, (void*)0); } // NOISE blanker void update_noise(void *d) { btnNOISE->value(progStatus.noise); } void read_noise() { { guard_lock serial_lock(&mutex_serial, 12); progStatus.noise = selrig->get_noise(); } Fl::awake(update_noise, (void*)0); } // preamp - attenuator void update_preamp(void *d) { btnPreamp->value(progStatus.preamp); } void update_attenuator(void *d) { btnAttenuator->value(progStatus.attenuator); } void read_preamp_att() { if (selrig->has_preamp_control) { { guard_lock serial_lock(&mutex_serial, 13); progStatus.preamp = selrig->get_preamp(); } Fl::awake(update_preamp, (void*)0); } if (selrig->has_attenuator_control) { { guard_lock serial_lock(&mutex_serial, 14); progStatus.attenuator = selrig->get_attenuator(); } Fl::awake(update_attenuator, (void*)0); } } // split void update_split(void *d) { if (xcvr_name == rig_FT450.name_ || xcvr_name == rig_FT450D.name_ || xcvr_name == rig_FT950.name_ || xcvr_name == rig_FTdx1200.name_ || xcvr_name == rig_TS480SAT.name_ || xcvr_name == rig_TS480HX.name_ || xcvr_name == rig_TS590S.name_ || xcvr_name == rig_TS590SG.name_ || xcvr_name == rig_TS2000.name_ || xcvr_name == rig_TS990.name_) { switch (progStatus.split) { case 0: btnSplit->value(0); useB = false; highlight_vfo(NULL); break; case 1: btnSplit->value(1); useB = true; highlight_vfo(NULL); break; case 2: btnSplit->value(1); useB = false; highlight_vfo(NULL); break; case 3: btnSplit->value(0); useB = true; highlight_vfo(NULL); break; } } else btnSplit->value(progStatus.split); } void read_split() { int val = progStatus.split; if (selrig->can_split()) { { guard_lock serial_lock(&mutex_serial, 15); val = selrig->get_split(); } if (val != progStatus.split) { progStatus.split = val; Fl::awake(update_split, (void*)0); } } } // volume void update_volume(void *d) { long *nr = (long *)d; if (spnrVOLUME) spnrVOLUME->value(progStatus.volume); if (spnrVOLUME) spnrVOLUME->activate(); sldrVOLUME->value(progStatus.volume); // Set slider to last known value sldrVOLUME->activate(); // activate it if (*nr) btnVol->value(1); // Button Lit else btnVol->value(0); // Button Dark. } long nlzero = 0L; long nlone = 1L; void read_volume() { if (!selrig->has_volume_control || volume_changed) return; int vol; { guard_lock serial_lock(&mutex_serial, 16); vol = selrig->get_volume_control(); } if (vol != progStatus.volume) { if (vol <= 1 && !btnVol->value()) return; progStatus.volume = vol; if (vol <= 1 && btnVol->value()) Fl::awake(update_volume, (void*)&nlzero); else Fl::awake(update_volume, (void*)&nlone); } } // ifshift void update_ifshift(void *d) { btnIFsh->value(progStatus.shift); // if (progStatus.shift) if (sldrIFSHIFT) sldrIFSHIFT->value(progStatus.shift_val); if (spnrIFSHIFT) spnrIFSHIFT->value(progStatus.shift_val); } void read_ifshift() { if (!selrig->has_ifshift_control || if_shift_changed) return; { guard_lock serial_lock(&mutex_serial, 17); progStatus.shift = selrig->get_if_shift(progStatus.shift_val); } Fl::awake(update_ifshift, (void*)0); } // noise reduction void update_nr(void *d) { btnNR->value(progStatus.noise_reduction); if (sldrNR) sldrNR->value(progStatus.noise_reduction_val); if (spnrNR) spnrNR->value(progStatus.noise_reduction_val); } void read_nr() { if (!selrig->has_noise_reduction || noise_reduction_changed) return; { guard_lock serial_lock(&mutex_serial, 18); progStatus.noise_reduction = selrig->get_noise_reduction(); progStatus.noise_reduction_val = selrig->get_noise_reduction_val(); } Fl::awake(update_nr, (void*)0); } // manual notch bool rig_notch; int rig_notch_val; void update_notch(void *d) { btnNotch->value(progStatus.notch = rig_notch); if (sldrNOTCH) sldrNOTCH->value(progStatus.notch_val = rig_notch_val); if (spnrNOTCH) spnrNOTCH->value(progStatus.notch_val = rig_notch_val); } void read_notch() { if (!selrig->has_notch_control || notch_changed) return; { guard_lock serial_lock(&mutex_serial, 19); rig_notch = selrig->get_notch(rig_notch_val); } if (rig_notch != progStatus.notch || rig_notch_val != progStatus.notch_val) Fl::awake(update_notch, (void*)0); } // power_control void update_power_control(void *d) { set_power_controlImage(progStatus.power_level); if (sldrPOWER) sldrPOWER->value(progStatus.power_level); if (spnrPOWER) spnrPOWER->value(progStatus.power_level); if (xcvr_name == rig_K2.name_) { double min, max, step; selrig->get_pc_min_max_step(min, max, step); if (sldrPOWER) sldrPOWER->minimum(min); if (sldrPOWER) sldrPOWER->maximum(max); if (sldrPOWER) sldrPOWER->step(step); if (sldrPOWER) sldrPOWER->redraw(); if (spnrPOWER) spnrPOWER->minimum(min); if (spnrPOWER) spnrPOWER->maximum(max); if (spnrPOWER) spnrPOWER->step(step); if (spnrPOWER) spnrPOWER->redraw(); } } void read_power_control() { if (!selrig->has_power_control || power_changed) return; { guard_lock serial_lock(&mutex_serial, 20); progStatus.power_level = selrig->get_power_control(); } Fl::awake(update_power_control, (void*)0); } // mic gain void update_mic_gain(void *d) { if (sldrMICGAIN) sldrMICGAIN->value(progStatus.mic_gain); if (spnrMICGAIN) spnrMICGAIN->value(progStatus.mic_gain); } void read_mic_gain() { if (!selrig->has_micgain_control || mic_changed) return; { guard_lock serial_lock(&mutex_serial, 21); progStatus.mic_gain = selrig->get_mic_gain(); } Fl::awake(update_mic_gain, (void*)0); } // rf gain void update_rfgain(void *d) { if (sldrRFGAIN) sldrRFGAIN->value(progStatus.rfgain); if (spnrRFGAIN) spnrRFGAIN->value(progStatus.rfgain); } void read_rfgain() { if (!selrig->has_rf_control || rfgain_changed) return; { guard_lock serial_lock(&mutex_serial, 22); progStatus.rfgain = selrig->get_rf_gain(); } Fl::awake(update_rfgain, (void*)0); } // squelch void update_squelch(void *d) { if (sldrSQUELCH) sldrSQUELCH->value(progStatus.squelch); if (spnrSQUELCH) spnrSQUELCH->value(progStatus.squelch); } void read_squelch() { if (!selrig->has_sql_control || squelch_changed) return; { guard_lock serial_lock(&mutex_serial, 23); progStatus.squelch = selrig->get_squelch(); } Fl::awake(update_squelch, (void*)0); } static bool resetrcv = true; static bool resetxmt = true; void serviceA() { if (queA.empty()) return; guard_lock serial_lock(&mutex_serial, 24); { guard_lock queA_lock(&mutex_queA, 25); while (!queA.empty()) { vfoA = queA.front(); queA.pop(); } } // if (RIG_DEBUG) LOG_INFO("%s", print(vfoA)); if (!selrig->can_change_alt_vfo && useB) return; if (changed_vfo && !useB) { selrig->selectA(); } // if TT550 etal and on the B vfo if (selrig->can_change_alt_vfo && useB) { selrig->set_vfoA(vfoA.freq); goto end_serviceA; } if (vfoA.freq != vfo.freq || changed_vfo) { selrig->set_vfoA(vfoA.freq); Fl::awake(setFreqDispA, (void *)vfoA.freq); vfo.freq = vfoA.freq; } // adjust for change in bandwidths_ if (vfoA.imode != vfo.imode || changed_vfo) { selrig->set_modeA(vfoA.imode); vfo.imode = vfoA.imode; Fl::awake(setModeControl); vfo.iBW = vfoA.iBW; set_bandwidth_control(); Fl::awake(setBWControl); selrig->set_bwA(vfo.iBW); } else if (vfoA.iBW != vfo.iBW) { selrig->set_bwA(vfoA.iBW); vfo.iBW = vfoA.iBW; Fl::awake(setBWControl); } end_serviceA: changed_vfo = false; } void serviceB() { if (queB.empty()) return; guard_lock serial_lock(&mutex_serial, 26); { guard_lock queB_lock(&mutex_queB, 27); while (!queB.empty()) { vfoB = queB.front(); queB.pop(); } } // if (RIG_DEBUG) LOG_INFO("%s", print(vfoB)); if (!selrig->can_change_alt_vfo && !useB) return; if (changed_vfo && useB) { selrig->selectB(); } // if TT550 or K3 and split or on vfoA just update the B vfo if ((xcvr_name == rig_K3.name_) || (selrig->can_change_alt_vfo && !useB)) { selrig->set_vfoB(vfoB.freq); goto end_serviceB; } if (vfoB.freq != vfo.freq || pushedB || changed_vfo) { selrig->set_vfoB(vfoB.freq); vfo.freq = vfoB.freq; Fl::awake(setFreqDispB, (void *)vfoB.freq); } if (vfoB.imode != vfo.imode || pushedB || changed_vfo) { selrig->set_modeB(vfoB.imode); vfo.imode = vfoB.imode; Fl::awake(setModeControl); vfo.iBW = vfoB.iBW; set_bandwidth_control(); Fl::awake(setBWControl); selrig->set_bwB(vfo.iBW); } else if (vfoB.iBW != vfo.iBW || pushedB) { selrig->set_bwB(vfoB.iBW); vfo.iBW = vfoB.iBW; Fl::awake(setBWControl); } pushedB = false; end_serviceB: changed_vfo = false; } void servicePTT() { // if (!tcpip && !RigSerial.IsOpen()) return; guard_lock ptt_lock(&mutex_ptt, 28); while (!quePTT.empty()) { PTT = quePTT.front(); quePTT.pop(); rigPTT(PTT); Fl::awake(update_UI_PTT); } } void serviceSliders() { if (!tcpip && !RigSerial.IsOpen()) return; SLIDER working(0,0); guard_lock serial_lock(&mutex_serial, 29); while(!sliders.empty()) { working = sliders.front(); sliders.pop(); switch (working.which) { case VOL: selrig->set_volume_control(working.value); progStatus.volume = working.value; volume_changed = false; break; case MIC: progStatus.mic_gain = working.value; selrig->set_mic_gain(working.value); mic_changed = false; break; case PWR: selrig->set_power_control(working.value); power_changed = false; break; case SQL: progStatus.squelch = working.value; selrig->set_squelch(working.value); squelch_changed = false; break; case IFSH: progStatus.shift = working.button; progStatus.shift_val = working.value; selrig->set_if_shift(working.value); if_shift_changed = false; break; case NOTCH: progStatus.notch = working.button; progStatus.notch_val = working.value; selrig->set_notch(working.button, working.value); notch_changed = false; break; case RFGAIN: progStatus.rfgain = working.value; selrig->set_rf_gain(working.value); rfgain_changed = false; break; case NR: if (xcvr_name == rig_TS2000.name_) { if (working.button != -1) { // pia if (selrig->noise_reduction_level() == 0) { selrig->set_noise_reduction(1); selrig->set_noise_reduction_val(selrig->nrval1()); progStatus.noise_reduction = 1; progStatus.noise_reduction_val = selrig->nrval1(); Fl::awake(update_nr, (void*)0); } else if (selrig->currmode() != RIG_TS2000::FM && selrig->noise_reduction_level() == 1) { selrig->set_noise_reduction(2); selrig->set_noise_reduction_val(selrig->nrval2()); progStatus.noise_reduction = 2; progStatus.noise_reduction_val = selrig->nrval2(); Fl::awake(update_nr, (void*)0); } else selrig->set_noise_reduction(0); } else { progStatus.noise_reduction_val = working.value; selrig->set_noise_reduction_val(working.value); Fl::awake(update_nr, (void*)0); } } else { // not TS2000 if (working.button != -1) { progStatus.noise_reduction = working.button; selrig->set_noise_reduction(working.button); } progStatus.noise_reduction_val = working.value; selrig->set_noise_reduction_val(working.value); } noise_reduction_changed = false; break; default : break; } } } inline bool que_pending() { if (!quePTT.empty()) return true; if (!queA.empty()) return true; if (!queB.empty()) return true; return false; } void * serial_thread_loop(void *d) { static int loopcount = progStatus.serloop_timing / 10; static int poll_nbr = 0; for(;;) { if (!run_serial_thread) break; MilliSleep(10); if (bypass_serial_thread_loop) { goto serial_bypass_loop; } serviceSliders(); servicePTT(); //send any freq/mode/bw changes in the queu if (!PTT) { serviceA(); if (!quePTT.empty()) continue; serviceB(); if (que_pending()) continue; if (resetrcv) { Fl::awake(zeroXmtMeters, 0); resetrcv = false; loopcount = progStatus.serloop_timing / 10; poll_nbr = 0; } resetxmt = true; if (!loopcount--) { loopcount = progStatus.serloop_timing / 10; poll_nbr++; if (xcvr_name == rig_K3.name_) { if (que_pending()) continue; read_K3(); } else if (xcvr_name == rig_KX3.name_) { if (que_pending()) continue; read_KX3(); } else if ((xcvr_name == rig_K2.name_) || (selrig->has_get_info && (progStatus.poll_frequency || progStatus.poll_mode || progStatus.poll_bandwidth))) { if (que_pending()) continue; read_info(); } else { if (progStatus.poll_frequency) if (!(poll_nbr % progStatus.poll_frequency)) { read_vfo(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_mode) if (!(poll_nbr % progStatus.poll_mode)) { read_mode(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_bandwidth) if (!(poll_nbr % progStatus.poll_bandwidth)) { read_bandwidth(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; } if (progStatus.poll_smeter) if (!(poll_nbr % progStatus.poll_smeter)) { read_smeter(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_volume) if (!(poll_nbr % progStatus.poll_volume)) { read_volume(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_auto_notch) if (!(poll_nbr % progStatus.poll_auto_notch)) { read_auto_notch(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_notch) if (!(poll_nbr % progStatus.poll_notch)) { read_notch(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_ifshift) if (!(poll_nbr % progStatus.poll_ifshift)) { read_ifshift(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_power_control) if (!(poll_nbr % progStatus.poll_power_control)) { read_power_control(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_pre_att) if (!(poll_nbr % progStatus.poll_pre_att)) { read_preamp_att(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_micgain) if (!(poll_nbr % progStatus.poll_micgain)) { read_mic_gain(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_squelch) if (!(poll_nbr % progStatus.poll_squelch)) { read_squelch(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_rfgain) if (!(poll_nbr % progStatus.poll_rfgain)) { read_rfgain(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_split) if (!(poll_nbr % progStatus.poll_split)) { read_split(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_vfoAorB) if (!(poll_nbr % progStatus.poll_vfoAorB)) { read_vfoAorB(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_nr) if (!(poll_nbr % progStatus.poll_nr)) { read_nr(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; if (que_pending()) continue; if (progStatus.poll_noise) if (!(poll_nbr % progStatus.poll_noise)) { read_noise(); } if (bypass_serial_thread_loop) goto serial_bypass_loop; } } else { if (resetxmt) { Fl::awake(updateSmeter, (void *)(0)); resetxmt = false; loopcount = progStatus.serloop_timing / 10; poll_nbr = 0; } resetrcv = true; if (!loopcount--) { loopcount = progStatus.serloop_timing / 10; poll_nbr++; if (progStatus.poll_pout) if (!(poll_nbr % progStatus.poll_pout)) read_power_out(); if (!quePTT.empty()) continue; if (progStatus.poll_swr) if (!(poll_nbr % progStatus.poll_swr)) read_swr(); if (!quePTT.empty()) continue; if (progStatus.poll_alc) if (!(poll_nbr % progStatus.poll_alc)) read_alc(); } } serial_bypass_loop: ; } return NULL; } //============================================================================= void setBW() { FREQMODE fm = vfo; fm.src = UI; fm.iBW = opBW->index(); if (useB) { guard_lock queB_lock(&mutex_queB, 30); queB.push(fm); } else { guard_lock queA_lock(&mutex_queA, 31); queA.push(fm); } } void setDSP() { FREQMODE fm = vfo; fm.src = UI; fm.iBW = ((opDSP_hi->index() << 8) | 0x8000) | (opDSP_lo->index() & 0xFF) ; if (useB) { guard_lock queB_lock(&mutex_queB, 32); queB.push(fm); } else { guard_lock queA_lock(&mutex_queA, 33); queA.push(fm); } } void selectDSP() { if (btnDSP->label()[0] == selrig->SL_label[0]) { btnDSP->label(selrig->SH_label); btnDSP->redraw_label(); opDSP_hi->show(); opDSP_lo->hide(); } else { btnDSP->label(selrig->SL_label); btnDSP->redraw_label(); opDSP_lo->show(); opDSP_hi->hide(); } } // set_bandwidth_control updates iBW and then posts the call for // the UI thread to updateBandwidthControl // changes to the UI cannot come from any thread other than the // main FL thread! Doing otherwise can cause what appears to be // random program crashes. void set_bandwidth_control() { if (!selrig->has_bandwidth_control) return; vfo.iBW = selrig->adjust_bandwidth(vfo.imode); if (vfo.iBW < 256) { int i = 0; while (selrig->bandwidths_[i]) i++; i--; if (vfo.iBW > i) vfo.iBW = selrig->def_bandwidth(vfo.imode); } useB ? vfoB.iBW = vfo.iBW : vfoA.iBW = vfo.iBW; Fl::awake(updateBandwidthControl); } void updateBandwidthControl(void *d) { if (selrig->has_bandwidth_control) { if (selrig->adjust_bandwidth(vfo.imode) != -1) { opBW->clear(); rigbws_.clear(); for (int i = 0; selrig->bandwidths_[i] != NULL; i++) { rigbws_.push_back(selrig->bandwidths_[i]); opBW->add(selrig->bandwidths_[i]); } if (selrig->has_dsp_controls) { opDSP_lo->clear(); opDSP_hi->clear(); for (int i = 0; selrig->dsp_SL[i] != NULL; i++) opDSP_lo->add(selrig->dsp_SL[i]); for (int i = 0; selrig->dsp_SH[i] != NULL; i++) opDSP_hi->add(selrig->dsp_SH[i]); if (vfo.iBW > 256) { opBW->index(0); opBW->hide(); opBW->hide(); opDSP_lo->index(vfo.iBW & 0xFF); opDSP_lo->hide(); opDSP_hi->index((vfo.iBW >> 8) & 0x7F); btnDSP->label(selrig->SL_label); opDSP_lo->show(); btnDSP->show(); } else { opDSP_lo->hide(); opDSP_hi->hide(); btnDSP->hide(); opBW->index(vfo.iBW); opBW->show(); } } else { // no DSP control so update BW control, hide DSP opDSP_lo->hide(); opDSP_hi->hide(); btnDSP->hide(); opBW->index(vfo.iBW); opBW->show(); } } } else { // no BW, no DSP controls opBW->index(0); opBW->hide(); opDSP_lo->index(0); opDSP_hi->index(0); btnDSP->hide(); opDSP_lo->hide(); opDSP_hi->hide(); } } void setMode() { FREQMODE fm = vfo; fm.imode = opMODE->index(); fm.iBW = selrig->def_bandwidth(fm.imode); fm.src = UI; if (useB) { guard_lock queB_lock(&mutex_queB, 34); queB.push(fm); } else { guard_lock queA_lock(&mutex_queA, 35); queA.push(fm); } } void sortList() { if (!numinlist) return; ATAG_FREQMODE temp; for (int i = 0; i < numinlist - 1; i++) for (int j = i + 1; j < numinlist; j++) if (oplist[i].freq > oplist[j].freq) { temp = oplist[i]; oplist[i] = oplist[j]; oplist[j] = temp; } } void clearList() { if (!numinlist) return; for (int i = 0; i < LISTSIZE; i++) { oplist[i].freq = 0; oplist[i].imode = USB; oplist[i].iBW = 0; memset(oplist[i].alpha_tag, 0, ATAGSIZE); } FreqSelect->clear(); numinlist = 0; inAlphaTag->value(""); } void updateSelect() { char szline[80 + ATAGSIZE]; char szatag[ATAGSIZE]; int i; if (!numinlist) return; sortList(); FreqSelect->clear(); // stripe lines int bg1, bg2, bg_clr; bg1 = FL_WHITE; bg2 = FL_LIGHT2; for (int n = 0; n < numinlist; n++) { memset(szline, 0, sizeof(szline)); memset(szatag, 0, sizeof(szatag)); for (i = 0; i < ATAGSIZE - 1; i++) { szatag[i] = oplist[n].alpha_tag[i]; if (szatag[i] == 0) szatag[i] = ' '; } bg_clr = (n % 2) ? bg1 : bg2; snprintf(szline, sizeof(szline), "@B%d@r%.3f\t@B%d@r%s\t@B%d@r%s\t@B%d@r%s", bg_clr, oplist[n].freq / 1000.0, bg_clr, selrig->get_bwname_(oplist[n].iBW, oplist[n].imode), bg_clr, selrig->get_modename_(oplist[n].imode), bg_clr, szatag ); FreqSelect->add (szline); } inAlphaTag->value(""); } void addtoList(int val, int imode, int iBW) { if (numinlist < LISTSIZE) { oplist[numinlist].imode = imode; oplist[numinlist].freq = val; oplist[numinlist].iBW = iBW; memset(oplist[numinlist].alpha_tag, 0, ATAGSIZE); numinlist++; } } void readFile() { ifstream iList(defFileName.c_str()); if (!iList) { fl_message ("Could not open %s", defFileName.c_str()); return; } clearList(); int i = 0, mode, bw; long freq; while (!iList.eof()) { freq = 0L; mode = -1; iList >> freq >> mode >> bw; if (freq && (mode > -1)) { oplist[i].freq = freq; oplist[i].imode = mode; oplist[i].iBW = (bw == -1 ? 0 : bw); memset(oplist[i].alpha_tag, 0, ATAGSIZE); i++; } } iList.close(); numinlist = i; updateSelect(); } void readTagFile() { ifstream iList(defFileName.c_str()); if (!iList) { fl_message ("Could not open %s", defFileName.c_str()); return; } clearList(); int i = 0, mode, bw; long freq; string atag; char ca[ATAGSIZE + 60]; while (!iList.eof()) { freq = 0L; mode = -1; atag.clear(); memset(ca, 0, sizeof(ca)); iList >> freq >> mode >> bw; iList.getline(ca, sizeof(ca) - 1); atag = ca; if (freq && (mode > -1)) { oplist[i].freq = freq; oplist[i].imode = mode; oplist[i].iBW = (bw == -1 ? 0 : bw); // trim leading, trailing spaces and double quotes atag = lt_trim(atag); snprintf(oplist[i].alpha_tag, ATAGSIZE, "%s", atag.c_str()); i++; } } iList.close(); numinlist = i; updateSelect(); } void buildlist() { string tmpFN, orgFN; // check for new Memory-Alpha-Tag file defFileName = RigHomeDir; defFileName.append(selrig->name_); defFileName.append(".mat"); FILE *fh = fopen(defFileName.c_str(), "r"); if (fh != NULL) { fclose (fh); readTagFile(); return; } // else only read original file to make new MAT file orgFN = RigHomeDir; orgFN.append(selrig->name_); orgFN.append(".arv"); fh = fopen(orgFN.c_str(), "r"); if (fh != NULL) { fclose (fh); tmpFN = defFileName; defFileName = orgFN; readFile(); defFileName = tmpFN; return; } clearList(); } // flrig front panel changed int movFreqA() { FREQMODE vfo = vfoA; vfo.freq = FreqDispA->value(); vfo.src = UI; guard_lock queA_lock(&mutex_queA, 36); queA.push(vfo); return 1; } int movFreqB() { if (progStatus.split && (!selrig->twovfos())) return 0; // disallow for ICOM transceivers FREQMODE vfo = vfoB; vfo.freq = FreqDispB->value(); vfo.src = UI; guard_lock queB_lock(&mutex_queB, 37); queB.push(vfo); return 1; } void cbAswapB() { if (selrig->canswap()) { selrig->swapvfos(); return; } if (Fl::event_button() == FL_RIGHT_MOUSE) { return cbA2B(); } if (!selrig->twovfos()) { vfoB.freq = FreqDispB->value(); FREQMODE temp = vfoB; vfoB = vfoA; vfoA = temp; FreqDispB->value(vfoB.freq); FreqDispB->redraw(); { guard_lock queA_lock(&mutex_queA, 38); while (!queA.empty()) queA.pop(); queA.push(vfoA); } } else { { guard_lock serial_lock(&mutex_serial, 39); bypass_serial_thread_loop = true; } if (!useB) { // vfoA is used, swap vfos and update display B vfoB.freq = FreqDispB->value(); FREQMODE temp = vfoB; vfoB = vfoA; vfoA = temp; FreqDispB->value(vfoB.freq); FreqDispB->redraw(); } else { // vfoB is used, swap vfos and update display A vfoA.freq = FreqDispA->value(); FREQMODE temp = vfoA; vfoA = vfoB; vfoB = temp; FreqDispA->value(vfoA.freq); FreqDispA->redraw(); } { guard_lock queA_lock(&mutex_queA, 40); while (!queA.empty()) queA.pop(); queA.push(vfoA); } { guard_lock queB_lock(&mutex_queB, 41); while (!queB.empty()) queB.pop(); queB.push(vfoB); } pushedB = true; { guard_lock serial_lock(&mutex_serial, 42); bypass_serial_thread_loop = false; } } } void cbA2B() { if (xcvr_name == rig_K3.name_) { K3_A2B(); return; } if (xcvr_name == rig_KX3.name_) { KX3_A2B(); return; } if (xcvr_name == rig_K2.name_) { guard_lock serial_lock(&mutex_serial, 43); vfoB = vfoA; selrig->set_vfoB(vfoB.freq); FreqDispB->value(vfoB.freq); return; } if (selrig->has_a2b) { guard_lock serial_lock(&mutex_serial, 44); selrig->A2B(); } vfoB = vfoA; { guard_lock queB_lock(&mutex_queB, 45); queB.push(vfoB); } FreqDispB->value(vfoB.freq); FreqDispB->redraw(); pushedB = true; } void highlight_vfo(void *d) { Fl_Color norm_fg = fl_rgb_color(progStatus.fg_red, progStatus.fg_green, progStatus.fg_blue); Fl_Color norm_bg = fl_rgb_color(progStatus.bg_red, progStatus.bg_green, progStatus.bg_blue); Fl_Color dim_bg = fl_color_average( norm_bg, FL_BLACK, 0.75); if (useB) { FreqDispA->SetONOFFCOLOR( norm_fg, dim_bg ); FreqDispB->SetONOFFCOLOR( norm_fg, norm_bg ); btnA->value(0); btnB->value(1); } else { FreqDispA->SetONOFFCOLOR( norm_fg, norm_bg ); FreqDispB->SetONOFFCOLOR( norm_fg, dim_bg); btnA->value(1); btnB->value(0); } FreqDispA->redraw(); FreqDispB->redraw(); btnA->redraw(); btnB->redraw(); Fl::flush(); } void cb_set_split(int val) { progStatus.split = val; if (selrig->has_split_AB) { guard_lock serial_lock(&mutex_serial, 46); selrig->set_split(val); } else if (val) { if (useB) { if (vfoB.freq != FreqDispB->value()) { vfoB.freq = FreqDispB->value(); guard_lock serial_lock(&mutex_serial, 47); selrig->selectB(); selrig->set_vfoB(vfoB.freq); selrig->selectA(); } btnA->value(1); btnB->value(0); cb_selectA(); } } else cb_selectA(); } void cb_selectA() { if (progStatus.split) { btnSplit->value(0); cb_set_split(0); } guard_lock serial_lock(&mutex_serial, 48); changed_vfo = true; vfoA.src = UI; vfoA.freq = FreqDispA->value(); guard_lock queA_lock(&mutex_queA, 49); queA.push(vfoA); useB = false; highlight_vfo((void *)0); } void cb_selectB() { if (progStatus.split) { btnSplit->value(0); cb_set_split(0); } guard_lock serial_lock(&mutex_serial, 50); changed_vfo = true; vfoB.src = UI; vfoB.freq = FreqDispB->value(); guard_lock queB_lock(&mutex_queB, 51); queB.push(vfoB); useB = true; highlight_vfo((void *)0); } void setLower() { } void setUpper() { } void selectFreq() { long n = FreqSelect->value(); if (!n) return; n--; FREQMODE fm; fm.freq = oplist[n].freq; fm.imode = oplist[n].imode; fm.iBW = oplist[n].iBW; fm.src = UI; if (!useB) { FreqDispA->value(fm.freq); guard_lock queA_lock(&mutex_queA, 52); queA.push(fm); } else { FreqDispB->value(fm.freq); guard_lock queB_lock(&mutex_queB, 53); queB.push(fm); } } void select_and_close() { switch (Fl::event_button()) { case FL_LEFT_MOUSE: if (FreqSelect->value() > 0) inAlphaTag->value(oplist[FreqSelect->value() - 1].alpha_tag); if (Fl::event_clicks()) { // double click selectFreq(); cbCloseMemory(); } break; case FL_RIGHT_MOUSE: if (FreqSelect->value() > 0) inAlphaTag->value(oplist[FreqSelect->value() - 1].alpha_tag); selectFreq(); break; default: break; } // update Alpha Tag field when keyboard scrolling switch (Fl::event_key()) { case FL_Up: case FL_Down: if (FreqSelect->value() > 0) inAlphaTag->value(oplist[FreqSelect->value() - 1].alpha_tag); break; default: break; } } void delFreq() { if (FreqSelect->value()) { long n = FreqSelect->value() - 1; for (int i = n; i < numinlist; i ++) oplist[i] = oplist[i+1]; oplist[numinlist - 1].imode = USB; oplist[numinlist - 1].freq = 0; oplist[numinlist - 1].iBW = 0; memset(oplist[numinlist - 1].alpha_tag, 0, ATAGSIZE); numinlist--; updateSelect(); } } void addFreq() { if (useB) { long freq = FreqDispB->value(); if (!freq) return; int mode = opMODE->index(); int bw; if (btnDSP->visible()) bw = ((opDSP_hi->index() << 8) | 0x8000) | (opDSP_lo->index() & 0xFF) ; else bw = opBW->index(); for (int n = 0; n < numinlist; n++) if (freq == oplist[n].freq && mode == oplist[n].imode) { oplist[n].iBW = bw; updateSelect(); // update list return; } addtoList(freq, mode, bw); updateSelect(); FreqDispB->visual_beep(); } else { long freq = FreqDispA->value(); if (!freq) return; int mode = opMODE->index(); int bw; if (btnDSP->visible()) bw = ((opDSP_hi->index() << 8) | 0x8000) | (opDSP_lo->index() & 0xFF) ; else bw = opBW->index(); for (int n = 0; n < numinlist; n++) if (freq == oplist[n].freq && mode == oplist[n].imode) { oplist[n].iBW = bw; updateSelect(); // update list return; } addtoList(freq, mode, bw); updateSelect(); FreqDispA->visual_beep(); } } void cbRIT() { guard_lock serial_lock(&mutex_serial, 54); if (selrig->has_rit) selrig->setRit((int)cntRIT->value()); } void cbXIT() { guard_lock serial_lock(&mutex_serial, 55); selrig->setXit((int)cntXIT->value()); } void cbBFO() { if (selrig->has_bfo) { guard_lock serial_lock(&mutex_serial, 56); selrig->setBfo((int)cntBFO->value()); } } void cbAttenuator() { guard_lock serial_lock(&mutex_serial, 57); progStatus.attenuator = btnAttenuator->value(); selrig->set_attenuator(progStatus.attenuator); } void setAttControl(void *d) { int val = (long)d; btnAttenuator->value(val); } void cbPreamp() { guard_lock serial_lock(&mutex_serial, 58); progStatus.preamp = btnPreamp->value(); selrig->set_preamp(progStatus.preamp); } void setPreampControl(void *d) { int val = (long)d; btnPreamp->value(val); } void cbNoise() { progStatus.noise = btnNOISE->value(); guard_lock serial_lock(&mutex_serial, 59); selrig->set_noise(progStatus.noise); } void cbNR() { if (!selrig->has_noise_reduction_control) return; noise_reduction_changed = true; if (sldrNR) sliders.push(SLIDER(NR, sldrNR->value(), btnNR->value() ) ); if (spnrNR) sliders.push(SLIDER(NR, spnrNR->value(), btnNR->value() ) ); } void setNR() { if (!selrig->has_noise_reduction_control) return; noise_reduction_changed = true; if (xcvr_name == rig_TS2000.name_ || xcvr_name == rig_TS590S.name_ || xcvr_name == rig_TS590SG.name_ || xcvr_name == rig_TS990.name_) { if (sldrNR) sliders.push(SLIDER(NR, sldrNR->value(), -1 ) ); if (spnrNR) sliders.push(SLIDER(NR, spnrNR->value(), -1 ) ); } else { if (sldrNR) sliders.push(SLIDER(NR, sldrNR->value(), btnNR->value() ) ); if (spnrNR) sliders.push(SLIDER(NR, spnrNR->value(), btnNR->value() ) ); } } void cbAN() { progStatus.auto_notch = btnAutoNotch->value(); guard_lock serial_lock(&mutex_serial, 60); selrig->set_auto_notch(progStatus.auto_notch); } void cbbtnNotch() { if (!selrig->has_notch_control) return; notch_changed = true; if (sldrNOTCH) sliders.push(SLIDER(NOTCH, sldrNOTCH->value(), btnNotch->value() )); if (spnrNOTCH) sliders.push(SLIDER(NOTCH, spnrNOTCH->value(), btnNotch->value() )); } void setNotch() { if (!selrig->has_notch_control) return; notch_changed = true; if (sldrNOTCH) sliders.push(SLIDER(NOTCH, sldrNOTCH->value(), btnNotch->value() )); if (spnrNOTCH) sliders.push(SLIDER(NOTCH, spnrNOTCH->value(), btnNotch->value() )); } // called from xml_io thread void setNotchControl(void *d) { // guard_lock serial_lock(&mutex_serial, 61); // selrig->set_notch(progStatus.notch, progStatus.notch_val); if (sldrNOTCH) sldrNOTCH->value(progStatus.notch_val); if (spnrNOTCH) spnrNOTCH->value(progStatus.notch_val); btnNotch->value(progStatus.notch); } void adjust_if_shift_control(void *d) { if (sldrIFSHIFT) sldrIFSHIFT->minimum(selrig->if_shift_min); if (sldrIFSHIFT) sldrIFSHIFT->maximum(selrig->if_shift_max); if (sldrIFSHIFT) sldrIFSHIFT->step(selrig->if_shift_step); if (sldrIFSHIFT) sldrIFSHIFT->value(selrig->if_shift_mid); if (sldrIFSHIFT) sldrIFSHIFT->redraw(); if (spnrIFSHIFT) spnrIFSHIFT->minimum(selrig->if_shift_min); if (spnrIFSHIFT) spnrIFSHIFT->maximum(selrig->if_shift_max); if (spnrIFSHIFT) spnrIFSHIFT->step(selrig->if_shift_step); if (spnrIFSHIFT) spnrIFSHIFT->value(selrig->if_shift_mid); if (spnrIFSHIFT) spnrIFSHIFT->redraw(); btnIFsh->value(0); btnIFsh->redraw(); } void setIFshiftButton(void *d) { bool b = (bool)d; if (b && !btnIFsh->value()) { btnIFsh->value(1); } else if (!b && btnIFsh->value()) { btnIFsh->value(0); if (sldrIFSHIFT) sldrIFSHIFT->value( selrig->if_shift_mid ); if (spnrIFSHIFT) spnrIFSHIFT->value( selrig->if_shift_mid ); } } void setIFshiftControl(void *d) { int val = (long)d; if (sldrIFSHIFT) { if (sldrIFSHIFT->value() != val) sldrIFSHIFT->value(val); } if (spnrIFSHIFT) { if (spnrIFSHIFT->value() != val) spnrIFSHIFT->value(val); } btnIFsh->value( val != selrig->if_shift_mid ); } void setIFshift() { if_shift_changed = true; if (sldrIFSHIFT) sliders.push(SLIDER(IFSH, sldrIFSHIFT->value(), btnIFsh->value())); if (spnrIFSHIFT) sliders.push(SLIDER(IFSH, spnrIFSHIFT->value(), btnIFsh->value())); } void cbIFsh() { if_shift_changed = true; if (sldrIFSHIFT) sliders.push(SLIDER(IFSH, sldrIFSHIFT->value(), btnIFsh->value())); if (spnrIFSHIFT) sliders.push(SLIDER(IFSH, spnrIFSHIFT->value(), btnIFsh->value())); } void cbEventLog() { debug::show(); } void setVolume() { volume_changed = true; if (spnrVOLUME) sliders.push(SLIDER(VOL, spnrVOLUME->value())); if (sldrVOLUME) sliders.push(SLIDER(VOL, sldrVOLUME->value())); } void cbMute() { volume_changed = true; if (btnVol->value() == 0) { if (spnrVOLUME) spnrVOLUME->deactivate(); if (sldrVOLUME) sldrVOLUME->deactivate(); sliders.push(SLIDER(VOL, 0)); } else { if (spnrVOLUME) { spnrVOLUME->activate(); sliders.push(SLIDER(VOL, spnrVOLUME->value())); } if (sldrVOLUME) { sldrVOLUME->activate(); sliders.push(SLIDER(VOL, sldrVOLUME->value())); } } } void setMicGain() { mic_changed = true; if (sldrMICGAIN) sliders.push(SLIDER(MIC, sldrMICGAIN->value())); if (spnrMICGAIN) sliders.push(SLIDER(MIC, spnrMICGAIN->value())); } void setMicGainControl(void* d) { int val = (long)d; if (sldrMICGAIN) sldrMICGAIN->value(val); if (spnrMICGAIN) spnrMICGAIN->value(val); } static int img = -1; void set_power_controlImage(double pwr) { if (progStatus.pwr_scale == 0 || (progStatus.pwr_scale == 4 && pwr < 26.0)) { if (img != 1) { img = 1; scalePower->image(image_p25); sldrFwdPwr->maximum(25.0); sldrFwdPwr->minimum(0.0); scalePower->redraw(); } } else if (progStatus.pwr_scale == 1 || (progStatus.pwr_scale == 4 && pwr < 51.0)) { if (img != 2) { img = 2; scalePower->image(image_p50); sldrFwdPwr->maximum(50.0); sldrFwdPwr->minimum(0.0); scalePower->redraw(); } } else if (progStatus.pwr_scale == 2 || (progStatus.pwr_scale == 4 && pwr < 101.0)) { if (img != 3) { img = 3; scalePower->image(image_p100); sldrFwdPwr->maximum(100.0); sldrFwdPwr->minimum(0.0); scalePower->redraw(); } } else if (progStatus.pwr_scale >= 3) { if (img != 4) { img = 4; scalePower->image(image_p200); sldrFwdPwr->maximum(200.0); sldrFwdPwr->minimum(0.0); scalePower->redraw(); } } return; } void setPower() { float pwr = 0; if (spnrPOWER) pwr = progStatus.power_level = spnrPOWER->value(); if (sldrPOWER) pwr = progStatus.power_level = sldrPOWER->value(); if (xcvr_name == rig_K2.name_) { double min, max, step; selrig->get_pc_min_max_step(min, max, step); if (spnrPOWER) spnrPOWER->minimum(min); if (spnrPOWER) spnrPOWER->maximum(max); if (spnrPOWER) spnrPOWER->step(step); if (spnrPOWER) spnrPOWER->value(progStatus.power_level); if (spnrPOWER) spnrPOWER->redraw(); if (sldrPOWER) sldrPOWER->minimum(min); if (sldrPOWER) sldrPOWER->maximum(max); if (sldrPOWER) sldrPOWER->step(step); if (sldrPOWER) sldrPOWER->value(progStatus.power_level); if (sldrPOWER) sldrPOWER->redraw(); } power_changed = true; sliders.push(SLIDER(PWR, progStatus.power_level)); set_power_controlImage(pwr); } void cbTune() { guard_lock serial_lock(&mutex_serial, 62); selrig->tune_rig(); } void cbPTT() { guard_lock ptt_lock(&mutex_ptt, 63); quePTT.push(btnPTT->value()); } void setSQUELCH() { squelch_changed = true; if (sldrSQUELCH) sliders.push(SLIDER(SQL, sldrSQUELCH->value() )); if (spnrSQUELCH) sliders.push(SLIDER(SQL, spnrSQUELCH->value() )); } void setRFGAIN() { rfgain_changed = true; if (spnrRFGAIN) sliders.push(SLIDER(RFGAIN, spnrRFGAIN->value())); if (sldrRFGAIN) sliders.push(SLIDER(RFGAIN, sldrRFGAIN->value())); } void updateALC(void * d) { if (meter_image != ALC_IMAGE) return; double data = (long)d; sldrRcvSignal->hide(); sldrSWR->hide(); sldrALC->value(data); sldrALC->redraw(); } void updateSWR(void * d) { if (meter_image != SWR_IMAGE) return; double data = (long)d; if (selrig->has_swr_control) { sldrRcvSignal->hide(); sldrALC->hide(); sldrSWR->show(); } sldrSWR->value(data); sldrSWR->redraw(); } void updateFwdPwr(void *d) { double power = (long)d; if (!sldrFwdPwr->visible()) { sldrFwdPwr->show(); } sldrFwdPwr->value(power); sldrFwdPwr->redraw(); if (!selrig->has_power_control) set_power_controlImage(sldrFwdPwr->peak()); } void updateSquelch(void *d) { if (sldrSQUELCH) sldrSQUELCH->value((long)d); if (sldrSQUELCH) sldrSQUELCH->redraw(); if (spnrSQUELCH) spnrSQUELCH->value((long)d); if (spnrSQUELCH) spnrSQUELCH->redraw(); } void updateRFgain(void *d) { if (spnrRFGAIN) { spnrRFGAIN->value((long)d); spnrRFGAIN->redraw(); } if (sldrRFGAIN) { sldrRFGAIN->value((long)d); sldrRFGAIN->redraw(); } } void zeroXmtMeters(void *d) { sldrFwdPwr->clear(); sldrALC->clear(); sldrSWR->clear(); updateFwdPwr(0); updateALC(0); updateSWR(0); } void setFreqDispA(void *d) { long f = (long)d; FreqDispA->value(f); FreqDispA->redraw(); } void setFreqDispB(void *d) { long f = (long)d; FreqDispB->value(f); FreqDispB->redraw(); } void updateSmeter(void *d) // 0 to 100; { double smeter = (long)d; if (!sldrRcvSignal->visible()) { sldrRcvSignal->show(); sldrFwdPwr->hide(); sldrALC->hide(); sldrSWR->hide(); } sldrRcvSignal->value(smeter); sldrRcvSignal->redraw(); } void saveFreqList() { string atag; if (!numinlist) { remove(defFileName.c_str()); return; } ofstream oList(defFileName.c_str()); if (!oList) { fl_message ("Could not write to %s", defFileName.c_str()); return; } for (int i = 0; i < numinlist; i++) { atag = oplist[i].alpha_tag; oList << oplist[i].freq << " " << oplist[i].imode << " " << oplist[i].iBW << " \"" << atag.c_str() << "\"" << endl; } oList.close(); } void setPTT( void *d) { int val = (long)d; guard_lock ptt_lock(&mutex_ptt, 64); quePTT.push(val); } void closeRig() { // restore initial rig settings guard_lock serial_lock(&mutex_serial, 65); selrig->set_vfoA(transceiverA.freq); selrig->set_modeA(transceiverA.imode); selrig->set_bwA(transceiverA.iBW); selrig->set_vfoB(transceiverB.freq); selrig->set_modeB(transceiverB.imode); selrig->set_bwB(transceiverB.iBW); } void cbExit() { progStatus.freq_A = vfoA.freq; progStatus.imode_A = vfoA.imode; progStatus.iBW_A = vfoA.iBW; progStatus.freq_B = vfoB.freq; progStatus.imode_B = vfoB.imode; progStatus.iBW_B = vfoB.iBW; progStatus.spkr_on = btnVol->value(); if (spnrPOWER) progStatus.power_level = spnrPOWER->value(); if (spnrVOLUME) progStatus.volume = spnrVOLUME->value(); if (spnrRFGAIN) progStatus.rfgain = spnrRFGAIN->value(); if (spnrMICGAIN) progStatus.mic_gain = spnrMICGAIN->value(); if (spnrNOTCH) progStatus.notch_val = spnrNOTCH->value(); if (spnrIFSHIFT) progStatus.shift_val = spnrIFSHIFT->value(); if (spnrNR) progStatus.noise_reduction_val = spnrNR->value(); if (sldrPOWER) progStatus.power_level = sldrPOWER->value(); if (sldrVOLUME) progStatus.volume = sldrVOLUME->value(); if (sldrRFGAIN) progStatus.rfgain = sldrRFGAIN->value(); if (sldrMICGAIN) progStatus.mic_gain = sldrMICGAIN->value(); if (sldrNOTCH) progStatus.notch_val = sldrNOTCH->value(); if (sldrIFSHIFT) progStatus.shift_val = sldrIFSHIFT->value(); if (sldrNR) progStatus.noise_reduction_val = sldrNR->value(); progStatus.notch = btnNotch->value(); progStatus.shift = btnIFsh->value(); progStatus.noise_reduction = btnNR->value(); progStatus.noise = btnNOISE->value(); progStatus.attenuator = btnAttenuator->value(); progStatus.preamp = btnPreamp->value(); progStatus.auto_notch = btnAutoNotch->value(); progStatus.saveLastState(); saveFreqList(); // shutdown serial thread { guard_lock serial_lock(&mutex_serial, 67); run_serial_thread = false; } pthread_join(*serial_thread, NULL); if (progStatus.restore_rig_data){ selrig->set_vfoA(transceiverA.freq); selrig->set_modeA(transceiverA.imode); selrig->set_bwA(transceiverA.iBW); selrig->set_vfoB(transceiverB.freq); selrig->set_modeB(transceiverB.imode); selrig->set_bwB(transceiverB.iBW); } selrig->shutdown(); // xcvr auto off if (selrig->has_xcvr_auto_on_off) selrig->set_xcvr_auto_off(); // close down the serial port RigSerial.ClosePort(); if (dlgDisplayConfig && dlgDisplayConfig->visible()) dlgDisplayConfig->hide(); if (dlgXcvrConfig && dlgXcvrConfig->visible()) dlgXcvrConfig->hide(); if (dlgMemoryDialog && dlgMemoryDialog->visible()) dlgMemoryDialog->hide(); debug::stop(); exit(0); } void cbALC_SWR() { if (!selrig->has_alc_control) return; if (meter_image == SWR_IMAGE) { btnALC_SWR->image(image_alc); meter_image = ALC_IMAGE; sldrALC->show(); { guard_lock serial_lock(&mutex_serial, 68); selrig->select_alc(); } } else { btnALC_SWR->image(image_swr); meter_image = SWR_IMAGE; sldrSWR->show(); { guard_lock serial_lock(&mutex_serial, 69); selrig->select_swr(); } } btnALC_SWR->redraw(); } void update_UI_PTT(void *d) { btnPTT->value(PTT); if (!PTT) { btnALC_SWR->hide(); scaleSmeter->show(); sldrRcvSignal->clear(); } else { btnALC_SWR->show(); scaleSmeter->hide(); sldrFwdPwr->clear(); sldrALC->clear(); sldrSWR->clear(); } } void adjust_small_ui() { int y = 0; btnVol->hide(); sldrVOLUME->hide(); sldrRFGAIN->hide(); btnIFsh->hide(); sldrIFSHIFT->hide(); btnNotch->hide(); sldrNOTCH->hide(); sldrMICGAIN->hide(); sldrPOWER->hide(); sldrSQUELCH->hide(); btnNR->hide(); sldrNR->hide(); if (progStatus.schema == 1 && selrig->widgets[0].W != NULL) { int i = 0; while (selrig->widgets[i].W != NULL) { selrig->widgets[i].W->resize( selrig->widgets[i].x, selrig->widgets[i].y, selrig->widgets[i].w, selrig->widgets[i].W->h() ); selrig->widgets[i].W->show(); selrig->widgets[i].W->redraw(); if (selrig->widgets[i].y > y) y = selrig->widgets[i].y; i++; } if (selrig->has_data_port) { sldrMICGAIN->label(""); sldrMICGAIN->redraw_label(); } } else { y = cntRIT->y() + 2; if (selrig->has_volume_control) { y += 20; btnVol->position( 2, y); btnVol->show(); btnVol->redraw(); sldrVOLUME->resize( 54, y, 368, 18 ); sldrVOLUME->show(); sldrVOLUME->redraw(); } if (selrig->has_rf_control) { y += 20; sldrRFGAIN->resize( 54, y, 368, 18 ); sldrRFGAIN->show(); sldrRFGAIN->redraw(); } if (selrig->has_sql_control) { y += 20; sldrSQUELCH->resize( 54, y, 368, 18 ); sldrSQUELCH->show(); sldrSQUELCH->redraw(); } if (selrig->has_noise_reduction_control) { y += 20; btnNR->position( 2, y); btnNR->show(); btnNR->redraw(); sldrNR->resize( 54, y, 368, 18 ); sldrNR->show(); sldrNR->redraw(); if (xcvr_name == rig_TT599.name_) btnNR->deactivate(); } if (selrig->has_ifshift_control) { y += 20; btnIFsh->position( 2, y); btnIFsh->show(); btnIFsh->redraw(); sldrIFSHIFT->resize( 54, y, 368, 18 ); sldrIFSHIFT->show(); sldrIFSHIFT->redraw(); } if (selrig->has_notch_control) { y += 20; btnNotch->position( 2, y); btnNotch->show(); btnNotch->redraw(); sldrNOTCH->resize( 54, y, 368, 18 ); sldrNOTCH->show(); sldrNOTCH->redraw(); } if (selrig->has_micgain_control) { y += 20; if (selrig->has_data_port) { sldrMICGAIN->label(""); sldrMICGAIN->redraw_label(); btnDataPort->position( 2, y); btnDataPort->show(); btnDataPort->redraw(); } sldrMICGAIN->resize( 54, y, 368, 18 ); sldrMICGAIN->show(); sldrMICGAIN->redraw(); } if (selrig->has_power_control) { y += 20; sldrPOWER->resize( 54, y, 368, 18 ); sldrPOWER->show(); sldrPOWER->redraw(); } } y += 20; btn_show_controls->position( btn_show_controls->x(), y ); btnAttenuator->position( btnAttenuator->x(), y); btnAttenuator->redraw(); btnPreamp->position( btnPreamp->x(), y); btnPreamp->redraw(); btnNOISE->position( btnNOISE->x(), y); btnNOISE->redraw(); btnAutoNotch->position( btnAutoNotch->x(), y); btnAutoNotch->redraw(); btnTune->position( btnTune->x(), y); btnTune->redraw(); if (xcvr_name == rig_FT1000MP.name_) { y -= 20; btnTune->position( btnTune->x(), y); btnTune->redraw(); btnAutoNotch->position( btnAutoNotch->x(), y); btnAutoNotch->redraw(); btnPTT->position( btnPTT->x(), y); btnPTT->redraw(); } if (xcvr_name == rig_FT100D.name_ || xcvr_name == rig_FT767.name_ || xcvr_name == rig_FT817.name_ || xcvr_name == rig_FT847.name_ || xcvr_name == rig_FT857D.name_ || xcvr_name == rig_FT890.name_ || xcvr_name == rig_FT897D.name_ || xcvr_name == rig_FT920.name_ ) { y -= 20; btnPTT->position( btnPTT->x(), y); btnPTT->redraw(); } int use_AuxPort = (progStatus.aux_serial_port != "NONE"); if (use_AuxPort) { btnPTT->resize(btnPTT->x(), y, btnPTT->w(), 38); btnPTT->redraw(); y += 20; boxControl->position(boxControl->x(), y); btnAuxRTS->position(btnAuxRTS->x(), y); btnAuxDTR->position(btnAuxDTR->x(), y); btnAuxRTS->value(progStatus.aux_rts); btnAuxDTR->value(progStatus.aux_dtr); boxControl->show(); btnAuxRTS->show(); btnAuxDTR->show(); } else { boxControl->hide(); btnAuxRTS->hide(); btnAuxDTR->hide(); btnPTT->resize(btnPTT->x(), y, btnPTT->w(), 18); btnPTT->redraw(); } tabs550->resize(tabs550->x(), y + 20, tabs550->w(), tabs550->h()); tabs550->hide(); tabsGeneric->resize(tabsGeneric->x(), y + 20, tabsGeneric->w(), tabsGeneric->h()); tabsGeneric->hide(); btn_show_controls->label("@-22->"); btn_show_controls->redraw_label(); if (selrig->has_extras) btn_show_controls->show(); else btn_show_controls->hide(); y += 20; if (progStatus.tooltips) { Fl_Tooltip::enable(1); mnuTooltips->set(); } else { mnuTooltips->clear(); Fl_Tooltip::enable(0); } if (progStatus.schema) mnuSchema->set(); else mnuSchema->clear(); mainwindow->size( mainwindow->w(), y); mainwindow->init_sizes(); mainwindow->redraw(); } void adjust_wide_ui() { mainwindow->resize( mainwindow->x(), mainwindow->y(), mainwindow->w(), 130); mainwindow->redraw(); btnVol->show(); sldrVOLUME->show(); sldrRFGAIN->show(); btnIFsh->show(); sldrIFSHIFT->show(); btnNotch->show(); sldrNOTCH->show(); sldrMICGAIN->show(); sldrPOWER->show(); sldrSQUELCH->show(); btnNR->show(); sldrNR->show(); if (xcvr_name == rig_TT550.name_) { tabs550->show(); tabsGeneric->hide(); } else { tabs550->hide(); tabsGeneric->remove(genericAux); if (progStatus.aux_serial_port != "NONE" || selrig->has_data_port) { if (progStatus.aux_serial_port != "NONE") { btnAuxRTS->activate(); btnAuxDTR->activate(); } else { btnAuxRTS->deactivate(); btnAuxDTR->deactivate(); } if (selrig->has_data_port) btnDataPort->activate(); else btnDataPort->deactivate(); tabsGeneric->add(genericAux); } tabsGeneric->remove(genericRXB); if (selrig->has_rit || selrig->has_xit || selrig->has_bfo) tabsGeneric->add(genericRXB); tabsGeneric->show(); } if (progStatus.tooltips) { Fl_Tooltip::enable(1); mnuTooltips->set(); } else { mnuTooltips->clear(); Fl_Tooltip::enable(0); } mainwindow->init_sizes(); mainwindow->redraw(); } void adjust_touch_ui() { mainwindow->resize( mainwindow->x(), mainwindow->y(), mainwindow->w(), TOUCH_MAINH); mainwindow->redraw(); if (spnrPOWER) spnrPOWER->show(); if (sldrPOWER) sldrPOWER->show(); btnVol->show(); if (spnrVOLUME) spnrVOLUME->show(); if (sldrVOLUME) sldrVOLUME->show(); if (spnrRFGAIN) spnrRFGAIN->show(); if (sldrRFGAIN) sldrRFGAIN->show(); btnIFsh->show(); if (spnrIFSHIFT) spnrIFSHIFT->show(); if (sldrIFSHIFT) sldrIFSHIFT->show(); btnNotch->show(); if (spnrNOTCH) spnrNOTCH->show(); if (sldrNOTCH) sldrNOTCH->show(); if (spnrMICGAIN) spnrMICGAIN->show(); if (sldrMICGAIN) sldrMICGAIN->show(); if (spnrSQUELCH) spnrSQUELCH->show(); if (sldrSQUELCH) sldrSQUELCH->show(); btnNR->show(); if (spnrNR) spnrNR->show(); if (sldrNR) sldrNR->show(); if (xcvr_name == rig_TT550.name_) { tabs550->show(); tabsGeneric->hide(); } else { tabs550->hide(); tabsGeneric->remove(genericAux); if (progStatus.aux_serial_port != "NONE" || selrig->has_data_port) { if (progStatus.aux_serial_port != "NONE") { btnAuxRTS->activate(); btnAuxDTR->activate(); } else { btnAuxRTS->deactivate(); btnAuxDTR->deactivate(); } if (selrig->has_data_port) btnDataPort->activate(); else btnDataPort->deactivate(); tabsGeneric->add(genericAux); } tabsGeneric->remove(genericRXB); if (selrig->has_rit || selrig->has_xit || selrig->has_bfo) tabsGeneric->add(genericRXB); tabsGeneric->show(); } if (progStatus.tooltips) { Fl_Tooltip::enable(1); mnuTooltips->set(); } else { mnuTooltips->clear(); Fl_Tooltip::enable(0); } mainwindow->init_sizes(); mainwindow->redraw(); } void adjust_control_positions() { switch (progStatus.UIsize) { case small_ui : adjust_small_ui(); break; case wide_ui : adjust_wide_ui(); break; case touch_ui : default : adjust_touch_ui(); break; } FreqDispA->set_hrd(progStatus.hrd_buttons); FreqDispB->set_hrd(progStatus.hrd_buttons); } void initXcvrTab() { if (xcvr_name == rig_TT550.name_) { spnr_tt550_line_out->value(progStatus.tt550_line_out); cbo_tt550_agc_level->index(progStatus.tt550_agc_level); spnr_tt550_cw_wpm->value(progStatus.tt550_cw_wpm); spnr_tt550_cw_vol->value(progStatus.tt550_cw_vol); spnr_tt550_cw_spot->value(progStatus.tt550_cw_spot); spnr_tt550_cw_weight->value(progStatus.tt550_cw_weight); spnr_tt550_cw_qsk->value(progStatus.tt550_cw_qsk); btn_tt550_enable_keyer->value(progStatus.tt550_enable_keyer); btn_tt550_vox->value(progStatus.tt550_vox_onoff); spnr_tt550_vox_gain->value(progStatus.tt550_vox_gain); spnr_tt550_anti_vox->value(progStatus.tt550_vox_anti); spnr_tt550_vox_hang->value(progStatus.tt550_vox_hang); btn_tt550_CompON->value(progStatus.tt550_compON); spnr_tt550_compression->value(progStatus.tt550_compression); spnr_tt550_mon_vol->value(progStatus.tt550_mon_vol); btn_tt550_enable_xmtr->value(progStatus.tt550_enable_xmtr); btn_tt550_enable_tloop->value(progStatus.tt550_enable_tloop); btn_tt550_tuner_bypass->value(progStatus.tt550_tuner_bypass); btn_tt550_use_xmt_bw->value(progStatus.tt550_use_xmt_bw); sel_tt550_encoder_step->value(progStatus.tt550_encoder_step); spnr_tt550_encoder_sensitivity->value(progStatus.tt550_encoder_sensitivity); sel_tt550_F1_func->value(progStatus.tt550_F1_func); sel_tt550_F2_func->value(progStatus.tt550_F2_func); sel_tt550_F3_func->value(progStatus.tt550_F3_func); mnuRestoreData->clear(); mnuRestoreData->hide(); mnuKeepData->clear(); mnuKeepData->hide(); progStatus.restore_rig_data = false; progStatus.use_rig_data = false; op_tt550_XmtBW->clear(); for (int i = 0; TT550_xmt_widths[i] != NULL; i++) { op_tt550_XmtBW->add(TT550_xmt_widths[i]); } op_tt550_XmtBW->activate(); op_tt550_XmtBW->index(progStatus.tt550_xmt_bw); poll_smeter->activate(); poll_smeter->value(progStatus.poll_smeter); poll_pout->activate(); poll_pout->value(progStatus.poll_pout); poll_swr->activate(); poll_swr->value(progStatus.poll_swr); poll_alc->activate(); poll_alc->value(progStatus.poll_alc); poll_frequency->deactivate(); poll_frequency->value(0); poll_mode->deactivate(); poll_mode->value(0); poll_bandwidth->deactivate(); poll_bandwidth->value(0); poll_volume->deactivate(); poll_volume->value(0); poll_notch->deactivate(); poll_notch->value(0); poll_auto_notch->deactivate(); poll_auto_notch->value(0); poll_ifshift->deactivate(); poll_ifshift->value(0); poll_power_control->deactivate(); poll_power_control->value(0); poll_pre_att->deactivate(); poll_pre_att->value(0); poll_squelch->deactivate(); poll_squelch->value(0); poll_micgain->deactivate(); poll_micgain->value(0); poll_rfgain->deactivate(); poll_rfgain->value(0); poll_split->deactivate(); poll_split->value(0); poll_nr->deactivate(); poll_nr->value(0); poll_noise->deactivate(); poll_noise->value(0); poll_all->deactivate(); poll_all->value(0); } else { tabsGeneric->remove(*genericBands); tabsGeneric->remove(*genericCW); tabsGeneric->remove(*genericVOX); tabsGeneric->remove(*genericSpeech); tabsGeneric->remove(*genericRx); tabsGeneric->remove(*genericMisc); if (selrig->has_band_selection) { if (progStatus.UIsize != touch_ui) genericBands->resize( tabsGeneric->x() + 2, tabsGeneric->y() + 19, tabsGeneric->w() - 4, tabsGeneric->h() - 21); tabsGeneric->insert(*genericBands, 0); } poll_all->activate(); poll_all->value(progStatus.poll_all); if (selrig->has_cw_wpm || selrig->has_cw_qsk || selrig->has_cw_weight || selrig->has_cw_keyer || selrig->has_cw_spot || selrig->has_cw_spot_tone) { if (progStatus.UIsize == wide_ui) genericCW->resize( tabsGeneric->x() + 2, tabsGeneric->y() + 19, tabsGeneric->w() - 4, tabsGeneric->h() - 21); tabsGeneric->insert(*genericCW, 6); if (selrig->has_cw_wpm) { int min, max; selrig->get_cw_wpm_min_max(min, max); spnr_cw_wpm->minimum(min); spnr_cw_wpm->maximum(max); spnr_cw_wpm->value(progStatus.cw_wpm); spnr_cw_wpm->show(); selrig->set_cw_wpm(); } else spnr_cw_wpm->hide(); if (selrig->has_cw_qsk) { double min, max, step; selrig->get_cw_qsk_min_max_step(min, max, step); spnr_cw_qsk->minimum(min); spnr_cw_qsk->maximum(max); spnr_cw_qsk->step(step); spnr_cw_qsk->value(progStatus.cw_qsk); spnr_cw_qsk->show(); selrig->set_cw_qsk(); } else spnr_cw_qsk->hide(); if (selrig->has_cw_weight) { double min, max, step; selrig->get_cw_weight_min_max_step( min, max, step ); spnr_cw_weight->minimum(min); spnr_cw_weight->maximum(max); spnr_cw_weight->step(step); spnr_cw_weight->value(progStatus.cw_weight); spnr_cw_weight->show(); selrig->set_cw_weight(); } else spnr_cw_weight->hide(); if (selrig->has_cw_keyer) { btn_enable_keyer->show(); btn_enable_keyer->value(progStatus.enable_keyer); selrig->enable_keyer(); } else btn_enable_keyer->hide(); if (selrig->has_cw_spot) { btnSpot->value(progStatus.cw_spot); selrig->set_cw_spot(); btnSpot->show(); } else btnSpot->hide(); if (selrig->has_cw_spot_tone) { spnr_cw_spot_tone->show(); int min, max, step; selrig->get_cw_spot_tone_min_max_step(min, max, step); spnr_cw_spot_tone->minimum(min); spnr_cw_spot_tone->maximum(max); spnr_cw_spot_tone->step(step); spnr_cw_spot_tone->value(progStatus.cw_spot_tone); selrig->set_cw_spot_tone(); } else spnr_cw_spot_tone->hide(); } if (selrig->has_cw_break_in || selrig->has_cw_qsk || selrig->has_cw_delay) { genericQSK->resize( tabsGeneric->x() + 2, tabsGeneric->y() + 19, tabsGeneric->w() - 4, tabsGeneric->h() - 21); tabsGeneric->insert(*genericQSK, 6); if (selrig->has_cw_qsk) { double min, max, step; selrig->get_cw_qsk_min_max_step(min, max, step); spnr_cw_qsk->minimum(min); spnr_cw_qsk->maximum(max); spnr_cw_qsk->step(step); spnr_cw_qsk->value(progStatus.cw_qsk); spnr_cw_qsk->show(); selrig->set_cw_qsk(); } else spnr_cw_qsk->hide(); if (selrig->has_cw_delay) { double min, max, step; selrig->get_cw_delay_min_max_step( min, max, step ); spnr_cw_delay->minimum(min); spnr_cw_delay->maximum(max); spnr_cw_delay->step(step); spnr_cw_delay->value(progStatus.cw_delay); spnr_cw_delay->show(); selrig->set_cw_delay(); } else spnr_cw_delay->hide(); } if (selrig->has_vox_onoff || selrig->has_vox_gain || selrig->has_vox_anti || selrig->has_vox_hang || selrig->has_vox_on_dataport || selrig->has_cw_spot_tone) { if (progStatus.UIsize == wide_ui) genericVOX->resize( tabsGeneric->x() + 2, tabsGeneric->y() + 19, tabsGeneric->w() - 4, tabsGeneric->h() - 21); tabsGeneric->insert(*genericVOX, 6); if (selrig->has_vox_onoff) { btn_vox->show(); btn_vox->value(progStatus.vox_onoff); selrig->set_vox_onoff(); } else btn_vox->hide(); if (selrig->has_vox_gain) { spnr_vox_gain->show(); int min, max, step; selrig->get_vox_gain_min_max_step(min, max, step); spnr_vox_gain->minimum(min); spnr_vox_gain->maximum(max); spnr_vox_gain->step(step); spnr_vox_gain->value(progStatus.vox_gain); selrig->set_vox_gain(); } else spnr_vox_gain->hide(); if (selrig->has_vox_anti) { spnr_anti_vox->show(); int min, max, step; selrig->get_vox_anti_min_max_step(min, max, step); spnr_anti_vox->minimum(min); spnr_anti_vox->maximum(max); spnr_anti_vox->step(step); spnr_anti_vox->value(progStatus.vox_anti); selrig->set_vox_anti(); } else spnr_anti_vox->hide(); if (selrig->has_vox_hang) { spnr_vox_hang->show(); int min, max, step; selrig->get_vox_hang_min_max_step(min, max, step); spnr_vox_hang->minimum(min); spnr_vox_hang->maximum(max); spnr_vox_hang->step(step); spnr_vox_hang->value(progStatus.vox_hang); selrig->set_vox_hang(); } else spnr_vox_hang->hide(); if (selrig->has_vox_on_dataport) { btn_vox_on_dataport->show(); btn_vox_on_dataport->value(progStatus.vox_on_dataport); selrig->set_vox_on_dataport(); } else btn_vox_on_dataport->hide(); } if (selrig->has_compON || selrig->has_compression) { if (progStatus.UIsize == wide_ui) genericSpeech->resize( tabsGeneric->x() + 2, tabsGeneric->y() + 19, tabsGeneric->w() - 4, tabsGeneric->h() - 21); tabsGeneric->insert(*genericSpeech, 6); if (selrig->has_compON) { btnCompON->show(); btnCompON->value(progStatus.compON); } else btnCompON->hide(); if (selrig->has_compression) { int min, max, step; selrig->get_comp_min_max_step(min, max, step); spnr_compression->minimum(min); spnr_compression->maximum(max); spnr_compression->step(step); spnr_compression->show(); spnr_compression->value(progStatus.compression); selrig->set_compression(); } else spnr_compression->hide(); } if (selrig->has_agc_level || selrig->has_nb_level || selrig->has_bpf_center) { if (progStatus.UIsize == wide_ui) genericRx->resize( tabsGeneric->x() + 2, tabsGeneric->y() + 19, tabsGeneric->w() - 4, tabsGeneric->h() - 21); tabsGeneric->insert(*genericRx, 6); if (selrig->has_agc_level) cbo_agc_level->activate(); else cbo_agc_level->deactivate(); if (selrig->has_nb_level) cbo_nb_level->activate(); else cbo_nb_level->deactivate(); if (selrig->has_bpf_center) { spnr_bpf_center->value(progStatus.bpf_center); spnr_bpf_center->show(); btn_use_bpf_center->show(); } else { spnr_bpf_center->hide(); btn_use_bpf_center->hide(); } } if (selrig->has_vfo_adj || selrig->has_xcvr_auto_on_off) { if (progStatus.UIsize == wide_ui) genericMisc->resize( tabsGeneric->x() + 2, tabsGeneric->y() + 19, tabsGeneric->w() - 4, tabsGeneric->h() - 21); tabsGeneric->insert(*genericMisc, 6); if (selrig->has_vfo_adj) { int min, max, step; selrig->get_vfoadj_min_max_step(min, max, step); spnr_vfo_adj->minimum(min); spnr_vfo_adj->maximum(max); spnr_vfo_adj->step(step); progStatus.vfo_adj = selrig->getVfoAdj(); spnr_vfo_adj->value(progStatus.vfo_adj); spnr_vfo_adj->show(); } else spnr_vfo_adj->hide(); spnr_line_out->hide(); // enable if a lineout control is used by any transceiver if (selrig->has_xcvr_auto_on_off) { btn_xcvr_auto_on->value(progStatus.xcvr_auto_on); btn_xcvr_auto_off->value(progStatus.xcvr_auto_off); btn_xcvr_auto_on->show(); btn_xcvr_auto_off->show(); } else { btn_xcvr_auto_on->hide(); btn_xcvr_auto_off->hide(); } } tabsGeneric->redraw(); mnuRestoreData->show(); mnuKeepData->show(); poll_frequency->activate(); poll_frequency->value(progStatus.poll_frequency); poll_mode->activate(); poll_mode->value(progStatus.poll_mode); poll_bandwidth->activate(); poll_bandwidth->value(progStatus.poll_bandwidth); poll_smeter->activate(); poll_smeter->value(progStatus.poll_smeter); poll_pout->activate(); poll_pout->value(progStatus.poll_pout); poll_swr->activate(); poll_swr->value(progStatus.poll_swr); poll_alc->activate(); poll_alc->value(progStatus.poll_alc); poll_volume->activate(); poll_volume->value(progStatus.poll_volume); poll_notch->activate(); poll_notch->value(progStatus.poll_notch); poll_auto_notch->activate(); poll_auto_notch->value(progStatus.poll_auto_notch); poll_ifshift->activate(); poll_ifshift->value(progStatus.poll_ifshift); poll_power_control->activate(); poll_power_control->value(progStatus.poll_power_control); poll_pre_att->activate(); poll_pre_att->value(progStatus.poll_pre_att); poll_squelch->activate(); poll_squelch->value(progStatus.poll_squelch); poll_micgain->activate(); poll_micgain->value(progStatus.poll_micgain); poll_rfgain->activate(); poll_rfgain->value(progStatus.poll_rfgain); poll_split->activate(); poll_split->value(progStatus.poll_split); poll_noise->activate(); poll_noise->value(progStatus.poll_noise); poll_nr->activate(); poll_nr->value(progStatus.poll_nr); if (!selrig->has_bandwidth_control) { poll_bandwidth->deactivate(); poll_bandwidth->value(0); } if (!selrig->has_smeter) { poll_smeter->deactivate(); poll_smeter->value(0); } if (!selrig->has_power_out) { poll_pout->deactivate(); poll_pout->value(0); } if (!selrig->has_swr_control) { poll_swr->deactivate(); poll_swr->value(0); } if (!selrig->has_alc_control) { poll_alc->deactivate(); poll_alc->value(0); } if (!selrig->has_volume_control) { poll_volume->deactivate(); poll_volume->value(0); } if (!selrig->has_notch_control) { poll_notch->deactivate(); poll_notch->value(0); } if (!selrig->has_auto_notch || xcvr_name == rig_FT1000MP.name_ ) { poll_auto_notch->deactivate(); poll_auto_notch->value(0); } if (!selrig->has_ifshift_control) { poll_ifshift->deactivate(); poll_ifshift->value(0); } if (!selrig->has_power_control) { poll_power_control->deactivate(); poll_power_control->value(0); } if (!selrig->has_preamp_control && !selrig->has_attenuator_control) { poll_pre_att->deactivate(); poll_pre_att->value(0); } if (!selrig->has_sql_control) { poll_squelch->deactivate(); poll_squelch->value(0); } if (!selrig->has_micgain_control) { poll_micgain->deactivate(); poll_micgain->value(0); } if (!selrig->has_rf_control) { poll_rfgain->deactivate(); poll_rfgain->value(0); } if (!selrig->has_split) { poll_split->deactivate(); poll_split->value(0); } if (!selrig->has_noise_control) {poll_noise->deactivate(); poll_noise->value(0);} if (!selrig->has_noise_reduction) {poll_nr->deactivate(); poll_nr->value(0);} } } void initRig() { btnInitializing->show(); mainwindow->redraw(); flrig_abort = false; sldrRcvSignal->aging(progStatus.rx_peak); sldrRcvSignal->avg(progStatus.rx_avg); sldrFwdPwr->aging(progStatus.pwr_peak); sldrFwdPwr->avg(progStatus.pwr_avg); if (progStatus.use_tcpip) { try { connect_to_remote(); } catch (...) { btnInitializing->hide(); mainwindow->redraw(); return; } } // disable the serial thread { guard_lock gl_serial(&mutex_serial, 71); // Xcvr Auto Power on as soon as possible if (selrig->has_xcvr_auto_on_off) selrig->set_xcvr_auto_on(); selrig->initialize(); if (flrig_abort) goto failed; FreqDispA->set_precision(selrig->precision); FreqDispA->set_ndigits(selrig->ndigits); FreqDispB->set_precision(selrig->precision); FreqDispB->set_ndigits(selrig->ndigits); if (xcvr_name == rig_TT550.name_) { selrig->selectA(); vfoB.freq = progStatus.freq_B; vfoB.imode = progStatus.imode_B; vfoB.iBW = progStatus.iBW_B; FreqDispB->value(vfoB.freq); selrig->set_vfoB(vfoB.freq); selrig->set_modeB(vfoB.imode); selrig->set_bwB(vfoB.iBW); vfo.freq = vfoA.freq = progStatus.freq_A; vfo.imode = vfoA.imode = progStatus.imode_A; vfo.iBW = vfoA.iBW = progStatus.iBW_A; FreqDispA->value( vfoA.freq ); selrig->set_vfoA(vfoA.freq); selrig->set_modeA(vfoA.imode); if (vfoA.iBW == -1) vfoA.iBW = selrig->def_bandwidth(vfoA.imode); selrig->set_bwA(vfoA.iBW); rigmodes_.clear(); opMODE->clear(); for (int i = 0; selrig->modes_[i] != NULL; i++) { rigmodes_.push_back(selrig->modes_[i]); opMODE->add(selrig->modes_[i]); } opMODE->activate(); opMODE->index(vfoA.imode); rigbws_.clear(); opBW->show(); opBW->clear(); old_bws = selrig->bandwidths_; for (int i = 0; selrig->bandwidths_[i] != NULL; i++) { rigbws_.push_back(selrig->bandwidths_[i]); opBW->add(selrig->bandwidths_[i]); } opBW->activate(); opBW->index(vfoA.iBW); } else { // !TT550 if (progStatus.CIV > 0) selrig->adjustCIV(progStatus.CIV); if (progStatus.use_rig_data) { selrig->selectA(); if (selrig->has_get_info) selrig->get_info(); transceiverA.freq = selrig->get_vfoA(); transceiverA.imode = selrig->get_modeA(); selrig->adjust_bandwidth(transceiverA.imode); transceiverA.iBW = selrig->get_bwA(); selrig->selectB(); if (selrig->has_get_info) selrig->get_info(); transceiverB.freq = selrig->get_vfoB(); transceiverB.imode = selrig->get_modeB(); selrig->adjust_bandwidth(transceiverB.imode); transceiverB.iBW = selrig->get_bwB(); progStatus.freq_A = transceiverA.freq; progStatus.imode_A = transceiverA.imode; progStatus.iBW_A = transceiverA.iBW; progStatus.freq_B = transceiverB.freq; progStatus.imode_B = transceiverB.imode; progStatus.iBW_B = transceiverB.iBW; mnuKeepData->set(); if (selrig->restore_mbw) selrig->last_bw = transceiverA.iBW; } else mnuKeepData->clear(); rigmodes_.clear(); opMODE->clear(); if (selrig->has_mode_control) { for (int i = 0; selrig->modes_[i] != NULL; i++) { rigmodes_.push_back(selrig->modes_[i]); opMODE->add(selrig->modes_[i]); } opMODE->activate(); opMODE->index(progStatus.imode_A); } else { opMODE->add(" "); opMODE->index(0); opMODE->deactivate(); } rigbws_.clear(); opBW->show(); opBW->clear(); if (selrig->has_bandwidth_control) { old_bws = selrig->bandwidths_; for (int i = 0; selrig->bandwidths_[i] != NULL; i++) { rigbws_.push_back(selrig->bandwidths_[i]); opBW->add(selrig->bandwidths_[i]); } opBW->activate(); if (progStatus.iBW_A == -1) progStatus.iBW_A = selrig->def_bandwidth(vfoA.imode); if (progStatus.iBW_B == -1) progStatus.iBW_B = selrig->def_bandwidth(vfoB.imode); opBW->index(progStatus.iBW_A); } else { opBW->add(" "); opBW->index(0); opBW->deactivate(); } } // !TT550 if (selrig->has_special) btnSpecial->show(); // btnSpecial->activate(); else btnSpecial->hide(); // btnSpecial->deactivate(); if (selrig->has_ext_tuner) btn_ext_tuner->show(); else btn_ext_tuner->hide(); if (selrig->has_rit) { int min, max, step; selrig->get_RIT_min_max_step(min, max, step); cntRIT->minimum(min); cntRIT->maximum(max); cntRIT->step(step); switch (progStatus.UIsize) { case small_ui : cntRIT->show(); break; case wide_ui : case touch_ui : default : cntRIT->activate(); } cntRIT->value(progStatus.rit_freq); } else { switch (progStatus.UIsize) { case small_ui : cntRIT->hide(); break; case wide_ui: case touch_ui : default : cntRIT->deactivate(); } } if (selrig->has_xit) { int min, max, step; selrig->get_XIT_min_max_step(min, max, step); cntXIT->minimum(min); cntXIT->maximum(max); cntXIT->step(step); cntXIT->value(progStatus.xit_freq); switch (progStatus.UIsize) { case small_ui : cntXIT->show(); break; case wide_ui : case touch_ui : default : cntXIT->activate(); } } else { switch (progStatus.UIsize) { case small_ui : cntXIT->hide(); case wide_ui : case touch_ui : default : cntXIT->deactivate(); } } if (selrig->has_bfo) { int min, max, step; selrig->get_BFO_min_max_step(min, max, step); cntBFO->minimum(min); cntBFO->maximum(max); cntBFO->step(step); cntBFO->value(progStatus.bfo_freq); switch (progStatus.UIsize) { case small_ui : cntBFO->show(); break; case wide_ui : case touch_ui : default : cntBFO->activate(); } } else { switch (progStatus.UIsize) { case small_ui : cntBFO->hide(); break; case wide_ui : case touch_ui : default : cntBFO->deactivate(); } } if (selrig->has_dsp_controls) { opDSP_lo->clear(); opDSP_hi->clear(); btnDSP->label(selrig->SL_label); btnDSP->redraw_label(); for (int i = 0; selrig->dsp_SL[i] != NULL; i++) opDSP_lo->add(selrig->dsp_SL[i]); opDSP_lo->tooltip(selrig->SL_tooltip); for (int i = 0; selrig->dsp_SH[i] != NULL; i++) opDSP_hi->add(selrig->dsp_SH[i]); opDSP_hi->tooltip(selrig->SH_tooltip); if (vfo.iBW > 256) { opDSP_lo->index(vfo.iBW & 0xFF); opDSP_hi->index((vfo.iBW >> 8) & 0x7F); btnDSP->show(); opDSP_hi->show(); opDSP_lo->hide(); opBW->hide(); opBW->index(0); } else { opDSP_lo->index(0); opDSP_hi->index(0); btnDSP->hide(); opDSP_lo->hide(); opDSP_hi->hide(); opBW->show(); } } else { btnDSP->hide(); opDSP_lo->hide(); opDSP_hi->hide(); opBW->show(); } if (selrig->has_volume_control) { int min, max, step; selrig->get_vol_min_max_step(min, max, step); if (spnrVOLUME) { spnrVOLUME->minimum(min); spnrVOLUME->maximum(max); spnrVOLUME->step(step); spnrVOLUME->redraw(); } if (sldrVOLUME) { sldrVOLUME->minimum(min); sldrVOLUME->maximum(max); sldrVOLUME->step(step); sldrVOLUME->redraw(); } if (progStatus.use_rig_data) { progStatus.volume = selrig->get_volume_control(); if (sldrVOLUME) sldrVOLUME->value(progStatus.volume); if (sldrVOLUME) sldrVOLUME->activate(); btnVol->value(1); if (spnrVOLUME) spnrVOLUME->value(progStatus.volume); if (spnrVOLUME) spnrVOLUME->activate(); sldrVOLUME->activate(); } else { if (sldrVOLUME) sldrVOLUME->value(progStatus.volume); if (spnrVOLUME) spnrVOLUME->value(progStatus.volume); if (progStatus.spkr_on == 0) { btnVol->value(0); if (sldrVOLUME) sldrVOLUME->deactivate(); if (spnrVOLUME) spnrVOLUME->deactivate(); selrig->set_volume_control(0); } else { btnVol->value(1); if (sldrVOLUME) sldrVOLUME->activate(); if (spnrVOLUME) spnrVOLUME->activate(); selrig->set_volume_control(progStatus.volume); } } switch (progStatus.UIsize) { case small_ui : btnVol->show(); if (sldrVOLUME) sldrVOLUME->show(); if (spnrVOLUME) spnrVOLUME->show(); break; case wide_ui : case touch_ui : default : btnVol->activate(); if (sldrVOLUME) sldrVOLUME->activate(); if (spnrVOLUME) spnrVOLUME->activate(); } } else { switch (progStatus.UIsize) { case small_ui : btnVol->hide(); if (sldrVOLUME) sldrVOLUME->hide(); if (spnrVOLUME) spnrVOLUME->hide(); break; case wide_ui : case touch_ui : default : btnVol->deactivate(); if (sldrVOLUME) sldrVOLUME->deactivate(); if (spnrVOLUME) spnrVOLUME->deactivate(); } } if (selrig->has_rf_control) { int min, max, step; selrig->get_rf_min_max_step(min, max, step); if (sldrRFGAIN) sldrRFGAIN->minimum(min); if (sldrRFGAIN) sldrRFGAIN->maximum(max); if (sldrRFGAIN) sldrRFGAIN->step(step); if (sldrRFGAIN) sldrRFGAIN->redraw(); if (spnrRFGAIN) spnrRFGAIN->minimum(min); if (spnrRFGAIN) spnrRFGAIN->maximum(max); if (spnrRFGAIN) spnrRFGAIN->step(step); if (spnrRFGAIN) spnrRFGAIN->redraw(); if (progStatus.use_rig_data) { progStatus.rfgain = selrig->get_rf_gain(); if (sldrRFGAIN) sldrRFGAIN->value(progStatus.rfgain); if (spnrRFGAIN) spnrRFGAIN->value(progStatus.rfgain); switch (progStatus.UIsize) { case small_ui : if (sldrRFGAIN) sldrRFGAIN->show(); if (spnrRFGAIN) spnrRFGAIN->show(); break; case wide_ui : case touch_ui : default : if (sldrRFGAIN) sldrRFGAIN->activate(); if (spnrRFGAIN) spnrRFGAIN->activate(); } } else { if (sldrRFGAIN) sldrRFGAIN->value(progStatus.rfgain); if (spnrRFGAIN) spnrRFGAIN->value(progStatus.rfgain); selrig->set_rf_gain(progStatus.rfgain); switch (progStatus.UIsize) { case small_ui : if (sldrRFGAIN) sldrRFGAIN->show(); if (spnrRFGAIN) spnrRFGAIN->show(); break; case wide_ui : case touch_ui : default : if (sldrRFGAIN) sldrRFGAIN->activate(); if (spnrRFGAIN) spnrRFGAIN->activate(); } } } else { switch (progStatus.UIsize) { case small_ui : if (sldrRFGAIN) sldrRFGAIN->hide(); if (spnrRFGAIN) spnrRFGAIN->hide(); break; case wide_ui : case touch_ui : default : if (sldrRFGAIN) sldrRFGAIN->deactivate(); if (spnrRFGAIN) spnrRFGAIN->deactivate(); } } if (selrig->has_sql_control) { int min, max, step; selrig->get_squelch_min_max_step(min, max, step); if (sldrSQUELCH) sldrSQUELCH->minimum(min); if (sldrSQUELCH) sldrSQUELCH->maximum(max); if (sldrSQUELCH) sldrSQUELCH->step(step); if (sldrSQUELCH) sldrSQUELCH->redraw(); if (spnrSQUELCH) spnrSQUELCH->minimum(min); if (spnrSQUELCH) spnrSQUELCH->maximum(max); if (spnrSQUELCH) spnrSQUELCH->step(step); if (spnrSQUELCH) spnrSQUELCH->redraw(); if (progStatus.use_rig_data) { progStatus.squelch = selrig->get_squelch(); if (sldrSQUELCH) sldrSQUELCH->value(progStatus.squelch); if (spnrSQUELCH) spnrSQUELCH->value(progStatus.squelch); switch (progStatus.UIsize) { case small_ui : if (sldrSQUELCH) sldrSQUELCH->show(); if (spnrSQUELCH) spnrSQUELCH->show(); break; case wide_ui : case touch_ui : default: if (sldrSQUELCH) sldrSQUELCH->activate(); if (spnrSQUELCH) spnrSQUELCH->activate(); } } else { if (sldrSQUELCH) sldrSQUELCH->value(progStatus.squelch); if (spnrSQUELCH) spnrSQUELCH->value(progStatus.squelch); selrig->set_squelch(progStatus.squelch); switch (progStatus.UIsize) { case small_ui : if (sldrSQUELCH) sldrSQUELCH->show(); if (spnrSQUELCH) spnrSQUELCH->show(); break; case wide_ui : case touch_ui : default : if (sldrSQUELCH) sldrSQUELCH->activate(); if (spnrSQUELCH) spnrSQUELCH->activate(); } } } else { switch (progStatus.UIsize) { case small_ui : if (sldrSQUELCH) sldrSQUELCH->hide(); if (spnrSQUELCH) spnrSQUELCH->hide(); break; case wide_ui : case touch_ui : default : if (sldrSQUELCH) sldrSQUELCH->deactivate(); if (spnrSQUELCH) spnrSQUELCH->deactivate(); } } if (selrig->has_noise_reduction_control) { int min, max, step; selrig->get_nr_min_max_step(min, max, step); if (sldrNR) sldrNR->minimum(min); if (sldrNR) sldrNR->maximum(max); if (sldrNR) sldrNR->step(step); if (sldrNR) sldrNR->redraw(); if (spnrNR) spnrNR->minimum(min); if (spnrNR) spnrNR->maximum(max); if (spnrNR) spnrNR->step(step); if (spnrNR) spnrNR->redraw(); switch (progStatus.UIsize) { case small_ui : btnNR->show(); if (sldrNR) sldrNR->show(); if (spnrNR) spnrNR->show(); break; case wide_ui : case touch_ui : default: btnNR->activate(); if (sldrNR) sldrNR->activate(); if (spnrNR) spnrNR->activate(); break; } if (progStatus.use_rig_data) { progStatus.noise_reduction = selrig->get_noise_reduction(); progStatus.noise_reduction_val = selrig->get_noise_reduction_val(); btnNR->value(progStatus.noise_reduction); if (sldrNR) sldrNR->value(progStatus.noise_reduction_val); if (spnrNR) spnrNR->value(progStatus.noise_reduction_val); } else { btnNR->value(progStatus.noise_reduction); if (sldrNR) sldrNR->value(progStatus.noise_reduction_val); if (spnrNR) spnrNR->value(progStatus.noise_reduction_val); selrig->set_noise_reduction(progStatus.noise_reduction); selrig->set_noise_reduction_val(progStatus.noise_reduction_val); } } else { switch (progStatus.UIsize) { case small_ui : btnNR->hide(); if (sldrNR) sldrNR->hide(); if (spnrNR) sldrNR->hide(); break; case wide_ui : case touch_ui : default : btnNR->deactivate(); if (sldrNR) sldrNR->deactivate(); if (spnrNR) spnrNR->deactivate(); break; } } if (selrig->has_ifshift_control) { int min, max, step; selrig->get_if_min_max_step(min, max, step); if (sldrIFSHIFT) sldrIFSHIFT->minimum(min); if (sldrIFSHIFT) sldrIFSHIFT->maximum(max); if (sldrIFSHIFT) sldrIFSHIFT->step(step); if (sldrIFSHIFT) sldrIFSHIFT->redraw(); if (spnrIFSHIFT) spnrIFSHIFT->minimum(min); if (spnrIFSHIFT) spnrIFSHIFT->maximum(max); if (spnrIFSHIFT) spnrIFSHIFT->step(step); if (spnrIFSHIFT) spnrIFSHIFT->redraw(); if (progStatus.use_rig_data) { progStatus.shift = selrig->get_if_shift(progStatus.shift_val); btnIFsh->value(progStatus.shift); if (sldrIFSHIFT) sldrIFSHIFT->value(progStatus.shift_val); if (spnrIFSHIFT) spnrIFSHIFT->value(progStatus.shift_val); } else { if (progStatus.shift) { btnIFsh->value(1); if (sldrIFSHIFT) sldrIFSHIFT->value(progStatus.shift_val); if (spnrIFSHIFT) spnrIFSHIFT->value(progStatus.shift_val); selrig->set_if_shift(progStatus.shift_val); } else { btnIFsh->value(0); if (sldrIFSHIFT) sldrIFSHIFT->value(selrig->if_shift_mid); if (spnrIFSHIFT) spnrIFSHIFT->value(selrig->if_shift_mid); selrig->set_if_shift(selrig->if_shift_mid); } } switch (progStatus.UIsize) { case small_ui : btnIFsh->show(); if (sldrIFSHIFT) sldrIFSHIFT->show(); if (spnrIFSHIFT) spnrIFSHIFT->show(); break; case wide_ui : case touch_ui : default : btnIFsh->activate(); if (sldrIFSHIFT) sldrIFSHIFT->activate(); if (spnrIFSHIFT) spnrIFSHIFT->activate(); break; } } else { switch (progStatus.UIsize) { case small_ui : btnIFsh->hide(); if (sldrIFSHIFT) sldrIFSHIFT->hide(); if (spnrIFSHIFT) spnrIFSHIFT->hide(); break; case wide_ui : case touch_ui : default : btnIFsh->deactivate(); if (sldrIFSHIFT) sldrIFSHIFT->deactivate(); if (spnrIFSHIFT) spnrIFSHIFT->deactivate(); break; } } if (xcvr_name == rig_TS870S.name_) { if (progStatus.imode_A == RIG_TS870S::tsCW || progStatus.imode_A == RIG_TS870S::tsCWR) { btnIFsh->activate(); if (sldrIFSHIFT) sldrIFSHIFT->activate(); if (spnrIFSHIFT) spnrIFSHIFT->activate(); } else { btnIFsh->deactivate(); if (sldrIFSHIFT) sldrIFSHIFT->deactivate(); if (spnrIFSHIFT) spnrIFSHIFT->deactivate(); } } if (selrig->has_notch_control) { int min, max, step; selrig->get_notch_min_max_step(min, max, step); if (sldrNOTCH) sldrNOTCH->minimum(min); if (sldrNOTCH) sldrNOTCH->maximum(max); if (sldrNOTCH) sldrNOTCH->step(step); if (sldrNOTCH) sldrNOTCH->redraw(); if (spnrNOTCH) spnrNOTCH->minimum(min); if (spnrNOTCH) spnrNOTCH->maximum(max); if (spnrNOTCH) spnrNOTCH->step(step); if (spnrNOTCH) spnrNOTCH->redraw(); if (progStatus.use_rig_data) { progStatus.notch = selrig->get_notch(progStatus.notch_val); btnNotch->value(progStatus.notch); if (sldrNOTCH) sldrNOTCH->value(progStatus.notch_val); if (spnrNOTCH) spnrNOTCH->value(progStatus.notch_val); } else { btnNotch->value(progStatus.notch); if (sldrNOTCH) sldrNOTCH->value(progStatus.notch_val); if (spnrNOTCH) spnrNOTCH->value(progStatus.notch_val); selrig->set_notch(progStatus.notch, progStatus.notch_val); } switch (progStatus.UIsize) { case small_ui : btnNotch->show(); if (sldrNOTCH) sldrNOTCH->show(); if (spnrNOTCH) spnrNOTCH->show(); break; case wide_ui : case touch_ui : default : btnNotch->activate(); if (sldrNOTCH) sldrNOTCH->activate(); if (spnrNOTCH) spnrNOTCH->activate(); break; } } else { switch (progStatus.UIsize) { case small_ui : btnNotch->hide(); if (sldrNOTCH) sldrNOTCH->hide(); if (spnrNOTCH) spnrNOTCH->hide(); break; case wide_ui : case touch_ui : default : btnNotch->deactivate(); if (sldrNOTCH) sldrNOTCH->deactivate(); if (spnrNOTCH) spnrNOTCH->deactivate(); break; } } if (selrig->has_micgain_control) { int min = 0, max = 0, step = 0; selrig->get_mic_min_max_step(min, max, step); if (sldrMICGAIN) sldrMICGAIN->minimum(min); if (sldrMICGAIN) sldrMICGAIN->maximum(max); if (sldrMICGAIN) sldrMICGAIN->step(step); if (spnrMICGAIN) spnrMICGAIN->minimum(min); if (spnrMICGAIN) spnrMICGAIN->maximum(max); if (spnrMICGAIN) spnrMICGAIN->step(step); if (progStatus.use_rig_data) progStatus.mic_gain = selrig->get_mic_gain(); else selrig->set_mic_gain(progStatus.mic_gain); if (sldrMICGAIN) sldrMICGAIN->value(progStatus.mic_gain); if (spnrMICGAIN) spnrMICGAIN->value(progStatus.mic_gain); switch (progStatus.UIsize) { case small_ui : if (sldrMICGAIN) sldrMICGAIN->show(); if (spnrMICGAIN) spnrMICGAIN->show(); break; case wide_ui : case touch_ui : default : if (sldrMICGAIN) sldrMICGAIN->activate(); if (spnrMICGAIN) spnrMICGAIN->activate(); break; } if (selrig->has_data_port) { btnDataPort->show(); btnDataPort->value(progStatus.data_port); btnDataPort->label(progStatus.data_port ? "Data" : "Mic"); btnDataPort->redraw_label(); } else btnDataPort->hide(); } else { switch (progStatus.UIsize) { case small_ui : if (sldrMICGAIN) sldrMICGAIN->hide(); if (spnrMICGAIN) spnrMICGAIN->hide(); break; case wide_ui : case touch_ui : default : if (sldrMICGAIN) sldrMICGAIN->deactivate(); if (spnrMICGAIN) spnrMICGAIN->deactivate(); } } double min, max, step; if (selrig->has_power_control) { if (progStatus.use_rig_data) progStatus.power_level = selrig->get_power_control(); else selrig->set_power_control(progStatus.power_level); selrig->get_pc_min_max_step(min, max, step); if (sldrPOWER) sldrPOWER->minimum(min); if (sldrPOWER) sldrPOWER->maximum(max); if (sldrPOWER) sldrPOWER->step(step); if (sldrPOWER) sldrPOWER->value(progStatus.power_level); if (sldrPOWER) sldrPOWER->show(); if (sldrPOWER) sldrPOWER->redraw(); if (spnrPOWER) spnrPOWER->minimum(min); if (spnrPOWER) spnrPOWER->maximum(max); if (spnrPOWER) spnrPOWER->step(step); if (spnrPOWER) spnrPOWER->value(progStatus.power_level); if (spnrPOWER) spnrPOWER->show(); if (spnrPOWER) spnrPOWER->redraw(); } set_power_controlImage(progStatus.power_level); if (selrig->has_attenuator_control) { if (progStatus.use_rig_data) progStatus.attenuator = selrig->get_attenuator(); else selrig->set_attenuator(progStatus.attenuator); switch (progStatus.UIsize) { case small_ui : btnAttenuator->show(); break; case wide_ui : case touch_ui : default : btnAttenuator->activate(); } } else { switch (progStatus.UIsize) { case small_ui : btnAttenuator->hide(); break; case wide_ui : case touch_ui : default : btnAttenuator->deactivate(); } } // hijack the preamp control for a SPOT button on the TT550 Pegasus if (xcvr_name == rig_TT550.name_) { btnPreamp->label("Spot"); btnPreamp->value(progStatus.tt550_spot_onoff); switch (progStatus.UIsize) { case small_ui : btnPreamp->show(); break; case wide_ui : case touch_ui : default : btnPreamp->activate(); } } else { if (selrig->has_preamp_control) { if (progStatus.use_rig_data) progStatus.preamp = selrig->get_preamp(); else selrig->set_preamp(progStatus.preamp); switch (progStatus.UIsize) { case small_ui : btnPreamp->show(); break; case wide_ui : case touch_ui : default : btnPreamp->activate(); } } else { switch (progStatus.UIsize) { case small_ui : btnPreamp->hide(); break; case wide_ui : case touch_ui : default : btnPreamp->deactivate(); } } } if (selrig->has_noise_control) { if (xcvr_name == rig_TS990.name_) { btnNOISE->label("AGC"); //Set TS990 AGC Label btnNR->label("NR1"); //Set TS990 NR Button } if (progStatus.use_rig_data) progStatus.noise = selrig->get_noise(); else selrig->set_noise(progStatus.noise); btnNOISE->value(progStatus.noise); switch (progStatus.UIsize) { case small_ui : btnNOISE->show(); break; case wide_ui : case touch_ui : default : btnNOISE->activate(); } } else { switch (progStatus.UIsize) { case small_ui : btnNOISE->hide(); break; case wide_ui : case touch_ui : default : btnNOISE->deactivate(); } } if (selrig->has_tune_control) { switch (progStatus.UIsize) { case small_ui : btnTune->show(); break; case wide_ui : case touch_ui : default : btnTune->activate(); } } else { switch (progStatus.UIsize) { case small_ui : btnTune->hide(); break; case wide_ui : case touch_ui : default : btnTune->deactivate(); } } if (selrig->has_ptt_control || progStatus.comm_dtrptt || progStatus.comm_rtsptt || progStatus.sep_dtrptt || progStatus.sep_rtsptt) { btnPTT->activate(); } else { btnPTT->deactivate(); } if (selrig->has_auto_notch) { if (xcvr_name == rig_RAY152.name_) { btnAutoNotch->label("AGC"); btnAutoNotch->tooltip("AGC on/off"); } else if (xcvr_name == rig_FT1000MP.name_) { btnAutoNotch->label("Tuner"); btnAutoNotch->tooltip("Tuner on/off"); } else { btnAutoNotch->label("AN"); btnAutoNotch->tooltip("Auto notch on/off"); } if (progStatus.use_rig_data) progStatus.auto_notch = selrig->get_auto_notch(); else selrig->set_auto_notch(progStatus.auto_notch); btnAutoNotch->value(progStatus.auto_notch); switch (progStatus.UIsize) { case small_ui : btnAutoNotch->show(); break; case wide_ui : case touch_ui : default : btnAutoNotch->activate(); } } else { switch (progStatus.UIsize) { case small_ui : btnAutoNotch->hide(); break; case wide_ui : case touch_ui : default : btnAutoNotch->deactivate(); } } if (selrig->has_swr_control) btnALC_SWR->activate(); else { btnALC_SWR->deactivate(); } if (selrig->has_compON || selrig->has_compression) selrig->set_compression(); adjust_control_positions(); initXcvrTab(); buildlist(); if (selrig->CIV) { char hexstr[8]; snprintf(hexstr, sizeof(hexstr), "0x%2X", selrig->CIV); txtCIV->value(hexstr); txtCIV->activate(); btnCIVdefault->activate(); if (selrig->name_ == rig_IC7200.name_ || selrig->name_ == rig_IC7600.name_ || selrig->name_ == rig_IC7800.name_ ) { // if (strstr(selrig->name_, "IC-7200") || strstr(selrig->name_, "IC-7600") // || strstr(selrig->name_, "IC-7800")) { btnUSBaudio->value(progStatus.USBaudio = true); btnUSBaudio->activate(); } else btnUSBaudio->deactivate(); } else { txtCIV->value(""); txtCIV->deactivate(); btnCIVdefault->deactivate(); btnUSBaudio->value(false); btnUSBaudio->deactivate(); } if (selrig->name_ != rig_TT550.name_) { vfoA.freq = progStatus.freq_A; vfoA.imode = progStatus.imode_A; vfoA.iBW = progStatus.iBW_A; if (vfoA.iBW == -1) vfoA.iBW = selrig->def_bandwidth(vfoA.imode); FreqDispA->value( vfoA.freq ); vfoB.freq = progStatus.freq_B; vfoB.imode = progStatus.imode_B; vfoB.iBW = progStatus.iBW_B; if (vfoB.iBW == -1) vfoB.iBW = selrig->def_bandwidth(vfoB.imode); FreqDispB->value(vfoB.freq); selrig->selectB(); selrig->set_vfoB(vfoB.freq); selrig->set_modeB(vfoB.imode); selrig->set_bwB(vfoB.iBW); selrig->selectA(); selrig->set_vfoA(vfoA.freq); selrig->set_modeA(vfoA.imode); selrig->set_bwA(vfoA.iBW); vfo = vfoA; updateBandwidthControl(); useB = false; highlight_vfo((void *)0); } // enable buttons, change labels if (xcvr_name == rig_TS990.name_) { // Setup TS990 Mon Button btnIFsh->label("MON"); } selrig->post_initialize(); // enable the serial thread } if (xcvr_name == rig_K3.name_) { btnB->hide(); btnA->hide(); btn_KX3_swapAB->hide(); btn_K3_swapAB->show(); } else if (xcvr_name == rig_KX3.name_) { btnB->hide(); btnA->hide(); btn_K3_swapAB->hide(); btn_KX3_swapAB->show(); } else { btn_K3_swapAB->hide(); btn_KX3_swapAB->hide(); btnB->show(); btnA->show(); } btnAswapB->show(); bypass_serial_thread_loop = false; btnInitializing->hide(); mainwindow->redraw(); return; failed: btnInitializing->hide(); mainwindow->redraw(); bypass_serial_thread_loop = true; fl_alert2(_("Transceiver not responding")); return; } void init_title() { title = PACKAGE; title += " "; title.append(selrig->name_); mainwindow->label(title.c_str()); } void initConfigDialog() { int picked = selectRig->index(); rigbase *srig = rigs[picked]; string xcvr_name = srig->name_; selectCommPort->index(0); selectCommPort->value(progStatus.xcvr_serial_port.c_str()); btnOneStopBit->value( progStatus.stopbits == 1 ); btnTwoStopBit->value( progStatus.stopbits == 2 ); mnuBaudrate->index( srig->comm_baudrate ); btnOneStopBit->value( srig->stopbits == 1 ); btnTwoStopBit->value( srig->stopbits == 2 ); cntRigCatRetries->value( srig->comm_retries ); cntRigCatTimeout->value( srig->comm_timeout ); cntRigCatWait->value( srig->comm_wait ); btnRigCatEcho->value( srig->comm_echo ); btncatptt->value( srig->comm_catptt ); btnrtsptt->value( srig->comm_rtsptt ); btndtrptt->value( srig->comm_dtrptt ); chkrtscts->value( srig->comm_rtscts ); btnrtsplus->value( srig->comm_rtsplus ); btndtrplus->value( srig->comm_dtrplus ); if (xcvr_name.find("IC") == 0) { char hexstr[8]; snprintf(hexstr, sizeof(hexstr), "0x%2X", srig->CIV); txtCIV->value(hexstr); txtCIV->activate(); btnCIVdefault->activate(); if (xcvr_name == rig_IC7200.name_ || xcvr_name == rig_IC7600.name_ || xcvr_name == rig_IC7800.name_) { btnUSBaudio->value(progStatus.USBaudio = true); btnUSBaudio->activate(); } else btnUSBaudio->deactivate(); } else { txtCIV->value(""); txtCIV->deactivate(); btnCIVdefault->deactivate(); btnUSBaudio->value(false); btnUSBaudio->deactivate(); } } void initStatusConfigDialog() { if (progStatus.CIV) selrig->adjustCIV(progStatus.CIV); selectRig->value(xcvr_name.c_str()); mnuBaudrate->index( progStatus.comm_baudrate ); selectCommPort->value( progStatus.xcvr_serial_port.c_str() ); selectAuxPort->value( progStatus.aux_serial_port.c_str() ); selectSepPTTPort->value( progStatus.sep_serial_port.c_str() ); btnOneStopBit->value( progStatus.stopbits == 1 ); btnTwoStopBit->value( progStatus.stopbits == 2 ); cntRigCatRetries->value( progStatus.comm_retries ); cntRigCatTimeout->value( progStatus.comm_timeout ); cntRigCatWait->value( progStatus.comm_wait ); btnRigCatEcho->value( progStatus.comm_echo ); btncatptt->value( progStatus.comm_catptt ); btnrtsptt->value( progStatus.comm_rtsptt ); btndtrptt->value( progStatus.comm_dtrptt ); chkrtscts->value( progStatus.comm_rtscts ); btnrtsplus->value( progStatus.comm_rtsplus ); btndtrplus->value( progStatus.comm_dtrplus ); btnSepDTRplus->value(progStatus.sep_dtrplus); btnSepDTRptt->value(progStatus.sep_dtrptt); btnSepRTSplus->value(progStatus.sep_rtsplus); btnSepRTSptt->value(progStatus.sep_rtsptt); init_title(); if (progStatus.use_tcpip) { box_xcvr_connect->color(FL_BACKGROUND2_COLOR); box_xcvr_connect->redraw(); } else { if (!startXcvrSerial()) { if (progStatus.xcvr_serial_port.compare("NONE") == 0) { LOG_WARN("No comm port ... test mode"); } else { LOG_WARN("%s cannot be accessed", progStatus.xcvr_serial_port.c_str()); progStatus.xcvr_serial_port = "NONE"; selectCommPort->value(progStatus.xcvr_serial_port.c_str()); } box_xcvr_connect->color(FL_BACKGROUND2_COLOR); box_xcvr_connect->redraw(); } else { selectCommPort->value(progStatus.xcvr_serial_port.c_str()); box_xcvr_connect->color(FL_GREEN); box_xcvr_connect->redraw(); } if (!startAuxSerial()) { if (progStatus.aux_serial_port.compare("NONE") != 0) { LOG_WARN("%s cannot be accessed", progStatus.aux_serial_port.c_str()); progStatus.aux_serial_port = "NONE"; selectAuxPort->value(progStatus.aux_serial_port.c_str()); } } if (!startSepSerial()) { if (progStatus.sep_serial_port.compare("NONE") != 0) { LOG_WARN("%s cannot be accessed", progStatus.sep_serial_port.c_str()); progStatus.sep_serial_port = "NONE"; selectSepPTTPort->value(progStatus.sep_serial_port.c_str()); } } } initRig(); } void initRigCombo() { selectRig->clear(); int i = 0; while (rigs[i] != NULL) selectRig->add(rigs[i++]->name_.c_str()); selectRig->index(0); } void nr_label(const char *l, bool on = false) { btnNR->value(on ? 1 : 0); btnNR->label(l); btnNR->redraw_label(); } void nb_label(const char * l, bool on = false) { btnNOISE->value(on ? 1 : 0); btnNOISE->label(l); btnNOISE->redraw_label(); } void preamp_label(const char * l, bool on = false) { btnPreamp->value(on ? 1 : 0); btnPreamp->label(l); btnPreamp->redraw_label(); } void atten_label(const char * l, bool on = false) { btnAttenuator->value(on ? 1 : 0); btnAttenuator->label(l); btnAttenuator->redraw_label(); } void auto_notch_label(const char * l, bool on = false) { btnAutoNotch->value(on ? 1 : 0); btnAutoNotch->label(l); btnAutoNotch->redraw_label(); } void cbAuxPort() { AuxSerial.setRTS(progStatus.aux_rts); AuxSerial.setDTR(progStatus.aux_dtr); } void cb_agc_level() { guard_lock serial_lock(&mutex_serial, 72); selrig->set_agc_level(); } void cb_cw_wpm() { guard_lock serial_lock(&mutex_serial, 73); selrig->set_cw_wpm(); } void cb_cw_vol() { // guard_lock serial_lock(&mutex_serial); // selrig->set_cw_vol(); } void cb_cw_spot() { int ret; guard_lock serial_lock(&mutex_serial, 74); ret = selrig->set_cw_spot(); if (!ret) btnSpot->value(0); } void cb_cw_spot_tone() { guard_lock serial_lock(&mutex_serial, 75); selrig->set_cw_spot_tone(); } void cb_vox_gain() { guard_lock serial_lock(&mutex_serial, 76); selrig->set_vox_gain(); } void cb_vox_anti() { guard_lock serial_lock(&mutex_serial, 77); selrig->set_vox_anti(); } void cb_vox_hang() { guard_lock serial_lock(&mutex_serial, 78); selrig->set_vox_hang(); } void cb_vox_onoff() { guard_lock serial_lock(&mutex_serial, 79); selrig->set_vox_onoff(); } void cb_vox_on_dataport() { guard_lock serial_lock(&mutex_serial, 80); selrig->set_vox_on_dataport(); } void cb_compression() { guard_lock serial_lock(&mutex_serial, 81); selrig->set_compression(); } void cb_auto_notch() { progStatus.auto_notch = btnAutoNotch->value(); guard_lock serial_lock(&mutex_serial, 82); selrig->set_auto_notch(progStatus.auto_notch); } void cb_vfo_adj() { progStatus.vfo_adj = spnr_vfo_adj->value(); guard_lock serial_lock(&mutex_serial, 83); selrig->setVfoAdj(progStatus.vfo_adj); } void cb_line_out() { } void cb_bpf_center() { guard_lock serial_lock(&mutex_serial, 84); selrig->set_if_shift(selrig->pbt); } void cb_special() { guard_lock serial_lock(&mutex_serial, 85); selrig->set_special(btnSpecial->value()); } void cb_nb_level() { guard_lock serial_lock(&mutex_serial, 86); progStatus.nb_level = cbo_nb_level->index(); selrig->set_nb_level(); } void cb_spot() { guard_lock serial_lock(&mutex_serial, 87); selrig->set_cw_spot(); } void cb_enable_keyer() { guard_lock serial_lock(&mutex_serial, 88); selrig->enable_keyer(); } void cb_enable_break_in() { guard_lock serial_lock(&mutex_serial, 89); selrig->enable_break_in(); } void cb_cw_weight() { guard_lock serial_lock(&mutex_serial, 89); selrig->set_cw_weight(); } void cb_cw_qsk() { guard_lock serial_lock(&mutex_serial, 90); selrig->set_cw_qsk(); } void cb_cw_delay() { guard_lock serial_lock(&mutex_serial, 90); selrig->set_cw_delay(); } void cbBandSelect(int band) { // bypass local { guard_lock gl_serial(&mutex_serial, 91); bypass_serial_thread_loop = true; } { guard_lock gl_serial(&mutex_serial, 92); selrig->set_band_selection(band); MilliSleep(100); // rig sync-up // get freqmdbw if (!useB) { vfoA.freq = selrig->get_vfoA(); if (selrig->has_mode_control) vfoA.imode = selrig->get_modeA(); if (selrig->has_bandwidth_control) { selrig->adjust_bandwidth(vfoA.imode); vfoA.iBW = selrig->get_bwA(); } vfo = vfoA; } else { vfoB.freq = selrig->get_vfoB(); if (selrig->has_mode_control) vfoB.imode = selrig->get_modeB(); if (selrig->has_bandwidth_control) { selrig->adjust_bandwidth(vfoB.imode); vfoB.iBW = selrig->get_bwB(); } vfo = vfoB; } // local display freqmdbw if (selrig->has_mode_control) Fl::awake(setModeControl); if (selrig->has_bandwidth_control) { set_bandwidth_control(); Fl::awake(setBWControl); } if (!useB) Fl::awake(setFreqDispA, (void *)vfo.freq); else Fl::awake(setFreqDispB, (void *)vfo.freq); MilliSleep(100); // local sync-up } // enable local guard_lock gl_serial(&mutex_serial, 94); bypass_serial_thread_loop = false; } void enable_bandselect_btn(int btn_num, bool enable) { switch (btn_num) { case 1: case 9: break; case 10: // 6m if (enable) btnBandSelect_10->show(); else btnBandSelect_10->hide(); break; case 11: // GEN if (enable) btnBandSelect_11->show(); else btnBandSelect_11->hide(); break; case 13: if (enable) opSelect60->show(); else opSelect60->hide(); break; default: break; } } // trim leading and trailing whitspace and double quote const string lt_trim(const string& pString, const string& pWhitespace) { size_t beginStr, endStr, range; beginStr = pString.find_first_not_of(pWhitespace); if (beginStr == string::npos) return ""; // no content endStr = pString.find_last_not_of(pWhitespace); range = endStr - beginStr + 1; return pString.substr(beginStr, range); } void editAlphaTag() { int indx; string atag; if (FreqSelect->value() < 1) { inAlphaTag->value(""); return; // no memory selected } indx = FreqSelect->value() - 1; atag = inAlphaTag->value(); // delete leading, trailing spaces atag = lt_trim(atag); memset(oplist[indx].alpha_tag, 0, ATAGSIZE); snprintf(oplist[indx].alpha_tag, ATAGSIZE, "%s", atag.c_str()); // update browser list updateSelect(); FreqSelect->value(indx + 1); inAlphaTag->value(oplist[indx].alpha_tag); } flrig-1.3.24/src/support/serial.cxx0000644000175000017500000005016412562731646014155 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include "serial.h" #include "debug.h" LOG_FILE_SOURCE(debug::LOG_RIGCONTROL); #ifndef __WIN32__ #include #include #include #include #include #include #include #include using namespace std; Cserial::Cserial() { device = "/dev/ttyS0"; baud = 1200; timeout = 50; //msec retries = 5; rts = dtr = false; rtsptt = dtrptt = false; rtscts = false; status = 0; stopbits = 2; fd = -1; } Cserial::~Cserial() { ClosePort(); } /////////////////////////////////////////////////////// // Function name : Cserial::OpenPort // Description : Opens the port specified by strPortName // Return type : bool // Argument : c_string strPortName /////////////////////////////////////////////////////// bool Cserial::CheckPort(string dev) { int testfd = open( dev.c_str(), O_RDWR | O_NOCTTY | O_NDELAY); if (testfd < 0) return false; close(fd); return true; } /////////////////////////////////////////////////////// // Function name : Cserial::OpenPort // Description : Opens the port specified by strPortName // Return type : bool // Argument : c_string strPortName /////////////////////////////////////////////////////// bool Cserial::OpenPort() { if ((fd = open( device.c_str(), O_RDWR | O_NOCTTY | O_NDELAY )) < 0) return false; // save current port settings tcflush (fd, TCIFLUSH); tcgetattr (fd, &oldtio); newtio = oldtio; // 8 data bits newtio.c_cflag &= ~CSIZE; newtio.c_cflag |= CS8; // enable receiver, set local mode newtio.c_cflag |= (CLOCAL | CREAD); // no parity newtio.c_cflag &= ~PARENB; if (stopbits == 1) // 1 stop bit newtio.c_cflag &= ~CSTOPB; else // 2 stop bit newtio.c_cflag |= CSTOPB; if (rtscts) // h/w handshake newtio.c_cflag |= CRTSCTS; else // no h/w handshake newtio.c_cflag &= ~CRTSCTS; // raw input newtio.c_lflag &= ~(ICANON | ECHO | ECHOE | ISIG); // raw output newtio.c_oflag &= ~OPOST; // software flow control disabled newtio.c_iflag &= ~IXON; // do not translate CR to NL newtio.c_iflag &= ~ICRNL; switch(baud) { case 300: speed = B300; break; case 1200: speed = B1200; break; case 2400: speed = B2400; break; case 4800: speed = B4800; break; case 9600: speed = B9600; break; case 19200: speed = B19200; break; case 38400: speed = B38400; break; case 57600: speed = B57600; break; case 115200: speed = B115200; break; default: speed = B1200; } cfsetispeed(&newtio, speed); cfsetospeed(&newtio, speed); tcsetattr (fd, TCSANOW, &newtio); ioctl(fd, TIOCMGET, &status); origstatus = status; if (dtr) status |= TIOCM_DTR; // set the DTR bit else status &= ~TIOCM_DTR; // clear the DTR bit if (rtscts == false) { // rts OK for ptt if RTSCTS not used if (rts) status |= TIOCM_RTS; // set the RTS bit else status &= ~TIOCM_RTS; // clear the RTS bit } ioctl(fd, TIOCMSET, &status); FlushBuffer(); return true; } /////////////////////////////////////////////////////// // Function name : Cserial::setPTT // Return type : void /////////////////////////////////////////////////////// void Cserial::SetPTT(bool ON) { if (fd < 0) { LOG_DEBUG("ptt fd < 0"); return; } if (dtrptt || rtsptt) { ioctl(fd, TIOCMGET, &status); if (ON) { // ptt enabled if (dtrptt && dtr) status &= ~TIOCM_DTR; // toggle low if (dtrptt && !dtr) status |= TIOCM_DTR; // toggle high if (!rtscts) { if (rtsptt && rts) status &= ~TIOCM_RTS; // toggle low if (rtsptt && !rts) status |= TIOCM_RTS; // toggle high } } else { // ptt disabled if (dtrptt && dtr) status |= TIOCM_DTR; // toggle high if (dtrptt && !dtr) status &= ~TIOCM_DTR; // toggle low if (!rtscts) { if (rtsptt && rts) status |= TIOCM_RTS; // toggle high if (rtsptt && !rts) status &= ~TIOCM_RTS; // toggle low } } LOG_INFO("PTT %d, DTRptt %d, DTR %d, RTSptt %d, RTS %d, RTSCTS %d, status %2X", ON, dtrptt, dtr, rtsptt, rts, rtscts, status); ioctl(fd, TIOCMSET, &status); } // LOG_DEBUG("No ptt specified"); } void Cserial::setRTS(bool b) { if (fd < 0) return; ioctl(fd, TIOCMGET, &status); if (b == true) status |= TIOCM_RTS; // toggle high else status &= ~TIOCM_RTS; // toggle low ioctl(fd, TIOCMSET, &status); } void Cserial::setDTR(bool b) { if (fd < 0) return; ioctl(fd, TIOCMGET, &status); if (b == true) status |= TIOCM_DTR; // toggle high else status &= ~TIOCM_DTR; // toggle low ioctl(fd, TIOCMSET, &status); } /////////////////////////////////////////////////////// // Function name : Cserial::ClosePort // Description : Closes the Port // Return type : void /////////////////////////////////////////////////////// void Cserial::ClosePort() { if (fd < 0) return; int myfd = fd; fd = -1; // Some serial drivers force RTS and DTR high immediately upon // opening the port, so our origstatus will indicate those bits // high (though the lines weren't actually high before we opened). // But then when we "restore" RTS and DTR from origstatus here // it can result in PTT activation upon program exit! To avoid // this possibility, we ignore the apparentl initial settings, and // instead force RTS and DTR low before closing the port. (Just // omitting the ioctl(TIOCMSET) would also resolve the problem). // Kamal Mostafa origstatus &= ~(TIOCM_RTS|TIOCM_DTR); ioctl(myfd, TIOCMSET, &origstatus); tcsetattr (myfd, TCSANOW, &oldtio); close(myfd); fd = -1; return; } bool Cserial::IOselect () { fd_set rfds; struct timeval tv; int retval; FD_ZERO (&rfds); FD_SET (fd, &rfds); tv.tv_sec = timeout/1000; tv.tv_usec = (timeout % 1000) * 1000; retval = select (FD_SETSIZE, &rfds, (fd_set *)0, (fd_set *)0, &tv); if (retval <= 0) // no response from serial port or error returned return false; return true; } /////////////////////////////////////////////////////// // Function name : Cserial::ReadBuffer // Description : Reads upto nchars from the selected port // Return type : # characters received // Argument : pointer to buffer; # chars to read /////////////////////////////////////////////////////// int Cserial::ReadBuffer (char *buf, int nchars) { if (fd < 0) return 0; int retnum, nread = 0; while (nchars > 0) { if (!IOselect()) { return nread; } retnum = read (fd, (char *)(buf + nread), nchars); if (retnum < 0) return 0;//nread; if (retnum == 0) return nread; nread += retnum; nchars -= retnum; } return nread; } /////////////////////////////////////////////////////// // Function name : Cserial::WriteBuffer // Description : Writes a string to the selected port // Return type : bool // Argument : BYTE by /////////////////////////////////////////////////////// int Cserial::WriteBuffer(const char *buff, int n) { if (fd < 0) return 0; int ret = write (fd, buff, n); return ret; } /////////////////////////////////////////////////////// // Function name : Cserial::WriteByte // Description : Writes a Byte to the selected port // Return type : bool // Argument : BYTE by /////////////////////////////////////////////////////// bool Cserial::WriteByte(char by) { if (fd < 0) return false; static char buff[2]; buff[0] = by; buff[1] = 0; return (write(fd, buff, 1) == 1); } /////////////////////////////////////////////////////// // Function name : Cserial::FlushBuffer // Description : flushes the pending rx chars // Return type : void /////////////////////////////////////////////////////// void Cserial::FlushBuffer() { if (fd < 0) return; tcflush (fd, TCIFLUSH); } //============================================================================= // WIN32 serial implementation //============================================================================= #else // __WIN32__ using namespace std; /////////////////////////////////////////////////////// // Function name : Cserial::CheckPort // Description : Checks the port specified by strPortName // Return type : bool // Argument : c_string strPortName /////////////////////////////////////////////////////// bool Cserial::CheckPort(string dev) { static HANDLE hTest; string COMportname = "//./"; COMportname.append(dev); hTest = CreateFile(COMportname.c_str(), GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); if(hTest == INVALID_HANDLE_VALUE) return false; CloseHandle(hTest); return true; } /////////////////////////////////////////////////////// // Function name : Cserial::OpenPort // Description : Opens the port specified by strPortName // Return type : bool // Argument : CString strPortName /////////////////////////////////////////////////////// bool Cserial::OpenPort() { string COMportname = "//./"; COMportname.append(device); hComm = CreateFile(COMportname.c_str(), GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); if(!hComm) return false; ConfigurePort( baud, 8, false, NOPARITY, stopbits); //LOG_INFO("Comm port %s open; handle = %d", device.c_str(), hComm); FlushBuffer(); return true; } /////////////////////////////////////////////////////// // Function name : Cserial::ClosePort // Description : Closes the Port // Return type : void /////////////////////////////////////////////////////// void Cserial::ClosePort() { if (hComm) { bPortReady = SetCommTimeouts (hComm, &CommTimeoutsSaved); CloseHandle(hComm); } hComm = 0; return; } bool Cserial::IsOpen() { if (!hComm) return false; return true; } /////////////////////////////////////////////////////// // Function name : Cserial::GetBytesRead // Description : // Return type : DWORD /////////////////////////////////////////////////////// DWORD Cserial::GetBytesRead() { return nBytesRead; } /////////////////////////////////////////////////////// // Function name : Cserial::GetBytesWritten // Description : returns total number of bytes written to port // Return type : DWORD /////////////////////////////////////////////////////// DWORD Cserial::GetBytesWritten() { return nBytesWritten; } /////////////////////////////////////////////////////// // Function name : Cserial::ReadByte // Description : Reads a byte from the selected port // Return type : bool // Argument : BYTE& by /////////////////////////////////////////////////////// bool Cserial::ReadByte(char & by) { static BYTE byResByte[1024]; static DWORD dwBytesTxD=0; if (!hComm) return false; if (ReadFile (hComm, &byResByte[0], 1, &dwBytesTxD, 0)) { if (dwBytesTxD == 1) { by = (UCHAR)byResByte[0]; return true; } } by = 0; return false; } int Cserial::ReadData (char *buf, int nchars) { DWORD dwRead = 0; if (!ReadFile(hComm, buf, nchars, &dwRead, NULL)) return 0; return (int) dwRead; } int Cserial::ReadChars (char *buf, int nchars, int msec) { if (msec) Sleep(msec); return ReadData (buf, nchars); } void Cserial::FlushBuffer() { #define TX_CLEAR 0x0004L #define RX_CLEAR 0x0008L if (!hComm) return; PurgeComm(hComm, RX_CLEAR); } /////////////////////////////////////////////////////// // Function name : Cserial::WriteByte // Description : Writes a Byte to teh selected port // Return type : bool // Argument : BYTE by /////////////////////////////////////////////////////// bool Cserial::WriteByte(char by) { if (!hComm) return false; nBytesWritten = 0; if (WriteFile(hComm,&by,1,&nBytesWritten,NULL)==0) return false; return true; } /////////////////////////////////////////////////////// // Function name : Cserial::WriteBuffer // Description : Writes a string to the selected port // Return type : bool // Argument : BYTE by /////////////////////////////////////////////////////// int Cserial::WriteBuffer(const char *buff, int n) { if (!hComm) return 0; WriteFile (hComm, buff, n, &nBytesWritten, NULL); return nBytesWritten; } /////////////////////////////////////////////////////// // Function name : Cserial::SetCommunicationTimeouts // Description : Sets the timeout for the selected port // Return type : bool // Argument : DWORD ReadIntervalTimeout // Argument : DWORD ReadTotalTimeoutMultiplier // Argument : DWORD ReadTotalTimeoutConstant // Argument : DWORD WriteTotalTimeoutMultiplier // Argument : DWORD WriteTotalTimeoutConstant /////////////////////////////////////////////////////// bool Cserial::SetCommunicationTimeouts( DWORD ReadIntervalTimeout, // msec DWORD ReadTotalTimeoutMultiplier, DWORD ReadTotalTimeoutConstant, DWORD WriteTotalTimeoutMultiplier, DWORD WriteTotalTimeoutConstant ) { if((bPortReady = GetCommTimeouts (hComm, &CommTimeoutsSaved))==0) { return false; } LOG_DEBUG("\n\ Read Interval Timeout............... %ld\n\ Read Total Timeout Multiplier....... %ld\n\ Read Total Timeout Constant Timeout. %ld\n\ Write Total Timeout Constant........ %ld\n\ Write Total Timeout Multiplier...... %ld", CommTimeoutsSaved.ReadIntervalTimeout, CommTimeoutsSaved.ReadTotalTimeoutMultiplier, CommTimeoutsSaved.ReadTotalTimeoutConstant, CommTimeoutsSaved.WriteTotalTimeoutConstant, CommTimeoutsSaved.WriteTotalTimeoutMultiplier); CommTimeouts.ReadIntervalTimeout = ReadIntervalTimeout; CommTimeouts.ReadTotalTimeoutMultiplier = ReadTotalTimeoutMultiplier; CommTimeouts.ReadTotalTimeoutConstant = ReadTotalTimeoutConstant; CommTimeouts.WriteTotalTimeoutConstant = WriteTotalTimeoutConstant; CommTimeouts.WriteTotalTimeoutMultiplier = WriteTotalTimeoutMultiplier; bPortReady = SetCommTimeouts (hComm, &CommTimeouts); if(bPortReady ==0) { CloseHandle(hComm); return false; } return true; } /* * Remarks * * WriteTotalTimeoutMultiplier * * The multiplier used to calculate the total time-out period for write * operations, in milliseconds. For each write operation, this value is * multiplied by the number of bytes to be written. * * WriteTotalTimeoutConstant * * A constant used to calculate the total time-out period for write operations, * in milliseconds. For each write operation, this value is added to the product * of the WriteTotalTimeoutMultiplier member and the number of bytes to be * written. * * A value of zero for both the WriteTotalTimeoutMultiplier and * WriteTotalTimeoutConstant members indicates that total time-outs are not * used for write operations. * * * If an application sets ReadIntervalTimeout and ReadTotalTimeoutMultiplier to * MAXDWORD and sets ReadTotalTimeoutConstant to a value greater than zero and * less than MAXDWORD, one of the following occurs when the ReadFile function * is called: * * If there are any bytes in the input buffer, ReadFile returns immediately * with the bytes in the buffer. * * If there are no bytes in the input buffer, ReadFile waits until a byte * arrives and then returns immediately. * * ********************************************************************* * * If no bytes arrive within the time specified by ReadTotalTimeoutConstant, * ReadFile times out. * * ReadIntervalTimeout * * The maximum time allowed to elapse between the arrival of two bytes on the * communications line, in milliseconds. During a ReadFile operation, the time * period begins when the first byte is received. If the interval between the * arrival of any two bytes exceeds this amount, the ReadFile operation is * completed and any buffered data is returned. A value of zero indicates that * interval time-outs are not used. * * A value of MAXDWORD, combined with zero values for both the * ReadTotalTimeoutConstant and ReadTotalTimeoutMultiplier members, specifies * that the read operation is to return immediately with the bytes that have * already been received, even if no bytes have been received. * * ReadTotalTimeoutMultiplier * * The multiplier used to calculate the total time-out period for read * operations, in milliseconds. For each read operation, this value is * multiplied by the requested number of bytes to be read. * * ReadTotalTimeoutConstant * * A constant used to calculate the total time-out period for read operations, * in milliseconds. For each read operation, this value is added to the product * of the ReadTotalTimeoutMultiplier member and the requested number of bytes. * * A value of zero for both the ReadTotalTimeoutMultiplier and * ReadTotalTimeoutConstant members indicates that total time-outs are not * used for read operations. * */ bool Cserial::SetCommTimeout() { return SetCommunicationTimeouts ( 0, // Read Interval Timeout 0, // Read Total Timeout Multiplier 50, // Read Total Timeout Constant 50, // Write Total Timeout Constant 0 // Write Total Timeout Multiplier ); } /////////////////////////////////////////////////////// // Function name : ConfigurePort // Description : Configures the Port // Return type : bool // Argument : DWORD BaudRate // Argument : BYTE ByteSize // Argument : DWORD fParity // Argument : BYTE Parity // Argument : BYTE StopBits /////////////////////////////////////////////////////// bool Cserial::ConfigurePort( DWORD BaudRate, BYTE ByteSize, DWORD dwParity, BYTE Parity, BYTE StopBits) { if((bPortReady = GetCommState(hComm, &dcb))==0) { // LOG_ERROR("GetCommState Error on %s", device.c_str()); CloseHandle(hComm); return false; } dcb.BaudRate = BaudRate; dcb.ByteSize = ByteSize; dcb.Parity = Parity ; dcb.StopBits = (StopBits == 1 ? ONESTOPBIT : TWOSTOPBITS); dcb.fBinary = true; dcb.fDsrSensitivity = false; dcb.fParity = dwParity; dcb.fOutX = false; dcb.fInX = false; dcb.fNull = false; dcb.fAbortOnError = true; dcb.fOutxCtsFlow = false; dcb.fOutxDsrFlow = false; if (dtr) dcb.fDtrControl = DTR_CONTROL_ENABLE; else dcb.fDtrControl = DTR_CONTROL_DISABLE; dcb.fDsrSensitivity = false; if (rtscts) dcb.fRtsControl = RTS_CONTROL_ENABLE; else { if (rts) dcb.fRtsControl = RTS_CONTROL_ENABLE; else dcb.fRtsControl = RTS_CONTROL_DISABLE; } bPortReady = SetCommState(hComm, &dcb); if(bPortReady == 0) { CloseHandle(hComm); return false; } return SetCommTimeout(); } /////////////////////////////////////////////////////// // Function name : Cserial::setPTT // Return type : void /////////////////////////////////////////////////////// void Cserial::SetPTT(bool ON) { if(!hComm) { LOG_ERROR("Invalid handle"); return; } if ( !(dtrptt || rtsptt) ) return; if (ON) { if (dtrptt && dtr) dcb.fDtrControl = DTR_CONTROL_DISABLE; if (dtrptt && !dtr) dcb.fDtrControl = DTR_CONTROL_ENABLE; if (!rtscts) { if (rtsptt && rts) dcb.fRtsControl = RTS_CONTROL_DISABLE; if (rtsptt && !rts) dcb.fRtsControl = RTS_CONTROL_ENABLE; } } else { if (dtrptt && dtr) dcb.fDtrControl = DTR_CONTROL_ENABLE; if (dtrptt && !dtr) dcb.fDtrControl = DTR_CONTROL_DISABLE; if (!rtscts) { if (rtsptt && rts) dcb.fRtsControl = RTS_CONTROL_ENABLE; if (rtsptt && !rts) dcb.fRtsControl = RTS_CONTROL_DISABLE; } } LOG_INFO("PTT %d, DTRptt %d, DTR %d, RTSptt %d, RTS %d, RTSCTS %d, %2x %2x", ON, dtrptt, dtr, rtsptt, rts, rtscts, static_cast(dcb.fDtrControl), static_cast(dcb.fRtsControl) ); SetCommState(hComm, &dcb); } void Cserial::setRTS(bool b) { if(!hComm) return; if (b == true) dcb.fRtsControl = RTS_CONTROL_ENABLE; else dcb.fRtsControl = RTS_CONTROL_DISABLE; SetCommState(hComm, &dcb); } void Cserial::setDTR(bool b) { if(!hComm) return; if (b == true) dcb.fDtrControl = DTR_CONTROL_ENABLE; else dcb.fDtrControl = DTR_CONTROL_DISABLE; SetCommState(hComm, &dcb); } #endif flrig-1.3.24/src/support/dialogs.cxx0000644000175000017500000010770012646444222014311 00000000000000// ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig. // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include "dialogs.h" #include "rigs.h" #include "util.h" #include "debug.h" #include "serial.h" #include "support.h" #include "rigpanel.h" #include "rigbase.h" #include "font_browser.h" #include #include using namespace std; #include #include #include #include #ifndef __WIN32__ #include #include #include #include #include #endif #include "rig.h" #include "socket_io.h" Fl_Double_Window *dlgDisplayConfig = NULL; Fl_Double_Window *dlgXcvrConfig = NULL; Fl_Double_Window *dlgMemoryDialog = NULL; Fl_Double_Window *dlgControls = NULL; Font_Browser *fntbrowser = NULL; Fl_Color flrig_def_color(int); //====================================================================== // test comm ports //====================================================================== void clear_combos() { selectCommPort->clear(); selectAuxPort->clear(); selectSepPTTPort->clear(); selectCommPort->add("NONE"); selectAuxPort->add("NONE"); selectSepPTTPort->add("NONE"); } void add_combos(char *port) { selectCommPort->add(port); selectAuxPort->add(port); selectSepPTTPort->add(port); } //====================================================================== // WIN32 init_port_combos //====================================================================== #ifdef __WIN32__ static bool open_serial(const char* dev) { bool ret = false; HANDLE fd = CreateFile(dev, GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, 0, 0); if (fd != INVALID_HANDLE_VALUE) { CloseHandle(fd); ret = true; } return ret; } # define TTY_MAX 255 void init_port_combos() { clear_combos(); char ttyname[21]; const char tty_fmt[] = "//./COM%u"; for (unsigned j = 0; j < TTY_MAX; j++) { snprintf(ttyname, sizeof(ttyname), tty_fmt, j); if (!open_serial(ttyname)) continue; snprintf(ttyname, sizeof(ttyname), "COM%u", j); LOG_WARN("Found serial port %s", ttyname); add_combos(ttyname); } } #endif //__WIN32__ //====================================================================== // Linux init_port_combos //====================================================================== #ifdef __linux__ #ifndef PATH_MAX # define PATH_MAX 1024 #endif # define TTY_MAX 8 void init_port_combos() { struct stat st; char ttyname[PATH_MAX + 1]; bool ret = false; DIR* sys = NULL; char cwd[PATH_MAX] = { '.', '\0' }; clear_combos(); LOG_QUIET("%s","Search for serial ports"); glob_t gbuf; glob("/dev/serial/by-id/*", 0, NULL, &gbuf); for (size_t j = 0; j < gbuf.gl_pathc; j++) { if ( !(stat(gbuf.gl_pathv[j], &st) == 0 && S_ISCHR(st.st_mode)) || strstr(gbuf.gl_pathv[j], "modem") ) continue; LOG_QUIET("Found serial port %s", gbuf.gl_pathv[j]); add_combos(gbuf.gl_pathv[j]); } globfree(&gbuf); if (getcwd(cwd, sizeof(cwd)) == NULL) goto out; if (chdir("/sys/class/tty") == -1) goto check_cuse; if ((sys = opendir(".")) == NULL) goto check_cuse; ssize_t len; struct dirent* dp; LOG_QUIET("%s", "Searching /sys/class/tty/"); while ((dp = readdir(sys))) { # ifdef _DIRENT_HAVE_D_TYPE if (dp->d_type != DT_LNK) continue; # endif if ((len = readlink(dp->d_name, ttyname, sizeof(ttyname)-1)) == -1) continue; ttyname[len] = '\0'; if (!strstr(ttyname, "/devices/virtual/")) { snprintf(ttyname, sizeof(ttyname), "/dev/%s", dp->d_name); if (stat(ttyname, &st) == -1 || !S_ISCHR(st.st_mode)) continue; LOG_QUIET("Found serial port %s", ttyname); add_combos(ttyname); ret = true; } } check_cuse: if (sys) { closedir(sys); sys = NULL; } if (chdir("/sys/class/cuse") == -1) goto out; if ((sys = opendir(".")) == NULL) goto out; LOG_QUIET("%s", "Searching /sys/class/cuse/"); while ((dp = readdir(sys))) { # ifdef _DIRENT_HAVE_D_TYPE if (dp->d_type != DT_LNK) continue; # endif if ((len = readlink(dp->d_name, ttyname, sizeof(ttyname)-1)) == -1) continue; ttyname[len] = '\0'; if (strstr(ttyname, "/devices/virtual/") && !strncmp(dp->d_name, "mhuxd", 5)) { char *name = strdup(dp->d_name); if(!name) continue; char *p = strchr(name, '!'); if(p) *p = '/'; snprintf(ttyname, sizeof(ttyname), "/dev/%s", name); free(name); if (stat(ttyname, &st) == -1 || !S_ISCHR(st.st_mode)) continue; LOG_QUIET("Found serial port %s", ttyname); add_combos(ttyname); ret = true; } } out: std::string tty_virtual = HomeDir; tty_virtual.append("vdev"); LOG_QUIET("Searching %s", tty_virtual.c_str()); tty_virtual.append("/ttyS%u"); for (unsigned j = 0; j < TTY_MAX; j++) { snprintf(ttyname, sizeof(ttyname), tty_virtual.c_str(), j); if ( !(stat(ttyname, &st) == 0 && S_ISCHR(st.st_mode)) ) continue; LOG_QUIET("Found serial port %s", ttyname); add_combos(ttyname); } if (sys) closedir(sys); if (chdir(cwd) == -1) return; if (ret) // do we need to fall back to the probe code below? return; const char* tty_fmt[] = { "/dev/ttyS%u", "/dev/ttyUSB%u", "/dev/usb/ttyUSB%u" }; LOG_QUIET("%s", "Serial port discovery via 'stat'"); for (size_t i = 0; i < sizeof(tty_fmt)/sizeof(*tty_fmt); i++) { for (unsigned j = 0; j < TTY_MAX; j++) { snprintf(ttyname, sizeof(ttyname), tty_fmt[i], j); if ( !(stat(ttyname, &st) == 0 && S_ISCHR(st.st_mode)) ) continue; LOG_WARN("Found serial port %s", ttyname); add_combos(ttyname); } } } #endif // __linux__ //====================================================================== // APPLE init_port_combos //====================================================================== #ifdef __APPLE__ #ifndef PATH_MAX # define PATH_MAX 1024 #endif void init_port_combos() { clear_combos(); struct stat st; const char* tty_fmt[] = { "/dev/cu.*", "/dev/tty.*" }; glob_t gbuf; for (size_t i = 0; i < sizeof(tty_fmt)/sizeof(*tty_fmt); i++) { glob(tty_fmt[i], 0, NULL, &gbuf); for (size_t j = 0; j < gbuf.gl_pathc; j++) { if ( !(stat(gbuf.gl_pathv[j], &st) == 0 && S_ISCHR(st.st_mode)) || strstr(gbuf.gl_pathv[j], "modem") ) continue; LOG_WARN("Found serial port %s", gbuf.gl_pathv[j]); add_combos(gbuf.gl_pathv[j]); } globfree(&gbuf); } } #endif //__APPLE__ //====================================================================== // FreeBSD init_port_combos //====================================================================== #ifdef __FreeBSD__ #ifndef PATH_MAX # define PATH_MAX 1024 #endif # define TTY_MAX 8 void init_port_combos() { int retval; struct stat st; char ttyname[PATH_MAX + 1]; const char* tty_fmt[] = { "/dev/ttyd%u" }; clear_combos(); for (size_t i = 0; i < sizeof(tty_fmt)/sizeof(*tty_fmt); i++) { for (unsigned j = 0; j < TTY_MAX; j++) { snprintf(ttyname, sizeof(ttyname), tty_fmt[i], j); if ( !(stat(ttyname, &st) == 0 && S_ISCHR(st.st_mode)) ) continue; LOG_WARN("Found serial port %s", ttyname); add_combos(ttyname); } } } #endif //__FreeBSD__ void cbCIVdefault() { char hexstr[8]; int picked = selectRig->index(); rigbase *srig = rigs[picked]; snprintf(hexstr, sizeof(hexstr), "0x%2X", srig->defaultCIV); txtCIV->value(hexstr); progStatus.CIV = srig->defaultCIV; srig->adjustCIV(progStatus.CIV); } void cbCIV() { int picked = selectRig->index(); int adr = 0; rigbase *srig = rigs[picked]; sscanf(txtCIV->value(), "0x%2X", &adr); progStatus.CIV = adr; srig->adjustCIV(progStatus.CIV); } void cbUSBaudio() { progStatus.USBaudio = btnUSBaudio->value(); } void cbCancelXcvrDialog() { btnOkXcvrDialog->labelcolor(FL_BLACK); dlgXcvrConfig->hide(); } void cbOkXcvrDialog() { if (progStatus.UIsize == wide_ui) { btn_show_controls->label("@-22->"); btn_show_controls->redraw_label(); grpTABS->hide(); mainwindow->resizable(grpTABS); mainwindow->size(mainwindow->w(), 150); mainwindow->size_range(735, 150, 0, 150); } // close the current rig control closeRig(); // local serial comm connection // disconnect_from_remote(); // remote tcpip connection { guard_lock gl_serial(&mutex_serial, 200); RigSerial.ClosePort(); AuxSerial.ClosePort(); SepSerial.ClosePort(); bypass_serial_thread_loop = true; } string p1 = selectCommPort->value(); string p2 = selectAuxPort->value(); string p3 = selectSepPTTPort->value(); if (p1.compare("NONE") != 0) if (p1 == p2 || p1 == p3) { fl_message("Select separate ports"); return; } if (p2.compare("NONE") != 0) if (p2 == p3) { fl_message("Select separate ports"); return; } if (xcvr_name != rigs[selectRig->index()]->name_) { clearList(); saveFreqList(); selrig = rigs[selectRig->index()]; xcvr_name = selrig->name_; } progStatus.xcvr_serial_port = selectCommPort->value(); progStatus.aux_serial_port = selectAuxPort->value(); progStatus.sep_serial_port = selectSepPTTPort->value(); progStatus.comm_baudrate = mnuBaudrate->index(); progStatus.stopbits = btnOneStopBit->value() ? 1 : 2; progStatus.comm_retries = (int)cntRigCatRetries->value(); progStatus.comm_timeout = (int)cntRigCatTimeout->value(); progStatus.comm_wait = (int)cntRigCatWait->value(); progStatus.comm_echo = btnRigCatEcho->value(); progStatus.comm_rtsptt = btnrtsptt->value(); progStatus.comm_catptt = btncatptt->value(); progStatus.comm_dtrptt = btndtrptt->value(); progStatus.comm_rtscts = chkrtscts->value(); progStatus.comm_rtsplus = btnrtsplus->value(); progStatus.comm_dtrplus = btndtrplus->value(); progStatus.sep_dtrplus = btnSepDTRplus->value(); progStatus.sep_dtrptt = btnSepDTRptt->value(); progStatus.sep_rtsplus = btnSepRTSplus->value(); progStatus.sep_rtsptt = btnSepRTSptt->value(); progStatus.imode_B = progStatus.imode_A = selrig->def_mode; progStatus.iBW_B = progStatus.iBW_A = selrig->def_bw; progStatus.freq_B = progStatus.freq_A = selrig->def_freq; init_title(); if (!startXcvrSerial()) { if (progStatus.xcvr_serial_port.compare("NONE") == 0) { LOG_WARN("No comm port ... test mode"); } else { progStatus.xcvr_serial_port = "NONE"; selectCommPort->value(progStatus.xcvr_serial_port.c_str()); } } if (!startAuxSerial()) { if (progStatus.aux_serial_port.compare("NONE") != 0) { progStatus.aux_serial_port = "NONE"; selectAuxPort->value(progStatus.aux_serial_port.c_str()); } } if (!startSepSerial()) { if (progStatus.sep_serial_port.compare("NONE") != 0) { progStatus.sep_serial_port = "NONE"; selectSepPTTPort->value(progStatus.sep_serial_port.c_str()); } } initRig(); btnOkXcvrDialog->labelcolor(FL_BLACK); } void configXcvr() { selectCommPort->value(progStatus.xcvr_serial_port.c_str()); selectAuxPort->value(progStatus.aux_serial_port.c_str()); selectSepPTTPort->value(progStatus.sep_serial_port.c_str()); if (xcvr_name.find("IC") == 0) { char hexstr[8]; snprintf(hexstr, sizeof(hexstr), "0x%2X", selrig->CIV); txtCIV->value(hexstr); txtCIV->activate(); btnCIVdefault->activate(); if (xcvr_name == rig_IC7200.name_ || xcvr_name == rig_IC7600.name_ ) { btnUSBaudio->value(progStatus.USBaudio); btnUSBaudio->activate(); } else btnUSBaudio->deactivate(); } else { txtCIV->value(""); txtCIV->deactivate(); btnCIVdefault->deactivate(); btnUSBaudio->value(0); btnUSBaudio->deactivate(); } dlgXcvrConfig->show(); tabsConfig->value(tabPrimary); } void open_poll_tab() { dlgXcvrConfig->show(); tabsConfig->value(tabPolling); } void open_send_command_tab() { dlgXcvrConfig->show(); tabsConfig->value(tabSndCmd); } void open_tcpip_tab() { dlgXcvrConfig->show(); tabsConfig->value(tabTCPIP); } void open_xmlrpc_tab() { dlgXcvrConfig->show(); tabsConfig->value(tabXMLRPC); } void open_ptt_tab() { dlgXcvrConfig->show(); tabsConfig->value(tabPTT); } void open_aux_tab() { dlgXcvrConfig->show(); tabsConfig->value(tabAux); } void createXcvrDialog() { dlgXcvrConfig = XcvrDialog(); init_port_combos(); mnuBaudrate->clear(); for (int i = 0; szBaudRates[i] != NULL; i++) mnuBaudrate->add(szBaudRates[i]); cbo_agc_level->clear(); cbo_agc_level->add("slow"); cbo_agc_level->add("med"); cbo_agc_level->add("fast"); cbo_agc_level->index(progStatus.agc_level); cbo_tt550_agc_level->add("slow"); cbo_tt550_agc_level->add("med"); cbo_tt550_agc_level->add("fast"); cbo_tt550_agc_level->index(progStatus.tt550_agc_level); cbo_tt550_nb_level->add("NONE"); cbo_tt550_nb_level->add("1"); cbo_tt550_nb_level->add("2"); cbo_tt550_nb_level->add("3"); cbo_tt550_nb_level->add("4"); cbo_tt550_nb_level->add("5"); cbo_tt550_nb_level->add("6"); cbo_tt550_nb_level->add("7"); cbo_tt550_nb_level->index(progStatus.tt550_nb_level); initRigCombo(); } // Frequency display font / colors Fl_Font selfont; void cbFreqControlFontBrowser(Fl_Widget*, void*) { selfont = fntbrowser->fontNumber(); lblTest->labelfont(selfont); dlgDisplayConfig->redraw(); fntbrowser->hide(); } void cbPrefFont() { fntbrowser->fontNumber(progStatus.fontnbr); fntbrowser->fontFilter(Font_Browser::FIXED_WIDTH); fntbrowser->fontFilter(Font_Browser::ALL_TYPES); fntbrowser->callback(cbFreqControlFontBrowser); fntbrowser->show(); } uchar fg_red, fg_green, fg_blue; uchar bg_red, bg_green, bg_blue; uchar smeterRed, smeterGreen, smeterBlue; uchar peakRed, peakGreen, peakBlue; uchar pwrRed, pwrGreen, pwrBlue; uchar swrRed, swrGreen, swrBlue; Fl_Color bgclr; Fl_Color fgclr; Fl_Color fgsys; static uchar fg_sys_red, fg_sys_green, fg_sys_blue; Fl_Color bgsys; static uchar bg_sys_red, bg_sys_green, bg_sys_blue; Fl_Color bg2sys; static uchar bg2_sys_red, bg2_sys_green, bg2_sys_blue; Fl_Color bg_slider; static uchar bg_slider_red, bg_slider_green, bg_slider_blue; Fl_Color btn_slider; static uchar btn_slider_red, btn_slider_green, btn_slider_blue; Fl_Color btn_lt_color; static uchar btn_lt_color_red, btn_lt_color_green, btn_lt_color_blue; void cb_lighted_button() { uchar r = btn_lt_color_red, g = btn_lt_color_green, b = btn_lt_color_blue; if (fl_color_chooser("Foreground color", r, g, b)) { btn_lt_color_red = r; btn_lt_color_green = g; btn_lt_color_blue = b; btn_lt_color = fl_rgb_color(r, g, b); btn_lighted->selection_color(btn_lt_color); btn_lighted->value(1); btn_lighted->redraw(); } } void cb_lighted_default() { btn_lt_color = flrig_def_color(FL_YELLOW); btn_lt_color_red = ((btn_lt_color >> 24) & 0xFF); btn_lt_color_green = ((btn_lt_color >> 16) & 0xFF); btn_lt_color_blue = ((btn_lt_color >> 8) & 0xFF); btn_lighted->selection_color(btn_lt_color); btn_lighted->value(1); btn_lighted->redraw(); } void cb_change_hrd_button() { progStatus.hrd_buttons = !progStatus.hrd_buttons; FreqDispA->set_hrd(progStatus.hrd_buttons); FreqDispB->set_hrd(progStatus.hrd_buttons); } void cb_slider_defaults() { bg_slider_red = 232; bg_slider_green = 255; bg_slider_blue = 232; btn_slider_red = 0; btn_slider_green = 0; btn_slider_blue = 128; bg_slider = fl_rgb_color( 232, 255, 232); btn_slider = fl_rgb_color( 0, 0, 128); sldrColors->color(bg_slider); sldrColors->selection_color(btn_slider); sldrColors->redraw(); } void cb_slider_background() { uchar r = bg_slider_red, g = bg_slider_green, b = bg_slider_blue; if (fl_color_chooser("Foreground color", r, g, b)) { bg_slider_red = r; bg_slider_green = g; bg_slider_blue = b; bg_slider = fl_rgb_color(r, g, b); sldrColors->color(bg_slider); sldrColors->selection_color(btn_slider); sldrColors->redraw(); } } void cb_slider_select() { uchar r = btn_slider_red, g = btn_slider_green, b = btn_slider_blue; if (fl_color_chooser("Foreground color", r, g, b)) { btn_slider_red = r; btn_slider_green = g; btn_slider_blue = b; btn_slider = fl_rgb_color(r, g, b); sldrColors->color(bg_slider); sldrColors->selection_color(btn_slider); sldrColors->redraw(); } } void cb_sys_defaults() { bgsys = flrig_def_color(FL_BACKGROUND_COLOR); bg_sys_red = ((bgsys >> 24) & 0xFF); bg_sys_green = ((bgsys >> 16) & 0xFF); bg_sys_blue = ((bgsys >> 8) & 0xFF); bg2sys = flrig_def_color(FL_BACKGROUND2_COLOR); bg2_sys_red = ((bg2sys) >> 24 & 0xFF); bg2_sys_green = ((bg2sys) >> 16 & 0xFF); bg2_sys_blue = ((bg2sys) >> 8 & 0xFF); fgsys = flrig_def_color(FL_FOREGROUND_COLOR); fg_sys_red = (fgsys >> 24) & 0xFF; fg_sys_green = (fgsys >> 16) & 0xFF; fg_sys_blue = (fgsys >> 8) & 0xFF; Fl::background(bg_sys_red, bg_sys_green, bg_sys_blue); Fl::background2(bg2_sys_red, bg2_sys_green, bg2_sys_blue); Fl::foreground(fg_sys_red, fg_sys_green, fg_sys_blue); dlgDisplayConfig->redraw(); mainwindow->redraw(); } void cb_sys_foreground() { uchar r = fg_sys_red, g = fg_sys_green, b = fg_sys_blue; if (fl_color_chooser("Foreground color", r, g, b)) { fg_sys_red = r; fg_sys_green = g; fg_sys_blue = b; fgsys = fl_rgb_color(r, g, b); Fl::foreground(r, g, b); dlgDisplayConfig->redraw(); mainwindow->redraw(); } } void cb_sys_background() { uchar r = bg_sys_red, g = bg_sys_green, b = bg_sys_blue; if (fl_color_chooser("Background color", r, g, b)) { bg_sys_red = r; bg_sys_green = g; bg_sys_blue = b; bgsys = fl_rgb_color(r, g, b); Fl::background(r, g, b); dlgDisplayConfig->redraw(); mainwindow->redraw(); } } void cb_sys_background2() { uchar r = bg2_sys_red, g = bg2_sys_green, b = bg2_sys_blue; if (fl_color_chooser("Background2 color", r, g, b)) { bg2_sys_red = r; bg2_sys_green = g; bg2_sys_blue = b; bg2sys = fl_rgb_color(r, g, b); Fl::background2(r, g, b); dlgDisplayConfig->redraw(); mainwindow->redraw(); } } void cbBacklightColor() { uchar r = bg_red, g = bg_green, b = bg_blue; if (fl_color_chooser("Background color", r, g, b)) { bg_red = r; bg_green = g; bg_blue = b; bgclr = fl_rgb_color(r, g, b); lblTest->color(bgclr); sldrRcvSignalColor->color( fl_rgb_color (smeterRed, smeterGreen, smeterBlue), bgclr ); sldrPWRcolor->color(fl_rgb_color (pwrRed, pwrGreen, pwrBlue), bgclr); sldrSWRcolor->color(fl_rgb_color (swrRed, swrGreen, swrBlue), bgclr); scaleSmeterColor->color(bgclr); scalePWRcolor->color(bgclr); scaleSWRcolor->color(bgclr); grpMeterColor->color(bgclr); dlgDisplayConfig->redraw(); } } void cbPrefForeground() { uchar r = fg_red, g = fg_green, b = fg_blue; if (fl_color_chooser("Foreground color", r, g, b)) { fg_red = r; fg_green = g; fg_blue = b; fgclr = fl_rgb_color(r, g, b); lblTest->labelcolor(fgclr); scaleSmeterColor->labelcolor(fgclr); scalePWRcolor->labelcolor(fgclr); scaleSWRcolor->labelcolor(fgclr); grpMeterColor->labelcolor(fgclr); dlgDisplayConfig->redraw(); } } void default_meters() { Fl_Color c; bg_red = 232; bg_green = 255; bg_blue = 232; bgclr = fl_rgb_color( bg_red, bg_green, bg_blue); lblTest->color(bgclr); sldrRcvSignalColor->color( fl_rgb_color (smeterRed, smeterGreen, smeterBlue), bgclr ); sldrPWRcolor->color(fl_rgb_color (pwrRed, pwrGreen, pwrBlue), bgclr); sldrSWRcolor->color(fl_rgb_color (swrRed, swrGreen, swrBlue), bgclr); scaleSmeterColor->color(bgclr); scalePWRcolor->color(bgclr); scaleSWRcolor->color(bgclr); grpMeterColor->color(bgclr); fg_red = 0; fg_green = 0; fg_blue = 0; fgclr = (Fl_Color)0; lblTest->labelcolor(fgclr); scaleSmeterColor->labelcolor(fgclr); scalePWRcolor->labelcolor(fgclr); scaleSWRcolor->labelcolor(fgclr); grpMeterColor->labelcolor(fgclr); smeterRed = 0; smeterGreen = 180; smeterBlue = 0; c = fl_rgb_color (smeterRed, smeterGreen, smeterBlue); sldrRcvSignalColor->color(c, bgclr ); peakRed = 255; peakGreen = 0; peakBlue = 0; c = fl_rgb_color( peakRed, peakGreen, peakBlue ); sldrRcvSignalColor->PeakColor(c); sldrPWRcolor->PeakColor(c); sldrSWRcolor->PeakColor(c); pwrRed = 180; pwrGreen = 0; pwrBlue = 0; c = fl_rgb_color( pwrRed, pwrGreen, pwrBlue ); sldrPWRcolor->color(c, bgclr); swrRed = 148; swrGreen = 0; swrBlue = 148; c = fl_rgb_color(swrRed, swrGreen, swrBlue); sldrSWRcolor->color(c, bgclr); dlgDisplayConfig->redraw(); } void cbSMeterColor() { uchar r = smeterRed, g = smeterGreen, b = smeterBlue; if (fl_color_chooser("S Meter color", r, g, b)) { smeterRed = r; smeterGreen = g; smeterBlue = b; sldrRcvSignalColor->color( fl_rgb_color (r, g, b), bgclr ); dlgDisplayConfig->redraw(); } } void cbPeakMeterColor() { uchar r = peakRed, g = peakGreen, b = peakBlue; if (fl_color_chooser("Peak value color", r, g, b)) { peakRed = r; peakGreen = g; peakBlue = b; sldrRcvSignalColor->PeakColor(fl_rgb_color (r, g, b)); sldrPWRcolor->PeakColor(fl_rgb_color (r, g, b)); sldrSWRcolor->PeakColor(fl_rgb_color (r, g, b)); dlgDisplayConfig->redraw(); } } void cbPwrMeterColor() { uchar r = pwrRed, g = pwrGreen, b = pwrBlue; if (fl_color_chooser("Power color", r, g, b)) { pwrRed = r; pwrGreen = g; pwrBlue = b; sldrPWRcolor->color( fl_rgb_color (r, g, b), bgclr ); dlgDisplayConfig->redraw(); } } void cbSWRMeterColor() { uchar r = swrRed, g = swrGreen, b = swrBlue; if (fl_color_chooser("Power color", r, g, b)) { swrRed = r; swrGreen = g; swrBlue = b; sldrSWRcolor->color( fl_rgb_color (swrRed, swrGreen, swrBlue), bgclr ); dlgDisplayConfig->redraw(); } } void setColors() { progStatus.swrRed = swrRed; progStatus.swrGreen = swrGreen; progStatus.swrBlue = swrBlue; progStatus.pwrRed = pwrRed; progStatus.pwrGreen = pwrGreen; progStatus.pwrBlue = pwrBlue; progStatus.smeterRed = smeterRed; progStatus.smeterGreen = smeterGreen; progStatus.smeterBlue = smeterBlue; progStatus.peakRed = peakRed; progStatus.peakGreen = peakGreen; progStatus.peakBlue = peakBlue; progStatus.fg_red = fg_red; progStatus.fg_green = fg_green; progStatus.fg_blue = fg_blue; progStatus.bg_red = bg_red; progStatus.bg_green = bg_green; progStatus.bg_blue = bg_blue; progStatus.fontnbr = selfont; FreqDispA->font(selfont); FreqDispB->font(selfont); progStatus.fg_sys_red = fg_sys_red; progStatus.fg_sys_green = fg_sys_green; progStatus.fg_sys_blue = fg_sys_blue; progStatus.bg_sys_red = bg_sys_red; progStatus.bg_sys_green = bg_sys_green; progStatus.bg_sys_blue = bg_sys_blue; progStatus.bg2_sys_red = bg2_sys_red; progStatus.bg2_sys_green = bg2_sys_green; progStatus.bg2_sys_blue = bg2_sys_blue; progStatus.slider_red = bg_slider_red; progStatus.slider_green = bg_slider_green; progStatus.slider_blue = bg_slider_blue; progStatus.slider_btn_red = btn_slider_red; progStatus.slider_btn_green = btn_slider_green; progStatus.slider_btn_blue = btn_slider_blue; progStatus.lighted_btn_red = btn_lt_color_red; progStatus.lighted_btn_green = btn_lt_color_green; progStatus.lighted_btn_blue = btn_lt_color_blue; if (useB) { FreqDispB->SetONOFFCOLOR( fl_rgb_color(fg_red, fg_green, fg_blue), bgclr); FreqDispA->SetONOFFCOLOR( fl_rgb_color(fg_red, fg_green, fg_blue), fl_color_average(bgclr, FL_BLACK, 0.87)); } else { FreqDispA->SetONOFFCOLOR( fl_rgb_color(fg_red, fg_green, fg_blue), bgclr); FreqDispB->SetONOFFCOLOR( fl_rgb_color(fg_red, fg_green, fg_blue), fl_color_average(bgclr, FL_BLACK, 0.87)); } grpMeters->color(bgclr); meter_fill_box->color(bgclr); scaleSmeter->color(bgclr); scaleSmeter->labelcolor(fgclr); scalePower->color(bgclr); scalePower->labelcolor(fgclr); btnALC_SWR->color(bgclr); btnALC_SWR->labelcolor(fgclr); btnALC_SWR->redraw(); sldrFwdPwr->color(fl_rgb_color (pwrRed, pwrGreen, pwrBlue), bgclr); sldrFwdPwr->PeakColor(fl_rgb_color(peakRed, peakGreen, peakBlue)); sldrRcvSignal->color(fl_rgb_color (smeterRed, smeterGreen, smeterBlue), bgclr); sldrRcvSignal->PeakColor(fl_rgb_color(peakRed, peakGreen, peakBlue)); sldrALC->color(fl_rgb_color (swrRed, swrGreen, swrBlue), bgclr); sldrALC->PeakColor(fl_rgb_color(peakRed, peakGreen, peakBlue)); sldrSWR->color(fl_rgb_color (swrRed, swrGreen, swrBlue), bgclr); sldrSWR->PeakColor(fl_rgb_color(peakRed, peakGreen, peakBlue)); grpMeters->redraw(); if (btnVol) btnVol->selection_color(btn_lt_color); if (btnNR) btnNR->selection_color(btn_lt_color); if (btnIFsh) btnIFsh->selection_color(btn_lt_color); if (btnNotch) btnNotch->selection_color(btn_lt_color); if (btnA) btnA->selection_color(btn_lt_color); if (btnB) btnB->selection_color(btn_lt_color); if (btnSplit) btnSplit->selection_color(btn_lt_color); if (btnAttenuator) btnAttenuator->selection_color(btn_lt_color); if (btnPreamp) btnPreamp->selection_color(btn_lt_color); if (btnNOISE) btnNOISE->selection_color(btn_lt_color); if (btnAutoNotch) btnAutoNotch->selection_color(btn_lt_color); if (btnTune) btnTune->selection_color(btn_lt_color); if (btnPTT) btnPTT->selection_color(btn_lt_color); if (btnAuxRTS) btnAuxRTS->selection_color(btn_lt_color); if (btnAuxDTR) btnAuxDTR->selection_color(btn_lt_color); if (btnSpot) btnSpot->selection_color(btn_lt_color); if (btn_vox) btn_vox->selection_color(btn_lt_color); if (btnCompON) btnCompON->selection_color(btn_lt_color); // if (btnSpecial) btnSpecial->selection_color(btn_lt_color); if (btn_tt550_vox) btn_tt550_vox->selection_color(btn_lt_color); if (btn_tt550_CompON) btn_tt550_CompON->selection_color(btn_lt_color); if (sldrVOLUME) sldrVOLUME->color(bg_slider); if (sldrVOLUME) sldrVOLUME->selection_color(btn_slider); if (sldrRFGAIN) sldrRFGAIN->color(bg_slider); if (sldrRFGAIN) sldrRFGAIN->selection_color(btn_slider); if (sldrSQUELCH) sldrSQUELCH->color(bg_slider); if (sldrSQUELCH) sldrSQUELCH->selection_color(btn_slider); if (sldrNR) sldrNR->color(bg_slider); if (sldrNR) sldrNR->selection_color(btn_slider); if (sldrIFSHIFT) sldrIFSHIFT->color(bg_slider); if (sldrIFSHIFT) sldrIFSHIFT->selection_color(btn_slider); if (sldrNOTCH) sldrNOTCH->color(bg_slider); if (sldrNOTCH) sldrNOTCH->selection_color(btn_slider); if (sldrMICGAIN) sldrMICGAIN->color(bg_slider); if (sldrMICGAIN) sldrMICGAIN->selection_color(btn_slider); if (sldrPOWER) sldrPOWER->color(bg_slider); if (sldrPOWER) sldrPOWER->selection_color(btn_slider); if (spnrPOWER) spnrPOWER->color(bg_slider); if (spnrVOLUME) spnrVOLUME->color(bg_slider); // if (spnrPOWER) spnrPOWER->selection_color(btn_slider); mainwindow->redraw(); } void cb_reset_display_dialog() { cb_sys_defaults(); cb_lighted_default(); cb_slider_defaults(); default_meters(); setColors(); } void cbOkDisplayDialog() { setColors(); dlgDisplayConfig->hide(); } void cbCancelDisplayDialog() { dlgDisplayConfig->hide(); } void setDisplayColors() { if (dlgDisplayConfig == NULL) return; swrRed = progStatus.swrRed; swrGreen = progStatus.swrGreen; swrBlue = progStatus.swrBlue; pwrRed = progStatus.pwrRed; pwrGreen = progStatus.pwrGreen; pwrBlue = progStatus.pwrBlue; smeterRed = progStatus.smeterRed; smeterGreen = progStatus.smeterGreen; smeterBlue = progStatus.smeterBlue; peakRed = progStatus.peakRed; peakGreen = progStatus.peakGreen; peakBlue = progStatus.peakBlue; fg_red = progStatus.fg_red; fg_green = progStatus.fg_green; fg_blue = progStatus.fg_blue; bg_red = progStatus.bg_red; bg_green = progStatus.bg_green; bg_blue = progStatus.bg_blue; bgclr = fl_rgb_color(bg_red, bg_green, bg_blue); fgclr = fl_rgb_color(fg_red, fg_green, fg_blue); fg_sys_red = progStatus.fg_sys_red; fg_sys_green = progStatus.fg_sys_green; fg_sys_blue = progStatus.fg_sys_blue; bg_sys_red = progStatus.bg_sys_red; bg_sys_green = progStatus.bg_sys_green; bg_sys_blue = progStatus.bg_sys_blue; bg2_sys_red = progStatus.bg2_sys_red; bg2_sys_green = progStatus.bg2_sys_green; bg2_sys_blue = progStatus.bg2_sys_blue; bg_slider_red = progStatus.slider_red; bg_slider_green = progStatus.slider_green; bg_slider_blue = progStatus.slider_blue; btn_slider_red = progStatus.slider_btn_red; btn_slider_green = progStatus.slider_btn_green; btn_slider_blue = progStatus.slider_btn_blue; sldrColors->color(fl_rgb_color(bg_slider_red, bg_slider_green, bg_slider_blue)); sldrColors->selection_color(fl_rgb_color(btn_slider_red, btn_slider_green, btn_slider_blue)); btn_lt_color_red = progStatus.lighted_btn_red; btn_lt_color_green = progStatus.lighted_btn_green; btn_lt_color_blue = progStatus.lighted_btn_blue; lblTest->labelcolor(fl_rgb_color(fg_red, fg_green, fg_blue)); lblTest->color(bgclr); scaleSmeterColor->color(bgclr); scaleSmeterColor->labelcolor(fgclr); scalePWRcolor->color(bgclr); scalePWRcolor->labelcolor(fgclr); scaleSWRcolor->color(bgclr); scaleSWRcolor->labelcolor(fgclr); grpMeterColor->color(bgclr); grpMeterColor->labelcolor(fgclr); sldrRcvSignalColor->color( fl_rgb_color (smeterRed, smeterGreen, smeterBlue), bgclr ); sldrPWRcolor->color( fl_rgb_color (pwrRed, pwrGreen, pwrBlue), bgclr ); sldrSWRcolor->color( fl_rgb_color (swrRed, swrGreen, swrBlue), bgclr ); sldrRcvSignalColor->minimum(0); sldrRcvSignalColor->maximum(100); sldrRcvSignalColor->value(25); sldrPWRcolor->minimum(0); sldrPWRcolor->maximum(100); sldrPWRcolor->value(25); sldrSWRcolor->minimum(0); sldrSWRcolor->maximum(100); sldrSWRcolor->value(25); btn_lt_color = fl_rgb_color( btn_lt_color_red, btn_lt_color_green, btn_lt_color_blue); btn_slider = fl_rgb_color( btn_slider_red, btn_slider_green, btn_slider_blue); bg_slider = fl_rgb_color(bg_slider_red, bg_slider_green, bg_slider_blue); btn_lighted->value(1); btn_lighted->selection_color(btn_lt_color); sldrColors->color(bg_slider); sldrColors->selection_color(btn_slider); mnuScheme->value(mnuScheme->find_item(progStatus.ui_scheme.c_str())); dlgDisplayConfig->show(); } void cbCloseMemory() { dlgMemoryDialog->hide(); } void openMemoryDialog() { if (dlgMemoryDialog == NULL) return; dlgMemoryDialog->show(); } void show_controls() { if (!(selrig->has_extras || selrig->name_ == rig_TT550.name_) && progStatus.aux_serial_port == "NONE") return; switch (progStatus.UIsize) { case wide_ui : if (mainwindow->h() > 150) { btn_show_controls->label("@-22->"); btn_show_controls->redraw_label(); grpTABS->hide(); mainwindow->resizable(grpTABS); mainwindow->size(mainwindow->w(), 150); mainwindow->size_range(735, 150, 0, 150); } else { btn_show_controls->label("@-28->"); btn_show_controls->redraw_label(); mainwindow->resizable(grpTABS); mainwindow->size(mainwindow->w(), 218); mainwindow->size_range(735, 218, 0, 218); grpTABS->show(); } mainwindow->redraw(); break; case touch_ui : if (selrig->name_ == rig_TT550.name_) { tabs550->show(); tabsGeneric->hide(); } else { tabs550->hide(); tabsGeneric->show(); } tabs550->redraw(); tabsGeneric->redraw(); mainwindow->redraw(); return; case small_ui : if (selrig->name_ == rig_TT550.name_) { tabsGeneric->hide(); if (tabs550->visible()) { tabs550->hide(); btn_show_controls->label("@-22->"); btn_show_controls->redraw_label(); mainwindow->size( mainwindow->w(), mainwindow->h() - 70); } else { tabs550->show(); btn_show_controls->label("@-28->"); btn_show_controls->redraw_label(); mainwindow->size( mainwindow->w(), mainwindow->h() + 70); } mainwindow->redraw(); } else { tabs550->hide(); if (tabsGeneric->visible()) { tabsGeneric->hide(); btn_show_controls->label("@-22->"); btn_show_controls->redraw_label(); mainwindow->size( mainwindow->w(), mainwindow->h() - 70); } else { tabsGeneric->show(); btn_show_controls->label("@-28->"); btn_show_controls->redraw_label(); mainwindow->size( mainwindow->w(), mainwindow->h() + 70); } mainwindow->redraw(); } break; default : break; } } // a replica of the default color map used by Fltk static unsigned flrig_cmap[256] = { 0x00000000, 0xff000000, 0x00ff0000, 0xffff0000, 0x0000ff00, 0xff00ff00, 0x00ffff00, 0xffffff00, 0x55555500, 0xc6717100, 0x71c67100, 0x8e8e3800, 0x7171c600, 0x8e388e00, 0x388e8e00, 0x00008000, 0xa8a89800, 0xe8e8d800, 0x68685800, 0x98a8a800, 0xd8e8e800, 0x58686800, 0x9c9ca800, 0xdcdce800, 0x5c5c6800, 0x9ca89c00, 0xdce8dc00, 0x5c685c00, 0x90909000, 0xc0c0c000, 0x50505000, 0xa0a0a000, 0x00000000, 0x0d0d0d00, 0x1a1a1a00, 0x26262600, 0x31313100, 0x3d3d3d00, 0x48484800, 0x55555500, 0x5f5f5f00, 0x6a6a6a00, 0x75757500, 0x80808000, 0x8a8a8a00, 0x95959500, 0xa0a0a000, 0xaaaaaa00, 0xb5b5b500, 0xc0c0c000, 0xcbcbcb00, 0xd5d5d500, 0xe0e0e000, 0xeaeaea00, 0xf5f5f500, 0xffffff00, 0x00000000, 0x00240000, 0x00480000, 0x006d0000, 0x00910000, 0x00b60000, 0x00da0000, 0x00ff0000, 0x3f000000, 0x3f240000, 0x3f480000, 0x3f6d0000, 0x3f910000, 0x3fb60000, 0x3fda0000, 0x3fff0000, 0x7f000000, 0x7f240000, 0x7f480000, 0x7f6d0000, 0x7f910000, 0x7fb60000, 0x7fda0000, 0x7fff0000, 0xbf000000, 0xbf240000, 0xbf480000, 0xbf6d0000, 0xbf910000, 0xbfb60000, 0xbfda0000, 0xbfff0000, 0xff000000, 0xff240000, 0xff480000, 0xff6d0000, 0xff910000, 0xffb60000, 0xffda0000, 0xffff0000, 0x00003f00, 0x00243f00, 0x00483f00, 0x006d3f00, 0x00913f00, 0x00b63f00, 0x00da3f00, 0x00ff3f00, 0x3f003f00, 0x3f243f00, 0x3f483f00, 0x3f6d3f00, 0x3f913f00, 0x3fb63f00, 0x3fda3f00, 0x3fff3f00, 0x7f003f00, 0x7f243f00, 0x7f483f00, 0x7f6d3f00, 0x7f913f00, 0x7fb63f00, 0x7fda3f00, 0x7fff3f00, 0xbf003f00, 0xbf243f00, 0xbf483f00, 0xbf6d3f00, 0xbf913f00, 0xbfb63f00, 0xbfda3f00, 0xbfff3f00, 0xff003f00, 0xff243f00, 0xff483f00, 0xff6d3f00, 0xff913f00, 0xffb63f00, 0xffda3f00, 0xffff3f00, 0x00007f00, 0x00247f00, 0x00487f00, 0x006d7f00, 0x00917f00, 0x00b67f00, 0x00da7f00, 0x00ff7f00, 0x3f007f00, 0x3f247f00, 0x3f487f00, 0x3f6d7f00, 0x3f917f00, 0x3fb67f00, 0x3fda7f00, 0x3fff7f00, 0x7f007f00, 0x7f247f00, 0x7f487f00, 0x7f6d7f00, 0x7f917f00, 0x7fb67f00, 0x7fda7f00, 0x7fff7f00, 0xbf007f00, 0xbf247f00, 0xbf487f00, 0xbf6d7f00, 0xbf917f00, 0xbfb67f00, 0xbfda7f00, 0xbfff7f00, 0xff007f00, 0xff247f00, 0xff487f00, 0xff6d7f00, 0xff917f00, 0xffb67f00, 0xffda7f00, 0xffff7f00, 0x0000bf00, 0x0024bf00, 0x0048bf00, 0x006dbf00, 0x0091bf00, 0x00b6bf00, 0x00dabf00, 0x00ffbf00, 0x3f00bf00, 0x3f24bf00, 0x3f48bf00, 0x3f6dbf00, 0x3f91bf00, 0x3fb6bf00, 0x3fdabf00, 0x3fffbf00, 0x7f00bf00, 0x7f24bf00, 0x7f48bf00, 0x7f6dbf00, 0x7f91bf00, 0x7fb6bf00, 0x7fdabf00, 0x7fffbf00, 0xbf00bf00, 0xbf24bf00, 0xbf48bf00, 0xbf6dbf00, 0xbf91bf00, 0xbfb6bf00, 0xbfdabf00, 0xbfffbf00, 0xff00bf00, 0xff24bf00, 0xff48bf00, 0xff6dbf00, 0xff91bf00, 0xffb6bf00, 0xffdabf00, 0xffffbf00, 0x0000ff00, 0x0024ff00, 0x0048ff00, 0x006dff00, 0x0091ff00, 0x00b6ff00, 0x00daff00, 0x00ffff00, 0x3f00ff00, 0x3f24ff00, 0x3f48ff00, 0x3f6dff00, 0x3f91ff00, 0x3fb6ff00, 0x3fdaff00, 0x3fffff00, 0x7f00ff00, 0x7f24ff00, 0x7f48ff00, 0x7f6dff00, 0x7f91ff00, 0x7fb6ff00, 0x7fdaff00, 0x7fffff00, 0xbf00ff00, 0xbf24ff00, 0xbf48ff00, 0xbf6dff00, 0xbf91ff00, 0xbfb6ff00, 0xbfdaff00, 0xbfffff00, 0xff00ff00, 0xff24ff00, 0xff48ff00, 0xff6dff00, 0xff91ff00, 0xffb6ff00, 0xffdaff00, 0xffffff00 }; Fl_Color flrig_def_color(int n) { if ( n > 255 ) n = 255; if (n < 0) n = 0; return (Fl_Color)flrig_cmap[n]; } void cb_send_command() { bool usehex = false; string command = txt_command->value(); if (command.empty()) return; string cmd = ""; if (command.find("x") != string::npos) { // hex strings size_t p = 0; usehex = true; unsigned int val; while (( p = command.find("x", p)) != string::npos) { sscanf(&command[p+1], "%x", &val); cmd += (unsigned char) val; p += 3; } } else cmd = command; // lock out polling loops until done guard_lock gl_serial(&mutex_serial, 201); sendCommand(cmd, 0); int timeout = 1000; while (timeout > 0) { if (timeout > 10) MilliSleep(10); else MilliSleep(timeout); timeout -= 10; Fl::awake(); } readResponse(); txt_response->value( usehex ? str2hex(replystr.c_str(), replystr.length()) : replystr.c_str()); } flrig-1.3.24/src/support/socket_io.cxx0000644000175000017500000001715612562731646014661 00000000000000// socket_io.cxx // // Author: Dave Freese, W1HKJ // Stelios Bounanos, M0GLD // // ---------------------------------------------------------------------------- // Copyright (C) 2014 // David Freese, W1HKJ // // This file is part of flrig // // flrig is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 3 of the License, or // (at your option) any later version. // // flrig is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program. If not, see . // ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "config.h" #include "status.h" #include "debug.h" #include "util.h" #include "gettext.h" #include "rigpanel.h" #include "socket_io.h" #include "socket.h" #include #include #include #ifdef WIN32 # include #else # include #endif using namespace std; Socket *tcpip = (Socket *)0; Address *remote_addr = (Address *)0; static bool exit_socket_loop = false; static string rxbuffer; pthread_t *rcv_socket_thread = 0; pthread_mutex_t mutex_rcv_socket = PTHREAD_MUTEX_INITIALIZER; static void log_level(int level, string s, string data) { time_t now; time(&now); struct tm *local = localtime(&now); char sztm[20]; strftime(sztm, sizeof(sztm), "%H:%M:%S", local); string s1; s1 = selrig->data_type == BINARY ? str2hex(data.c_str(), data.length()) : data; if (selrig->data_type == STRING) { s1 = data; size_t p; while((p = s1.find('\r')) != string::npos) s1.replace(p, 1, ""); while((p = s1.find('\n')) != string::npos) s1.replace(p, 1, ""); } else s1 = str2hex(data.c_str(), data.length()); switch (level) { case QUIET: LOG_QUIET("%s: %s : %s", sztm, s.c_str(), s1.c_str()); break; case ERR: LOG_ERROR("%s: %s : %s", sztm, s.c_str(), s1.c_str()); break; case WARN: LOG_WARN("%s: %s : %s", sztm, s.c_str(), s1.c_str()); break; case INFO: LOG_INFO("%s: %s : %s", sztm, s.c_str(), s1.c_str()); break; default: LOG_DEBUG("%s: %s : %s", sztm, s.c_str(), s1.c_str()); } } void *rcv_socket_loop(void *) { for (;;) { MilliSleep(50); { guard_lock socket_lock(&mutex_rcv_socket); if (exit_socket_loop) break; if (tcpip && tcpip->fd() != -1) { try { tcpip->recv(rxbuffer); box_tcpip_connect->color(FL_GREEN); box_tcpip_connect->redraw(); box_xcvr_connect->color(FL_GREEN); box_xcvr_connect->redraw(); tcpip_menu_box->color(FL_GREEN); tcpip_menu_box->redraw(); } catch (const SocketException& e) { LOG_ERROR("Error %d, %s", e.error(), e.what()); box_tcpip_connect->color(FL_YELLOW); box_tcpip_connect->redraw(); box_xcvr_connect->color(FL_YELLOW); box_xcvr_connect->redraw(); tcpip_menu_box->color(FL_YELLOW); tcpip_menu_box->redraw(); } } } // end guard_lock } exit_socket_loop = false; return NULL; } void connect_to_remote() { try { if (remote_addr) delete remote_addr; remote_addr = new Address(progStatus.tcpip_addr.c_str(), progStatus.tcpip_port.c_str()); LOG_QUIET("Created new remote_addr @ %p", remote_addr); if (!tcpip) { guard_lock socket_lock(&mutex_rcv_socket); tcpip = new Socket(*remote_addr); LOG_QUIET("Created new socket @ %p", tcpip); tcpip->set_timeout(0.001); tcpip->connect(); tcpip->set_nonblocking(true); LOG_QUIET("Connected to %d", tcpip->fd()); tcpip_box->show(); box_tcpip_connect->color(FL_GREEN); box_tcpip_connect->redraw(); box_xcvr_connect->color(FL_GREEN); box_xcvr_connect->redraw(); tcpip_menu_box->color(FL_GREEN); tcpip_menu_box->redraw(); } if (tcpip->fd() == -1) { guard_lock socket_lock(&mutex_rcv_socket); try { tcpip->connect(*remote_addr); tcpip->set_nonblocking(true); LOG_QUIET("Connected to %d", tcpip->fd()); tcpip_box->show(); box_tcpip_connect->color(FL_GREEN); box_tcpip_connect->redraw(); box_xcvr_connect->color(FL_GREEN); box_xcvr_connect->redraw(); tcpip_menu_box->color(FL_GREEN); tcpip_menu_box->redraw(); } catch (const SocketException & e) { LOG_ERROR("Error: %d, %s", e.error(), e.what()); delete remote_addr; remote_addr = 0; delete tcpip; tcpip = 0; box_tcpip_connect->color(FL_LIGHT1); box_tcpip_connect->redraw(); box_xcvr_connect->color(FL_LIGHT1); box_xcvr_connect->redraw(); tcpip_menu_box->color(FL_LIGHT1); tcpip_menu_box->redraw(); throw e; } } if (!rcv_socket_thread) { rcv_socket_thread = new pthread_t; if (pthread_create(rcv_socket_thread, NULL, rcv_socket_loop, NULL)) { perror("pthread_create"); exit(EXIT_FAILURE); } LOG_QUIET("%s", "Socket receive thread started"); } } catch (const SocketException& e) { LOG_ERROR("Error: %d, %s", e.error(), e.what()); delete remote_addr; remote_addr = 0; LOG_ERROR("Deleted remote address"); delete tcpip; tcpip = 0; LOG_ERROR("Deleted tcpip socket"); throw e; } return; } void disconnect_from_remote() { if (!tcpip || tcpip->fd() == -1) return; { guard_lock socket_lock(&mutex_rcv_socket); tcpip->close(); delete tcpip; tcpip = 0; LOG_QUIET("%s", "Deleted tcpip socket instance"); delete remote_addr; remote_addr = 0; LOG_QUIET("%s", "Deleted socket address instance"); exit_socket_loop = true; } pthread_join(*rcv_socket_thread, NULL); rcv_socket_thread = NULL; LOG_QUIET("%s", "Exited from socket read thread"); box_tcpip_connect->color(FL_LIGHT1); box_tcpip_connect->redraw(); box_xcvr_connect->color(FL_LIGHT1); box_xcvr_connect->redraw(); tcpip_menu_box->color(FL_LIGHT1); tcpip_menu_box->redraw(); } int retry_after = 0; int drop_count = 0; void send_to_remote(string cmd_string, int pace) { if (retry_after > 0) { retry_after -= progStatus.serloop_timing; if (retry_after < 0) retry_after = 0; return; } if (!tcpip || tcpip->fd() == -1) { try { connect_to_remote(); } catch (...) { LOG_QUIET("Retry connect in %d seconds", progStatus.tcpip_reconnect_after); retry_after = 1000 * progStatus.tcpip_reconnect_after; return; } } try { guard_lock send_lock(&mutex_rcv_socket); size_t len = cmd_string.length(); for (size_t i = 0; i < len; i += 8) tcpip->send(&cmd_string[i], len - i > 8 ? 8 : len - i); log_level(WARN, "send to remote", cmd_string); drop_count = 0; } catch (const SocketException& e) { LOG_ERROR("Error: %d, %s", e.error(), e.what()); drop_count++; if (drop_count == progStatus.tcpip_drops_allowed) { disconnect_from_remote(); drop_count = 0; } } return; } int read_from_remote(string &str) { if (!tcpip || tcpip->fd() == -1) return 0; guard_lock socket_lock(&mutex_rcv_socket); str = rxbuffer; rxbuffer.clear(); if (!str.empty()) log_level(WARN, "receive from remote", str); else log_level(WARN, "receive from remote", "no data"); return str.length(); } flrig-1.3.24/build-aux/0000755000175000017500000000000012650266612011605 500000000000000flrig-1.3.24/build-aux/install-sh0000755000175000017500000003325612562732137013544 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-01-19.21; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for `test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call `install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for `test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writeable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: flrig-1.3.24/build-aux/config.sub0000755000175000017500000010517612562732137013524 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # This file is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Please send patches to . Submit a context # diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze) basic_machine=microblaze-xilinx ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: flrig-1.3.24/build-aux/compile0000755000175000017500000001624512261335263013110 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: flrig-1.3.24/build-aux/depcomp0000755000175000017500000004755612562732137013125 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2011-12-04.11; # UTC # Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009, 2010, # 2011 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try \`$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by `PROGRAMS ARGS'. object Object file output by `PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts `$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; icc) # Intel's C compiler understands `-MD -MF file'. However on # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c # ICC 7.0 will fill foo.d with something like # foo.o: sub/foo.c # foo.o: sub/foo.h # which is wrong. We want: # sub/foo.o: sub/foo.c # sub/foo.o: sub/foo.h # sub/foo.c: # sub/foo.h: # ICC 7.1 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using \ : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile" # Add `dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then # With Tru64 cc, shared objects can also be used to make a # static library. This mechanism is used in libtool 1.4 series to # handle both shared and static libraries in a single compilation. # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. # # With libtool 1.5 this exception was removed, and libtool now # generates 2 separate objects for the 2 libraries. These two # compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 tmpdepfile2=$dir$base.o.d # libtool 1.5 tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.o.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d tmpdepfile4=$dir$base.d "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a tab and a space in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test "$stat" = 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/ \1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/ / G p }' >> "$depfile" rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for `:' # in the target name. This is to cope with DOS-style filenames: # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. "$@" $dashmflag | sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: flrig-1.3.24/build-aux/missing0000755000175000017500000002415212562732137013132 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. scriptversion=2012-01-06.13; # UTC # Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006, # 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: sed_output='s/.* --output[ =]\([^ ]*\).*/\1/p' sed_minuso='s/.* -o \([^ ]*\).*/\1/p' # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi msg="missing on your system" case $1 in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 # Exit code 63 means version mismatch. This often happens # when the user try to use an ancient version of a tool on # a file that requires a minimum version. In this case we # we should proceed has if the program had been absent, or # if --run hadn't been passed. if test $? = 63; then run=: msg="probably too old" fi ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' autom4te touch the output file, or create a stub one automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch] Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and \`g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; esac # normalize program name to check for. program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` # Now exit if we have it, but it failed. Also exit now if we # don't have it and --version was passed (most likely to detect # the program). This is about non-GNU programs, so use $1 not # $program. case $1 in lex*|yacc*) # Not GNU programs, they don't have --version. ;; *) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 elif test "x$2" = "x--version" || test "x$2" = "x--help"; then # Could not run --version or --help. This is probably someone # running `$TOOL --version' or `$TOOL --help' to check whether # $TOOL exists and not knowing $TOOL uses missing. exit 1 fi ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case $program in aclocal*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case $f in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te*) echo 1>&2 "\ WARNING: \`$1' is needed, but is $msg. You might have modified some files without having the proper tools for further handling them. You can get \`$1' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison*|yacc*) echo 1>&2 "\ WARNING: \`$1' $msg. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if test -f "$SRCFILE"; then cp "$SRCFILE" y.tab.h fi ;; esac fi if test ! -f y.tab.h; then echo >y.tab.h fi if test ! -f y.tab.c; then echo 'main() { return 0; }' >y.tab.c fi ;; lex*|flex*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if test $# -ne 1; then eval LASTARG=\${$#} case $LASTARG in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if test -f "$SRCFILE"; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if test ! -f lex.yy.c; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit $? fi ;; makeinfo*) echo 1>&2 "\ WARNING: \`$1' is $msg. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." # The file to touch is that specified with -o ... file=`echo "$*" | sed -n "$sed_output"` test -z "$file" && file=`echo "$*" | sed -n "$sed_minuso"` if test -z "$file"; then # ... or it is the one specified with @setfilename ... infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n ' /^@setfilename/{ s/.* \([^ ]*\) *$/\1/ p q }' $infile` # ... or it is derived from the source name (dir/f.texi becomes f.info) test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info fi # If the file does not exist, the user really needs makeinfo; # let's fail without touching anything. test -f $file || exit 1 touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and is $msg. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequisites for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: flrig-1.3.24/build-aux/config.guess0000755000175000017500000012743212562732137014060 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, # 2011, 2012 Free Software Foundation, Inc. timestamp='2012-02-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Per Bothner. Please send patches (context # diff format) to and include a ChangeLog # entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm:riscos:*:*|arm:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-gnueabi else echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in i386) eval $set_cc_for_build if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then UNAME_PROCESSOR="x86_64" fi fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: flrig-1.3.24/configure0000755000175000017500000073470412650265655011567 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for FLRIG 1.3.24. # # Report bugs to . # # Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and w1hkj AT w1hkj DOT $0: com about your system, including any error possibly $0: output before this message. Then install a modern $0: shell, or manually run the script under such a shell if $0: you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='FLRIG' PACKAGE_TARNAME='flrig' PACKAGE_VERSION='1.3.24' PACKAGE_STRING='FLRIG 1.3.24' PACKAGE_BUGREPORT='w1hkj AT w1hkj DOT com' PACKAGE_URL='' ac_unique_file="src/main.cxx" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS FLRIG_BUILD_LDADD FLRIG_BUILD_LDFLAGS FLRIG_BUILD_CXXFLAGS FLRIG_BUILD_CPPFLAGS ENABLE_FLXMLRPC_FALSE ENABLE_FLXMLRPC_TRUE FLXMLRPC_LIBS FLXMLRPC_CFLAGS X_LIBS X_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG HAVE_FLUID_FALSE HAVE_FLUID_TRUE FLUID FLTK_LIBS FLTK_CFLAGS FLTK_CONFIG COMPAT_STRCASESTR_FALSE COMPAT_STRCASESTR_TRUE EXTRA_LIBS COMPAT_REGEX_FALSE COMPAT_REGEX_TRUE PTW32_LIBS PTW32_CFLAGS MINGW32_FALSE MINGW32_TRUE WIN32_FALSE WIN32_TRUE HAVE_NSIS_FALSE HAVE_NSIS_TRUE HAVE_WINDRES_FALSE HAVE_WINDRES_TRUE MAKENSIS WINDRES DARWIN_FALSE DARWIN_TRUE MAC_UNIVERSAL_LDFLAGS MAC_UNIVERSAL_CFLAGS COMPAT_STACK_FALSE COMPAT_STACK_TRUE RDYNAMIC DEBUG_CFLAGS ENABLE_DEBUG_FALSE ENABLE_DEBUG_TRUE BFD_LIBS BFD_CFLAGS OPT_CFLAGS EGREP GREP CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build AC_CONFIG_ARGS FLRIG_VERSION FLRIG_VERSION_PATCH FLRIG_VERSION_MINOR FLRIG_VERSION_MAJOR target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_static enable_optimizations enable_debug with_bfd enable_mac_universal with_ptw32 with_flxmlrpc ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS CPP BFD_CFLAGS BFD_LIBS PTW32_CFLAGS PTW32_LIBS FLTK_CONFIG FLTK_CFLAGS FLTK_LIBS FLUID PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR X_CFLAGS X_LIBS FLXMLRPC_CFLAGS FLXMLRPC_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures FLRIG 1.3.24 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/flrig] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of FLRIG 1.3.24:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-static enable static linking for some libraries --enable-optimizations use x86 optimizations (none|sse|sse2|sse3|native) [none] --enable-debug turn on debugging --enable-mac-universal build a universal binary on Mac OS X [no] Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-bfd[=DIR] search for libbfd in DIR/include and DIR/lib [mingw32 only] --with-ptw32[=DIR] search for pthreads-w32 in DIR/include and DIR/lib [mingw32 only] --with-flxmlrpc use external flxmlrpc library [autodetect] Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor BFD_CFLAGS C compiler flags for libbfd BFD_LIBS linker flags for libbfd PTW32_CFLAGS C compiler flags for pthreads-w32 PTW32_LIBS linker flags for pthreads-w32 FLTK_CONFIG Path to fltk-config utility FLTK_CFLAGS C compiler flags for FLTK, overriding fltk-config FLTK_LIBS linker flags for FLTK, overriding fltk-config FLUID Fast Light User-Interface Designer PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path X_CFLAGS C compiler flags for X, overriding pkg-config X_LIBS linker flags for X, overriding pkg-config FLXMLRPC_CFLAGS C compiler flags for FLXMLRPC, overriding pkg-config FLXMLRPC_LIBS linker flags for FLXMLRPC, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF FLRIG configure 1.3.24 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright (C) 2009 Dave Freese, W1HKJ (w1hkj AT w1hkj DOT com) _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------- ## ## Report this to w1hkj AT w1hkj DOT com ## ## ------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by FLRIG $as_me 1.3.24, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu FLRIG_VERSION_MAJOR=1 FLRIG_VERSION_MINOR=3 FLRIG_VERSION_PATCH=.24 FLRIG_VERSION=1.3.24 $as_echo "#define FLRIG_VERSION_MAJOR 1" >>confdefs.h $as_echo "#define FLRIG_VERSION_MINOR 3" >>confdefs.h $as_echo "#define FLRIG_VERSION_PATCH \".24\"" >>confdefs.h $as_echo "#define FLRIG_VERSION \"1.3.24\"" >>confdefs.h AC_CONFIG_ARGS=$ac_configure_args ac_aux_dir= for ac_dir in build-aux "$srcdir"/build-aux; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # define build, build_cpu, build_vendor, build_os # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac # define host, host_cpu, host_vendor, host_os { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # define target, target_cpu, target_vendor, target_os { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version='1.14' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='flrig' VERSION='1.3.24' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi #change the next config item for the specific application src's ac_config_headers="$ac_config_headers src/config.h" # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "#define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h $as_echo "#define _ALL_SOURCE 1" >>confdefs.h $as_echo "#define _GNU_SOURCE 1" >>confdefs.h $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h # Checks for libraries. # Checks for header files. for ac_header in stdlib.h string.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi # Checks for library functions. for ac_func in getaddrinfo gethostbyname hstrerror gmtime_r localtime_r memmove memset mkdir select setenv snprintf socket socketpair strcasecmp strcasestr strchr strdup strerror strlcpy strncasecmp strrchr strstr strtol uname unsetenv vsnprintf do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ### static flag # Set ac_cv_static to yes/no # Substitute RTLIB in Makefile # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; case "${enableval}" in yes|no) ac_cv_static="${enableval}" ;; *) as_fn_error $? "bad value ${enableval} for --enable-static" "$LINENO" 5 ;; esac else ac_cv_static=no fi ### optimizations # Set ac_cv_opt to arg # Substitute OPT_FLAGS in Makefile # Check whether --enable-optimizations was given. if test "${enable_optimizations+set}" = set; then : enableval=$enable_optimizations; case "${enableval}" in none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;; *) as_fn_error $? "bad value ${enableval} for --enable-optimizations" "$LINENO" 5 ;; esac else ac_cv_opt=none fi OPT_CFLAGS="-O2 -ffast-math -finline-functions -fomit-frame-pointer" case "$ac_cv_opt" in sse) OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse" ;; sse2) OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse" ;; sse3) OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse" ;; native) OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse" ;; none) ;; esac ### debug flag # Set ac_cv_debug to yes/no # Override CXXFLAGS # Set ENABLE_DEBUG Makefile conditional # Substitute RDYNAMIC in Makefile # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; case "${enableval}" in yes|no) ac_cv_debug="${enableval}" ;; *) as_fn_error $? "bad value ${enableval} for --enable-debug" "$LINENO" 5 ;; esac else ac_cv_debug=no fi # Check whether --with-bfd was given. if test "${with_bfd+set}" = set; then : withval=$with_bfd; ac_cv_want_bfd="$withval" else ac_cv_want_bfd=yes fi if test "x$ac_cv_debug" = "xyes" && test "x$ac_cv_want_bfd" != "xno" && \ test "x$target_mingw32" = "xyes"; then if test "x$ac_cv_want_bfd" != "xyes"; then # set -I and -L switches bfd_default_cflags="-I${ac_cv_want_bfd}/include" bfd_default_libs="-L${ac_cv_want_bfd}/lib" fi # don't override the user-specified vars BFD_CFLAGS="${BFD_CFLAGS:-$bfd_default_cflags}" BFD_LIBS="${BFD_LIBS:-$bfd_default_libs}" ac_cv_want_bfd="yes" CPPFLAGS_saved="$CPPFLAGS" LDFLAGS_saved="$LDFLAGS" CPPFLAGS="$CPPFLAGS $BFD_CFLAGS" LDFLAGS="$LDFLAGS $BFD_LIBS" ac_fn_c_check_header_mongrel "$LINENO" "bfd.h" "ac_cv_header_bfd_h" "$ac_includes_default" if test "x$ac_cv_header_bfd_h" = xyes; then : ac_cv_have_bfd="yes" else ac_cv_have_bfd="no" fi if test "x$ac_cv_have_bfd" = "xyes"; then bfd_other_libs="-liberty -lpsapi -limagehlp" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bfd_set_format in -lbfd" >&5 $as_echo_n "checking for bfd_set_format in -lbfd... " >&6; } if ${ac_cv_lib_bfd_bfd_set_format+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lbfd $bfd_other_libs $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char bfd_set_format (); int main () { return bfd_set_format (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bfd_bfd_set_format=yes else ac_cv_lib_bfd_bfd_set_format=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_set_format" >&5 $as_echo "$ac_cv_lib_bfd_bfd_set_format" >&6; } if test "x$ac_cv_lib_bfd_bfd_set_format" = xyes; then : ac_cv_have_bfd="yes" else ac_cv_have_bfd="no" fi fi CPPFLAGS="$CPPFLAGS_saved" LDFLAGS="$LDFLAGS_saved" if test "x$ac_cv_have_bfd" = "xyes"; then BFD_LIBS="$BFD_LIBS -lbfd $bfd_other_libs" fi fi if test "x$ac_cv_debug" = "xyes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debug info flag" >&5 $as_echo_n "checking for debug info flag... " >&6; } if test "x$GXX" = "xyes"; then if test "x$target_mingw32" = "xyes"; then gflag="-gstabs" else gflag="-ggdb3" fi else gflag="-g" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gflag" >&5 $as_echo "$gflag" >&6; } DEBUG_CFLAGS="-O0 -fno-inline-functions -fno-omit-frame-pointer $gflag -Wall" LDFLAGS_saved="$LDFLAGS" LDFLAGS="$LDFLAGS -rdynamic" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -rdynamic" >&5 $as_echo_n "checking whether $CC supports -rdynamic... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_rdynamic=yes else ac_cv_rdynamic=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5 $as_echo "$ac_cv_rdynamic" >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports -rdynamic" >&5 $as_echo_n "checking whether $CXX supports -rdynamic... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_rdynamic=yes else ac_cv_rdynamic=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5 $as_echo "$ac_cv_rdynamic" >&6; } ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu LDFLAGS="$LDFLAGS_saved" if test "x$ac_cv_rdynamic" = "xyes"; then RDYNAMIC=-rdynamic fi CXXFLAGS="" CFLAGS="$CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: debugging enabled; overriding CXXFLAGS" >&5 $as_echo "$as_me: debugging enabled; overriding CXXFLAGS" >&6;} if test "x$target_darwin" = "xyes"; then ac_cv_compat_stack=yes $as_echo "#define HAVE_DBG_STACK 1" >>confdefs.h elif test "x$target_mingw32" = "xyes" && test "x$ac_cv_have_bfd" = "xyes"; then ac_cv_compat_stack=yes $as_echo "#define HAVE_DBG_STACK 1" >>confdefs.h else ac_cv_compat_stack=no $as_echo "#define HAVE_DBG_STACK 0" >>confdefs.h fi fi if test "x$ac_cv_debug" = "xyes"; then ENABLE_DEBUG_TRUE= ENABLE_DEBUG_FALSE='#' else ENABLE_DEBUG_TRUE='#' ENABLE_DEBUG_FALSE= fi if test "x$ac_cv_compat_stack" = "xyes"; then COMPAT_STACK_TRUE= COMPAT_STACK_FALSE='#' else COMPAT_STACK_TRUE='#' COMPAT_STACK_FALSE= fi ###### OS support ### OSX # Set ac_cv_mac_universal to yes/no # Set DARWIN Makefile conditional # Substitute MAC_UNIVERSAL_CFLAGS and MAC_UNIVERSAL_LDFLAGS in Makefile case "$target_os" in darwin*) target_darwin="yes" ;; *) target_darwin="no" ;; esac # Check whether --enable-mac-universal was given. if test "${enable_mac_universal+set}" = set; then : enableval=$enable_mac_universal; case "${enableval}" in yes|no) ac_cv_mac_universal="${enableval}" ;; *) as_fn_error $? "bad value \"${enableval}\" for --enable-mac-universal" "$LINENO" 5 ;; esac else ac_cv_mac_universal=no fi if test "x$target_darwin" = "xyes" && test "x$ac_cv_mac_universal" = "xyes"; then mac_minversion="-mmacosx-version-min=10.4" case "$target_os" in darwin8*) mac_arches="-arch i386 -arch ppc" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" ;; darwin9*) mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk" ;; *) mac_arches="" mac_sysroot="" ;; esac MAC_UNIVERSAL_CFLAGS="$mac_arches $mac_sysroot $mac_minversion" MAC_UNIVERSAL_LDFLAGS="$mac_arches" fi if test "x$target_darwin" = "xyes"; then DARWIN_TRUE= DARWIN_FALSE='#' else DARWIN_TRUE='#' DARWIN_FALSE= fi ### win32 # Set WIN32 Makefile conditional # Set HAVE_WINDRES Makefile conditional # Substitute WINDRES in Makefile case "$target_os" in *mingw*) target_win32="yes" target_mingw32="yes" ;; *cygwin*|*win32*|*w32*) target_win32="yes" ;; *) target_win32="no" ;; esac if test "x$target_win32" = "xyes"; then # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. set dummy ${ac_tool_prefix}windres; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_WINDRES+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$WINDRES"; then ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_WINDRES="${ac_tool_prefix}windres" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi WINDRES=$ac_cv_prog_WINDRES if test -n "$WINDRES"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 $as_echo "$WINDRES" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$WINDRES" = "x" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The windres utility could not be found" >&5 $as_echo "$as_me: WARNING: The windres utility could not be found" >&2;} fi $as_echo "#define __WOE32__ 1" >>confdefs.h fi if test "x$target_mingw32" = "xyes"; then # Extract the first word of "makensis", so it can be a program name with args. set dummy makensis; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MAKENSIS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MAKENSIS"; then ac_cv_prog_MAKENSIS="$MAKENSIS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MAKENSIS="makensis" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MAKENSIS=$ac_cv_prog_MAKENSIS if test -n "$MAKENSIS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKENSIS" >&5 $as_echo "$MAKENSIS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test "x$WINDRES" != "x"; then HAVE_WINDRES_TRUE= HAVE_WINDRES_FALSE='#' else HAVE_WINDRES_TRUE='#' HAVE_WINDRES_FALSE= fi if test "x$MAKENSIS" != "x"; then HAVE_NSIS_TRUE= HAVE_NSIS_FALSE='#' else HAVE_NSIS_TRUE='#' HAVE_NSIS_FALSE= fi if test "x$target_win32" = "xyes"; then WIN32_TRUE= WIN32_FALSE='#' else WIN32_TRUE='#' WIN32_FALSE= fi if test "x$target_mingw32" = "xyes"; then MINGW32_TRUE= MINGW32_FALSE='#' else MINGW32_TRUE='#' MINGW32_FALSE= fi # Check whether --with-ptw32 was given. if test "${with_ptw32+set}" = set; then : withval=$with_ptw32; ac_cv_want_ptw32="$withval" else ac_cv_want_ptw32=no fi if test "x$ac_cv_want_ptw32" != "xno"; then if test "x$ac_cv_want_ptw32" != "xyes"; then # set -I and -L switches ptw32_default_cflags="-I${ac_cv_want_ptw32}/include" ptw32_default_libs="-L${ac_cv_want_ptw32}/lib" fi ptw32_default_libs="$ptw32_default_libs -lpthreadGC2 -lws2_32" # don't override the user-specified vars PTW32_CFLAGS="${PTW32_CFLAGS:-$ptw32_default_cflags}" PTW32_LIBS="${PTW32_LIBS:-$ptw32_default_libs}" ac_cv_want_ptw32="yes" fi ### Non-POSIX compatibility (i.e. mingw32) # Sets various Makefile conditionals; see m4/np-compat.m4 if test "x$ac_cv_header_regex_h" != "xyes"; then COMPAT_REGEX_TRUE= COMPAT_REGEX_FALSE='#' else COMPAT_REGEX_TRUE='#' COMPAT_REGEX_FALSE= fi if test "x$target_mingw32" = "xyes"; then sem_libs="pthreadGC2" else sem_libs="pthread rt" fi other_libs="" if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS_saved="$CFLAGS" LDFLAGS_saved="$LDFLAGS" EXTRA_LIBS_saved="$EXTRA_LIBS" CFLAGS="$CFLAGS $PTW32_CFLAGS" LDFLAGS="$LDFLAGS $PTW32_LIBS" other_libs=-lws2_32 fi LIBS_search_libs_save="$LIBS" LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_dlopen=1 else ac_cv_have_func_dlopen=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi cat >>confdefs.h <<_ACEOF #define HAVE_DLOPEN $ac_cv_have_func_dlopen _ACEOF LIBS="$LIBS_search_libs_save" LIBS_search_libs_save="$LIBS" LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_clock_gettime=1 else ac_cv_have_func_clock_gettime=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi cat >>confdefs.h <<_ACEOF #define HAVE_CLOCK_GETTIME $ac_cv_have_func_clock_gettime _ACEOF LIBS="$LIBS_search_libs_save" LIBS_search_libs_save="$LIBS" LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_unlink" >&5 $as_echo_n "checking for library containing sem_unlink... " >&6; } if ${ac_cv_search_sem_unlink+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sem_unlink (); int main () { return sem_unlink (); ; return 0; } _ACEOF for ac_lib in '' $sem_libs; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sem_unlink=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sem_unlink+:} false; then : break fi done if ${ac_cv_search_sem_unlink+:} false; then : else ac_cv_search_sem_unlink=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_unlink" >&5 $as_echo "$ac_cv_search_sem_unlink" >&6; } ac_res=$ac_cv_search_sem_unlink if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_sem_unlink=1 else ac_cv_have_func_sem_unlink=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi cat >>confdefs.h <<_ACEOF #define HAVE_SEM_UNLINK $ac_cv_have_func_sem_unlink _ACEOF LIBS="$LIBS_search_libs_save" LIBS_search_libs_save="$LIBS" LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing sem_timedwait" >&5 $as_echo_n "checking for library containing sem_timedwait... " >&6; } if ${ac_cv_search_sem_timedwait+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char sem_timedwait (); int main () { return sem_timedwait (); ; return 0; } _ACEOF for ac_lib in '' $sem_libs; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $other_libs $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_sem_timedwait=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_sem_timedwait+:} false; then : break fi done if ${ac_cv_search_sem_timedwait+:} false; then : else ac_cv_search_sem_timedwait=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_sem_timedwait" >&5 $as_echo "$ac_cv_search_sem_timedwait" >&6; } ac_res=$ac_cv_search_sem_timedwait if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" ac_cv_have_func_sem_timedwait=1 else ac_cv_have_func_sem_timedwait=0 fi if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi cat >>confdefs.h <<_ACEOF #define HAVE_SEM_TIMEDWAIT $ac_cv_have_func_sem_timedwait _ACEOF LIBS="$LIBS_search_libs_save" if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS="$CFLAGS_saved" LDFLAGS="$LDFLAGS_saved" EXTRA_LIBS="$EXTRA_LIBS_saved" fi if test "x$ac_cv_func_strcasestr" != "xyes"; then COMPAT_STRCASESTR_TRUE= COMPAT_STRCASESTR_FALSE='#' else COMPAT_STRCASESTR_TRUE='#' COMPAT_STRCASESTR_FALSE= fi ### FLTK # Substitute FLTK_CFLAGS and FLTK_LIBS in Makefile # Set FLUID variable # Set HAVE_FLUID Makefile conditional if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then if test "x$FLTK_CONFIG" = "x"; then # Extract the first word of "fltk-config", so it can be a program name with args. set dummy fltk-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_FLTK_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $FLTK_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_FLTK_CONFIG="$FLTK_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_FLTK_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_FLTK_CONFIG" && ac_cv_path_FLTK_CONFIG="no" ;; esac fi FLTK_CONFIG=$ac_cv_path_FLTK_CONFIG if test -n "$FLTK_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLTK_CONFIG" >&5 $as_echo "$FLTK_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fltk-config" >&5 $as_echo_n "checking for fltk-config... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLTK_CONFIG" >&5 $as_echo "$FLTK_CONFIG" >&6; } fi if test "$FLTK_CONFIG" = "no"; then as_fn_error $? " *** The fltk-config script could not be found. Please install the development *** headers and libraries for FLTK 1.1.x, or set PATH to the directory that *** contains fltk-config. " "$LINENO" 5 fi HAVE_FLTK_API_VERSION=no FLTK_API_VERSION="`$FLTK_CONFIG --api-version`" if test $? -ne 0; then as_fn_error $? "$FLTK_CONFIG failed" "$LINENO" 5 fi if test "x$FLTK_API_VERSION" = "x1.1" || test "x$FLTK_API_VERSION" = "x1.3"; then HAVE_FLTK_API_VERSION=yes fi FLRIG_FLTK_API_MAJOR=${FLTK_API_VERSION%%.*} FLRIG_FLTK_API_MINOR=${FLTK_API_VERSION#*.}; FLRIG_FLTK_API_MINOR=${FLRIG_FLTK_API_MINOR%%.*} if test "${HAVE_FLTK_API_VERSION}" = "no"; then as_fn_error $? " *** The version of FLTK found on your system provides API version $FLTK_API_VERSION. *** To build $PACKAGE you need a FLTK version that provides API 1.1 or 1.3. " "$LINENO" 5 fi FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags` if test "x$ac_cv_static" != "xyes"; then FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images` if test "x$target_mingw32" != "xyes"; then if test "x$target_darwin" != "xyes"; then if grep -q "lX11" <<< "$FLTK_LIBS"; then FLTK_LIBS="$FLTK_LIBS"; else FLTK_LIBS="$FLTK_LIBS -lm -lX11"; fi fi fi else FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images` fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not checking for FLTK" >&5 $as_echo "$as_me: not checking for FLTK" >&6;} fi cat >>confdefs.h <<_ACEOF #define FLTK_BUILD_VERSION "`$FLTK_CONFIG --version`" _ACEOF cat >>confdefs.h <<_ACEOF #define FLRIG_FLTK_API_MAJOR $FLRIG_FLTK_API_MAJOR _ACEOF cat >>confdefs.h <<_ACEOF #define FLRIG_FLTK_API_MINOR $FLRIG_FLTK_API_MINOR _ACEOF # Extract the first word of "fluid", so it can be a program name with args. set dummy fluid; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_FLUID+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$FLUID"; then ac_cv_prog_FLUID="$FLUID" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_FLUID="fluid" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi FLUID=$ac_cv_prog_FLUID if test -n "$FLUID"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FLUID" >&5 $as_echo "$FLUID" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "$FLUID"; then HAVE_FLUID_TRUE= HAVE_FLUID_FALSE='#' else HAVE_FLUID_TRUE='#' HAVE_FLUID_FALSE= fi ### X11 # Set ac_cv_x to yes/no # Define USE_X in config.h # Substitute X_CFLAGS and X_LIBS in Makefile if test "x$target_darwin" = "xno" && test "x$target_win32" = "xno"; then if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi test "x$ac_cv_want_x" = "x" && ac_cv_want_x="check" case "x$ac_cv_want_x" in "xno") ac_cv_x=no ;; "xcheck") pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } if test -n "$X_CFLAGS"; then pkg_cv_X_CFLAGS="$X_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$X_LIBS"; then pkg_cv_X_LIBS="$X_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then X_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` else X_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$X_PKG_ERRORS" >&5 ac_cv_x=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_x=no else X_CFLAGS=$pkg_cv_X_CFLAGS X_LIBS=$pkg_cv_X_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_x=yes fi ;; "xyes") pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } if test -n "$X_CFLAGS"; then pkg_cv_X_CFLAGS="$X_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_CFLAGS=`$PKG_CONFIG --cflags "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$X_LIBS"; then pkg_cv_X_LIBS="$X_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"x11\""; } >&5 ($PKG_CONFIG --exists --print-errors "x11") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_X_LIBS=`$PKG_CONFIG --libs "x11" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then X_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "x11" 2>&1` else X_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "x11" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$X_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (x11) were not met: $X_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables X_CFLAGS and X_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables X_CFLAGS and X_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else X_CFLAGS=$pkg_cv_X_CFLAGS X_LIBS=$pkg_cv_X_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # if we get here the test has succeeded ac_cv_x=yes ;; esac if test "x$ac_cv_x" = "xyes"; then $as_echo "#define USE_X 1" >>confdefs.h pkg_x_version=`$PKG_CONFIG --modversion "x11" 2>/dev/null` else $as_echo "#define USE_X 0" >>confdefs.h pkg_x_version="" fi cat >>confdefs.h <<_ACEOF #define X_BUILD_VERSION "$pkg_x_version" _ACEOF : fi ### libflxmlrpc # Set ac_cv_flxmlrpc to yes/no # Define USE_FLXMLRPC in config.h # Substitute FLXMLRPC_CFLAGS and FLXMLRPC_LIBS in Makefile # Check whether --with-flxmlrpc was given. if test "${with_flxmlrpc+set}" = set; then : withval=$with_flxmlrpc; case "${withval}" in yes|no) ac_cv_want_flxmlrpc="${withval}" ;; *) as_fn_error $? "bad value \"${withval}\" for --with-flxmlrpc" "$LINENO" 5 ;; esac else ac_cv_want_flxmlrpc=check fi test "x$ac_cv_want_flxmlrpc" = "x" && ac_cv_want_flxmlrpc="check" case "x$ac_cv_want_flxmlrpc" in "xno") ac_cv_flxmlrpc=no ;; "xcheck") pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLXMLRPC" >&5 $as_echo_n "checking for FLXMLRPC... " >&6; } if test -n "$FLXMLRPC_CFLAGS"; then pkg_cv_FLXMLRPC_CFLAGS="$FLXMLRPC_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 0.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 0.1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_CFLAGS=`$PKG_CONFIG --cflags "flxmlrpc >= 0.1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$FLXMLRPC_LIBS"; then pkg_cv_FLXMLRPC_LIBS="$FLXMLRPC_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 0.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 0.1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_LIBS=`$PKG_CONFIG --libs "flxmlrpc >= 0.1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "flxmlrpc >= 0.1.0" 2>&1` else FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "flxmlrpc >= 0.1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$FLXMLRPC_PKG_ERRORS" >&5 ac_cv_flxmlrpc=no elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ac_cv_flxmlrpc=no else FLXMLRPC_CFLAGS=$pkg_cv_FLXMLRPC_CFLAGS FLXMLRPC_LIBS=$pkg_cv_FLXMLRPC_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } ac_cv_flxmlrpc=yes fi ;; "xyes") pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FLXMLRPC" >&5 $as_echo_n "checking for FLXMLRPC... " >&6; } if test -n "$FLXMLRPC_CFLAGS"; then pkg_cv_FLXMLRPC_CFLAGS="$FLXMLRPC_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 0.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 0.1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_CFLAGS=`$PKG_CONFIG --cflags "flxmlrpc >= 0.1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$FLXMLRPC_LIBS"; then pkg_cv_FLXMLRPC_LIBS="$FLXMLRPC_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"flxmlrpc >= 0.1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "flxmlrpc >= 0.1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_FLXMLRPC_LIBS=`$PKG_CONFIG --libs "flxmlrpc >= 0.1.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "flxmlrpc >= 0.1.0" 2>&1` else FLXMLRPC_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "flxmlrpc >= 0.1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$FLXMLRPC_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (flxmlrpc >= 0.1.0) were not met: $FLXMLRPC_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables FLXMLRPC_CFLAGS and FLXMLRPC_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables FLXMLRPC_CFLAGS and FLXMLRPC_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else FLXMLRPC_CFLAGS=$pkg_cv_FLXMLRPC_CFLAGS FLXMLRPC_LIBS=$pkg_cv_FLXMLRPC_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi # if we get here the test has succeeded ac_cv_flxmlrpc=yes ;; esac if test "x$ac_cv_flxmlrpc" = "xyes"; then $as_echo "#define USE_FLXMLRPC 1" >>confdefs.h pkg_flxmlrpc_version=`$PKG_CONFIG --modversion "flxmlrpc >= 0.1.0" 2>/dev/null` else $as_echo "#define USE_FLXMLRPC 0" >>confdefs.h pkg_flxmlrpc_version="" fi cat >>confdefs.h <<_ACEOF #define FLXMLRPC_BUILD_VERSION "$pkg_flxmlrpc_version" _ACEOF if test "x$ac_cv_flxmlrpc" = "xyes"; then ENABLE_FLXMLRPC_TRUE= ENABLE_FLXMLRPC_FALSE='#' else ENABLE_FLXMLRPC_TRUE='#' ENABLE_FLXMLRPC_FALSE= fi ### build info # Define various build variables in config.h # Define build flags and substitute in Makefile.in # CPPFLAGS FLRIG_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLRIG_BUILD_CPPFLAGS="$FLRIG_BUILD_CPPFLAGS -I\$(srcdir)/xmlrpcpp" fi if test "x$target_win32" = "xyes"; then FLRIG_BUILD_CPPFLAGS="$FLRIG_BUILD_CPPFLAGS -D_WINDOWS" fi # CXXFLAGS FLRIG_BUILD_CXXFLAGS="$FLTK_CFLAGS -I\$(srcdir) -I\$(srcdir)/include \ $X_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS $PTW32_CFLAGS" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLRIG_BUILD_CXXFLAGS="-I\$(srcdir)/xmlrpcpp $FLRIG_BUILD_CXXFLAGS" fi if test "x$target_mingw32" = "xyes"; then FLRIG_BUILD_CXXFLAGS="-mthreads $FLRIG_BUILD_CXXFLAGS" fi # LDFLAGS FLRIG_BUILD_LDFLAGS= # LDADD FLRIG_BUILD_LDADD="$FLTK_LIBS $X_LIBS $EXTRA_LIBS $PTW32_LIBS $FLXMLRPC_LIBS" if test "x$ac_cv_debug" = "xyes"; then FLRIG_BUILD_CXXFLAGS="$FLRIG_BUILD_CXXFLAGS -UNDEBUG" FLRIG_BUILD_LDFLAGS="$FLRIG_BUILD_LDFLAGS $RDYNAMIC" else FLRIG_BUILD_CXXFLAGS="$FLRIG_BUILD_CXXFLAGS -DNDEBUG" fi if test "x$target_mingw32" = "xyes"; then FLRIG_BUILD_LDFLAGS="-mthreads $FLRIG_BUILD_LDFLAGS" fi #define build variables for config.h cat >>confdefs.h <<_ACEOF #define BUILD_BUILD_PLATFORM "$build" _ACEOF cat >>confdefs.h <<_ACEOF #define BUILD_HOST_PLATFORM "$host" _ACEOF cat >>confdefs.h <<_ACEOF #define BUILD_TARGET_PLATFORM "$target" _ACEOF test "x$LC_ALL" != "x" && LC_ALL_saved="$LC_ALL" LC_ALL=C export LC_ALL ac_sh_dq="\"`echo $ac_configure_args | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define BUILD_CONFIGURE_ARGS $ac_sh_dq _ACEOF # Allow BUILD_DATE, BUILD_USER, BUILD_HOST to be externally overridden by # environment variables. ac_sh_dq="\"$BUILD_DATE\"" test "x$BUILD_DATE" = "x" && ac_sh_dq="\"`date | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define BUILD_DATE $ac_sh_dq _ACEOF ac_sh_dq="\"$BUILD_USER\"" test "x$BUILD_USER" = "x" && ac_sh_dq="\"`whoami | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define BUILD_USER $ac_sh_dq _ACEOF ac_sh_dq="\"$BUILD_HOST\"" test "x$BUILD_HOST" = "x" && ac_sh_dq="\"`hostname | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define BUILD_HOST $ac_sh_dq _ACEOF ac_sh_dq="\"`$CXX -v 2>&1 | tail -1 | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define BUILD_COMPILER $ac_sh_dq _ACEOF ac_sh_dq="\"`echo $FLRIG_BUILD_CPPFLAGS $FLRIG_BUILD_CXXFLAGS | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define FLRIG_BUILD_CXXFLAGS $ac_sh_dq _ACEOF ac_sh_dq="\"`echo $FLRIG_BUILD_LDFLAGS $FLRIG_BUILD_LDADD | sed 's/"/\\\\"/g'`\"" cat >>confdefs.h <<_ACEOF #define FLRIG_BUILD_LDFLAGS $ac_sh_dq _ACEOF if test "x$LC_ALL_saved" != "x"; then LC_ALL="$LC_ALL_saved" export LC_ALL fi ac_config_files="$ac_config_files Makefile src/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_DEBUG_TRUE}" && test -z "${ENABLE_DEBUG_FALSE}"; then as_fn_error $? "conditional \"ENABLE_DEBUG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPAT_STACK_TRUE}" && test -z "${COMPAT_STACK_FALSE}"; then as_fn_error $? "conditional \"COMPAT_STACK\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DARWIN_TRUE}" && test -z "${DARWIN_FALSE}"; then as_fn_error $? "conditional \"DARWIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_WINDRES_TRUE}" && test -z "${HAVE_WINDRES_FALSE}"; then as_fn_error $? "conditional \"HAVE_WINDRES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_NSIS_TRUE}" && test -z "${HAVE_NSIS_FALSE}"; then as_fn_error $? "conditional \"HAVE_NSIS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WIN32_TRUE}" && test -z "${WIN32_FALSE}"; then as_fn_error $? "conditional \"WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${MINGW32_TRUE}" && test -z "${MINGW32_FALSE}"; then as_fn_error $? "conditional \"MINGW32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPAT_REGEX_TRUE}" && test -z "${COMPAT_REGEX_FALSE}"; then as_fn_error $? "conditional \"COMPAT_REGEX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${COMPAT_STRCASESTR_TRUE}" && test -z "${COMPAT_STRCASESTR_FALSE}"; then as_fn_error $? "conditional \"COMPAT_STRCASESTR\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_FLUID_TRUE}" && test -z "${HAVE_FLUID_FALSE}"; then as_fn_error $? "conditional \"HAVE_FLUID\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_FLXMLRPC_TRUE}" && test -z "${ENABLE_FLXMLRPC_FALSE}"; then as_fn_error $? "conditional \"ENABLE_FLXMLRPC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by FLRIG $as_me 1.3.24, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ FLRIG config.status 1.3.24 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/config.h") CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi ### summary { $as_echo "$as_me:${as_lineno-$LINENO}: result: Configuration summary: Version ..................... $VERSION Target OS ................... $target_os Have flxmlrpc library ....... $ac_cv_flxmlrpc Static linking .............. $ac_cv_static CPU optimizations ........... $ac_cv_opt Debugging ................... $ac_cv_debug " >&5 $as_echo " Configuration summary: Version ..................... $VERSION Target OS ................... $target_os Have flxmlrpc library ....... $ac_cv_flxmlrpc Static linking .............. $ac_cv_static CPU optimizations ........... $ac_cv_opt Debugging ................... $ac_cv_debug " >&6; } flrig-1.3.24/m4/0000755000175000017500000000000012650266612010233 500000000000000flrig-1.3.24/m4/pkg-config.m40000644000175000017500000000266412562732137012453 00000000000000# name, version, show-in-help?, optional?, help-text, [am-cond] AC_DEFUN([AC_FLRIG_PKG_CHECK], [ m4_define([PKG_NAME_UC], m4_translit([$1], [a-z], [A-Z])) m4_if([$3], [yes], [ AC_ARG_WITH($1, AC_HELP_STRING([--with-[]$1], [$5]), [case "${withval}" in yes|no) ac_cv_want_[]$1="${withval}" ;; *) AC_MSG_ERROR([bad value "${withval}" for --with-[]$1]) ;; esac], [ac_cv_want_[]$1=check]) ]) m4_if([$4], [no], [ac_cv_want_[]$1=yes]) test "x$ac_cv_want_[]$1" = "x" && ac_cv_want_[]$1="check" case "x$ac_cv_want_[]$1" in "xno") ac_cv_[]$1=no ;; "xcheck") PKG_CHECK_MODULES(PKG_NAME_UC, [$2], [ac_cv_[]$1=yes], [ac_cv_[]$1=no]) ;; "xyes") PKG_CHECK_MODULES(PKG_NAME_UC, [$2]) # if we get here the test has succeeded ac_cv_[]$1=yes ;; esac if test "x$ac_cv_[]$1" = "xyes"; then AC_DEFINE([USE_]PKG_NAME_UC, 1, [Define to 1 if we are using $1]) pkg_[]$1_version=`$PKG_CONFIG --modversion "$2" 2>/dev/null` else AC_DEFINE([USE_]PKG_NAME_UC, 0, [Define to 1 if we are using $1]) pkg_[]$1_version="" fi AC_SUBST(PKG_NAME_UC[_CFLAGS]) AC_SUBST(PKG_NAME_UC[_LIBS]) AC_DEFINE_UNQUOTED(PKG_NAME_UC[_BUILD_VERSION], ["$pkg_[]$1_version"], [$1 version]) m4_ifval([$6], [ AM_CONDITIONAL([$6], [test "x$ac_cv_[]$1" = "xyes"]) ], [:]) ]) flrig-1.3.24/m4/build.m40000644000175000017500000000562512562732137011526 00000000000000AC_DEFUN([AC_FLRIG_SH_DQ], [ ac_sh_dq="\"`$1 | sed 's/"/\\\\"/g'`\"" ]) AC_DEFUN([AC_FLRIG_BUILD_INFO], [ # Define build flags and substitute in Makefile.in # CPPFLAGS FLRIG_BUILD_CPPFLAGS="-I\$(srcdir) -I\$(srcdir)/include" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLRIG_BUILD_CPPFLAGS="$FLRIG_BUILD_CPPFLAGS -I\$(srcdir)/xmlrpcpp" fi if test "x$target_win32" = "xyes"; then FLRIG_BUILD_CPPFLAGS="$FLRIG_BUILD_CPPFLAGS -D_WINDOWS" fi # CXXFLAGS FLRIG_BUILD_CXXFLAGS="$FLTK_CFLAGS -I\$(srcdir) -I\$(srcdir)/include \ $X_CFLAGS -pipe -Wall -fexceptions $OPT_CFLAGS $DEBUG_CFLAGS $PTW32_CFLAGS" if test "x$ac_cv_flxmlrpc" != "xyes"; then FLRIG_BUILD_CXXFLAGS="-I\$(srcdir)/xmlrpcpp $FLRIG_BUILD_CXXFLAGS" fi if test "x$target_mingw32" = "xyes"; then FLRIG_BUILD_CXXFLAGS="-mthreads $FLRIG_BUILD_CXXFLAGS" fi # LDFLAGS FLRIG_BUILD_LDFLAGS= # LDADD FLRIG_BUILD_LDADD="$FLTK_LIBS $X_LIBS $EXTRA_LIBS $PTW32_LIBS $FLXMLRPC_LIBS" if test "x$ac_cv_debug" = "xyes"; then FLRIG_BUILD_CXXFLAGS="$FLRIG_BUILD_CXXFLAGS -UNDEBUG" FLRIG_BUILD_LDFLAGS="$FLRIG_BUILD_LDFLAGS $RDYNAMIC" else FLRIG_BUILD_CXXFLAGS="$FLRIG_BUILD_CXXFLAGS -DNDEBUG" fi if test "x$target_mingw32" = "xyes"; then FLRIG_BUILD_LDFLAGS="-mthreads $FLRIG_BUILD_LDFLAGS" fi AC_SUBST([FLRIG_BUILD_CPPFLAGS]) AC_SUBST([FLRIG_BUILD_CXXFLAGS]) AC_SUBST([FLRIG_BUILD_LDFLAGS]) AC_SUBST([FLRIG_BUILD_LDADD]) #define build variables for config.h AC_DEFINE_UNQUOTED([BUILD_BUILD_PLATFORM], ["$build"], [Build platform]) AC_DEFINE_UNQUOTED([BUILD_HOST_PLATFORM], ["$host"], [Host platform]) AC_DEFINE_UNQUOTED([BUILD_TARGET_PLATFORM], ["$target"], [Target platform]) test "x$LC_ALL" != "x" && LC_ALL_saved="$LC_ALL" LC_ALL=C export LC_ALL AC_FLRIG_SH_DQ([echo $ac_configure_args]) AC_DEFINE_UNQUOTED([BUILD_CONFIGURE_ARGS], [$ac_sh_dq], [Configure arguments]) # Allow BUILD_DATE, BUILD_USER, BUILD_HOST to be externally overridden by # environment variables. ac_sh_dq="\"$BUILD_DATE\"" test "x$BUILD_DATE" = "x" && AC_FLRIG_SH_DQ([date]) AC_DEFINE_UNQUOTED([BUILD_DATE], [$ac_sh_dq], [Build date]) ac_sh_dq="\"$BUILD_USER\"" test "x$BUILD_USER" = "x" && AC_FLRIG_SH_DQ([whoami]) AC_DEFINE_UNQUOTED([BUILD_USER], [$ac_sh_dq], [Build user]) ac_sh_dq="\"$BUILD_HOST\"" test "x$BUILD_HOST" = "x" && AC_FLRIG_SH_DQ([hostname]) AC_DEFINE_UNQUOTED([BUILD_HOST], [$ac_sh_dq], [Build host]) AC_FLRIG_SH_DQ([$CXX -v 2>&1 | tail -1]) AC_DEFINE_UNQUOTED([BUILD_COMPILER], [$ac_sh_dq], [Compiler]) AC_FLRIG_SH_DQ([echo $FLRIG_BUILD_CPPFLAGS $FLRIG_BUILD_CXXFLAGS]) AC_DEFINE_UNQUOTED([FLRIG_BUILD_CXXFLAGS], [$ac_sh_dq], [FLRIG compiler flags]) AC_FLRIG_SH_DQ([echo $FLRIG_BUILD_LDFLAGS $FLRIG_BUILD_LDADD]) AC_DEFINE_UNQUOTED([FLRIG_BUILD_LDFLAGS], [$ac_sh_dq], [FLRIG linker flags]) if test "x$LC_ALL_saved" != "x"; then LC_ALL="$LC_ALL_saved" export LC_ALL fi ]) flrig-1.3.24/m4/fltk.m40000644000175000017500000000511112562732137011355 00000000000000AC_DEFUN([AC_CHECK_FLTK], [ AC_ARG_VAR([FLTK_CONFIG], [Path to fltk-config utility]) AC_ARG_VAR([FLTK_CFLAGS], [C compiler flags for FLTK, overriding fltk-config]) AC_ARG_VAR([FLTK_LIBS], [linker flags for FLTK, overriding fltk-config]) if test "x$FLTK_CFLAGS" = "x" && test "x$FLTK_LIBS" = "x"; then if test "x$FLTK_CONFIG" = "x"; then AC_PATH_PROG([FLTK_CONFIG], [fltk-config], [no]) else AC_MSG_CHECKING([for fltk-config]) AC_MSG_RESULT([$FLTK_CONFIG]) fi if test "$FLTK_CONFIG" = "no"; then AC_MSG_ERROR([ *** The fltk-config script could not be found. Please install the development *** headers and libraries for FLTK 1.1.x, or set PATH to the directory that *** contains fltk-config. ]) fi HAVE_FLTK_API_VERSION=no FLTK_API_VERSION="`$FLTK_CONFIG --api-version`" if test $? -ne 0; then AC_MSG_ERROR([$FLTK_CONFIG failed]) fi if test "x$FLTK_API_VERSION" = "x1.1" || test "x$FLTK_API_VERSION" = "x1.3"; then HAVE_FLTK_API_VERSION=yes fi FLRIG_FLTK_API_MAJOR=${FLTK_API_VERSION%%.*} FLRIG_FLTK_API_MINOR=${FLTK_API_VERSION#*.}; FLRIG_FLTK_API_MINOR=${FLRIG_FLTK_API_MINOR%%.*} if test "${HAVE_FLTK_API_VERSION}" = "no"; then AC_MSG_ERROR([ *** The version of FLTK found on your system provides API version $FLTK_API_VERSION. *** To build $PACKAGE you need a FLTK version that provides API 1.1 or 1.3. ]) fi FLTK_CFLAGS=`$FLTK_CONFIG --cxxflags` if test "x$ac_cv_static" != "xyes"; then FLTK_LIBS=`$FLTK_CONFIG --ldflags --use-images` if test "x$target_mingw32" != "xyes"; then if test "x$target_darwin" != "xyes"; then if grep -q "lX11" <<< "$FLTK_LIBS"; then FLTK_LIBS="$FLTK_LIBS"; else FLTK_LIBS="$FLTK_LIBS -lm -lX11"; fi fi fi else FLTK_LIBS=`$FLTK_CONFIG --ldstaticflags --use-images` fi else AC_MSG_NOTICE([not checking for FLTK]) fi AC_SUBST([FLTK_CFLAGS]) AC_SUBST([FLTK_LIBS]) AC_DEFINE_UNQUOTED([FLTK_BUILD_VERSION], ["`$FLTK_CONFIG --version`"], [FLTK version]) AC_DEFINE_UNQUOTED([FLRIG_FLTK_API_MAJOR], [$FLRIG_FLTK_API_MAJOR], [FLTK API major version]) AC_DEFINE_UNQUOTED([FLRIG_FLTK_API_MINOR], [$FLRIG_FLTK_API_MINOR], [FLTK API minor version]) AC_ARG_VAR([FLUID], [Fast Light User-Interface Designer]) AC_CHECK_PROG([FLUID], [fluid], [fluid]) AM_CONDITIONAL([HAVE_FLUID], [test -n "$FLUID"]) ]) flrig-1.3.24/m4/opt.m40000644000175000017500000000163412562732137011225 00000000000000AC_DEFUN([AC_FL_OPT], [ AC_ARG_ENABLE([optimizations], AC_HELP_STRING([--enable-optimizations], [use x86 optimizations (none|sse|sse2|sse3|native) @<:@none@:>@]), [case "${enableval}" in none|sse|sse2|sse3|native) ac_cv_opt="${enableval}" ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-optimizations]) ;; esac], [ac_cv_opt=none]) OPT_CFLAGS="-O2 -ffast-math -finline-functions -fomit-frame-pointer" case "$ac_cv_opt" in sse) OPT_CFLAGS="$OPT_CFLAGS -msse -mfpmath=sse" ;; sse2) OPT_CFLAGS="$OPT_CFLAGS -msse2 -mfpmath=sse" ;; sse3) OPT_CFLAGS="$OPT_CFLAGS -msse3 -mfpmath=sse" ;; native) OPT_CFLAGS="$OPT_CFLAGS -march=native -mfpmath=sse" ;; none) ;; esac AC_SUBST([OPT_CFLAGS]) ]) flrig-1.3.24/m4/funcs.m40000644000175000017500000000076112562732137011541 00000000000000# args: function, search-libs, other-libraries AC_DEFUN([AC_FLRIG_SEARCH_LIBS], [ m4_define([FUNC_NAME_UC], m4_translit([$1], [a-z], [A-Z])) LIBS_search_libs_save="$LIBS" LIBS="" AC_SEARCH_LIBS($1, $2, [ac_cv_have_func_[]$1=1], [ac_cv_have_func_[]$1=0], $3) if test "x$LIBS" != "x"; then echo "$EXTRA_LIBS" | grep -q -e "$LIBS" || EXTRA_LIBS="$EXTRA_LIBS $LIBS" fi AC_DEFINE_UNQUOTED([HAVE_]FUNC_NAME_UC, $ac_cv_have_func_[]$1, [Define to 1 if we have $1]) LIBS="$LIBS_search_libs_save" ]) flrig-1.3.24/m4/macosx.m40000644000175000017500000000245212562732137011714 00000000000000AC_DEFUN([AC_FL_MACOSX], [ case "$target_os" in darwin*) target_darwin="yes" ;; *) target_darwin="no" ;; esac AC_ARG_ENABLE([mac-universal], AC_HELP_STRING([--enable-mac-universal], [build a universal binary on Mac OS X @<:@no@:>@]), [case "${enableval}" in yes|no) ac_cv_mac_universal="${enableval}" ;; *) AC_MSG_ERROR([bad value "${enableval}" for --enable-mac-universal]) ;; esac], [ac_cv_mac_universal=no]) if test "x$target_darwin" = "xyes" && test "x$ac_cv_mac_universal" = "xyes"; then mac_minversion="-mmacosx-version-min=10.4" case "$target_os" in darwin8*) mac_arches="-arch i386 -arch ppc" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.4u.sdk" ;; darwin9*) mac_arches="-arch i386 -arch ppc -arch x86_64 -arch ppc64" mac_sysroot="-isysroot /Developer/SDKs/MacOSX10.5.sdk" ;; *) mac_arches="" mac_sysroot="" ;; esac MAC_UNIVERSAL_CFLAGS="$mac_arches $mac_sysroot $mac_minversion" MAC_UNIVERSAL_LDFLAGS="$mac_arches" fi AC_SUBST([MAC_UNIVERSAL_CFLAGS]) AC_SUBST([MAC_UNIVERSAL_LDFLAGS]) AM_CONDITIONAL([DARWIN], [test "x$target_darwin" = "xyes"]) ]) flrig-1.3.24/m4/np-compat.m40000644000175000017500000000203612562732137012316 00000000000000AC_DEFUN([AC_FLRIG_NP_COMPAT], [ AC_REQUIRE([AC_FL_MACOSX]) AC_REQUIRE([AC_FL_WIN32]) AM_CONDITIONAL([COMPAT_REGEX], [test "x$ac_cv_header_regex_h" != "xyes"]) if test "x$target_mingw32" = "xyes"; then sem_libs="pthreadGC2" else sem_libs="pthread rt" fi other_libs="" if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS_saved="$CFLAGS" LDFLAGS_saved="$LDFLAGS" EXTRA_LIBS_saved="$EXTRA_LIBS" CFLAGS="$CFLAGS $PTW32_CFLAGS" LDFLAGS="$LDFLAGS $PTW32_LIBS" other_libs=-lws2_32 fi AC_FLRIG_SEARCH_LIBS([dlopen], [dl], [$other_libs]) AC_FLRIG_SEARCH_LIBS([clock_gettime], [rt], [$other_libs]) AC_FLRIG_SEARCH_LIBS([sem_unlink], [$sem_libs], [$other_libs]) AC_FLRIG_SEARCH_LIBS([sem_timedwait], [$sem_libs], [$other_libs]) if test "x$ac_cv_want_ptw32" = "xyes"; then CFLAGS="$CFLAGS_saved" LDFLAGS="$LDFLAGS_saved" EXTRA_LIBS="$EXTRA_LIBS_saved" fi AC_SUBST([EXTRA_LIBS]) AM_CONDITIONAL([COMPAT_STRCASESTR], [test "x$ac_cv_func_strcasestr" != "xyes"]) ]) flrig-1.3.24/m4/static.m40000644000175000017500000000062012562732137011704 00000000000000AC_DEFUN([AC_FL_STATIC], [ AC_ARG_ENABLE([static], AC_HELP_STRING([--enable-static], [enable static linking for some libraries]), [case "${enableval}" in yes|no) ac_cv_static="${enableval}" ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-static]) ;; esac], [ac_cv_static=no]) ]) flrig-1.3.24/m4/win32.m40000644000175000017500000000350512562732137011364 00000000000000AC_DEFUN([AC_FL_WIN32], [ case "$target_os" in *mingw*) target_win32="yes" target_mingw32="yes" ;; *cygwin*|*win32*|*w32*) target_win32="yes" ;; *) target_win32="no" ;; esac if test "x$target_win32" = "xyes"; then AC_CHECK_PROG([WINDRES], [${ac_tool_prefix}windres], [${ac_tool_prefix}windres]) if [ test "x$WINDRES" = "x" ]; then AC_MSG_WARN([The windres utility could not be found]) fi AC_DEFINE([__WOE32__], 1, [Define to 1 if we are building on mingw]) fi if test "x$target_mingw32" = "xyes"; then AC_CHECK_PROG([MAKENSIS], [makensis], [makensis]) fi AC_SUBST([WINDRES]) AM_CONDITIONAL([HAVE_WINDRES], [test "x$WINDRES" != "x"]) AC_SUBST([MAKENSIS]) AM_CONDITIONAL([HAVE_NSIS], [test "x$MAKENSIS" != "x"]) AM_CONDITIONAL([WIN32], [test "x$target_win32" = "xyes"]) AM_CONDITIONAL([MINGW32], [test "x$target_mingw32" = "xyes"]) AC_ARG_VAR([PTW32_CFLAGS], [C compiler flags for pthreads-w32]) AC_ARG_VAR([PTW32_LIBS], [linker flags for pthreads-w32]) AC_ARG_WITH([ptw32], AC_HELP_STRING([--with-ptw32@<:@=DIR@:>@], [search for pthreads-w32 in DIR/include and DIR/lib @<:@mingw32 only@:>@]), [ac_cv_want_ptw32="$withval"], [ac_cv_want_ptw32=no]) if test "x$ac_cv_want_ptw32" != "xno"; then if test "x$ac_cv_want_ptw32" != "xyes"; then # set -I and -L switches ptw32_default_cflags="-I${ac_cv_want_ptw32}/include" ptw32_default_libs="-L${ac_cv_want_ptw32}/lib" fi ptw32_default_libs="$ptw32_default_libs -lpthreadGC2 -lws2_32" # don't override the user-specified vars PTW32_CFLAGS="${PTW32_CFLAGS:-$ptw32_default_cflags}" PTW32_LIBS="${PTW32_LIBS:-$ptw32_default_libs}" ac_cv_want_ptw32="yes" fi AC_SUBST([PTW32_CFLAGS]) AC_SUBST([PTW32_LIBS]) ]) flrig-1.3.24/m4/debug.m40000644000175000017500000000706712562732137011517 00000000000000AC_DEFUN([AC_FL_RDYNAMIC], [ LDFLAGS_saved="$LDFLAGS" LDFLAGS="$LDFLAGS -rdynamic" AC_MSG_CHECKING([whether $CC supports -rdynamic]) AC_TRY_LINK([], [], [ac_cv_rdynamic=yes], [ac_cv_rdynamic=no]) AC_MSG_RESULT([$ac_cv_rdynamic]) AC_LANG_PUSH(C++) AC_MSG_CHECKING([whether $CXX supports -rdynamic]) AC_TRY_LINK([], [], [ac_cv_rdynamic=yes], [ac_cv_rdynamic=no]) AC_MSG_RESULT([$ac_cv_rdynamic]) AC_LANG_POP(C++) LDFLAGS="$LDFLAGS_saved" ]) AC_DEFUN([AC_FL_DEBUG], [ AC_REQUIRE([AC_FL_OPT]) AC_ARG_ENABLE([debug], AC_HELP_STRING([--enable-debug], [turn on debugging]), [case "${enableval}" in yes|no) ac_cv_debug="${enableval}" ;; *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;; esac], [ac_cv_debug=no]) AC_ARG_VAR([BFD_CFLAGS], [C compiler flags for libbfd]) AC_ARG_VAR([BFD_LIBS], [linker flags for libbfd]) AC_ARG_WITH([bfd], AC_HELP_STRING([--with-bfd@<:@=DIR@:>@], [search for libbfd in DIR/include and DIR/lib @<:@mingw32 only@:>@]), [ac_cv_want_bfd="$withval"], [ac_cv_want_bfd=yes]) if test "x$ac_cv_debug" = "xyes" && test "x$ac_cv_want_bfd" != "xno" && \ test "x$target_mingw32" = "xyes"; then if test "x$ac_cv_want_bfd" != "xyes"; then # set -I and -L switches bfd_default_cflags="-I${ac_cv_want_bfd}/include" bfd_default_libs="-L${ac_cv_want_bfd}/lib" fi # don't override the user-specified vars BFD_CFLAGS="${BFD_CFLAGS:-$bfd_default_cflags}" BFD_LIBS="${BFD_LIBS:-$bfd_default_libs}" ac_cv_want_bfd="yes" CPPFLAGS_saved="$CPPFLAGS" LDFLAGS_saved="$LDFLAGS" CPPFLAGS="$CPPFLAGS $BFD_CFLAGS" LDFLAGS="$LDFLAGS $BFD_LIBS" AC_CHECK_HEADER([bfd.h], [ac_cv_have_bfd="yes"], [ac_cv_have_bfd="no"]) if test "x$ac_cv_have_bfd" = "xyes"; then bfd_other_libs="-liberty -lpsapi -limagehlp" AC_CHECK_LIB([bfd], [bfd_set_format], [ac_cv_have_bfd="yes"], [ac_cv_have_bfd="no"], [$bfd_other_libs]) fi CPPFLAGS="$CPPFLAGS_saved" LDFLAGS="$LDFLAGS_saved" if test "x$ac_cv_have_bfd" = "xyes"; then BFD_LIBS="$BFD_LIBS -lbfd $bfd_other_libs" fi fi if test "x$ac_cv_debug" = "xyes"; then AC_MSG_CHECKING([for debug info flag]) if test "x$GXX" = "xyes"; then if test "x$target_mingw32" = "xyes"; then gflag="-gstabs" else gflag="-ggdb3" fi else gflag="-g" fi AC_MSG_RESULT([$gflag]) DEBUG_CFLAGS="-O0 -fno-inline-functions -fno-omit-frame-pointer $gflag -Wall" AC_FL_RDYNAMIC if test "x$ac_cv_rdynamic" = "xyes"; then RDYNAMIC=-rdynamic fi CXXFLAGS="" CFLAGS="$CXXFLAGS" AC_MSG_NOTICE([debugging enabled; overriding CXXFLAGS]) if test "x$target_darwin" = "xyes"; then ac_cv_compat_stack=yes AC_DEFINE([HAVE_DBG_STACK], 1, [Define to 1 if we have dbg::stack]) elif test "x$target_mingw32" = "xyes" && test "x$ac_cv_have_bfd" = "xyes"; then ac_cv_compat_stack=yes AC_DEFINE([HAVE_DBG_STACK], 1, [Define to 1 if we have dbg::stack]) else ac_cv_compat_stack=no AC_DEFINE([HAVE_DBG_STACK], 0, [Define to 0 if not using dbg::stack]) fi fi AM_CONDITIONAL([ENABLE_DEBUG], [test "x$ac_cv_debug" = "xyes"]) AC_SUBST([DEBUG_CFLAGS]) AC_SUBST([RDYNAMIC]) AM_CONDITIONAL([COMPAT_STACK], [test "x$ac_cv_compat_stack" = "xyes"]) ]) flrig-1.3.24/AUTHORS0000644000175000017500000000021512562731644010705 00000000000000AUTHOR: Dave Freese CALLSIGN: W1HKJ EMAIL: w1hkj@w1hkj.com Author can be contacted on the linuxham yahoo group EMAIL: linuxham@yahoo.com flrig-1.3.24/INSTALL0000644000175000017500000002500112562732137010664 00000000000000Installation Instructions for flrig ************************************ To compile flrig you will need: * A recent C++ compiler. The GNU C++ compilers in the 4.x series are known to work. * Version 1.1.x of the Fast Light Tool Kit (FLTK), with its development library and headers. Versions 1.1.7 to 1.1.9 are known to work. FLTK's multi-threading support is recommended but not required. Once you have installed the required packages, the following commands should be sufficient to compile flrig and install it under /usr/local: ./configure make make install (you may need superuser privileges for installation) The `install' target installs the executable, an icon, and a .desktop file. After installation, an flrig launcher should appear somewhere in your applications menu. Create the desktop launcher. flrig is designed as a desktop application that accepts target files to be wrapped or unwrapped by dropping the file onto the desktop launcher. Windows installation notes ************************** flrig supports win32 systems as a cross compiled application using the MinGW win32 environment. To build an internationalized version of flrig, install these additional packages: gettext gettext-devel libiconv libiconv2 ========== Generic installation instructions follow ========== Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf bug. Until the bug is fixed you can use this workaround: CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. flrig-1.3.24/data/0000755000175000017500000000000012650266613010625 500000000000000flrig-1.3.24/data/flrig.desktop0000644000175000017500000000027112562732142013240 00000000000000[Desktop Entry] Name=Flrig GenericName=Amateur Radio Rig Control Comment=Amateur Radio Communications Exec=flrig Icon=flrig Terminal=false Type=Application Categories=Network;HamRadio; flrig-1.3.24/data/win32/0000755000175000017500000000000012650266613011567 500000000000000flrig-1.3.24/data/win32/fl_app.nsi0000644000175000017500000001334712562732142013470 00000000000000# -*- conf -*- # NSIS installer script based on example2.nsi from the nsis-2.44 distribution. # Copyright (c) 2009 Stelios Bounanos, M0GLD. # Copyright (c) 2009 Dave Freese, W1HKJ # substitute your application name for instances of FLRIG # Variables !define FLRIG_DESCRIPTION "${FLRIG_NAME} ${FLRIG_VERSION}" !define FLRIG_STRING "${FLRIG_NAME}-${FLRIG_VERSION}" !define PRODUCT_BINARY "${FLRIG_BINARY}" !define PRODUCT_NAME "${FLRIG_NAME}" !define PRODUCT_VERSION "${FLRIG_VERSION}" !define PRODUCT_STRING "${FLRIG_STRING}" !define PRODUCT_DESCRIPTION "${FLRIG_DESCRIPTION}" # Compression options SetCompressor /SOLID lzma # This function is called before displaying the first installer page. # It aborts the installation if the Windows version is too old. !include WinVer.nsh Function .onInit ${IfNot} ${AtLeastWin2000} MessageBox MB_ICONSTOP "Sorry, your Windows version is too old.$\n${PRODUCT_NAME} requires Windows 2000 or later." Abort ${EndIf} FunctionEnd # The name of the installer Name "${PRODUCT_DESCRIPTION}" # The file to write OutFile ${INSTALLER_FILE} # The default installation directory InstallDir $PROGRAMFILES\${PRODUCT_STRING} # Registry key to check for directory (so if you install again, it will # overwrite the old one automatically) !define INSTALL_DIR_REG_KEY SOFTWARE\${PRODUCT_STRING} InstallDirRegKey HKLM "${INSTALL_DIR_REG_KEY}" "Install_Dir" # Request application privileges for Windows Vista RequestExecutionLevel admin # License LicenseText "${PRODUCT_NAME} is distributed under the GNU GPL as detailed \ below. You must abide by the terms of this license if you modify or \ redistribute the program." "Continue" LicenseData "${LICENSE_FILE}" SubCaption 0 ": License Information" # Other options BrandingText " " InstProgressFlags smooth VIAddVersionKey ProductName "${PRODUCT_NAME}" VIAddVersionKey ProductVersion "${PRODUCT_VERSION}" VIAddVersionKey FileVersion "${PRODUCT_VERSION}" VIAddVersionKey FileDescription "${FLRIG_DESCRIPTION} installer" VIAddVersionKey LegalCopyright "${PRODUCT_NAME} developers" VIAddVersionKey OriginalFilename "${INSTALLER_FILE}" VIProductVersion "3.0.0.0" WindowIcon off XPStyle on # Installer pages Page license Page components Page directory Page instfiles UninstPage uninstConfirm UninstPage instfiles # Registry uninstall path !define REG_UNINSTALL_PATH Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_STRING} # This is a hidden section and is always selected. It writes the uninstall # registry keys and uninstaller binary. Section -install # Set output path to the installation directory. SetOutPath $INSTDIR # Write the installation paths into the registry WriteRegStr HKLM "${INSTALL_DIR_REG_KEY}" "Install_Dir" "$INSTDIR" # Write the uninstall keys for Windows WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayName" "${PRODUCT_DESCRIPTION}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "DisplayIcon" '"$INSTDIR\${PRODUCT_BINARY}"' WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "HelpLink" "${SUPPORT_URL}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "Publisher" "FLRIG developers" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "URLUpdateInfo" "${UPDATES_URL}" WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegStr HKLM "${REG_UNINSTALL_PATH}" "QuietUninstallString" '"$INSTDIR\uninstall.exe" /S' WriteRegDWORD HKLM "${REG_UNINSTALL_PATH}" "NoModify" 1 WriteRegDWORD HKLM "${REG_UNINSTALL_PATH}" "NoRepair" 1 WriteUninstaller "uninstall.exe" SectionEnd #Var WANT_FLRIG Section "FLRIG" SectionIn RO SetOutPath $INSTDIR File "${FLRIG_BINARY}" SectionEnd # Start Menu path !define SM_PATH_BASE $SMPROGRAMS\${PRODUCT_NAME} !define SM_PATH ${SM_PATH_BASE}\${PRODUCT_STRING} # The following sections are optional Section "Start Menu Shortcuts" CreateDirectory "${SM_PATH}" CreateShortCut "${SM_PATH}\${FLRIG_NAME}.lnk" "$INSTDIR\${FLRIG_BINARY}" "" "$INSTDIR\${FLRIG_BINARY}" 0 # CreateShortCut "${SM_PATH}\${FLRIG_NAME} Beginners' Guide.lnk" "${GUIDE_URL}" # CreateShortCut "${SM_PATH}\${FLRIG_NAME} Documentation.lnk" "${FLRIG_DOCS_URL}" CreateShortCut "${SM_PATH}\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 SectionEnd Section "Desktop Shortcuts" CreateShortCut "$DESKTOP\${FLRIG_DESCRIPTION}.lnk" "$INSTDIR\${FLRIG_BINARY}" "" \ "$INSTDIR\${FLRIG_BINARY}" 0 SectionEnd # This is unselected by default Section /o "Quick Launch Shortcuts" CreateShortCut "$QUICKLAUNCH\${FLRIG_DESCRIPTION}}.lnk" "$INSTDIR\${FLRIG_BINARY}" "" \ "$INSTDIR\${FLRIG_BINARY}" 0 SectionEnd # Uninstaller Section "Uninstall" # Remove registry keys DeleteRegKey HKLM "${REG_UNINSTALL_PATH}" DeleteRegKey HKLM "${INSTALL_DIR_REG_KEY}" # Remove files and uninstaller Delete /REBOOTOK $INSTDIR\${FLRIG_BINARY} Delete /REBOOTOK $INSTDIR\uninstall.exe # Remove shortcuts, if any Delete "${SM_PATH}\*.*" Delete "$DESKTOP\${FLRIG_DESCRIPTION}.lnk" Delete "$QUICKLAUNCH\${FLRIG_DESCRIPTION}.lnk" # Remove directories used RMDir "${SM_PATH}" RMDir "${SM_PATH_BASE}" RMDir "$INSTDIR" SectionEnd # Offer to reboot the machine if the reboot flag is nonzero. This flag is set by # commands that specify the /REBOOTOK switch if the BINARY_* files were in use # during uninstallation. Stupid Windows. Function un.onGUIEnd IfRebootFlag 0 noreboot MessageBox MB_YESNO|MB_ICONQUESTION \ "A reboot is required to finish removing ${PRODUCT_NAME}. Do you wish to reboot now?" IDNO noreboot Reboot noreboot: FunctionEnd # Tell the user if we could not reboot for some reason. Function un.onRebootFailed MessageBox MB_OK|MB_ICONSTOP "Reboot failed. Please reboot manually." /SD IDOK FunctionEnd flrig-1.3.24/data/win32/flrig.ico0000644000175000017500000003056612562732142013315 00000000000000@?`1(@~    !-- '(-.+,"""333444999======:::666333''' //6ad!54000--->>0XX%%0ij?ln>ik-II nnnJJJIII222===???eeeLLLqqqfffcccsssMMMddd>>>???444@@@MMMFFFIII AAAFFF===>>>FFFHLK fff___CCC,,,AAAEEEuuuVVV@@@111)))&&&'''***333DDD[[[wwwFFFAAA222AAA <<<:::111222222111]]]///\\\EEEKKK<<>>ooommm ---FFFLLL###""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""%%%^^^@@@555*@A/MN/VW(QQ\\\&&&AAA555111222888\\\%%%^^^ EEEppp%%%""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""+++vvvDDD""" //-.VVV,,,@@@KKKIII777///^^^ 333FFF<<<$$$""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""###JJJFFF888 EEEMMMNONPPPNNN::: ???ppp!!!!!!"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""'''vvvDDDTTTNNNYYY\\\$b/$b0 " 6%6$%%%:::HHH%%%""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""###[[[444...aaa~~~rrr-nC.nD%9&:$  333iii000!!!""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""###:::ggg888<<<:::<<<999///;;;KJJ++* ,,,IIIBAB,,,:::PPP###"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""",,,XXX=== 111KKK444\\\ ]]]MMMPPP888 999lll""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""$$$ttt::: :::ddd"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" rrr;;;**$AB*MN&GH =>999bbb""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""!!!ooo===--'@@3RS$AA1PQ:::ppp""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""%%%www===  &&,,  444OOO%%%"""""""""""""""""""""""""""""""""!!!######!!!"""""""""""""""""""""""""""""""""///WWW;;;;;;======;;;>wx0mn$99###888666 !!&MM*TU))-@@7UU,>?,,,iii222"""""""""""""""""""""""""""!!!777aaafffXXXFFF111!!!""""""""""""""""""""""""###===hhh222==={{{~~~qqq  CCCBBB:::;;;CCDQ[[ CCCLLL$$$"""""""""""""""""""""!!!HHHxxxgggUUUAAA222444""""""""""""""""""""""""###^^^<<<###@@@ddd\\\OOO>>>888222222222111VVVDDD >>>sss$$$"""""""""""""""""""""***yyygggUUUBBB---""",,,""""""""""""""""""!!!,,,xxxDDD """'''111222222222222///)))MMMCCC###""""""""""""""""""XXXyyygggUUUBBB---111""""""""""""""""""$$$QQQLLL111,,,$$$???222222222222222222bbb  BBBsss***""""""""""""""""""kkkyyygggUUUBBB---+++""""""""""""""""""333xxxDDD    (((&&&222222222222222000!!!MMMSSS&&&"""""""""""""""```yyygggUUUBBB---///"""""""""""""""***dddFFF+++..2kl!@A>>333&&&>>>???kkkVVVvvvnnnlllwwwVVViii???>>>***###000CCC6556@J3CQ4AJ;;;kkk000888GGG&&&LKKSSSIIIoooPPPccc@@@<<<,,,>>>:::(((111888999888888222*** )))999KKK    ---!!!777 "!! $$$+++111333 ! ---,,, 999999999888888888999999888888888998999899999889888999888888888888888999::::::;;;:::;;;;;;:::;;;;;;;;;<<<<<<=========?????????@@@@@@AAABBBBBBBBBCCCDDDEEEEEEEEEDDDAAA===999777666777888888;::99:"""""""""""""""######"""""""""""""""############"""""""""#########"""!!!###""""""######"""""""""""""""""""""""""""###:::999%%%'''((()))***+++,,,---//////000111222...'''444444444444444444444444444444444444444444444444444444544544444444444&&&555444444444444444444444444444444444444444444555555444444444666666777788888999999:::::::::;;;;;;'''433000,,,---//.'''#""#""#""#""#""#""#""#""#""#""#""#""#""#"!$""#"!#""#""$""#""#""#""#""#""$""#""#""#""#""#""#""#""#""#""#""#""$""$""#""#""#""$""#""$""$""*'')((,)),+*-,+.-,0..1//200210321.-,'%%Aw@w?w?x=x=x=xwJGKIFB?;951.)7<0! " "  Emheda\NMIEB?<;400845$"    +${w X][YVR?~]NIFB?A/z1/-21s+yh$ !',""!p,#/}*w (DY%C[`Z][YUNUOJHEA><:63192-! v$'0z ('|(~ RSUW[^[XVRPNHKOGE?;61.+'�) z opu {  UPR^`[]\]ZVPOMYGND<9620,):?,)   :a}OQ@x?rYZ^E;fPSPOKIFB>;=9{/hI34'!!q0#u '@;r?z4 / _]V`_Uace`YFRPNKIEB?><922.)$ ' $w'z#s& !~ BiwGnBi{Hm~GkImJm~GyOPOTVRPNKOFB>wHKI8nSSK;f_][YZ!:R^-ToCB"7DIG:5*Ym;/*ap(&n|'e}!j,9ADKDXTQUX[]\HVETOHJI&`!Le"E[5;BWMd Ma(-=OOdOc!idzSd Pe VjRdIY|PaRd +/37:>@DKGMPQUXZ][YVRPNJJOMJ<9@=:,'+,(    =y>y?y@yAxBxCxDxExExFxGwGwHwIwJwJvKvJvJvHwHwHwGwGxFxExDxCxByBx@y@y>y>z>>(((""""""WWW999'''MMM222""""""888;;;...;;; +++!!!;;;,,,...222(((BBBFFF'''777///666###<<<---999666""""""""""""""""""""""""###555++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++,,,+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++***$$$$$$$$$%%%%%%%%%&&&&&&&&&&&&&&&&&&&&&'''''''''''''''''''''&&&&&&&&&&&&&&&%%%%%%%%%%%%%%%%%%$$$$$$$$$$$$$$$$$$$$$$$$#################################$$$$$$$$$$$$%%%%%%&&&&&&&&&''''''&&&'''(((flrig-1.3.24/data/mac/0000755000175000017500000000000012650266613011365 500000000000000flrig-1.3.24/data/mac/flrig.icns0000644000175000017500000015263212562732142013274 00000000000000icns՚it32##$ %$#"$$%%&&%&&%&'&%&%$%$##$$%$#$$##$$##"##"!"#$#$$%%&'&'(('&%&&%&''&''&'(('&'&&%&&%&%$%&'(('(0/+)*)&&()**)**((**(()*)(())(()* )'&()*)''()*)( ))((*+))*)(()()'())''))())(())()*74+')?,34/,-,))+,-+()./+*--+)(()**+..,,..+*))(+12.+*,11-+*))*-..-++,,*)(*--+*++,+)*0/*)..+*,-,+**,-,+*)a((<6$"$"0LO:02.%$-22, $8:+)45,%!!&((-890/66,'$"!,EI8-'.AD5+%""'2774,,1/&"$$!&35+'*,-*#)<;%$69,(/2/ ,&(14/.121-&#$pKE7+"3fj>/=9$%'*FM>1%%3<@?6;LE%!79&&:A;635;=;:<2%MQ/(<>/1C?%&CF/.AIF;' !q"dbcP)6;)ML'+Y^:3IK8(2kvS>5>ZZ>@`Y+(NP/ 4lz]* ?LI=(%0=JNIY~n)%bh6*ARZVFFVdp_1.ru6*QR,3gc''be/,\qkT. !q mlr\+2wx5&JK)-WZ71GH5%.dqS@7@ZY=)!&+-,3D>!49,'+-../02231.% BF*$31/.:=(%5==3 -khfX<15@;14EF837=:87536>>636>A@>=CPL7/243589,;@?868;>><956=>;727EE65CF=;><523326?B><=>?<634 589yyxunklmopnmnnoonnomjkpplklnoon mmllkklnnlklnoptsmklmnmnoom&noomllmnonmklqqmlpqononmlkllnopoonnonmlmlkkllmnn$0 ݀݀ ݀ պK쪅|wtؐpvywluzy~vtՕvxwtţtt ͬM椢ᮧ몆pYilQpxjod>izslf]qyvӔvykIiۙvrqtȴLpp曋锂ʌʳyݹ_Ṭf|_T]drfһZ\wrf★}˥fkn|NJ˃ eb`Z$Ѷ̰Ȱ9bdkϰY^غ}xxɡ{~O@`bbQ$ߤzзڮ⽟8qtJ]غyϷuw{۶pW;nqjޞrwމ״wCc󷑁~繓socqë𳒍}}ߎģv»pۄܰC`jdoķѵǭvg݋ҮRm׸ocdIUsa嚄Ԁvʯßvff[cʨ]^҃IYTdZ{tpЦwЍwܽ|Z\`jͭfky|rpv|zr{qt؃qr]bUxpr{yB^~ac`^|ֿtqxhlڸxbȹ[_lnedinturmemݞ-梌y{zu|v|qX|wmwwlvвtozٖЪtqwײmovvqpsvyzyvqw8ĺлֺ˻Ʒڇ+#}y!ҸדҺξ θξ ¡ ܧx㯒仞 㱒楖 | 縦 3̰廢캴鮣ɥ ̳ 3dz ļ Ѽջ ζ/Ű̱ н5Ǯ̿欓ժ굛ͺ9Ȱ}ט߸޵뷘y|w=ҙԥȬ׭ǜٽ·:=4eχ6ݥᰨ৩ö}Dǽ5ڼùğѹ̝w / 鳡̿5õֱɲѷӸĿվ%n5뷱⭲𭛺Ӽ۠ל墡,16O{ǽ+诨鬧؟˼֢詩塠˭¸'ìѻ 켼Ӷ ĸȲǭѻ    臬noonmmnonoonononoon ooppqrssttuvwxxyxwurpmkigfhijk32234347899::;;<<==>?@ABA@=951.+'#"$%(*-."##$$%%&&''())**+,*%"! /.//../,$$-0/./0112234567794)&-/-*'&%%'&#12.&&/2100101026775211234556782'$+-+)'')*+*'#$%$%$%$# !$%$%$ ##)5::4*%'(()*++,,--./01220.+& %&''&&%&%&'&'&%&&'&'& ,8==7-)+,,--../00123 4455652/,(%" #$%%445544565565456565578789;?AA?<;<=>>?@@ABBCB?=;864321012344567"645981..//013431001345578875432101101455688656556767889:;<<=> =<<=<86641/012!.+"%61 " "'(+/12.'!  #"%-,#!!"!!"!!  !""#$ #"%.-$!%""/0027.$+$#07:89>9,#  "--# *-'#    "//3<7$%:GN?7PccRO\XD::. $-7:7+  "'*,- ,+*(#   *2:B;%  "3KP@ 3J]^LIVR>57-  (2=A@2 " "199=EIHGFFHF>::3$  "-4?ME( $ '/0)&)&'-) '2>A=. " #,10=X_RVhojgfhoiVR]V=00-%   )0:HB( )%18=>>;9  &--&    H!(35/$  (7IOIPdgWWhmgcbemiXWfdPIOJ:,  !'.73$ )/AOZaaZW   ;HF8  '" H .8?OjpcZWPFBCA><;>BDCHSZ^eqjQA9/$  0F\owq4BIB,&($## "   !2JTQXik\OD;5/*()"**,28>HS`mk[SUL7&    2I^rzt5BDDBBCEF@2#  1 -9Njo^QG>5.+'#!!(+,)$"#%(,18ALVcrkM:1$   5HUamnc^ .2*%"""6J\c`ZSLE?9/# "#&+4BQ`fcWA+   8MZdjjfc(DJ8037=@?:008BOE%   !9Qfj\K5'! 8"&6Rgvyqh^VNF=4*$! "*:ScjeS>%    0AKRVVTS >D0-:?:765 >NL62?6   ):GR]V>.&"!:'A\v}vmd[QH>3051$ ! !#(2D]dXK=+    $&'(('' ,RS/':@:520026ASO59ZQ   @QRQMA+ ! 2^{tkbYOE:/,21'""!! "0IWYXSA$      )=RTC9754221 28EKKZxe!   7WcZK7)#!"$B{}skbYPE;1("#+,$!%-=VcdX=%   !(1/"  (8FIA:301028IftqT ?  .F`dR>) !!""!%2T|skbYPF<2&,0% !""!! ,G[icJ2   )8@A?;9 ,0++021 /,IF  #;NZS9)# !"" +Gh|tkbYPF<2%*/%!!""! $-AaeL8)   #;]bIIbm !&(+02 .(H/ !   4OXP@) !!" .Tu}tkbYPF=2%(-%!!"!! 0P]WK:(   6VX==Zg  #(#(6:412 /+E~v-ML  -JjfA*# !" /Yy}tkbYPF=2%&+$!!"! &4KjkM1  !""% #(#(7;411221122/*Ex-LK  8Rja5 !!" /Wx}tkbYPF<2%'+$!!"! !%=iqT9    &),/11221122.%G1  *@NRG, !" -No}tkbYPF=2%*/%!!"!1S]O@0!    !(-021 0/L~, %:QSA2& !" )?`}tkbYPF<2&+/% !"! )>MVQ@, 3=84101 0.5FT^L   ,Iid8"!"! #(J}tkbYPF<1' +,$!!"! #+BhmP2     .;<;753 2>UU<&   1Nkb2 !!"!! 8q~tkbYPF<2+'')(#!!"! 29jrR4  '*,*)''  '=FC>:78:>J\O#   4HVM.!" +JiukbYOE<302/&""!!"!!! 2\cG1"  /APTOJDB%$#1=;512.$ !"!!"" -LVK=-#  5Ngqle]YigcU='  '/8<;5*1KVPA+&2>II?.   4Z_C/% !"!#-?Rdmlh_VLB7.'#"!!"! );M^X:(! 1Npzqnqom^C*  !+0/( 6EMD,'5AKKA0  '<^^;'"!!"!!""! '5JVXVPJB:1)"!"! &0Da`A-" 1Jguurkh;;>9*  !&'&$   +;OL1#"!!"!!""! !"&+.00.,)'%$!"!$+;SVB1$  4DKNNMJI    !.>RL- !!" !!""!! !!""!!"!!"&7UZE3$  )1.- ,,   !0Fe]."!!""! !""!!"! 7elK3#    !0Ikb."!!"!"!!"!! 6jrM2#  "0EbZ-"!!"!"!!" 2dlK3" !*18BA76@D     #1D^V-"1bkK2! '5@KVVJHPS     $1E_W-"1dlJ1  %4@KSTNJGF    $1FcZ-"2fnJ0  )3:?@>:42 #1=<-2LDCRE@D@6(   %0Gh_-"!! 4hpJ0!  *;HI=AVJI\TQSNA.  $1FbZ-""!!"!5ciH1#   )66*  0ARL/!"! #)9SXE4"#:GJ># $'*% ,Ba^9%! !"! %-A`bF0)0-+--,+7DC6 " '1#  !3Jf_4 !!"!"&H52?HMOOJA7.6ND  .?MK:-%!"! '8EONC4  !&$#$$,IM5/8?DFE@845?TM*  '4?GKB+ !"!.MVH>7,  #DK60:<86 5>QN32IA  )61/ 03?UQ49bY    !5Mha:%" !"! $-CfiN7%   3;97  (;PQ@76421 6@KVdu^  +;LPH:& "!! +IUOH?2 1@BHQSON  %4@D>9201121 2Hq}jI  !.;HTM4%" !"! "(;\_G82( 0?EILLIG )/--02112 11/+HA $5I_`J7% "!! )AUebK8'  !#%%$$  &)-022112 /(G- "%  +@Z`RB1&" !"! #)7N\aYD0    %*%(48312 /+Fx.IH   -EOKGD9& !"!! *ANPE0   &+$'48311221122/*F|/FE  2>ELSL5(#!"!!"!%,* !"!!"!  #1IY`]PA0"  )/221 001Ny)  %//*   2EX^WMA6.'#!$(0;GW^^UE4#  !""   2=951/011/-7NVP<  CPB=B5 -@JMVgcK7(  !  "+=QhjVLLC0" 0?FE>;=>  ,9=<7543?YS- '  !RcSLQ@ +7?PklTD>71,'%$#"!"$%')-2:BJZokN=:0 ?8O`d][^`   $;FFB=;;>BISC   "TiaXM8 )$.;KOGNdgUG;3.)$! !!"%*06?KYifQIPL>2'/4Qq}~ .;>><;;<=AI@&!""!: #YndYM8   )18 '&2=ILFL]]LM`f^ZX]gbNM^]LGNK?3' 8LY]YX[\2;VW<&  $)'!*/=9$%'*FM>1%%3<@?6;LE%!79&&:A;635;=;:<2%MQ/(<>/1C?%&CF/.AIF;' !q"dbcP)6;)ML'+Y^:3IK8(2kvS>5>ZZ>@`Y+(NP/ 4lz]* ?MJ=(%0=JNIY~n)%bh6*BRZVFFVdp_1.ru6*QR,3gc''be/,\qkT. !q mmr]+3wx6&JK*.W[71GI5%.eqS@7@[Z==XP%#IL+0byv[*LVTEESan]-,or5)ON&-a^$%`b-*YmhR,N hffQ'*IJ-&46,,89.(&)3/ 6>:4,.98+)2-34"$;FD:')>?*#(,.-4E?"6:-(-/ 0134420& CG+%420/ =4!ifeV:/3:CD<:=?.=<=9.2CD6149?@;9;;865303;;401104;?>=:@MI5,02125769==6469<<:734:<9504CC43AD;9<;401 5>@<:;<=;412367pookdacdfedcded c`aefbaabddcbbaa``acca`acd cehgb`bbaabcdeedccdedccdeedbcghddghffggedccdeggfggfdedefg À Ľ€ 0²Ƽƺ Ľχ΁́΂bd^YWinU[]]jƵqS\`_ftsg_]mɭy`ba^yk^_k̆ʁɁg{{d_TDQ}S=U\TZnĮO0R`\XTtiM_d^lǫw_cW=Wb^]^jʁȀˁʀȽOUXwloenf_b}mMCTeJCOVaWɁ΁sȿDHm]WQŭylern~TVšZf;:ݲTTRMɃzĸĽĶysFKeSzGKÿebdntqdiɵfv¯=3׬MQRÈͶvyui}ɳxlj|sixxcrRVxbus;I~bjzaejfzxðuĶZG}ԭX]lX˶ptpcyɍumjqwsw~yn}¦hipgo^4Mpfcimov\XkhQ\ówsniioӶuwˡwrvpaxͺū~yutuy{{zw{æffûv~g2IpSdpwrhk|rOZéȵypeWqԷtttCWͰ½ ȈhĠMMĽ5>\Nį{me`x’|drذVTžƠMRʧ~|}zzlœHHýӧB>RKƬsf][qevufvĿiy֫LLǿSYʩʂ\^caXXaeeddbaguZWX¼˩YIx{QJfqn}ît[ajud6KjTUnnSRj~qeagΨY[˱tshTm˶ɂȀSUZXOOW[[ZZYW]kŻ΀ȼĴΰrpʀɃȀqswxvuwvssuwxz}NĿźƺüƾѯgeɁ Ʉ&ĿĀíŀʀ}yɁ"ƼƂɁ̾xpqplq}ʂɃȀarsnxjp'tgu÷˵{|ƁɁȂ̿xpmpw˂ɀ žǀȀo~}zsy.}sŷʷʀɁ&~{~ȯȀGù¶΀1ƹȀ ½WúĿȼƽǀ Ȁ ¾ ù>ʽ{|yƵȾǼȀ ýƀ7ʾ}kpvŧĿ{ɀȀ[\Xq1½Ł5̷s~ųŘʿɃȀ-/'K0Á7yȚ̻DZ{roʃȀ3ôO{|q{Ý{ì{pj˃Ȁ#p[òzs{›w}ͽǰȁɀX\̻ͺēϸ̸зǿȁ"'??@@>;73/+(%! !#%')*     #$$%%&'(()**++,,--.,'$# /0,%%-1/././0122344567894)'-/-*(&%&('#12.&&/2100101026775211234556782'$+-+)'')*,+'#$%$%$%$# !$%$%$ ##)5::4*%'(()*++,,--./01220.+& %&''&&%&%&'&%&&'&'& ,8==7-)+,,--../00123 4455652/,(%"!#$%%445544565565456565578789;?AA?<;<=>>?@@ABBC8B?=;864321012344567767645981..//013431001355678875321001101455688656556767889:;<<=> =<<=<86641/012"1.+"%61 " "'(+/12.&!  #"%-,#!!"!!"!!  !""#$ #"%.-$!%""/0027.#*$#07:79>9+#  "--# *-'#   "//3<7$$8EL=7PccQN[WC::. $-7:7+  "'*,- ,+*(#   *2:B;%  "3::3$  "-4?ME( # 6BC7(.037/ '2>A=. " #,10=X_RVhojgfhoiVR]V=00-%   )0:HB( &/35"44  !EVUE$  )00% H!(35/$  (7IOIPdgWWhmgcbemiXWfdPIOJ:,  !'.73$ )0>EJMMJI  1om2  *9BE6 H .8?OjpcZWPFBCA><;>BDCHSZ^eqjQA9/$  2BLV_`YU,ap>",7>@=/ "   !2JTQXik\OD;5/*()"**,28>HS`mk[SUL7&    4ENWabZV+CLHEBBCEHD8* 1 -9Njo^QG>5.+'#!!(+,)$"#%(,18ALVcrkM:1$   6EIOTTMJ '6ENQRSQLB3' ?   7FO[jhTB1&!$)05:;:5-(%" #)5FYlm[OJ;"   8GJMPOKH 8B2.7?FJIC81/6F;  5 (@YebZK>2*%"""6J\c`ZSLE?9/# "#&+4BQ`fcWA+   9JOSUTQP(DI8137=@?:008BOE%   !9Qfj\K5'! 8"&6Rgvyqh^VNF=4*$! "*:ScjeS>%    0>CEFEED >D0-:?:765 >NL62?6   ):GR]V>.&"!:'A\v}vmd[QH>3051$ ! !#(2D]dXK=+    #$$#$$% ,RS0':@:520026ASO59ZQ   @QRQMA+ ! 2^{tkbYOE:/,21'""!! "0IWYXSA$      )=RTC9754221 28EKKZxe!   7WcZK7)#!"$B{}skbYPE;1("#+,$!%-=VcdX=%   !(20"  (8FIA:301028IftqT ?  .F`dR>) !!""!%2T|skbYPF<2&,0% !""!! ,G[icJ2   (7?@>:7 ,0++021 /,IF  #;NZS9)# !"" +Gh|tkbYPF<2%*/%!!""! $-AaeL8)   #;\aHHal !&(+02 .(H/ !   4OXP@) !!" .Tu}tkbYPF=2%(-%!!"!! 0P]WK:(   5UW<MVQ@, 3=84101 0.5FT^L   ,Iid8"!"! #(J}tkbYPF<1' +,$!!"! #+BhmP2     .;<;753 2=UU<'   1Nkb2 !!"!! 8q~tkbYPF<2+'')(#!!"! 29jrR4  '*,*)''  '=FC>:78:>I[O#   4HVM.!" +JiukbYOE<302/&""!!"!!! 2\cG1"  /APTOJDB$$#1=;EXO) #ANI=* !"!$1Il{wrld[QG>512.$ !"!!"" -LVK=-#  5Ngqle]YhfbU=(  '/8<;5)1LVOA+&2>II>-   4Z_C/% !"!#-?Rdmlh_VLB7.'#"!!"! );M^X:(! 1Npzqnpnl]B*  !+0/( 6ELC+'5AKKA/  '<^^;'"!!"!!""! '5JVXVPJB:1)"!"! &0Da`A-" 1Jguurkh;;>8)   &#   +;OL1#"!!"!!""! !"&+.00.,)'%$!"!$+;SVB1$  4DKNNMJI!   !.>RL- !!" !!""!! !!""!!"!!"&7UZE3$  )1.- ,,   !0Fe]."!!""! !""!!"! 7elK3#    !0Ikb."!!"!"!!"!! 6jrM2#  "0EbZ-"!!"!"!!" 2dlK3" !*18AA76?C     #1D^V-"1bkK2! '5@JUUJHOR     $1E_W-"1dlJ1  %3@JRSMIFE    $1FcZ-"2fnJ0  )3:>?=941 #1=<-2LDCRE@D@6(   %0Gh_-"!! 4hpJ0!  *;HH<@VJI\TQSMA.  $1FbZ-""!!"!5ciH1#   *6:>CB=. -?IMIB7) !2BSK+ ""!!" !!"$5TZF4$  "1>JTK0 /@FB9+  0ARL/!"! #)9SXE4",UknZ/ +8>>3 ,Ba^9%! !"! %-A`bF0)0-+--,+)_yw]- (3:<0 'HMPOJA7.5ND  .?MK:-%!"! '8EONC4   &$%%,IM5/8?DFE@845?TM*  '4?GKB+ !"!.MVH>7,  #DK60:<86 5>QN32IA  )61/ 03?UQ49bY    !5Mha:%" !"! $-CfiN7%   3;86  (;PQ@76421 6@KVdu^  +;LPH:& "!! +IUOH?2 1?AGPSOM  %4@D>9201121 2Hq}jI  !.;HTM4%" !"! "(;\_G82(  />DHKKHG )/--02112 11/+HA $5I_`J7% "!! )AUebK8'   #$%$$  &)-022112 /(G- "%  +@Z`RB1&" !"! #)7N\aYD0    %*%(48312 /+Fx.IH   -EOKGD9& !"!! *ANPE0   &+$'48311221122/*F|/FE  2>ELSL5(#!"!!"!%,* !"!!"!  #1IY`]PA0"  )/221 001My)  %//*   2EX^WMA6.'#!$(0;GW^^UE4#  !""   2=951/011/-7NVP<  CPB=B5 -@JMVgcK7(  !  "+=QhjVLLC0" 0?FE>;=>  ,9=<7543?YS- '  !RcSLQ@ +7?PklTD>71,'%$#"!"$%')-2:BJZokN=:0 '8O`d][^`   $;FFB=;;>BISD   "TiaXM8 )$.;KOGNdgUG;3.)$! !!"%*06?KYifQIPL>2'(4Qq}~ .;>><;;<=AJA'! : #YndYM8   )18 '&2=ILFL]]LM`f^ZX]gbNM^]LGNK?3' 8LY]YX[\2:TT=' - $)'!*>=8."  !  %.<@<=EIHIJG?=@<1(! '#   "  &*,--/1221/..-+'"                              ##$ %$#"$$%%&&%&&%&'&%&%$%$##$$%$#$$##$$##"##"!"#$#$$%%&'&'(('&%&&%&''&''&'(('&'&&%&&%&%$%&'(('(0/+)*)&&()**)**((**(()*)(())(()* )'&()*)''()*)( ))((*+))*)(()()'())''))())(())()*74+')?,34/,-,))+,-+()./+*--+)(()**+..,,..+*))(+12.+*,11-+*))*-..-++,,*)(*--+*++,+)*0/*)..+*,-,+**,-,+*)a((<6$"$"0LO:02.%$-22, $8:+)45,%!!&((-89//66,'$"!,EI8-'.AD5+%""'2774,,1/&"$$!&34+'*,-*#)<;%$69,(/2/ ,&(14..121-&#$pKE7+"3fj>/=9$%ZZ>@_Y,)NP/ 4lz]* ?MJ=(%0=JNIY~n)%bh6*BRZVFFVdp_1.ru6*QR,3gc''be0-\qjT. !q ont^,4xy7(KL+/X\92HJ6&/frTA8A\[>>YQ'%JM,2czw]+!=ID9'$,7EJGX}m*&cj:,?NXUGFTbp^..qs6+PP(.b_&&ad/,[oiT. !qljjU+.MN1)8:/0<=2,)-62!#9A=702<;/,51 "67%'>IG>+-BC.# !',0219IC'#:?1-13345689974+&HL0*97$#54 $@C.+;CC9& ! A!#$^\[L0%)09:3145664350%):<.(,17832430.-+(+33,())(+365428D@,#'(()+-/32,)+.11/,()/1.*$)77((580-0/(% $(140//01/)&'&&''&'*,FB<9:>??@@?@@?=>CC@>?ACBAA@ABA@? ABA@@ACB=;;<;#:;<;98789987667753248855786565433434656654344545679=? @ABCCDEGGFGIKKLMNOPPONLKLKJIHHIHFEDCBBDDBAA?<:99::998742100/.,+ *+-..-.-++,-.-,+**+.-.,+,,--/24689:<>?@ABEIJFFJLMNOPQSTUVWYZZYWVVTQO@NMKIIKOPONMHA<;:3.+,/110.*#     -*+-/13579;=>?ACFIJJKNOPQQSUWXZ[\^]ZXYXTSSRQONMJIGEDCB@;98/76541,('&%%&%$      [..024679;=?@ADGHEIRVTRPPSUVXY[\]]YPOUTKKRTQNLKJJKC2)('(,38;5' !"$'*,'   01359<<=>?@BDHMKCDPUTSIUVWYZ[\]^UCCSSDBOTPKCAGJJA/%$" $08=5!!#%(.)     125:@DEEA@ADINUQB>BHOTXYXRZ[\[\_Q33TW>:KRPF31BHEA<983*+4:>7$&,1.$#-+!   458;?CFFDCDGKNOLEABFLPRTY[Z[:Z[_N)+TY93ENMA))?HDBA@?9.-6;<5'$*040! +*$!  e % 89;:78=AEHJKKF=?KPPOMH@EW_]\[ZYZ^L&)TX5-?HG<&'?KIE?;94+,8:4/)'(**&&%!   '^)"99:967<@DFGHHD;>MTRPMF;AWa^\[YXY]N-.RW;2=?CGHJLLJJMKDIX_\[ZXWX[R<;PUIA:9<4"'DJ:11012540-,+*(#$+.-+'   !   <=>AFJLJFCBDINRTRPOPTTPRZ][ZXWUV[S=:LSOH=:?6#CG0(/2112220,,.-*% "-0+(& #"   #   OPRSRTWXWVWXYZYZ]_`acb_^\[ZXWURU]Q/,GQLHCDK=?D'"4:30/".-*&(10&&(!  )  #'*" PRUTPPUXNYZYWTV_defgfda]ZYWUSQT\N*'DOJGEHOA:>'$5:2..-+("%00&""    */.$ @BGF??FINJJHFCIV]]^``^\ZYWUSQPRWK.+CMIECEKB+'47/.33.-//,'!#+.)# $!!    170! :;A@:9@CBBCCB@>CPVVWXYXWUTRPOPRJ86EJFCAAEA625C320-,.-*&"#()($#!   +1) >?CC??CEDDFEBELPQUVWVSRPOONMKIHGFDA?>-=;97531/-+)&%&&%$#        JIIKJGGLNMLKLNOMNRTSRPOOQTTRPOOMLJKOMGCA@><;<@?:87520.,)&##$%$"  r      \[ZWST[^]ZSSZ]]^ab`]YSIHPSQOOMLKIIHGDB@?>=<;<94132/-+)&#!  %$   " ] YY[ZWVYZYXVX^bcc`]ZXXTJHOQPOMLKIHGDBA@>=>=<:766531/-)&#!$%" " '+-.-++-$(!$ @CNSSOGCBGSZ[]`[OF@CNRP*ONKJIHFECA?=<<==;714BC722/(#!!&--( /;?<;=<9+, *- <@JPQNFBAHU[Z[^YLD>ALRSRPON'LIHHFC@><::;;84.2AB5054.)%! '(!  (3732551$"#% NNOOPRVXXYZZ\8[YVTSTTQPONMOUTJGLKFA=;:986420021+-7<<7-((#   WVRQQT[`a`\[\\[[]][YVSPNMLKOWUJGLKEA=:97531//-*'&*29>;0+*#       VVUUSTWZ[]"\ZYXXWUSRPOMJIJMQPIGGFB?<:7530.-,*'&B'+34.)&     I=<:864202662/.*$  ! "#  )'  ""  #%B*Rc]Z\\ZYXWUQKLTVQMJHHFEB@?><9887531002773/+'#  3 $  &(!  .-# ',-$ C L`][[ZYWVUSMBEW[RLJHGECA??A=40220/-.0221/)"# { &!  (,%  ,-"+1/$ CZ_`^\\[YWVOCEUYPKIGEDB@>>@<2./0/../1220,% ! 7# &&  &$ &,) :9Rbieddca_]WMKOOKHFECB@>=<=:510//1453351)#! 3   '  "  ;(=O^ec`]\]\YVPMKJHGECA@>=;::8520..0797660% ! 3  '( !"    9CDGJNQSUWRGELNLKLKJHGECA@><;:97520/-*-5:<;6-! 3  &! $   6]]^\XTQPRMCAGIGGJJIGFDB@?=;987421/-+()/464.& -    8 ``_^[XVUTSRQOMLKJIHFDBA?=<;97531/.,)'&&%%#  9YYXWUTSQOORRMKJHGFDCA??><::975321/-,*(&$"       !)IIHGF ECCDDCBA@@?>=<;:99876654322110.-,++*)'&&%$##"#"#"!"! !"##"##$"!  %1688765432 12100//00//.-,,+,+*+**+*))*+,--./0100/,*)('&$#"#%)03'&%&&%&%$%$$#$%%$#$%()+,,--./001210-)%"!$%&&%&%&&%##&'&'&%&''&''(+,.//0012233453.+*($ 1212.''/3210123456678 99:<7,*130-*(*)%!1001010100121.&&/2100102577521 23434454556782'$,.+)'')*,+'#$%$%$%$# !$%$%$ ##)5::4*%'(()*++,,--./01220.+& %&''&&%&%&'&%&&'&'& ,8==7-)+,,--../001234455652/,(%!!#$44554456566543456565578789;?AA?<;<=>>?@@ABBC8B?=;864321012344578767645981..//013441001355678765421001101455688656556767889:;<<=> =<<=<86641/01%3321.+"%61 #!"'(+/12.&!  #"%-,#!!"!!"!!  !""#$ #"%.-$!%""/0027.$,%#07:89>9+#  "--# *-'#   "//3<7$%;IO@7PccRO\XD::. $-7:7+  "'*,- ,+*(#   *2:B;%  "357-  (2=A@2 " "199=EIHGFFHF>::3$  "-4?ME( " !&("&)'(,( '2>A=. " #,10=X_RVhojgfhoiVR]V=00-%   )0:HB( )'/.-++,,      H!(35/$  (7IOIPdgWWhmgcbemiXWfdPIOJ:,  !'.73$ 1<:865  )/.&  !(" H .8?OjpcZWPFBCA><;>BDCHSZ^eqjQA9/$  4>865310$-42'&)&$% "   !2JTQXik\OD;5/*()"**,28>HS`mk[SUL7&    6@9542/. 0>CDBBCEF@3$  1 -9Njo^QG>5.+'#!!(+,)$"#%(,18ALVcrkM:1$   8B;63100  0>IOQRSQLC6* ?   7FO[jhTB1&!$)05:;:5-(%" #)5FYlm[OJ;"   :E>84234 ;E508?FJIC8107G<  5 (@YebZK>2*%"""6J\c`ZSLE?9/# "#&+4BQ`fcWA+   ;GA;7688(DJ8037=@?:008BOE%   !9Qfj\K5'! 8"&6Rgvyqh^VNF=4*$! "*:ScjeS>%    3<730/13 >D0-:?:75 6>NL62?6   ):GR]V>.&"!.'A\v}vmd[QH>3051$ ! !#(2D]dXK=+   $!!" ,RS/':@:510026ASO59ZQ   @QRQMA+ ! 2^{tkbYOE:/,21'""! "0IWYXSA$     )=RTC975421 28EKKZxe!   7WcZK7)#!"$B{}skbYPE;1("#+,$!%-=VcdX=%  "!  (8FIA:301211028IftqT ?  .F`dR>) !!""!%2T|skbYPF<2&,0% !""!! ,G[icJ2   $&%"  ,0++02121 /,IF  #;NZS9)# !"" +Gh|tkbYPF<2%*/%!!""! $-AaeL8)  -/%'39 !&(+02 .(H/ !   4OXP@) !!" .Tu}tkbYPF=2%(-%!!"!! 0P]WK:(  )) .5  #(#(6:412 /+E~v-ML  -JjfA*# !" /Yy}tkbYPF=2%&+$!!"! &4KjkM1   #(#(7;411221122/*Ex-LK  8Rja5 !!" /Wx}tkbYPF<2%'+$!!"! !%=iqT9    &),/11221122.%G1  *@NRG, !" -No}tkbYPF=2%*/%!!"! 1S]O@0!   !(-021 0/M~, %:QSA2& !" )?`}tkbYPF<2&+/% !"!)>MVQ@,  3=84101 0.5GU_L  ,Iid8"!"! #(J}tkbYPF<1' +,$!!"! #+BhmP2      .;<;7532=TT=(  1Nkb2 !!"!! 8q~tkbYPF<2+'')(#!!"! =9jrR4  '*,*)''  '=FC>:78:>GVJ$  4HVM.!" +JiukbYOE<302/&""!!"!!! 2\cG1"  /APTOJDB1=;   #ANI=* !"!$1Il{wrld[QG>512.$ !"!!"" -LVK=-#  5Ngqle]Y74-'#  '/8<;6+)//)!#+00+"   4Z_C/% !"!#-?Rdmlh_VLB7.'#"!!"! );M^X:(! 1Npzqn:71,&  !+0/) %!$-11,# '<^^;'"!!"!!""! '5JVXVPJB:1)"!"! &0Da`A-" 1Kguurkh!!"    +;OL1#"!!"!!""! !"&+.00.,)'%$!"!$+;SVB1$  4DKNNMKI   !.>RL- !!" !!""!! !!""!!"!!"&7UZE3$  *2.-,,   !0Fe]."!!""! !""!!"! 7elK3#   !0Ikb."!!"!"!!"!! 6jrM2#    "0EbZ-"!!"!"!!" 2dlK3" #)(&*     #1D^V-"1bkK2! %,32)'.1     $1E_W-"1dlJ1  #)--)&%%    $1FcZ-"2fnJ0   ##"  #1=<-2LDCRE@D@6(   %0Gh_-"!! 4hpJ0!  *;IJ=BWJI\TQSNA.  $1FbZ-""!!"!5ciH1#  )7=CIG>. .@KOKD8( !2BSK+ ""!!" !!"$5TZF4$   #-36*  0ARL/!"! #)9SXE4"+36/ !%),& ,Ba^9%! !"! %-A`bF0)0-+--,+&,+$ $ '1#  !3Jf_4 !!"!"&H52?HMOOJA7.6ND  .?MK:-%!"! '8EONC4   &%$%%&&,IM5/8?DFE@845?TM*  '4?GKB+ !"!.MVH>7,  #DK60:<86 5>QN32IA  )61/ 03?UQ49bY    !5Mha:%" !"! $-CfiN7%  %"!  (;PQ@76421 6@KVdu^  +;LPH:& "!! +IUOH?2 !()*--)'  %4@D>9201121 2Hq}jI  !.;HTM4%" !"! "(;\_G82(  !(*+*($# )/--02112 11/+HA $5I_`J7% "!! )AUebK8'   &)-022112 /(G- "%  +@Z`RB1&" !"! #)7N\aYD0     %*%(48312 /+Fx.IH   -EOKGD9& !"!! *ANPE0   &+$'48311221122/*F|/FE  2>ELSL5(#!"!!"!%,* !"!!"!  #1IY`]PA0"  )/221 001Ny)  %//*   2EX^WMA6.'#!$(0;GW^^UE4#  !""   2=951/011/-7NVP<  CPB=B5 -@JMVgcK7(  !  "+=QhjVLLC0" 0?FE>;=>  ,9=<7543?YS. & !RcSLQ@ +7?PklTD>71,'%$#"!"$%')-2:BJZokN=:0 )8O`d][^`  $;FFB=;;>BIRD   "TiaXM8 )$.;KOGNdgUG;3.)$! !!"%*06?KYifQIPL>2'(4Qq}~ .;>><;;<>?A5: #YndYM8   )18 '&2=ILFL]]LM`f^ZX]gbNM^]LGNK?3' 8LY]YX[\ .0$ - $)'!(''2:=<70#  MZD;?4 #%-024@X[LOdlea_cmfPL[V@432/'-9;;6567!'  "&&$!  !  %.<@<=EIHIJG?=@<1(!      &*,--/1221/..-+'"                                  t8mk@flrig-1.3.24/data/mac/Info.plist.in0000644000175000017500000000200712562732142013656 00000000000000 CFBundleInfoDictionaryVersion 6.0 CFBundleIdentifier %%IDENTIFIER%% CFBundleName %%NAME%% CFBundlePackageType APPL CFBundleSignature %%SIGNATURE%% CFBundleDevelopmentRegion English CFBundleExecutable %%BINARY%% CFBundleVersion %%VERSION%% CFBundleShortVersionString %%VERSION%% CFBundleLongVersionString %%VERSION%% CFBundleIconFile %%ICON%% NSAppleScriptEnabled No NSHumanReadableCopyright Copyright (c) 2009 Dave Freese W1HKJ flrig-1.3.24/data/flrig.xpm0000644000175000017500000004101012562732142012367 00000000000000/* XPM */ static char * flrig_xpm[] = { "64 64 525 2", " c #2F2F2F", ". c #303030", "+ c #313131", "@ c #323232", "# c #2E2E2E", "$ c #333333", "% c #434343", "& c #373737", "* c #383838", "= c #363636", "- c #515151", "; c #2C2C2C", "> c #777777", ", c #404040", "' c #454545", ") c #2B2B2B", "! c #3F3F3F", "~ c #4F4F4F", "{ c #2A2A2A", "] c #393939", "^ c #525252", "/ c #4D4D4D", "( c #6A6A6A", "_ c #474747", ": c #5F5F5F", "< c #464646", "[ c #4A4A4A", "} c #3A3A3A", "| c #272727", "1 c #565656", "2 c #3C3C3C", "3 c #444444", "4 c #4B4B4B", "5 c #7F7F7F", "6 c #838383", "7 c #252525", "8 c #242424", "9 c #B2B2B2", "0 c #6E6E6E", "a c #818181", "b c #3D3D3D", "c c #696969", "d c #292929", "e c #9C9C9C", "f c #5C5C5C", "g c #7E7E7E", "h c #282829", "i c #9A9A9A", "j c #919191", "k c #595959", "l c #565858", "m c #626262", "n c #636363", "o c #A8A8A8", "p c #222222", "q c #969696", "r c #5F6060", "s c #585858", "t c #787878", "u c #929292", "v c #232323", "w c #202020", "x c #A6A6A6", "y c #757575", "z c #939393", "A c #2B2B2C", "B c #8C8C8C", "C c #7A7A7A", "D c #717272", "E c #414141", "F c #4A4B4B", "G c #2B2C2C", "H c #39393A", "I c #444545", "J c #353535", "K c #3E3E3E", "L c #393A3A", "M c #474746", "N c #2A2B2A", "O c #474847", "P c #2C2C2E", "Q c #A4924C", "R c #A4924D", "S c #A6924E", "T c #A4924F", "U c #A49151", "V c #A49152", "W c #A49153", "X c #A49154", "Y c #A49155", "Z c #A49156", "` c #A48F58", " . c #A68F59", ".. c #A48F5A", "+. c #A68F5B", "@. c #A48E5B", "#. c #A48E5C", "$. c #A48F59", "%. c #A69158", "&. c #A69156", "*. c #A69155", "=. c #A69154", "-. c #A69153", ";. c #A49252", ">. c #A6924F", ",. c #A6924D", "'. c #A6934D", "). c #A6934B", "!. c #A6934A", "~. c #A49447", "{. c #A69346", "]. c #A69345", "^. c #A69443", "/. c #A49443", "(. c #A69543", "_. c #A69643", ":. c #A79643", "<. c #A69641", "[. c #A79543", "}. c #A49641", "|. c #A49544", "1. c #A79844", "2. c #FFF107", "3. c #FFEF13", "4. c #FFE63D", "5. c #FFC55C", "6. c #6D5433", "7. c #EECC6B", "8. c #EDBB67", "9. c #050505", "0. c #FFE03C", "a. c #FFEF12", "b. c #FFE34D", "c. c #FFD668", "d. c #F2BF4E", "e. c #F7BF63", "f. c #F9BF4B", "g. c #B88F43", "h. c #B98F4D", "i. c #FFE735", "j. c #CB9D5A", "k. c #B48546", "l. c #D8A45C", "m. c #AB7C4A", "n. c #FFE73D", "o. c #C29A45", "p. c #C09B47", "q. c #A88B54", "r. c #A08558", "s. c #BC944E", "t. c #BB944C", "u. c #AB8C58", "v. c #C09C62", "w. c #C29D5F", "x. c #C3995B", "y. c #C39B62", "z. c #C2945B", "A. c #CBA76B", "B. c #BF9F67", "C. c #CDA76F", "D. c #CBA771", "E. c #E6B76D", "F. c #FFEB3D", "G. c #FFEF07", "H. c #FFEE1B", "I. c #BB914F", "J. c #B29258", "K. c #E0AD61", "L. c #E0AB62", "M. c #E1AD61", "N. c #B9A373", "O. c #EEC071", "P. c #F0BF69", "Q. c #D6B675", "R. c #C3A773", "S. c #E9B968", "T. c #FCC676", "U. c #EDBB78", "V. c #E0B67A", "W. c #D4B075", "X. c #DFB26D", "Y. c #E6AB56", "Z. c #967648", "`. c #BD914F", " + c #B68A4E", ".+ c #CF9B55", "++ c #A97C4A", "@+ c #F6B662", "#+ c #FFCB61", "$+ c #E4B75F", "%+ c #E9C46D", "&+ c #DBAF58", "*+ c #FFD460", "=+ c #E7B654", "-+ c #C7AD4E", ";+ c #C6A438", ">+ c #F4B959", ",+ c #CFA85C", "'+ c #D4AF61", ")+ c #D3A758", "!+ c #FCC655", "~+ c #D4A84E", "{+ c #EFBF2E", "]+ c #EAC63D", "^+ c #C49C35", "/+ c #6F5330", "(+ c #FFD63F", "_+ c #FFF40D", ":+ c #FFF208", "<+ c #FFF006", "[+ c #FFF007", "}+ c #FFF408", "|+ c #241E1C", "1+ c #1E1716", "2+ c #F5B96B", "3+ c #C9984E", "4+ c #D6B771", "5+ c #B9933C", "6+ c #D2A73E", "7+ c #D2A73C", "8+ c #D2A839", "9+ c #E0B93F", "0+ c #A88B3E", "a+ c #B99237", "b+ c #A47E22", "c+ c #EBBD2F", "d+ c #D3AB28", "e+ c #D3AB24", "f+ c #D3AD21", "g+ c #B99922", "h+ c #FFEF0B", "i+ c #0F0B0C", "j+ c #241C1B", "k+ c #A38455", "l+ c #FFD241", "m+ c #F6C33D", "n+ c #E1B846", "o+ c #FFF211", "p+ c #FFF40A", "q+ c #FFE319", "r+ c #FFF50C", "s+ c #F2BD35", "t+ c #DDB845", "u+ c #D9B94B", "v+ c #A98F51", "w+ c #A98F4F", "x+ c #A98F4E", "y+ c #A9914E", "z+ c #A9914C", "A+ c #A9914B", "B+ c #A9924B", "C+ c #A99148", "D+ c #A99147", "E+ c #A99247", "F+ c #A99246", "G+ c #A89245", "H+ c #A89344", "I+ c #A99344", "J+ c #A99341", "K+ c #A99340", "L+ c #A9933F", "M+ c #A9943D", "N+ c #A9943C", "O+ c #A9943A", "P+ c #A99438", "Q+ c #A99538", "R+ c #A99536", "S+ c #A99636", "T+ c #A89636", "U+ c #A99637", "V+ c #A99537", "W+ c #A99635", "X+ c #A99835", "Y+ c #AA9635", "Z+ c #AA9935", "`+ c #AD9A35", " @ c #AE9B36", ".@ c #AF9B36", "+@ c #AF9C37", "@@ c #B09C37", "#@ c #B09D37", "$@ c #B19F38", "%@ c #B29F39", "&@ c #B2A039", "*@ c #AA9835", "=@ c #A79433", "-@ c #A39132", ";@ c #A28F30", ">@ c #A49133", ",@ c #A68D45", "'@ c #2B2C2E", ")@ c #2C2C2F", "!@ c #323236", "~@ c #333335", "{@ c #353538", "]@ c #363738", "^@ c #373839", "/@ c #38393A", "(@ c #3A3A3D", "_@ c #3C3C3E", ":@ c #3D3D3F", "<@ c #3D3E3F", "[@ c #3E3F40", "}@ c #303032", "|@ c #272729", "1@ c #1E1E21", "2@ c #161617", "3@ c #1A1A1A", "4@ c #1E1E20", "5@ c #232324", "6@ c #414143", "7@ c #464645", "8@ c #484848", "9@ c #404041", "0@ c #3A3C3C", "a@ c #282828", "b@ c #222221", "c@ c #191919", "d@ c #232424", "e@ c #292928", "f@ c #464747", "g@ c #474646", "h@ c #4C4C4C", "i@ c #4E4E4E", "j@ c #535353", "k@ c #545454", "l@ c #555555", "m@ c #48484A", "n@ c #484747", "o@ c #111111", "p@ c #121212", "q@ c #141414", "r@ c #2B2A2A", "s@ c #212121", "t@ c #131313", "u@ c #5C5C5D", "v@ c #666666", "w@ c #161616", "x@ c #5A5A5A", "y@ c #868686", "z@ c #151515", "A@ c #1D1D1D", "B@ c #151415", "C@ c #141415", "D@ c #1A1C1A", "E@ c #314F24", "F@ c #324F25", "G@ c #1B201B", "H@ c #1E241E", "I@ c #243725", "J@ c #293728", "K@ c #B8B8B8", "L@ c #171717", "M@ c #434344", "N@ c #5B4F44", "O@ c #635340", "P@ c #5B5141", "Q@ c #20251E", "R@ c #59A73E", "S@ c #5AA83F", "T@ c #212C20", "U@ c #283629", "V@ c #2A532C", "W@ c #355436", "X@ c #151514", "Y@ c #737373", "Z@ c #5B5B5B", "`@ c #606060", " # c #616161", ".# c #806644", "+# c #A97C41", "@# c #926D3C", "## c #141214", "$# c #484548", "%# c #605F60", "&# c #727272", "*# c #5D5D5D", "=# c #3C3A3C", "-# c #676767", ";# c #515152", "># c #6A5B47", ",# c #7D633F", "'# c #6D593F", ")# c #646364", "!# c #8B8B8B", "~# c #6B6B6B", "{# c #7C7C7C", "]# c #1B1B1B", "^# c #525253", "/# c #71614B", "(# c #7D6443", "_# c #776146", ":# c #1E1E1E", "<# c #686868", "[# c #40403F", "}# c #7D7D7D", "|# c #161615", "1# c #242324", "2# c #242423", "3# c #242422", "4# c #232425", "5# c #646464", "6# c #707070", "7# c #29281E", "8# c #3A3928", "9# c #4B4B31", "0# c #323122", "a# c #BCBCBC", "b# c #797979", "c# c #3A3A23", "d# c #83813F", "e# c #514F2B", "f# c #8B8A4B", "g# c #9F9F9F", "h# c #1C1C1C", "i# c #171914", "j# c #171713", "k# c #161611", "l# c #C3C3C3", "m# c #141515", "n# c #6F6F63", "o# c #171715", "p# c #191914", "q# c #171716", "r# c #918F4D", "s# c #85843D", "t# c #47472F", "u# c #2B2B2A", "v# c #5F5F31", "w# c #686736", "x# c #35351E", "y# c #4F4F39", "z# c #686845", "A# c #4E4D38", "B# c #767676", "C# c #949494", "D# c #989898", "E# c #888888", "F# c #313120", "G# c #383827", "H# c #25241C", "I# c #161515", "J# c #191912", "K# c #171612", "L# c #212117", "M# c #21211B", "N# c #141412", "O# c #141413", "P# c #393922", "Q# c #4F4F32", "R# c #666440", "S# c #51512F", "T# c #63623E", "U# c #363621", "V# c #52512F", "W# c #605F36", "X# c #595831", "Y# c #4D4C2A", "Z# c #717171", "`# c #151615", " $ c #151616", ".$ c #5B5B5C", "+$ c #363737", "@$ c #525152", "#$ c #1D211D", "$$ c #538539", "%$ c #54853A", "&$ c #1E281D", "*$ c #243025", "=$ c #274729", "-$ c #2F4831", ";$ c #141514", ">$ c #1D201B", ",$ c #3C772F", "'$ c #3D772F", ")$ c #1C241C", "!$ c #232C24", "~$ c #29442A", "{$ c #2F4430", "]$ c #6F6F6F", "^$ c #8A8A8A", "/$ c #6D6D6D", "($ c #232222", "_$ c #222323", ":$ c #1E201A", "<$ c #141411", "[$ c #3C3C2A", "}$ c #3A3929", "|$ c #848484", "1$ c #514F36", "2$ c #605F3C", "3$ c #6A693C", "4$ c #636333", "5$ c #191716", "6$ c #1D1D15", "7$ c #202016", "8$ c #202017", "9$ c #A3A3A3", "0$ c #C2C2C2", "a$ c #141313", "b$ c #5C5D59", "c$ c #131314", "d$ c #141314", "e$ c #999999", "f$ c #9D9D9D", "g$ c #A9A9A9", "h$ c #3C3C21", "i$ c #797644", "j$ c #41432B", "k$ c #4D4D28", "l$ c #6B6B3D", "m$ c #30301E", "n$ c #807F3D", "o$ c #85834E", "p$ c #817F4D", "q$ c #5A5A39", "r$ c #161613", "s$ c #858585", "t$ c #39392B", "u$ c #27251B", "v$ c #1E1E19", "w$ c #333223", "x$ c #383723", "y$ c #28281E", "z$ c #151516", " . . . + + + + + + + @ @ @ @ @ @ @ + + + + + . . . . . . # # # # # # # # # # # . . + + + @ @ + @ $ ", "% & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & & * & & & & & & & & & & & & & & & & & & & & & & & & & & & = ", "- ; ; > , ' ) ' ! ) ~ + ~ & { ] & ^ ] / $ ; ; ( _ @ : ! ; ; < [ } [ { & ) [ * } ! $ ^ | 1 @ ' 2 3 # 4 ] _ 3 ; ; ; ; ; ; ; ; # ", "5 6 7 8 9 0 ; a b c ] d e f [ 5 [ g h 0 ; ; ; i j 7 k l ; ; % m n o p q & r > s t u v w x . y # z p j A B 5 ; ; ; ; ; ; ; ; ) ", "C D ) @ ^ * % ! E b ) F G b ' H E = & ) E ; ; ; < I H s ) ; ; J * * _ b 2 ] $ K L @ M d ~ = , ) $ N O * , E ; P ; ; ; ; ; ; @ ", "Q R S T U V W X Y Y Z ` ` ...+.@.#.@.@. .$.$.` %.&.*.=.-.;.V >.>.,.'.).!.!.~.{.].^./.^.(.(.(._._.(.:.(.(.<.<.(.[.[._._.}.|._.1.", "2.2.2.2.2.2.2.2.3.4.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.", "2.2.2.2.2.2.2.5.6.7.8.2.2.2.2.2.2.9.0.9.2.2.9.2.2.9.9.2.2.2.9.9.9.9.2.9.9.9.9.2.9.9.9.9.2.9.9.9.9.2.9.9.9.9.2.2.2.2.2.2.2.2.2.2.", "2.2.2.a.2.2.b.c.d.6.e.2.2.2.2.2.2.9.2.9.2.2.9.2.9.2.2.9.2.2.9.2.2.2.2.9.2.2.9.2.9.2.2.2.2.2.2.2.9.2.9.2.2.2.2.2.2.2.2.2.2.2.2.2.", "2.f.g.h.a.i.j.k.2.2.l.m.2.2.2.2.2.9.2.9.2.2.9.2.n.3.3.9.2.2.9.9.9.2.2.9.2.2.9.2.9.9.9.2.2.2.2.2.9.2.9.9.9.2.2.2.2.2.2.9.9.9.2.2.", "o.p.q.r.s.t.u.v.w.x.y.z.2.2.2.2.2.9.2.2.9.9.9.2.2.9.9.2.2.2.2.2.2.9.2.9.2.2.9.2.2.2.2.9.2.2.2.2.9.2.2.2.2.9.2.2.2.2.2.2.2.2.2.2.", "6.A.B.6.C.D.6.E.2.2.2.2.2.2.2.2.2.9.2.2.2.2.9.F.9.2.2.2.2.2.9.2.2.9.2.9.2.2.9.2.9.G.2.9.2.9.9.2.9.2.9.G.H.9.2.2.2.2.2.2.2.2.2.2.", "6.6.6.6.6.6.6.I.2.2.2.2.2.2.2.2.2.9.2.2.2.2.9.2.9.9.9.9.2.2.2.9.9.2.2.9.9.9.9.2.2.9.9.2.2.9.9.2.9.2.2.9.9.2.2.2.2.2.2.2.2.2.2.2.", "6.6.6.6.6.6.6.J.K.L.M.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.", "N.O.P.Q.R.S.T.U.V.W.X.Y.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.", "Z.2.2.`. +2.2.2..+++@+2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.", "2.2.2.2.2.2.2.2.2.2.2.2.#+$+%+&+*+=+2.2.2.2.2.2.2.2.-+;+2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.", "2.2.2.2.2.2.2.2.2.2.2.2.>+,+'+)+!+~+2.2.2.2.2.2.2.{+]+^+2.2.2.2.2.9.9.9.2.9.9.9.2.9.9.9.2.9.9.2.9.2.9.2.9.9.9.2.2.2.2.2.2.2.2.2.", "6./+2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.(+2.2.2.2.2.2.2.2.2.2.2.2.2.2.9._+9.2.9.:+<+[+}+9.2.9.2.9.2.2.2.9.2.9.9.2.2.2.2.2.2.", "|+1+2+2.2.2.2.2.3+4+2.2.2.2.2.2.5+6+7+8+9+0+a+b+c+d+e+f+g+2.2.2.2.2.9.9.2.9.h+9.2.9.9.9.2.9.9.2.9.9.9.2.2.9.2.2.9.9.2.2.2.2.2.2.", "i+j+k+2.2.2.2.2.2.2.2.2.2.2.2.2.l+2.m+n+2.2.2.2.2.2.2.2.2.2.2.2.2.9.2.2.2.9.o+9.2.p+q+9.2.r+9.2.2.2.9.2.2.9.2.2.2.2.2.2.2.2.2.2.", "2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.s+t+u+2.2.2.2.2.2.2.2.2.2.2.2.9.9.9.2.9.9.9.2.9.9.9.2.9.9.2.2.2.9.2.2.9.2.2.2.2.2.2.2.2.2.2.", "2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.2.", "v+w+x+y+z+z+z+A+B+C+D+E+F+G+H+I+J+K+K+L+M+N+O+P+Q+R+R+R+R+S+S+T+T+U+S+S+V+W+S+S+S+W+W+X+Y+Z+`+ @.@+@@@#@$@$@%@&@%@.@*@=@-@;@>@,@", "P P P P P P P P P P P P P '@)@'@P P )@P P P P P )@P P P P P P P P P P P )@)@P P P )@P )@)@!@~@{@]@^@/@(@_@:@<@[@/@}@|@1@2@3@4@5@", "E E E E E E E E E E E E E E E E E E 6@6@E E E + % E E E E E E E E E E E E E E % % E E E 3 3 ' 7@< _ _ 8@8@8@[ [ @ 9@b * ] 0@@ 7 ", "; ; ; ; ; # # ; ; ; ; ; # # # # ; ; ; # # # ; ) # ; ; # # ; ; ; ; ; ; ; ; ; # 8@_ . @ $ J = & * ] 2 2 b K ! } @ a@b@c@3@w d@a@e@", "_ _ _ < < < _ _ < < < f@_ M _ g@< _ < < < < < _ 8@8@[ 8@[ [ 8@[ [ [ 4 4 h@h@h@i@i@i@~ ~ - ^ ^ ^ j@k@l@l@l@k@- h@_ ' 3 ' < < m@n@", "] ) ' o@p@p@w A q@q@ & K , r@s@q@q@q@q@q@q@q@| | ] 8 v v v v v v v v v v v v p p p v v v v v v v v v v v 8 * a@{ t@q@q@q@q@q@q@", "[ a b < s + u@v@w@w@x@y@m t ~ 4 w@w@w@w@w@w@w@8 * / 8@w@w@w@w@w@w@w@z@A@$ K < _ < < ! = w q@w@w@w@w@w@w@w@J _ f | z@w@w@B@C@C@C@", "q@q@z@w@w@D@E@F@G@w@B@H@I@J@t@z@w@w@w@w@w@w@w@8 = / , w@w@w@w@w@z@+ / i@a c K@K@K@K@K@5 i@/ = L@w@w@w@w@w@# b j@a@z@w@c@M@N@O@P@", "w@w@w@w@w@Q@R@S@T@q@q@U@V@W@X@w@w@w@w@w@w@w@w@7 w@w z@w@w@w@z@d j@: K@Y@Z@[ , 2 2 E h@`@t K@ #j@+ z@w@w@w@z@w w@a@z@w@3@h@.#+#@#", "w@w@w@w@w@w@##$#%# #&#*#=#q@w@w@w@w@w@w@w@w@w@7 z@w@w@w@w@z@! *#K@-#, . ; ) b b ) ; @ ' 0 K@Z@< L@w@w@w@w@w@a@z@w@3@;#>#,#'#", "w@w@w@w@w@w@)#2 3 k@^ } &#-#q@w@w@w@w@w@w@w@w@7 z@w@w@w@w@i@K@&#% ; ; ) #!#5 ~#Z@8@; ; ; 8@{#K@^ ]#w@w@w@w@a@z@w@3@^#/#(#_#", "w@w@w@w@:#<#&#^ _ [#, [ ( &#m q@w@w@w@w@w@w@w@7 z@w@w@z@~ #-#J ; ; ; { y K@u }#<#- ] < ) ; ; ; ] &#<#^ c@w@w@w@a@z@|#z@1#2#3#4#", "w@w@w@w@' 5#^ , ! ! ! ! k@Y@u p@w@w@w@w@w@w@w@7 z@w@z@, K@n + ; ; ; ; % K@K@K@}#<#- ] v K ; ; ; ; J 6#K@8@q@w@w@a@z@w@w@7#8#9#0#", "w@w@w@w@]#&#+ ! ! ! ! ! b a#p 3@w@w@w@w@w@w@w@7 z@w@) : v@+ ; ; ; ; ; y K@K@K@}#<#^ ] ]#2 ; ; ; ; ; = b#1 & w@w@a@z@w@w@c#d#e#f#", "w@w@w@w@* i@! ! ! ! ! ! g#8 > t@w@w@w@w@w@w@7 z@q@^ K@= ; ; ; ; ; ; K@K@K@K@}#<#^ ] h#& ; ; ; ; ; ; , K@k@c@w@a@z@w@w@X@i#j#k#", "w@w@w@w@w@; &#K ! ! ! ! 2 l#L@w@w@w@w@w@w@w@w@7 z@J : j@# ; ; ; ; ; ; ~#K@K@K@}#<#^ ] ]#K ; ; ; ; ; ; n *#K w@a@z@w@|#w@w@w@w@", "w@w@w@w@w@z@/ < ! ! ! K c k@z@w@w@w@w@w@w@w@w@7 q@/ K@ ; ; ; ; ; ; ; = K@K@u }#<#^ ] ; * ; ; ; ; ; ; ) * K@k@q@a@z@w@z@7 | | | ", "q@q@m#w@w@w@:#&#^ &#[ &#n#L@w@o#p#q#|#w@w@w@w@7 h#j@*# ; ; ; ; ; ; ; ) k K@j }#<#- ! E ; ; ; ; ; ; ; ; #  # a@z@w@3@~ b#6# #", "r#s#t#w@w@w@w@]## < 3 u#v#w#x#y#z#A#w@w@w@w@w@7 * K@! ; ; ; ; ; ; ; ; ; ) ' B#{#~#1 K ) ; ; ; ; ; ; ; ; # h@g ! a@z@w@3@h@C#D#E#", "F#G#H#|#w@w@w@w@w@z@z@w@I#J#K#H#L#M#w@w@w@w@w@7 E #. ; ; ; ; ; ; ; ; ; ; ; ) # # ) ; ; ; ; ; ; ; ; ; ; ; 2 ( [ a@z@w@c@[ h@h@[ ", "w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@7 8@K@| ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; . K@h@| z@w@X@N#N#O#N#", "w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@| _ > d ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ) K@h@7 z@w@P#Q#R#S#T#", "w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@d 8@K@d ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; { K@[ v z@w@U#V#W#X#Y#", "w@w@w@w@w@K f E 6#q@t@Z#: m < w@w@w@w@w@w@w@w@{ _ K@| ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; K@8@| w@w@w@`#X@w@ $", "w@w@w@w@w@2 [ .$+$w@q@* x@@$* w@2@w@w@w@w@w@w@p 8@K@# ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; * ~#h@| w@w@z@t@t@t@t@", "w@w@w@w@w@#$$$%$&$w@w@*$=$-$;$w@w@w@w@w@w@w@w@w , 5 b ) ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; # 8@}#< w w@w@3@4 8@4 _ ", "w@w@w@w@w@>$,$'$)$t@t@!$~${$z@w@w@w@w@w@w@w@w@z@. 8@k . ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; # ]$E } ]#w@w@3@B#i D#^$", "w@w@w@w@w@w@t@l@: &#&#`@8@q@w@w@w@w@w@w@w@w@w@w@7 i@K@) ) ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; @ K@k@7 z@w@w@]#-#`@/$6#", "w@w@w@w@w@c@c &#~ f x@' 2 &#q@w@w@w@w@w@w@w@w@w@A@, 1 4 ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; # Z@1 < s@w@w@w@z@($_$_$_$", "w@w@w@w@8 6#&#- % K ! < 6#. &#q@w@w@w@w@w@w@w@w@z@| l@K@. ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; & K@k@; w@w@w@w@w@:$<$[$}$", "w@w@w@w@E : i@! ! ! ! ! / y@|$p@w@w@w@w@w@w@w@w@w@h#] 1 *## ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; . &#~ % :#w@w@w@w@w@1$2$3$4$", "w@w@w@w@z@@ J ! ! ! ! ! b K@:#p w@w@w@w@w@w@w@w@w@w@v [ K@k # ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; . <#K@~ 8 z@w@w@w@w@w@5$6$7$8$", "w@w@w@w@b &#[ ! ! ! ! ! ! 9$7 0 q@w@w@w@w@w@w@w@w@w@z@| j@k Z@ ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; @ <#: k@{ L@w@w@w@w@w@w@w@w@w@w@", "w@w@w@w@w@d = K ! ! ! ! b 0$z@w@w@w@w@w@w@w@z@d @ L@w@L@d k@K@m & # ; ; ; ; ; ; ; ; ; ; ; ; # b 6#K@l@; 3@w@w@w@w@w@w@z@:#:#:#:#", "w@w@w@w@w@q@@K ! ! K Z#2 z@w@w@w@w@w@w@w@w@6#l@f w@w@L@| 4 *#K@k = ) ; ; ; ; ; ; ; ] #K@k - { 3@w@w@w@w@w@w@w@3@^ ( Z@`@", "C@a$q@w@w@w@]#- &#h@/ &#b$w@w@c$d$t@O#w@w@w@3@{#Y@j@w@w@w@z@p * - l@K@c ~ K J + @ = , k@]$K@1 - ! v w@w@w@w@w@w@w@w@w@3@- e$f$g$", "h$i$j$w@w@w@w@w@8 &#] p k$l$m$n$o$p$q$r$w@w@z@s$Z@x@w@w@w@w@w@]#v ! h@i@K@*#K@K@K@K@K@K@/ i@E 7 A@w@w@w@w@w@w@w@w@w@w@3@~ : 1 x@", "t$u$v$w@w@w@w@w@w@z@|#w@|#O#t@w$8#x$y$|#w@w@z@z@z@z@w@w@w@w@w@w@w@h#s@; , E _ h@h@8@3 , @ s@A@z@w@w@w@w@w@w@w@w@w@w@w@q@p@p@p@p@", "w@w@|#w@w@w@w@w@w@t@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@z@]#p w :#:#w s@h#z@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@w@", "z@z@z@X@z@z@z@z@z@p@z$z@z@z@B@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@", "z@z@z@X@z@z@z@z@z@p@z$z@z@z@B@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@z@"}; flrig-1.3.24/Makefile.in0000644000175000017500000006222612650265656011717 00000000000000# Makefile.in generated by automake 1.14.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) AUTHORS COPYING \ ChangeLog INSTALL README build-aux/compile \ build-aux/config.guess build-aux/config.sub build-aux/depcomp \ build-aux/install-sh build-aux/missing \ $(top_srcdir)/build-aux/compile \ $(top_srcdir)/build-aux/config.guess \ $(top_srcdir)/build-aux/config.sub \ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/build.m4 \ $(top_srcdir)/m4/debug.m4 $(top_srcdir)/m4/fltk.m4 \ $(top_srcdir)/m4/funcs.m4 $(top_srcdir)/m4/macosx.m4 \ $(top_srcdir)/m4/np-compat.m4 $(top_srcdir)/m4/opt.m4 \ $(top_srcdir)/m4/pkg-config.m4 $(top_srcdir)/m4/static.m4 \ $(top_srcdir)/m4/win32.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/src/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AC_CONFIG_ARGS = @AC_CONFIG_ARGS@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BFD_CFLAGS = @BFD_CFLAGS@ BFD_LIBS = @BFD_LIBS@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEBUG_CFLAGS = @DEBUG_CFLAGS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXTRA_LIBS = @EXTRA_LIBS@ FLRIG_BUILD_CPPFLAGS = @FLRIG_BUILD_CPPFLAGS@ FLRIG_BUILD_CXXFLAGS = @FLRIG_BUILD_CXXFLAGS@ FLRIG_BUILD_LDADD = @FLRIG_BUILD_LDADD@ FLRIG_BUILD_LDFLAGS = @FLRIG_BUILD_LDFLAGS@ FLRIG_VERSION = @FLRIG_VERSION@ FLRIG_VERSION_MAJOR = @FLRIG_VERSION_MAJOR@ FLRIG_VERSION_MINOR = @FLRIG_VERSION_MINOR@ FLRIG_VERSION_PATCH = @FLRIG_VERSION_PATCH@ FLTK_CFLAGS = @FLTK_CFLAGS@ FLTK_CONFIG = @FLTK_CONFIG@ FLTK_LIBS = @FLTK_LIBS@ FLUID = @FLUID@ FLXMLRPC_CFLAGS = @FLXMLRPC_CFLAGS@ FLXMLRPC_LIBS = @FLXMLRPC_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAC_UNIVERSAL_CFLAGS = @MAC_UNIVERSAL_CFLAGS@ MAC_UNIVERSAL_LDFLAGS = @MAC_UNIVERSAL_LDFLAGS@ MAKEINFO = @MAKEINFO@ MAKENSIS = @MAKENSIS@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OPT_CFLAGS = @OPT_CFLAGS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTW32_CFLAGS = @PTW32_CFLAGS@ PTW32_LIBS = @PTW32_LIBS@ RDYNAMIC = @RDYNAMIC@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ X_CFLAGS = @X_CFLAGS@ X_LIBS = @X_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target = @target@ target_alias = @target_alias@ target_cpu = @target_cpu@ target_os = @target_os@ target_vendor = @target_vendor@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ACLOCAL_AMFLAGS = -I m4 SUBDIRS = src all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-tags \ distcleancheck distdir distuninstallcheck dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am @DARWIN_TRUE@appbundle: @DARWIN_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) @HAVE_NSIS_TRUE@nsisinst: @HAVE_NSIS_TRUE@ (cd src && $(MAKE) $(AM_MAKEFLAGS) $@) #EXTRA_DIST = build-aux/config.rpath # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: flrig-1.3.24/scripts/0000755000175000017500000000000012650266613011403 500000000000000flrig-1.3.24/scripts/mknsisinst.sh0000755000175000017500000000162112563434622014064 00000000000000#!/bin/sh ### Script to create a win32 installer file ### 20090510 Stelios Bounanos M0GLD, Dave Freese W1HKJ ### change for the target application FLRIG_name=flrig FLRIG_bin=flrig.exe if [ $# -ne 2 ]; then echo "Syntax: $0 data-dir build-dir" >&2 exit 1 fi if [ -z "$PACKAGE_TARNAME" ]; then echo "E: \$PACKAGE_TARNAME undefined" exit 1 fi PWD=`pwd` data="${PWD}/$1" build="${PWD}/$2" # more sanity checks for d in "$data" "$build"; do test -d "$d" && continue echo "E: ${d}: not a directory" >&2 exit 1 done if ! test -w "$build"; then echo "E: ${build} is not writeable" >&2 exit 1 fi set -e def="-DFLRIG_NAME=$FLRIG_name -DFLRIG_BINARY=$FLRIG_bin -DFLRIG_VERSION=$PACKAGE_VERSION" $MAKENSIS -V2 -NOCD -D"INSTALLER_FILE=$INSTALLER_FILE" -D"LICENSE_FILE=$data/../COPYING" \ -D"SUPPORT_URL=$PACKAGE_HOME" -D"UPDATES_URL=$PACKAGE_DL" $def "$data/win32/fl_app.nsi" flrig-1.3.24/scripts/buildmxe.sh0000755000175000017500000000057112564116400013466 00000000000000#!/bin/sh ./configure \ $PKGCFG \ $CROSSCFG \ --with-ptw32=$PREFIX/usr/i686-w64-mingw32.static \ --with-libiconv-prefix=$PREFIX/iconv \ --enable-static \ PTW32_LIBS="-lpthread -lpcreposix -lpcre -lregex" \ FLTK_CONFIG=$PREFIX/bin/i686-w64-mingw32.static-fltk-config make $PREFIX/bin/i686-w64-mingw32.static-strip src/flrig.exe make nsisinst mv src/*setup*exe . flrig-1.3.24/scripts/mkappbundle.sh0000755000175000017500000000670112562732137014171 00000000000000#!/bin/sh ### Script to create the .app structure for osx ### 20090730 Stelios Bounanos M0GLD if [ $# -ne 2 ]; then echo "Syntax: $0 data-dir build-dir" >&2 exit 1 fi if [ -z "$PACKAGE_TARNAME" ]; then echo "E: \$PACKAGE_TARNAME undefined" exit 1 fi PWD=`pwd` data="${PWD}/$1" build="${PWD}/$2" bundle_dir="$APPBUNDLE_NOLIBS" static_bundle_dir="$APPBUNDLE" # more sanity checks for d in "$data" "$build"; do test -d "$d" && continue echo "E: ${d}: not a directory" >&2 exit 1 done if ! test -w "$build"; then echo "E: ${build} is not writeable" >&2 exit 1 fi plist="${data}/mac/Info.plist.in" flrig_icon="${data}/mac/flrig.icns" for f in "$plist" "$flrig_icon"; do test -r "$f" && continue echo "E: ${f}: not readable" >&2 exit 1 done # aaaaaaaaaargh => Aaaaaaaaaargh upcase1() { sed 'h; s/\(^.\).*/\1/; y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/; G; s/\n.//' } function copy_libs() { list="$1" while test "x$list" != "x"; do change="$list" list="" for obj in $change; do for lib in `otool -L $obj | \ sed -n 's!^.*[[:space:]]\([^[:space:]]*\.dylib\).*$!\1!p' | \ grep -Ev '^/(usr/lib|System)'`; do libfn="`basename $lib`" if ! test -f "Frameworks/$libfn"; then cp "$lib" "Frameworks/$libfn" install_name_tool -id "@executable_path/../Frameworks/$libfn" "Frameworks/$libfn" list="$list Frameworks/$libfn" fi install_name_tool -change "$lib" "@executable_path/../Frameworks/$libfn" "$obj" done done done } function bundle() { appname="${binary}-${appversion}.app" cd "$build" # bundle the binary echo "creating ${build}/$bundle_dir/$appname" $mkinstalldirs "$bundle_dir/$appname/Contents/MacOS" "$bundle_dir/$appname/Contents/Resources" cd "$bundle_dir" $INSTALL_PROGRAM "${build}/$binary" "$appname/Contents/MacOS" test "x$NOSTRIP" = "x" && ${STRIP:-strip} -S "$appname/Contents/MacOS/$binary" $INSTALL_DATA "$icon" "$appname/Contents/Resources" echo "APPL${signature}" > "$appname/Contents/PkgInfo" sed -e "s!%%IDENTIFIER%%!${identifier}!g; s!%%NAME%%!${name}!g;\ s!%%SIGNATURE%%!${signature}!g; s!%%BINARY%%!${binary}!g;\ s!%%VERSION%%!${version}!g; s!%%ICON%%!${icon##*/}!g;" < "$plist" > "$appname/Contents/Info.plist" if grep '%%[A-Z]*%%' "$appname/Contents/Info.plist"; then echo "E: unsubstituted variables in $appname/Contents/Info.plist" >&2 exit 1 fi # bundle the binary and its non-standard dependencies echo "creating ${build}/$static_bundle_dir/$appname" cd .. $mkinstalldirs "$static_bundle_dir" cp -pR "$bundle_dir/$appname" "$static_bundle_dir" $mkinstalldirs "$static_bundle_dir/$appname/Contents/Frameworks" cd "$static_bundle_dir/$appname/Contents" copy_libs "MacOS/$binary" } set -e identifier="com.w1hkj.$PACKAGE_TARNAME" name=$(echo "$PACKAGE_TARNAME" | upcase1) # we'll use the first four consonants as the signature signature="$(echo $PACKAGE_TARNAME | sed 's/[aeiouAEIOU]//g; s/\(^....\).*/\1/')" binary="$PACKAGE_TARNAME" icon="$flrig_icon" version="${FLRIG_VERSION_MAJOR}.${FLRIG_VERSION_MINOR}" appversion="$FLRIG_VERSION" bundle cd "$build" echo $ECHO_N "creating disk image" hdiutil create -ov -srcfolder "$bundle_dir" -format UDZO -tgtimagekey zlib-level=9 "${APPBUNDLE}-nolibs.dmg" echo $ECHO_N "creating disk image" hdiutil create -ov -srcfolder "$static_bundle_dir" -format UDZO -tgtimagekey zlib-level=9 "${APPBUNDLE}.dmg" flrig-1.3.24/scripts/builddist.sh0000755000175000017500000000105112563434622013642 00000000000000# build file to generate the distribution binary tarball autoreconf # build windows installation file ./configure \ $PKGCFG \ $CROSSCFG \ --with-ptw32=$PREFIX/usr/i686-w64-mingw32.static \ --with-libiconv-prefix=$PREFIX/iconv \ --enable-static \ PTW32_LIBS="-lpthread -lpcreposix -lpcre -lregex" \ FLTK_CONFIG=$PREFIX/bin/i686-w64-mingw32.static-fltk-config make $PREFIX/bin/i686-w64-mingw32.static-strip src/flrig.exe make nsisinst mv src/*setup*exe . make clean # build the distribution tarball ./configure make distcheck make clean