mirror of
https://github.com/n5ac/mmtty.git
synced 2025-12-06 04:12:03 +01:00
Added source file to repo as received from AA6YQ
This commit is contained in:
commit
979c196eb6
423
ARRL.DX
Normal file
423
ARRL.DX
Normal file
|
|
@ -0,0 +1,423 @@
|
|||
! ARRL DXCC COUNTRIES LIST For MMLOG
|
||||
!
|
||||
AP ;AP-AS,6P-6S ;PAKISTAN ;AS ;E
|
||||
!A1 ;A1 ;ABU AIL ;AS
|
||||
A2 ;A2,8O ;BOTSWANA ;AF ;B
|
||||
A3 ;A3 ;TONGA ;OC ;N
|
||||
A4 ;A4 ;OMAN ;AS ;D
|
||||
A5 ;A5 ;BHUTAN ;AS ;F
|
||||
A6 ;A6 ;UNITED ARAB ;AS ;D
|
||||
A7 ;A7 ;QATAR ;AS ;C
|
||||
A9 ;A9 ;BAHRAIN ;AS ;C
|
||||
BV9P ;BV9P\,BQ9P\ ;PRATAS IS. ;AS ;H
|
||||
BV ;BV ;TAIWAN ;AS ;H
|
||||
BS7 ;BS7H\ ;SCARBOROUGH REEF ;AS ;H
|
||||
BY ;BA-BZ,3H-3U,B1-B9 ;CHINA ;AS ;H
|
||||
CE0X ;CE0X,XQ0X-XR0X,CE0AA ;SAN FELIX IS. ;SA ;R
|
||||
CE0Z ;CE0Z,CE0I,CE0OGZ,XQ0Z-XR0Z,XQ0I-XR0I,CE0/JA7XYE; FERNANDEZ ;SA ;R
|
||||
CE0 ;CE0,XQ0-XR0 ;EASTER IS. ;SA ;T
|
||||
CE ;CA-CE,XQ-XR,3G ;CHILE ;SA ;Q
|
||||
CM ;CL-CM,CO,T4 ;CUBA ;NA ;R
|
||||
CN ;CN,5C-5G ;MOROCCO ;AF ;Z
|
||||
CP ;CP ;BOLIVIA ;SA ;Q
|
||||
CT3 ;CS3,CT3,CR9 ;MADEIRAI IS.(PORTUGAL) ;AF ;Z
|
||||
CU ;CU ;AZORES IS.(PORTUGAL) ;EU ;Z
|
||||
CT ;CQ-CU ;PORTUGAL ;EU ;Z
|
||||
CY9 ;CY9,CY0SPI ;ST PAUL IS. ;NA ;Q
|
||||
CY0 ;CY0 ;SABLE IS. ;NA ;Q
|
||||
CX ;CV-CX ;URUGUAY ;SA ;P
|
||||
C2 ;C2 ;NAURU ;OC ;M
|
||||
C3 ;C3 ;ANDORRA ;EU ;A
|
||||
C5 ;C5 ;THE GAMBIA ;AF ;Z
|
||||
C6 ;C6 ;BAHAMA IS. ;NA ;R
|
||||
C8 ;C8-C9 ;MOZAMBIQUE ;AF ;B
|
||||
DL ;DA-DR,Y2-Y9 ;GERMANY ;EU ;A
|
||||
DU ;DU-DZ,4D-4I ;PHILIPPINES ;OC ;H
|
||||
D2 ;D2-D3 ;ANGOLA ;AF ;A
|
||||
D4 ;D4 ;CAPE VERDE ;AF ;A
|
||||
D6 ;D6 ;COMOROS ;AF ;C
|
||||
EA6 ;EA6-EH6,AM6-AO6 ;BALEARIC ;EU ;A
|
||||
EA8 ;EA8-EH8,AM8-AO8 ;CANARY ;AF ;A
|
||||
EA9 ;EA9-EH9,AM9-AO9 ;CEUTA & MELILLA(SPAIN) ;AF ;A
|
||||
EA ;EA-EH,AM-AO ;SPAIN ;EU ;A
|
||||
EI ;EI-EJ ;IRELAND ;EU ;Z
|
||||
EK ;EK ;ARMENIA (ex UG) ;AS ;D
|
||||
EL ;EL,5L-5M,A8,D5,6Z ;LIBERIA ;AF ;Z
|
||||
EP ;EP-EQ,HN,9B-9D ;IRAN ;AS ;c
|
||||
ER ;ER ;MOLDOVA (ex UO) ;EU ;C
|
||||
ES ;ES ;ESTONIA ;EU ;C
|
||||
ET ;ET,9E-9F ;ETHIOPIA ;AF ;C
|
||||
EU ;EU-EW ;BELARUS (ex UC) ;EU ;C
|
||||
EX ;EX ;KYRGYZSTAN (ex UM) ;AS ;F
|
||||
EY ;EY ;TAJIKISTAN (ex UJ) ;AS ;F
|
||||
EZ ;EZ ;TURKMENISTAN (ex UH) ;AS ;F
|
||||
E4 ;E4 ;PALESTINE ;AS ;B
|
||||
E3 ;E3 ;ERITREA ;AF ;C
|
||||
FG ;FG ;GUADELOUPE ;NA ;Q
|
||||
FH ;FH ;MAYOTTE ;AF ;C
|
||||
FJ ;FJ,FS ;SAINT MARTIN ;NA ;Q
|
||||
FK ;FK,TX8 ;NEW CALEDONIA ;OC ;L
|
||||
FM ;FM ;MARTINIQUE ;NA ;Q
|
||||
FO/C ;FO0X,FO0AAA ;CLIPPERTON IS. ;NA ;T
|
||||
FO ;FO ;FRENCH POLYNESIA ;OC ;W
|
||||
FO/A ;FO ;AUSTRAL IS ;OC ;W
|
||||
FO/M ;FO ;MARQUESAS IS ;OC ;W
|
||||
FP ;FP ;ST.PIERRE & MIQUELON IS. ;NA ;Q
|
||||
FR/J ;FR*/J,FR*/E ;JUAN DE NOVA & EUROPA IS. ;AF ;C
|
||||
FR/G ;FR*/G ;GLORIOSO IS. ;AF ;C
|
||||
FR/T ;FR*/T ;TROMELIN ;AF ;C
|
||||
FR ; ;REUNION IS. ;AF ;C
|
||||
FR/? ;FR ;REUNION IS. /GLORIOSO IS. /JUAN DE NOVA & EUROPA ;AF ;C
|
||||
FT5W ;FT8W,FT2W,FT4W,FT5W,FT0W ;CROZET IS. ;AF ;C
|
||||
FT5X ;FT8X,FT2X,FT4X,FT5X,FT0X ;KERGUELEN IS. ;AF ;E
|
||||
FT5Z ;FT8Z,FT2Z,FT4Z,FT5Z,FT0Z ;AMSTERDAM & ST PAUL IS. ;AF ;E
|
||||
FW ;FW ;WALLIS & FUTUNA IS. ;OC ;M
|
||||
FY ;FY ;FRENCH GUIANA ;SA ;P
|
||||
F ;F,HW-HY,TM,TO-TQ ;FRANCE ;EU ;A
|
||||
GD ;GD,GT,MA6-MB6,2A6,MD ;ISLE OF MAN ;EU ;Z
|
||||
GI ;GI,GN,MA5-MB5,2A5,MI ;NORTHERN IRELAND ;EU ;Z
|
||||
GJ ;GH,GJ,MA7-MB7,2A7,MJ ;JERSEY ;EU ;Z
|
||||
GM ;GM,GS,MA3-MB3,2A3,MM ;SCOTLAND ;EU ;Z
|
||||
GU ;GU,GP,MA8-MB8,2A8,MG ;GUERNSEY ;EU ;Z
|
||||
GW ;GW,GC,MA4-MB4,2A4,MW ;WALES,U.K ;EU ;Z
|
||||
G ;G,2,M ;ENGLAND(U.K) ;EU ;Z
|
||||
HA ;HA,HG ;HUNGARY ;EU ;A
|
||||
HB0 ;HB0,HE0 ;LIECHTENSTEIN ;EU ;A
|
||||
HB ;HB,HE,4U1VIC ;SWITZERLAND ;EU ;A
|
||||
HC8 ;HC8-HD8 ;GALAPAGOS IS.(ECUADOR) ;SA ;R
|
||||
HC ;HC,HD ;ECUADOR ;SA ;R
|
||||
HH ;HH,4V ;HAITI ;NA ;R
|
||||
HI ;HI ;DOMINICAN REPUBLIC ;NA ;R
|
||||
HK0/M ;HK0M,5J0M,HK0TU ;MALPELO IS. ;NA ;R
|
||||
HK0/A ;HK0,5J0 ;SAN ANDRES ;NA ;R
|
||||
HK ;HJ-HK,5J-5K ;COLOMBIA ;SA ;R
|
||||
HL ;HL,DS-DT,6K-6N,D7-D9,KL9 ;REPUBLIC OF KOREA (SOUTH KOREA) ;AS ;I
|
||||
HP ;HO-HP,3E-3F,H3,H8-H9 ;PANAMA ;NA ;R
|
||||
HR ;HQ-HR ;HONDURAS ;NA ;S
|
||||
HS ;HS,E2 ;THAILAND ;AS ;G
|
||||
HV ;HV ;VATICAN ;EU ;A
|
||||
HZ ;HZ,7Z-8Z ;SAUDI ARABIA ;AS ;C
|
||||
H40 ;H40 ;TEMOTU IS ;OC ;L
|
||||
H4 ;H4 ;SOLOMON IS. ;OC ;L
|
||||
IS ;IS,IM0,IU0 ;SARDINIA ;EU ;A
|
||||
I ;I ;ITALY ;EU ;A
|
||||
JD1/M ;JD1YAA,JD1BIY ;MINAMI TORISHIMA ;OC ;I
|
||||
JD1 ;JD1BIC ;OGASAWARA ;AS ;I
|
||||
JD1/? ;JD1 ;OGASAWARA, /MINAMI TORISHIMA ;I
|
||||
JA ;JA-JS,7J-7N,8J-8N ;JAPAN ;AS ;I
|
||||
JT ;JT-JV ;MONGOLIA ;AS ;H
|
||||
JW ;JW ;SVALBARD IS. ;EU ;A
|
||||
JX ;JX ;JA MAYEN IS. ;EU ;Z
|
||||
JY ;JY ;JORDAN ;AS ;B
|
||||
J2 ;J2 ;DJIBOUTI ;AF ;C
|
||||
J3 ;J3 ;GRENADA ;NA ;Q
|
||||
J5 ;J5 ;GUINEA-BISSAU ;AF ;Z
|
||||
J6 ;J6 ;ST LUCIA ;NA ;Q
|
||||
J7 ;J7 ;DOMINICA ;NA ;Q
|
||||
J8 ;J8 ;ST VINCENT & DEPENDENCIES ;NA ;Q
|
||||
KC4 ;8J1R?\,R1A,FB8Y,CE9A,ZL5,Y88,Y90ANT,ZS8BBB,ZS8AAA,KC4AAC,KC4USV,Y73SOP,KC4AAA,KC4USB,KC4USX,3G9A,3Y9WT,8J1RY,AT0A,IA0PS,OR4,XS7ANT,Y83ANT,ZL0AIC,ZS7ANT,VK0DS,KC4AAE ;ANTARCTICA ;AN
|
||||
KC6 ;T8,KC6??\ ;(WESTERN CAROLINE IS.) BELAU ;OC ;I
|
||||
KG4 ;KG4??\ ;GUANTANAMO BAY ;NA ;R
|
||||
KH0 ;AH0,KH0,NH0,WH0 ;MARIANA IS. ;OC ;K
|
||||
KH1 ;AH1,KH1,NH1,WH1 ;BAKER & HOWLAND IS. ;OC ;X
|
||||
KH2 ;AH2,KH2,NH2,WH2 ;GUAM ;OC ;K
|
||||
KH3 ;AH3,KH3,NH3,WH3 ;JOHNSTON IS. ;OC ;X
|
||||
KH4 ;AH4,KH4,NH4,WH4 ;MIDWAY IS. ;OC ;M
|
||||
KH5K ;AH5K,KH5K,NH5K,WH5K ;KINGMAN REEF ;OC ;W
|
||||
KH5 ;AH5,KH5,NH5,WH5 ;PALMYRA & JARVIS ;OC ;W
|
||||
KH7K ;AH7K,KH7K,NH7K,WH7K ;KURE IS. ;OC ;M
|
||||
KH6 ;AH6-AH7,KH6-KH7,NH6-NH7,WH6-WH7 ;HAWAIIAN IS. ;OC ;W
|
||||
KH8 ;AH8,KH8,NH8,WH8 ;AMERICAN SAMOA ;OC ;W
|
||||
KH9 ;AH9,KH9,NH9,WH9 ;WAKE IS. ;OC ;L
|
||||
KL7 ;AL,KL0-KL8,NL,WL ;ALASKA ;NA ;W
|
||||
KP1 ;KP1,NP1,WP1 ;NAVASSA IS. ;NA ;Q
|
||||
KP2 ;KP2,NP2,WP2 ;AM.VIRGIN IS. ;NA ;Q
|
||||
KP4 ;KP3-KP4,NP3-NP4,WP3-WP4 ;PUERTO RICO ;NA ;Q
|
||||
KP5 ;KP5,NP5,WP5 ;DESECHEO IS. ;NA ;Q
|
||||
W ;AA6-AK6,K6,N6,W6,K?6,N?6,W?6 ;U.S.A. ;NA ;U
|
||||
W ;AA7-AK7,K7,N7,W7,K?7,N?7,W?7 ;U.S.A. ;NA ;T
|
||||
W ;AA0-AK0,K0,N0,W0,K?0,N?0,W?0,AA5-AK5,K5,N5,W5,K?5,N?5,W?5,AA9-AK9,K9,N9,W9,K?9,N?9,W?9 ;U.S.A. ;NA ;S
|
||||
W ;AA-AL,K,N,W,4U1WB ;U.S.A. ;NA ;R
|
||||
LA ;LA-LN ;NORWAY ;EU ;A
|
||||
LU ;LO-LW,AY-AZ,L2-L9 ;ARGENTINA ;SA ;P
|
||||
LX ;LX ;LUXEMBOURG ;EU ;A
|
||||
LY ;LY ;LITHUANIA ;EU ;C
|
||||
LZ ;LZ ;BULGARIA ;EU ;B
|
||||
OA ;OA-OC,4T ;PERU ;SA ;R
|
||||
OD ;OD ;LEBANON ;AS ;B
|
||||
OE ;OE ;AUSTRIA ;EU ;A
|
||||
OH0 ;OH0,OF0 ;ALAND IS. ;EU ;B
|
||||
OJ0 ;OJ0 ;MARKET REEF ;EU ;B
|
||||
OH ;OF-OJ ;FINLAND ;EU ;B
|
||||
OK ;OK-OL ;CZECH REPUBLIC ;EU ;A
|
||||
OM ;OM ;SLOVAK REPUBLIC ;EU ;A
|
||||
ON ;ON-OT ;BELGIUM ;EU ;A
|
||||
OX ;OX ;GREENLAND ;NA ;Q
|
||||
OY ;OY ;FAROES ;EU ;Z
|
||||
OZ ;OU-OZ,XP,5P-5Q ;DENMARK ;EU ;A
|
||||
PJ8 ;PJ5-PJ8,PJ0J,PJ1F ;SINT MAARTEN ;NA ;Q
|
||||
PJ9 ;PJ ;NETHERLANDS ANTILLES ;SA ;Q
|
||||
PA ;PA-PI ;NETHERLANDS ;EU ;A
|
||||
PY0/S ;PP0S-PY0S,ZV0S-ZZ0S,PY0DX,PT0MI,PS0WH-PT0WH,PY0RO,PW0PP,PP0ZS-PY0ZS ;ST PETER ;SA ;P
|
||||
PY0/T ;PP0T-PY0T,ZV0T-ZZ0T ;TRINDADE ;SA ;P
|
||||
PY0 ;PP0-PY0,ZV0-ZZ0 ;FERNANDO DE NORONHA ;SA ;P
|
||||
PY ;PP-PY,ZV-ZZ ;BRAZIL ;SA ;P
|
||||
PZ ;PZ ;SURINAM ;SA ;Q
|
||||
P2 ;P2 ;PAPUA NEW GUINEA ;OC ;K
|
||||
P4 ;P4 ;ARUBA ;SA ;Q
|
||||
P5 ;P5-P9,HM ;NORTH KOREA (DPRK) ;AS ;I
|
||||
R1/MVI ;4J1FS,R1M,*/MVI,MVI/* ;MALYJ VYSOTSKIJ IS. (ex 4J1) ;EU ;C
|
||||
R1/FJL ;R1F,*/FJL,FJL/* ;FRANZ JOSEPH LAND (ex UA1/4K2) ;EU ;C
|
||||
SM ;SA-SM,7S-8S ;SWEDEN ;EU ;A
|
||||
SP ;SN-SR,HF,3Z ;POLAND ;EU ;A
|
||||
!ST0 ;ST0,6T0-6U0 ;SOUTHEN SUDAN ;AF ;B
|
||||
ST ;ST,6T-6U ;SUDAN ;AF ;B
|
||||
SU ;SU,6A-6B ;EGYPT ;AF ;B
|
||||
SV/A ;SY1MA,SV*/A,*/SV/A ;MT ATHOS ;EU ;B
|
||||
SV5 ;SV5-SZ5,J45 ;DODECANESE IS. ;EU ;B
|
||||
SV9 ;SV9-SZ9,J49 ;CRETE ;EU ;B
|
||||
SV ;SV-SZ,J4 ;GREECE ;EU ;B
|
||||
S2 ;S2-S3 ;BANGLADESH ;AS ;F
|
||||
S5 ;S5 ;SLOVENIA (ex YU3) ;EU ;A
|
||||
S7 ;S7 ;SEYCHELLES ;AF ;C
|
||||
S9 ;S9 ;SAO TOME & PRINCIPE ;AF ;B
|
||||
S0 ;S0 ;WESTERN SAHARA ;AF ;Z
|
||||
TA ;TA1-TC1,YM1 ;TURKEY (EU) ;EU ;C
|
||||
TA ;TA2-TA9,TB2-TB9,TC2-TC9,YM2-YM9;TURKEY (AS) ;AS ;C
|
||||
TF ;TF ;ICELAND ;EU ;Z
|
||||
TG ;TG,TD ;GUATEMALA ;NA ;S
|
||||
TI9 ;TI9,TE9 ;COCOS IS. ;NA ;S
|
||||
TI ;TI,TE ;COSTA RICA ;NA ;S
|
||||
TJ ;TJ ;CAMEROON ;AF ;A
|
||||
TK ;TK ;CORSICA ;EU ;A
|
||||
TL ;TL ;CENTRAL AFRICAN REP ;AF ;A
|
||||
TN ;TN ;CONGO ;AF ;A
|
||||
TR ;TR ;GABON ;AF ;A
|
||||
TT ;TT ;CHAD ;AF ;A
|
||||
TU ;TU ;IVORY COAST ;AF ;Z
|
||||
TY ;TY ;BENIN ;AF ;Z
|
||||
TX0 ;TX0 ;CHESTERFIELD IS. ;OC ;L
|
||||
TZ ;TZ ;MALI ;AF ;Z
|
||||
T2 ;T2 ;TUVALU ;OC ;M
|
||||
T30 ;T30 ;WEST KIRIBATI(GILBERT IS.) ;OC ;X
|
||||
T31 ;T31 ;CENTRAL KIRIBATI(BRITISH PHOENIX IS.) ;OC ;X
|
||||
T32 ;T32 ;EAST KIRIBATI(LINE IS.) ;OC ;W
|
||||
T33 ;T33 ;BANABA IS(OCEAN IS.) ;OC ;M
|
||||
T5 ;T5,6O ;SOMALIA ;AF ;C
|
||||
T7 ;T7 ;SAN MARINO ;EU ;A
|
||||
T9 ;T9 ;BOSNIA-HERZEGOVINA (ex YU4,4N4) ;EU ;A
|
||||
UJ ;UJ-UM ;UZBEKISTAN (ex UI) ;AS ;E
|
||||
UN ;UN-UQ ;KAZAKHSTAN (ex UL) ;AS ;E
|
||||
UR ;UR-UZ,EM-EO ;UKRAINE (ex UB) ;EU ;B
|
||||
UA2 ;U?2,R?2 ;KALININGRAD ;EU ;C
|
||||
UA/EU ;U?1-U?6,R?1-R?6,U1-U6,R1-R6 ;EUROPEAN RUSSIA ;EU ;C
|
||||
UA/AS ;U?9,R?9,U9,R9 ;ASIATIC RUSSIA ;AS ;E
|
||||
UA/AS ;U?8,U?0,R?8,R?0,U8,U0,R8,R0 ;ASIATIC RUSSIA ;AS ;I
|
||||
VE ;VA7-VG7,VX7,CF7-CK7,XJ7-XO7,VY1 ;CANADA ;NA ;U
|
||||
VE ;VA6-VG6,VX6,CF6-CK6,XJ6-XO6,VA5-VG5,VX5,CF5-CK5,XJ5-XO5 ;CANADA ;NA ;T
|
||||
VE ;VA4-VG4,VX4,CF4-CK4,XJ4-XO4 ;CANADA ;NA ;S
|
||||
VE ;VA3-VG3,VX3,CF3-CK3,XJ3-XO3,VA2-VG2,VX2,CF2-CK2,XJ2-XO2 ;CANADA ;NA ;R
|
||||
VE ;VA-VG,VO,VX-VY,CF-CK,CY-CZ,XJ-XO ;CANADA ;NA ;Q
|
||||
VK9L ;VK9L,AX9L ;LORD HOWE IS. ;OC ;L
|
||||
VK9M ;VK9JW,VK9ZR,VK9MR,VK9ZM ;MELLISH REEF ;OC ;K
|
||||
VK9N ;VK9N,AX9N ;NORFOLK IS. ;OC ;L
|
||||
VK9W ;VK9Z,AX9Z,VK9TR ;WILLIS IS. ;OC ;K
|
||||
VK9X ;VK9X,AX9X ;CHRISTMAS IS. ;OC ;H
|
||||
VK9C ;VK9Y,AX9Y,VK9WB,VK9EW ;COCOS-KEELING IS. ;OC ;H
|
||||
VK9? ;VK9 ;COCOS-KEELING IS., /LORD HOWE IS., /MELLISH IS., /NORFOLK IS., /WILLIS IS., /CHRISTMAS IS. ;OC ;K
|
||||
VK0/M ;VK0AE,VK0GC,VK0WH ;MACQUARIE ;OC ;K
|
||||
VK0/H ;VK0HM,VK0HI,VK0CW,VK0DA,VK0IR ;HEARD IS. ;AF ;E
|
||||
VK0/? ;VK0 ;HEARD IS., /MACQUARIE IS.
|
||||
VK ;VH-VN,VZ,AX ;AUSTRALIA ;OC ;K
|
||||
VP2E ;VP2E,VP25E ;ANGUILLA ;NA ;Q
|
||||
VP2M ;VP2M ;MONTSERRAT ;NA ;Q
|
||||
VP2V ;VP2V ;BRITISH VIRGIN IS. ;NA ;Q
|
||||
VP5 ;VP5 ;TURKS & CAICOS IS. ;NA ;R
|
||||
VP8/G ;VP8BUB,VP8CDJ,VP8SGP ;SOUTH GEORGIA ;SA ;P
|
||||
VP8/O ;LU1Z,VP8BXK ;SOUTH ORKNEY ;SA ;P
|
||||
VP8/S ;LU2Z,4K1F,CX0XY,HF0POL,LU5ZI,ZX0ECF,VP8CQS,VP8CQR,LZ0A ;SOUTH SHETLAND ;SA ;P
|
||||
VP8/SW ;VP8SSI ;SOUTH SANDWICH IS. ;SA ;P
|
||||
VP8 ;VP8CSA ;FALKLAND IS. ;SA ;Q
|
||||
VP8/? ;VP8,LU?Z ;FALKLAND IS., /SOUTH GEORGIA IS., /SOUTH ORKNEY IS., /SOUTH SANDWICH IS., /SOUTH SHETLAND IS. ;SA ;P
|
||||
VP9 ;VP9 ;BERMUDA IS. ;NA
|
||||
VQ9 ;VQ9 ;CHAGOS IS. ;AF ;E
|
||||
VR6 ;VR6,VP6 ;PITCAIRN IS. ;OC ;U
|
||||
VR2 ;VS6,VS96,VS97,VR97,VR98,VR2 ;HONG KONG ;AS ;H
|
||||
VU/A ;VU2JPS ;ANDAMAN & NICOBAR IS. ;AS ;e
|
||||
VU/L ; ;LACCADIVE IS. ;AS ;e
|
||||
VU ; ;INDIA ;AS ;e
|
||||
VU/? ;VT-VW,AT-AW,8T-8Y ;INDIA, /ANDAMAN & NICOBAR IS., /LACCADIVE IS. ;AS ;e
|
||||
V2 ;V2 ;ANTIGUA & BARBUDA ;NA ;Q
|
||||
V3 ;V3 ;BELIZE ;NA ;S
|
||||
V4 ;V4 ;ST KITTS & NEVIS ;NA ;Q
|
||||
V5 ;V5 ;NAMIBIA ;AF ;B
|
||||
V6 ;V6 ;MICRONESIA(E CAROLINE IS.) ;OC ;L
|
||||
V7 ;V7 ;MARSHALL IS. ;OC ;M
|
||||
V8 ;V8 ;BRUNEI ;OC ;H
|
||||
XF4 ;XA4-XI4,4A4-4C4,6D4-6J4 ;REVILLA GIGEDO ;NA ;T
|
||||
XE ;XA-XI,4A-4C,6D-6J ;MEXICO ;NA ;S
|
||||
XT ;XT ;BURKINA-FASO ;AF ;Z
|
||||
XU ;XU ;CAMBODIA ;AS ;G
|
||||
XV ;XV,3W ;VIETNAM ;AS ;G
|
||||
XW ;XW ;LAOS ;AS ;G
|
||||
XX9 ;XX9 ;MACAO ;AS ;H
|
||||
XZ ;XY-XZ,1Z ;MYANMAR ;AS ;f
|
||||
YA ;YA,T6 ;AFGHANISTAN ;AS ;d
|
||||
YB ;YB-YH,JZ,PK-PO,7A-7I,8A-8I ;INDONESIA ;OC ;H
|
||||
YI ;YI ;IRAQ ;AS ;C
|
||||
YJ ;YJ ;VANUATU ;OC ;L
|
||||
YK ;YK,6C ;SYRIA ;AS ;B
|
||||
YL ;YL,UQ ;LATVIA ;EU ;C
|
||||
YN ;YN,HT,H6-H7 ;NICARAGUA ;NA ;S
|
||||
YO ;YO-YR ;ROMANIA ;EU ;B
|
||||
YS ;YS,HU ;EL SALVADOR ;NA ;S
|
||||
YU ;YT,YU,YZ,4N-4O ;YUGOSLAVIA ;EU ;A
|
||||
YV0 ;YV0-YY0,4M0 ;AVES IS. ;NA ;Q
|
||||
YV ;YV-YY,4M ;VENEZUELA ;SA ;Q
|
||||
ZA ;ZA ;ALBANIA ;EU ;A
|
||||
ZB ;ZB ;GIBRALTAR ;EU ;A
|
||||
ZC ;ZC ;UK SOVEREIGN BASES ON CYPRUS ;AS ;B
|
||||
ZD7 ;ZD7 ;ST HELENA ;AF ;Z
|
||||
ZD8 ;ZD8 ;ASCENSION IS. ;AF ;Z
|
||||
ZD9 ;ZD9 ;TRISTAN DE CUNHA & GOUGH IS. ;AF ;Z
|
||||
ZF ;ZF ;CAYMAN IS. ;NA ;R
|
||||
ZK1/N ;ZK1CQ,ZK1RS,ZK1BY,ZK1WL,ZK1XP,ZK1XY ;NORTH COOK IS. ;OC ;W
|
||||
ZK1/S ; ;SOUTH COOK IS ;OC ;W
|
||||
ZK1/? ;ZK1 ;NORTH COOK IS., /SOUTH COOK IS. ;OC ;W
|
||||
ZK2 ;ZK2 ;NIUE ;OC ;X
|
||||
ZK3 ;ZK3 ;TOKELAU IS. ;OC ;X
|
||||
ZL7 ;ZL7-ZM7 ;CHATHAM IS. ;OC ;M
|
||||
ZL8 ;ZL8-ZM8 ;KERMADEC IS. ;OC ;M
|
||||
ZL9 ;ZL9-ZM9 ;AUKLAND & CAMPBELL IS. ;OC ;M
|
||||
ZL ;ZL-ZM ;NEW ZEALAND ;OC ;M
|
||||
ZP ;ZP ;PARAGUAY ;SA ;Q
|
||||
ZS8 ;ZS8MI,ZT8M-ZU8M,ZR8M,ZS8IR ;PRINCE EDWARD & MARION IS. ;AF ;B
|
||||
!ZS9 ;ZS9 ;WALVIS BAY ;AF
|
||||
ZS ;ZR-ZU ;REP OF SOUTH AFRICA ;AF ;B
|
||||
Z2 ;Z2 ;ZIMBABWE ;AF ;B
|
||||
Z3 ;Z3 ;MACEDONIA (ex YU5,4N5) ;EU ;A
|
||||
1A0 ;1A0 ;SOVEREIGN MILLITARY ORDER OF MALTA ;EU ;A
|
||||
1S ;1S,9M0,9M6OO ;SPRATLY IS. ;AS ;H
|
||||
3A ;3A ;MONACO ;EU ;A
|
||||
3B6 ;3B6-3B7 ;AGALEGA & ST BRANDON IS. ;AF ;C
|
||||
3B8 ;3B8 ;MAURITIUS IS. ;AF ;C
|
||||
3B9 ;3B9 ;RODRIGUEZ IS. ;AF ;C
|
||||
3C0 ;3C0 ;ANNOBON IS. ;AF ;A
|
||||
3C ;3C ;EQUATORIAL GUINEA ;AF ;A
|
||||
3D2/C ;3D2CR,3D2WV,3D2HL,3D2VT,3D2AM,3D2CU,3D2CT ;CONWAY REEF ;OC ;M
|
||||
3D2/R ;3D2XX,3D2RJ,3D2XV,3D2XR,3D2AP,3D2RO,3D2OQ,3D2RW ;ROTUMA IS ;OC ;M
|
||||
3D2 ;3D2 ;FIJI IS. ;OC ;M
|
||||
3DA ;3DA ;SWAZILAND ;AF ;B
|
||||
3V ;3V,TS ;TUNISIA ;AF ;A
|
||||
3X ;3X ;GUINEA ;AF ;Z
|
||||
3Y ;3Y1VC,3Y5X ;BOUVET ;AF ;Z
|
||||
3Y/P ;3Y1EE,3Y2GV ;PETER 1 IS. ;AN ;S
|
||||
3Y/? ;3Y ;BOUVET, /PETER 1 IS. ;AF,AN
|
||||
4J ;4J-4K ;AZERBAIJAN (ex UD) ;AS ;F
|
||||
4L ;4L ;GEORGIA (ex UF) ;AS ;F
|
||||
4S ;4P-4S ;SRI LANKA ;AS ;e
|
||||
4U1/U ;4U1U,4U43-4U44,4U45UN ;UN HEADQUATERS NEW YORK ;NA ;R
|
||||
4U1/I ;4U?ITU ;ITU GENEVA ;EU ;A
|
||||
4U1/? ;4U ;UN HEADQUATERS NEW YORK, /ITU GENEVA, etc
|
||||
!4W ;4W ;YEMEN :AS
|
||||
4W ;4W ;EAST TIMOR ;OC ;H
|
||||
4X ;4X,4Z ;ISRAEL ;AS ;B
|
||||
5A ;5A ;LIBYA ;AF ;B
|
||||
5B ;5B,C4,H2,P3 ;CYPRUS ;AS ;B
|
||||
5H ;5H-5I ;TANZANIA ;AF ;C
|
||||
5N ;5N-5O ;NIGERIA ;AF ;A
|
||||
5R ;5R-5S,6X ;MADAGASCAR ;AF ;C
|
||||
5T ;5T ;MAURITANIA ;AF ;Z
|
||||
5U ;5U ;NIGER ;AF ;A
|
||||
5V ;5V ;TOGO ;AF ;Z
|
||||
5W ;5W ;WESTERN SAMOA ;OC ;X
|
||||
5X ;5X ;UGANDA ;AF ;C
|
||||
5Y ;5Y-5Z ;KENYA ;AF ;C
|
||||
6W ;6V-6W ;SENEGAL ;AF ;Z
|
||||
6Y ;6Y ;JAMAICA ;NA ;R
|
||||
7O ;7O ;REP OF YEMEN ;AS ;C
|
||||
7P ;7P ;LESOTHO ;AF ;B
|
||||
7Q ;7Q ;MALAWI ;AF ;B
|
||||
7X ;7T-7Y ;ALGERIA ;AF ;Z
|
||||
8P ;8P ;BARBADOS ;NA ;Q
|
||||
8Q ;8Q ;MALDIVES ;AS,AF ;E
|
||||
8R ;8R ;GUYANA ;SA ;P
|
||||
9A ;9A ;CROATIA (ex YU2) ;EU ;A
|
||||
9G ;9G ;GHANA ;AF ;Z
|
||||
9H ;9H ;MALTA ;EU ;A
|
||||
9J ;9I-9J ;ZAMBIA ;AF ;B
|
||||
9K ;9K ;KUWAIT ;AS ;C
|
||||
9L ;9L ;SIERRA LEONE ;AF ;Z
|
||||
9M2 ;9M2,9M4,9W2,9W4 ;WEST MALAYSIA ;AS ;H
|
||||
9M6 ;9M6,9M8,9W6,9W8 ;EAST MALAYSIA ;OC ;H
|
||||
9N ;9N ;NEPAL ;AS ;e
|
||||
9Q ;9O-9T ;ZAIRE ;AF ;B
|
||||
9U ;9U ;BURUNDI ;AF ;B
|
||||
9V ;9V,S6 ;SINGAPORE ;AS ;H
|
||||
9X ;9X ;RWANDA ;AF ;B
|
||||
9Y ;9Y-9Z ;TRINIDAD & TOBAGO ;SA ;Q
|
||||
$END
|
||||
!----------------------------------------------------------------------------
|
||||
!ファイルの形式
|
||||
! カントリ名 ; カントリ識別子 ; QTH ; 大陸名 ; タイムゾーン
|
||||
!
|
||||
!● 行の先頭の<!>はコメントコード,<$>は終了コード
|
||||
!● カントリ名は8文字以内。
|
||||
!● カントリ識別子は<,>で区切って複数個記述可。
|
||||
!● QTHは任意の文字列
|
||||
!● 大陸名は NA, SA, EU, OC, AF, AS, AN
|
||||
!● タイムゾーンはA~Z(Jを除く)で記述する。小文字は+30分
|
||||
!● <TAB>コードは任意の位置にあっても良い
|
||||
!● 1行255文字以内。
|
||||
!● 定義する行(コメント行を除く)は最大512行まで
|
||||
!● このファイルをネット等で流通させる場合は、最後の変更履歴に追加記載する
|
||||
! ことをお勧めします。
|
||||
!
|
||||
!カントリ識別子
|
||||
! 1.プリフィックス(コールサイン)の羅列
|
||||
! 9M2,9M4,9W2,9W4
|
||||
! JD1YAA,JD1BIY
|
||||
! ※ コールサインが短い場合は終端記号(\)を付加したほうが良い
|
||||
! BV9P → BV9PAも含まれる
|
||||
! BV9P\ → BV9Pのみ
|
||||
!
|
||||
! 2.範囲の指定
|
||||
! DA-DR,Y2-Y9
|
||||
! EA6-EH6,AM6-AO6
|
||||
! 範囲は同じ位置の1ヶ所のみを昇順で記述
|
||||
! JA-JS EA6-EH6 OK
|
||||
! JS-JA(降順) EA6-EH7(2ヶ所) NG
|
||||
!
|
||||
! 3.ワイルドカード(範囲の複合可)
|
||||
! U?1-U?6,R?1-R?6
|
||||
! SV*/A,*/SV/A
|
||||
! <?>=すべての文字, <*>=すべての文字列
|
||||
!
|
||||
! 4.最初に定義したほうが優先される
|
||||
! JD1/M ;JD1YAA ; MINAMI TORISHIMA ;OC
|
||||
! JA ;JA-JS ; JAPAN ;AS
|
||||
! 上記の例ではJD1YAAはJA-JSにも含まれるが、その前にJD1/Mの定義
|
||||
! があるのでそちらが優先される
|
||||
!
|
||||
!<<<変更履歴>>>
|
||||
! Jan 15, 1996 - BV9P追加 JE3HHT
|
||||
! Feb 15, 1996 - BS7H追加 JE3HHT
|
||||
! Aug. 4, 1998 - VR98追加 JQ3UDL
|
||||
! Aug. 4, 1998 - TA(AS)変更 JQ3UDL
|
||||
! Nov. 15, 1998 - BQ9P追加 JQ3UDL
|
||||
! Feb. 7, 1999 - FO0/M追加 JQ3UDL
|
||||
! Feb. 7, 1999 - FO0/A追加 JQ3UDL
|
||||
! Feb. 7, 1999 - H40追加 JQ3UDL
|
||||
! Jul. 10, 1999 - E4追加 JQ3UDL
|
||||
! Nov. 15. 1999 - 9M6OO追加 JQ3UDL
|
||||
! Nov. 20. 1999 - B1-B9追加 JQ3UDL
|
||||
! Jan. 06. 2000 - ST0削除 JE3HHT
|
||||
! Feb. 15. 2000 - VR6にVP6追加 JE3HHT
|
||||
! Mar. 03. 2000 - FO0XにFO0AAA追加 JE3HHT
|
||||
! Mar. 20. 2000 - FO0X=>FO/C,FO0/M=>FO/M,FO0/A=>FO/Aに変更 JQ3UDL
|
||||
! Mar. 20. 2000 - 4W追加 JQ3UDL
|
||||
! Mar. 21. 2000 - TX0追加 JE3HHT
|
||||
! Jan. 07. 2001 - P2の範囲変更 JQ3UDL
|
||||
! Jan. 08. 2001 - KG4範囲変更 JQ3UDL
|
||||
! Jan. 08. 2001 - LZ0A追加 JQ3UDL
|
||||
|
||||
82
CLX.cpp
Normal file
82
CLX.cpp
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "math.h"
|
||||
#include "CLX.h"
|
||||
|
||||
///----------------------------------------------------------------
|
||||
/// •¡‘f<E28098>”‰‰ŽZƒNƒ‰ƒX
|
||||
void CLX::Div(const CLX &ref)
|
||||
{
|
||||
double R, J, D;
|
||||
R = r * ref.r + j * ref.j;
|
||||
J = j * ref.r - r * ref.j;
|
||||
D = ref.r * ref.r + ref.j * ref.j;
|
||||
if( D ){
|
||||
r = R/D;
|
||||
j = J/D;
|
||||
}
|
||||
else {
|
||||
r = R >= 0 ? 1e100 : -1e100;
|
||||
j = J >= 0 ? 1e100 : -1e100;
|
||||
}
|
||||
}
|
||||
|
||||
CLX CLX::Sqrt(void)
|
||||
{
|
||||
CLX a;
|
||||
|
||||
double R, ST;
|
||||
R = sqrt(sqrt(r*r + j*j));
|
||||
ST = 0;
|
||||
if( r ) ST = atan2(j, r)/2.0;
|
||||
a.r = R*cos(ST);
|
||||
a.j = R*sin(ST);
|
||||
return a;
|
||||
}
|
||||
|
||||
CLX operator+(const double R, const CLX &ref)
|
||||
{
|
||||
CLX a(R);
|
||||
a+=ref;
|
||||
return a;
|
||||
}
|
||||
CLX operator-(const double R, const CLX &ref)
|
||||
{
|
||||
CLX a(R);
|
||||
a-=ref;
|
||||
return a;
|
||||
}
|
||||
CLX operator*(const double R, const CLX &ref)
|
||||
{
|
||||
CLX a(R);
|
||||
a*=ref;
|
||||
return a;
|
||||
}
|
||||
CLX operator/(const double R, const CLX &ref)
|
||||
{
|
||||
CLX a(R);
|
||||
a/=ref;
|
||||
return a;
|
||||
}
|
||||
#pragma package(smart_init)
|
||||
181
CLX.h
Normal file
181
CLX.h
Normal file
|
|
@ -0,0 +1,181 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef CLXH
|
||||
#define CLXH
|
||||
//---------------------------------------------------------------------------
|
||||
///----------------------------------------------------------------
|
||||
/// •¡‘f<E28098>”‰‰ŽZƒNƒ‰ƒX
|
||||
class CLX {
|
||||
public:
|
||||
double r;
|
||||
double j;
|
||||
inline CLX(void){};
|
||||
inline CLX(const double R){
|
||||
r = R;
|
||||
j = 0;
|
||||
};
|
||||
inline CLX(const double R, const double J){
|
||||
r = R;
|
||||
j = J;
|
||||
};
|
||||
inline CLX(CLX &ref){
|
||||
r = ref.r;
|
||||
j = ref.j;
|
||||
};
|
||||
inline void Add(const CLX &ref){
|
||||
r += ref.r;
|
||||
j += ref.j;
|
||||
};
|
||||
inline void Add(const double &R){
|
||||
r += R;
|
||||
};
|
||||
inline void Sub(const CLX &ref){
|
||||
r -= ref.r;
|
||||
j -= ref.j;
|
||||
};
|
||||
inline void Sub(const double &R){
|
||||
r -= R;
|
||||
};
|
||||
inline double Abs(void){
|
||||
return sqrt(r * r + j * j);
|
||||
};
|
||||
inline double vAbs(void){
|
||||
return r * r + j * j;
|
||||
};
|
||||
inline void Mul(CLX &z, const CLX &ref){
|
||||
z.r = r * ref.r - j * ref.j;
|
||||
z.j = r * ref.j + j * ref.r;
|
||||
}
|
||||
inline void Mul(const CLX &ref){
|
||||
CLX z;
|
||||
z.r = r * ref.r - j * ref.j;
|
||||
z.j = r * ref.j + j * ref.r;
|
||||
r = z.r; j = z.j;
|
||||
};
|
||||
void Div(const CLX &ref);
|
||||
inline void Mul(const double &R){
|
||||
r *= R; j *= R;
|
||||
}
|
||||
inline void Div(const double &R){
|
||||
r /= R; j /= R;
|
||||
}
|
||||
CLX Sqrt(void);
|
||||
inline void PhDiff(CLX &z, const CLX &ref){
|
||||
z.r = r * ref.r + j * ref.j;
|
||||
z.j = j * ref.r - r * ref.j;
|
||||
|
||||
};
|
||||
inline double Phase(void){
|
||||
if( r && j ){
|
||||
return atan2(j, r);
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
inline BOOL IsSame(const CLX &ref){
|
||||
return ((r == ref.r) && (j == ref.j));
|
||||
};
|
||||
inline CLX& operator=(const CLX &ref){
|
||||
if( this != &ref ){
|
||||
r = ref.r;
|
||||
j = ref.j;
|
||||
}
|
||||
return *this;
|
||||
};
|
||||
inline CLX& operator+=(const CLX &ref){
|
||||
Add(ref);
|
||||
return *this;
|
||||
};
|
||||
inline CLX& operator+=(const double R){
|
||||
Add(R);
|
||||
return *this;
|
||||
};
|
||||
inline CLX& operator-=(const CLX &ref){
|
||||
Sub(ref);
|
||||
return *this;
|
||||
};
|
||||
inline CLX& operator-=(const double R){
|
||||
Sub(R);
|
||||
return *this;
|
||||
};
|
||||
inline CLX& operator*=(const CLX &ref){
|
||||
Mul(ref);
|
||||
return *this;
|
||||
};
|
||||
inline CLX& operator*=(const double R){
|
||||
Mul(R);
|
||||
return *this;
|
||||
};
|
||||
inline CLX& operator/=(const CLX &ref){
|
||||
Div(ref);
|
||||
return *this;
|
||||
};
|
||||
inline CLX& operator/=(const double R){
|
||||
Div(R);
|
||||
return *this;
|
||||
};
|
||||
inline CLX operator+(const CLX &ref) const {
|
||||
CLX a(r, j);
|
||||
a+=ref;
|
||||
return a;
|
||||
};
|
||||
inline CLX operator+(const double R) const {
|
||||
CLX a(r, j);
|
||||
a+=R;
|
||||
return a;
|
||||
};
|
||||
inline CLX operator-(const CLX &ref) const {
|
||||
CLX a(r, j);
|
||||
a-=ref;
|
||||
return a;
|
||||
};
|
||||
inline CLX operator-(const double R) const {
|
||||
CLX a(r, j);
|
||||
a-=R;
|
||||
return a;
|
||||
};
|
||||
inline CLX operator*(const CLX &ref) const {
|
||||
CLX a(r, j);
|
||||
a*=ref;
|
||||
return a;
|
||||
};
|
||||
inline CLX operator*(const double R) const {
|
||||
CLX a(r, j);
|
||||
a*=R;
|
||||
return a;
|
||||
};
|
||||
inline CLX operator/(const CLX &ref) const {
|
||||
CLX a(r, j);
|
||||
a/=ref;
|
||||
return a;
|
||||
};
|
||||
inline CLX operator/(const double R) const {
|
||||
CLX a(r, j);
|
||||
a/=R;
|
||||
return a;
|
||||
};
|
||||
friend CLX operator+(const double R, const CLX &ref);
|
||||
friend CLX operator-(const double R, const CLX &ref);
|
||||
friend CLX operator*(const double R, const CLX &ref);
|
||||
friend CLX operator/(const double R, const CLX &ref);
|
||||
};
|
||||
#endif
|
||||
165
COPYING.LESSER.txt
Normal file
165
COPYING.LESSER.txt
Normal file
|
|
@ -0,0 +1,165 @@
|
|||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser 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
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
674
COPYING.txt
Normal file
674
COPYING.txt
Normal file
|
|
@ -0,0 +1,674 @@
|
|||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. 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
|
||||
them 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 prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. 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.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey 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;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If 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 convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU 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 that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
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.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
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.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
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
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
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 3 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program 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, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU 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 Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
449
ClockAdj.cpp
Normal file
449
ClockAdj.cpp
Normal file
|
|
@ -0,0 +1,449 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "ClockAdj.h"
|
||||
#include "Main.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TClockAdjDlg *ClockAdjDlg;
|
||||
static int s_Gain = 0x0108;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TClockAdjDlg::TClockAdjDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
pBitmap = new Graphics::TBitmap();
|
||||
pBitmap->Width = PaintBox->Width;
|
||||
pBitmap->Height = PaintBox->Height;
|
||||
// pBitmap->Palette = MmttyWd->UsrPal;
|
||||
|
||||
switch(SampType){
|
||||
case 0:
|
||||
UpDown->Max = 11599;
|
||||
UpDown->Min = 10000;
|
||||
break;
|
||||
case 1:
|
||||
UpDown->Max = 9999;
|
||||
UpDown->Min = 7000;
|
||||
break;
|
||||
case 2:
|
||||
UpDown->Max = 6999;
|
||||
UpDown->Min = 5000;
|
||||
break;
|
||||
case 3:
|
||||
UpDown->Max = 12500;
|
||||
UpDown->Min = 11600;
|
||||
break;
|
||||
}
|
||||
TRect rc;
|
||||
int XL = 0;
|
||||
int XR = pBitmap->Width - 1;
|
||||
int YT = 0;
|
||||
int YB = pBitmap->Height - 1;
|
||||
rc.Left = XL;
|
||||
rc.Right = XR;
|
||||
rc.Top = YT;
|
||||
rc.Bottom = YB+1;
|
||||
TCanvas *cp = pBitmap->Canvas;
|
||||
cp->Brush->Color = clBlack;
|
||||
cp->FillRect(rc);
|
||||
|
||||
m_CursorX = XR - 20;
|
||||
|
||||
pDem = NULL;
|
||||
pTick = NULL;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
cp->Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
cp->Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
cp->Font->Color = clWhite;
|
||||
cp->Font->Size = 10;
|
||||
int FH = cp->TextHeight("A");
|
||||
int Y = 5;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
Caption = "Calibrating the Sound Card with a Time Standard Broadcast Station";
|
||||
// "Adjust Sampling Frequency using an off-air time signal";
|
||||
// Caption = "Adjust Sampling freq. (Recive WWV tick sound on Mark freq.)";
|
||||
CancelBtn->Caption = "Cancel";
|
||||
|
||||
cp->TextOut(10, Y, "1.Tune your radio to WWV or another 1-second tick standard. Set the radio display"); Y+=FH;
|
||||
cp->TextOut(10, Y, " to the carrier frequency."); Y+=FH;
|
||||
cp->TextOut(10, Y, "2.Wait for about three minutes. If you are using 11025 Hz. calibration, you should"); Y+=FH;
|
||||
cp->TextOut(10, Y, " see two lines of marks (vertical or slanted), corresponding to the 1-second tick"); Y+=FH;
|
||||
cp->TextOut(10, Y, " sound bursts transmitted by the time-standard broadcast station. You will see only"); Y+=FH;
|
||||
cp->TextOut(10, Y, " one line with 8000 Hz. or 6000 Hz."); Y+=FH;
|
||||
cp->TextOut(10, Y, "3.Right-click to move the vertical green line to the tick line. This allows you to"); Y+=FH;
|
||||
cp->TextOut(10, Y, " compare the tick line to vertical."); Y+=FH;
|
||||
cp->TextOut(10, Y, "4.Left-click a low tick burst mark (bottom one if possible), and move the cursor to"); Y+=FH;
|
||||
cp->TextOut(10, Y, " the top of the line. You will see a yellow line on the display."); Y+=FH;
|
||||
cp->TextOut(10, Y, "5.Overlay the yellow line with the tick mark line, and left-click a high burst mark"); Y+=FH;
|
||||
cp->TextOut(10, Y, " (top one if possible)."); Y+=FH;
|
||||
cp->TextOut(10, Y, "6.This will automatically put the correct clock frequency in the adjust window."); Y+=FH;
|
||||
cp->TextOut(10, Y, "7.Click OK to leave the setup display and to memorize the new value."); Y+=FH;
|
||||
cp->TextOut(10, Y, "8.Restart MMTTY for the new clock value to take effect.");
|
||||
|
||||
#if 0
|
||||
cp->TextOut(10, 10, "1.Receive WWV in AM or SSB mode. Tune the radio to the carrier frequency.");
|
||||
cp->TextOut(10, 30, "2.Let this adjustment display run for a few minutes, and look for one or two");
|
||||
cp->TextOut(10, 50, " almost-vertical lines of dots. If you do not see this, wait for up to ten minutes.");
|
||||
cp->TextOut(10, 70, "3.If your sound card clock is far out of adjustment, the lines will be very slanted.");
|
||||
cp->TextOut(10, 90, "4.Click the 1st point on the slanted line.");
|
||||
cp->TextOut(10,110, "5.And then click the 2nd point on the same line. The value of clock will be revised");
|
||||
cp->TextOut(10,130, " automatically. If there is distance of 1st point and 2nd point, precision is better.");
|
||||
cp->TextOut(10,160, "If the first degree of slant is very big, please repeat once again, because an error");
|
||||
cp->TextOut(10,180, "remains a little.");
|
||||
cp->TextOut(10,200, "WWV - 2.5, 5, 10MHz // GBR - 60KHz // RWM - 4.996, 9.996, 14.996MHz");
|
||||
cp->TextOut(10,240, "Left click - Start adjustment");
|
||||
cp->TextOut(10,260, "Right click - Move vertical cursor");
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
cp->TextOut(10, Y, "1.JJYをAMまたはSSBで受信し、この画面の下にあるMarkに1000Hzまたは"); Y+=FH;
|
||||
cp->TextOut(10, Y, " 1600Hzを設定します."); Y+=FH;
|
||||
cp->TextOut(10, Y, "2.SSBの場合は1秒チック音がMarkに重なるように受信周波数を調整します."); Y+=FH;
|
||||
cp->TextOut(10, Y, "3.しばらく受信して縦または斜めラインが表示されるのを待ちます(数分)."); Y+=FH;
|
||||
cp->TextOut(10, Y, "4.線が垂直の場合はクロック値は正確です。斜めになっている場合は、"); Y+=FH;
|
||||
cp->TextOut(10, Y, " その斜め線の最初の端点をクリックします."); Y+=FH;
|
||||
cp->TextOut(10, Y, "5.更に同じ斜め線の反対側の端点をクリックするとクロック値が自動的に"); Y+=FH;
|
||||
cp->TextOut(10, Y, " 設定されます.(2点間の距離が長いほうが正確です)"); Y+=FH;
|
||||
cp->TextOut(10, Y, "傾斜が非常に大きい場合、上記の手続きをもう一度繰り返して下さい."); Y+=FH+FH;
|
||||
cp->TextOut(10, Y, "JJYの代わりに、JMH,JMGなどのFAX放送の0.5秒毎のデッドセクタを利用しても"); Y+=FH;
|
||||
cp->TextOut(10, Y, "OKのようです."); Y+=FH;
|
||||
cp->TextOut(10, Y, "左クリック - 調整の開始"); Y+=FH;
|
||||
cp->TextOut(10, Y, "右クリック - 垂直カーソル移動");
|
||||
}
|
||||
m_agcMax = 8192;
|
||||
m_agcMin = 0;
|
||||
m_agcSumMax = 8192 * AGCAVG;
|
||||
m_Point = 0;
|
||||
// SBHelp->Visible = !JanHelp.IsEmpty();
|
||||
SBHelp->Visible = FALSE;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TClockAdjDlg::~TClockAdjDlg()
|
||||
{
|
||||
pDem = NULL;
|
||||
pTick = NULL;
|
||||
pBitmap->Palette = NULL;
|
||||
delete pBitmap;
|
||||
pBitmap = NULL;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// 現在の論理パレットを返す(TControl::GetPaletteのオーバライド関数)
|
||||
HPALETTE __fastcall TClockAdjDlg::GetPalette(void)
|
||||
{
|
||||
pBitmap->Palette = MmttyWd->UsrPal;
|
||||
return MmttyWd->UsrPal;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::UpdateTB(void)
|
||||
{
|
||||
TBGAIN->Enabled = !SBAGC->Down;
|
||||
LG->Font->Color = SBAGC->Down ? clGrayText : clBlack;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::UpdatePPM(void)
|
||||
{
|
||||
int d = ((UpDown->Position - SampBase) * 1000000.0 / SampBase) + 0.5;
|
||||
|
||||
char bf[64];
|
||||
sprintf(bf, "%d ppm", d);
|
||||
LPPM->Caption = bf;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TClockAdjDlg::Execute(TSound *p, double &Samp)
|
||||
{
|
||||
pSound = p;
|
||||
pDem = &p->FSKDEM;
|
||||
pTick = &pDem->Tick;
|
||||
pTick->m_Samp = int(Samp);
|
||||
InitColorTable(clBlack, clWhite);
|
||||
MmttyWd->ReqPaletteChange();
|
||||
if( (Samp > UpDown->Max) || (Samp < UpDown->Max) ){
|
||||
Samp = SampFreq;
|
||||
}
|
||||
EditClock->Text = int(Samp);
|
||||
UpDown->Position = SHORT(Samp);
|
||||
pDem->Tick.Init();
|
||||
pDem->m_Tick = 1;
|
||||
m_DisEvent++;
|
||||
double SaveMarkFreq = pDem->GetMarkFreq();
|
||||
double SaveSpaceFreq = pDem->GetSpaceFreq();
|
||||
int SaveAFC = sys.m_AFC;
|
||||
int SaveBPF = pSound->m_bpf;
|
||||
int SaveType = pSound->FSKDEM.m_type;
|
||||
pSound->m_bpf = 0;
|
||||
sys.m_AFC = 0;
|
||||
if( SaveType == 2 ) pSound->FSKDEM.m_type = 0;
|
||||
UDMark->Position = 1000;
|
||||
pDem->SetMarkFreq(1000.0);
|
||||
pDem->SetSpaceFreq(1200.0);
|
||||
TBGAIN->Position = s_Gain & 0x00ff;
|
||||
SBAGC->Down = s_Gain & 0xff00 ? 1 : 0;
|
||||
UpdateTB();
|
||||
m_DisEvent--;
|
||||
UpdatePPM();
|
||||
int r = ShowModal();
|
||||
InitColorTable(sys.m_ColorLow, sys.m_ColorHigh);
|
||||
s_Gain = (s_Gain & 0x00ff) | (SBAGC->Down ? 0x0100 : 0);
|
||||
pDem->m_Tick = 0;
|
||||
pDem->SetMarkFreq(SaveMarkFreq);
|
||||
pDem->SetSpaceFreq(SaveSpaceFreq);
|
||||
sys.m_AFC = SaveAFC;
|
||||
pSound->m_bpf = SaveBPF;
|
||||
pSound->FSKDEM.m_type = SaveType;
|
||||
MmttyWd->ReqPaletteChange();
|
||||
if( r == IDOK ){
|
||||
Samp = UpDown->Position;
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::TimerTimer(TObject *Sender)
|
||||
{
|
||||
if( pBitmap == NULL ) return;
|
||||
if( pDem == NULL ) return;
|
||||
if( pTick == NULL ) return;
|
||||
|
||||
int *p = pTick->GetData();
|
||||
if( p == NULL ) return;
|
||||
|
||||
TCanvas *tp = pBitmap->Canvas;
|
||||
TRect rc;
|
||||
int XL = 0;
|
||||
int XR = pBitmap->Width - 1;
|
||||
int YT = 0;
|
||||
int YB = pBitmap->Height - 1;
|
||||
rc.Left = XL;
|
||||
rc.Right = XR;
|
||||
rc.Top = YT;
|
||||
rc.Bottom = YB+1;
|
||||
|
||||
TRect src(rc);
|
||||
src.Bottom--;
|
||||
rc.Top++;
|
||||
tp->CopyRect(rc, tp, src);
|
||||
|
||||
int mx = -MAXINT;
|
||||
int mi = MAXINT;
|
||||
int x, xx, d;
|
||||
double k1 = 16384.0/double(m_agcMax - m_agcMin);
|
||||
double k2;
|
||||
if( SBAGC->Down ){
|
||||
k2 = 128.0 / 16384.0;
|
||||
}
|
||||
else {
|
||||
k2 = (128.0 * (s_Gain & 0x00ff)) / (4096 * 16);
|
||||
}
|
||||
for( x = 0; x < XR; x++){
|
||||
xx = (x * pTick->m_Samp)/pBitmap->Width;
|
||||
d = p[xx];
|
||||
if( mx < d ) mx = d;
|
||||
if( mi > d ) mi = d;
|
||||
if( SBAGC->Down ){
|
||||
d -= m_agcMin;
|
||||
if( m_agcMax > 0 ) d = double(d) * k1;
|
||||
}
|
||||
d = double(d) * k2;
|
||||
|
||||
if( d >= 128 ) d = 127;
|
||||
if( d <= 0 ) d = 0;
|
||||
tp->Pixels[x][0] = TColor(ColorTable[127-d] | sys.d_PaletteMask);
|
||||
}
|
||||
m_agcSumMax -= m_agcMax;
|
||||
m_agcSumMax += mx;
|
||||
if( m_agcSumMax < (4096*AGCAVG) ) m_agcSumMax = (4096*AGCAVG);
|
||||
m_agcMax = m_agcSumMax / AGCAVG;
|
||||
m_agcMin = mi;
|
||||
if( m_agcMin > 2048 ) m_agcMin = 2048;
|
||||
m_PointY++;
|
||||
PaintBox->Canvas->Draw(0, 0, (TGraphic*)pBitmap);
|
||||
PaintCursor();
|
||||
#if 0
|
||||
PaintBox->Canvas->Font->Color = clWhite;
|
||||
char bf[128];
|
||||
sprintf(bf, "curMax:%d", mx);
|
||||
PaintBox->Canvas->TextOut( 500, 200, bf );
|
||||
sprintf(bf, "agcMax:%d", m_agcMax);
|
||||
PaintBox->Canvas->TextOut( 500, 220, bf );
|
||||
sprintf(bf, "agcMin:%d", m_agcMin);
|
||||
PaintBox->Canvas->TextOut( 500, 240, bf );
|
||||
sprintf(bf, "SumMax:%d", m_agcSumMax);
|
||||
PaintBox->Canvas->TextOut( 500, 260, bf );
|
||||
#endif
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::DrawMessage(LPCSTR p)
|
||||
{
|
||||
int xr = PaintBox->Canvas->TextWidth(p);
|
||||
int xl = (PaintBox->Width - xr)/2;
|
||||
xr += xl;
|
||||
int FH = PaintBox->Canvas->TextHeight(p);
|
||||
int VC = PaintBox->Height - FH;
|
||||
PaintBox->Canvas->Pen->Color = clWhite;
|
||||
PaintBox->Canvas->Brush->Color = clBlack;
|
||||
PaintBox->Canvas->RoundRect(xl-10, VC-FH, xr+10, VC+FH, 10, 10);
|
||||
PaintBox->Canvas->Font->Color = clWhite;
|
||||
PaintBox->Canvas->TextOut(xl, VC-FH/2, p);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::PaintCursor(void)
|
||||
{
|
||||
PaintBox->Canvas->Pen->Color = clLime;
|
||||
PaintBox->Canvas->Pen->Style = psDot;
|
||||
PaintBox->Canvas->MoveTo(m_CursorX, 0);
|
||||
int rop = ::SetROP2(PaintBox->Canvas->Handle, R2_MASKPENNOT);
|
||||
PaintBox->Canvas->LineTo(m_CursorX, pBitmap->Height - 1);
|
||||
::SetROP2((HDC)PaintBox->Canvas, rop);
|
||||
if( m_Point ){
|
||||
PaintBox->Canvas->Pen->Color = clYellow;
|
||||
PaintBox->Canvas->Pen->Style = psSolid;
|
||||
PaintBox->Canvas->MoveTo(m_PointX, m_PointY);
|
||||
::SetROP2(PaintBox->Canvas->Handle, R2_MASKPENNOT);
|
||||
PaintBox->Canvas->LineTo(m_PointX2, m_PointY2);
|
||||
::SetROP2((HDC)PaintBox->Canvas, rop);
|
||||
char bf[256];
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
sprintf( bf, "OK : Left button, Cancel : Right button Clock=%.1lf", GetPointSamp());
|
||||
}
|
||||
else {
|
||||
sprintf( bf, "決定 : 左ボタン, 中止 : 右ボタン Clock=%.1lf", GetPointSamp());
|
||||
}
|
||||
DrawMessage(bf);
|
||||
if( PaintBox->Cursor != crCross ) PaintBox->Cursor = crCross;
|
||||
}
|
||||
else {
|
||||
if( PaintBox->Cursor != crDefault ) PaintBox->Cursor = crDefault;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::UpDownClick(TObject *Sender, TUDBtnType Button)
|
||||
{
|
||||
if( pTick == NULL ) return;
|
||||
|
||||
pTick->m_Samp = UpDown->Position;
|
||||
UpdatePPM();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::PaintBoxPaint(TObject *Sender)
|
||||
{
|
||||
PaintBox->Canvas->Draw(0, 0, (TGraphic*)pBitmap);
|
||||
PaintCursor();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::PaintBoxMouseUp(TObject *Sender,
|
||||
TMouseButton Button, TShiftState Shift, int X, int Y)
|
||||
{
|
||||
if( Button == mbLeft ){
|
||||
if( m_Point ){
|
||||
m_Point = 0;
|
||||
if( m_PointY2 != m_PointY ){
|
||||
int newc = int(GetPointSamp() + 0.5);
|
||||
pTick->m_Samp = newc;
|
||||
UpDown->Position = SHORT(newc);
|
||||
ModalResult = mrOk;
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_PointX2 = m_PointX = X;
|
||||
m_PointY2 = m_PointY = Y;
|
||||
m_Point = 1;
|
||||
}
|
||||
}
|
||||
else if( m_Point ){
|
||||
m_Point = 0;
|
||||
}
|
||||
else {
|
||||
m_CursorX = X;
|
||||
}
|
||||
PaintBox->Canvas->Draw(0, 0, (TGraphic*)pBitmap);
|
||||
PaintCursor();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::MarkFreqChange(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
int dd;
|
||||
if( sscanf(AnsiString(MarkFreq->Text).c_str(), "%lu", &dd ) == 1){ //JA7UDE 0428
|
||||
if( (dd >= 300) && (dd <= 2700) ){
|
||||
m_DisEvent++;
|
||||
UDMark->Position = SHORT(dd);
|
||||
pDem->SetMarkFreq(dd);
|
||||
pDem->SetSpaceFreq(dd + 200);
|
||||
m_DisEvent--;
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::TBGAINChange(TObject *Sender)
|
||||
{
|
||||
s_Gain = (s_Gain & 0xff00) | TBGAIN->Position;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::UDMarkClick(TObject *Sender, TUDBtnType Button)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
pDem->SetMarkFreq(UDMark->Position);
|
||||
pDem->SetSpaceFreq(UDMark->Position + 200);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::SBAGCClick(TObject *Sender)
|
||||
{
|
||||
UpdateTB();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
double __fastcall TClockAdjDlg::GetPointSamp(void)
|
||||
{
|
||||
if( m_PointY == m_PointY2 ) return pTick->m_Samp;
|
||||
double d = (m_PointX2 - m_PointX);
|
||||
d = d * pTick->m_Samp / pBitmap->Width;
|
||||
d /= (m_PointY - m_PointY2);
|
||||
d += pTick->m_Samp;
|
||||
return d;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::PaintBoxMouseMove(TObject *Sender,
|
||||
TShiftState Shift, int X, int Y)
|
||||
{
|
||||
if( m_Point ){
|
||||
m_PointX2 = X;
|
||||
m_PointY2 = Y;
|
||||
PaintBox->Canvas->Draw(0, 0, (TGraphic*)pBitmap);
|
||||
PaintCursor();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TClockAdjDlg::SBHelpClick(TObject *Sender)
|
||||
{
|
||||
#if 1
|
||||
ShowHtmlHelp();
|
||||
#else
|
||||
ShowHelp(25);
|
||||
#endif
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
ClockAdj.dfm
Normal file
BIN
ClockAdj.dfm
Normal file
Binary file not shown.
118
ClockAdj.h
Normal file
118
ClockAdj.h
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef ClockAdjH
|
||||
#define ClockAdjH
|
||||
//----------------------------------------------------------------------------
|
||||
/* JA7UDE 0428
|
||||
#include <vcl\System.hpp>
|
||||
#include <vcl\Windows.hpp>
|
||||
#include <vcl\SysUtils.hpp>
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Graphics.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include <vcl\ComCtrls.hpp>
|
||||
*/
|
||||
#include "Comlib.h"
|
||||
#include "sound.h"
|
||||
#include <Buttons.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <ComCtrls.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
#define AGCAVG 4
|
||||
//----------------------------------------------------------------------------
|
||||
class TClockAdjDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TPanel *Panel;
|
||||
TPaintBox *PaintBox;
|
||||
TEdit *EditClock;
|
||||
TLabel *Label1;
|
||||
TUpDown *UpDown;
|
||||
TTimer *Timer;
|
||||
TComboBox *MarkFreq;
|
||||
TLabel *Label2;
|
||||
TLabel *LPPM;
|
||||
TTrackBar *TBGAIN;
|
||||
TUpDown *UDMark;
|
||||
TSpeedButton *SBAGC;
|
||||
TLabel *LG;
|
||||
TSpeedButton *SBHelp;
|
||||
void __fastcall TimerTimer(TObject *Sender);
|
||||
void __fastcall UpDownClick(TObject *Sender, TUDBtnType Button);
|
||||
void __fastcall PaintBoxPaint(TObject *Sender);
|
||||
void __fastcall PaintBoxMouseUp(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
|
||||
void __fastcall MarkFreqChange(TObject *Sender);
|
||||
void __fastcall TBGAINChange(TObject *Sender);
|
||||
|
||||
void __fastcall UDMarkClick(TObject *Sender, TUDBtnType Button);
|
||||
void __fastcall SBAGCClick(TObject *Sender);
|
||||
void __fastcall PaintBoxMouseMove(TObject *Sender, TShiftState Shift, int X,
|
||||
int Y);
|
||||
|
||||
void __fastcall SBHelpClick(TObject *Sender);
|
||||
private:
|
||||
Graphics::TBitmap *pBitmap;
|
||||
TSound *pSound;
|
||||
CFSKDEM *pDem;
|
||||
CTICK *pTick;
|
||||
|
||||
int m_DisEvent;
|
||||
|
||||
int m_agcMin;
|
||||
int m_agcMax;
|
||||
int m_agcSumMax;
|
||||
|
||||
DYNAMIC HPALETTE __fastcall GetPalette(void);
|
||||
void __fastcall UpdateTB(void);
|
||||
void __fastcall UpdatePPM(void);
|
||||
void __fastcall PaintCursor(void);
|
||||
int m_CursorX;
|
||||
|
||||
void __fastcall DrawMessage(LPCSTR p);
|
||||
double __fastcall GetPointSamp(void);
|
||||
int m_Point;
|
||||
int m_PointX;
|
||||
int m_PointY;
|
||||
int m_PointX2;
|
||||
int m_PointY2;
|
||||
|
||||
AnsiString m_Help;
|
||||
public:
|
||||
virtual __fastcall TClockAdjDlg(TComponent* AOwner);
|
||||
__fastcall TClockAdjDlg::~TClockAdjDlg();
|
||||
|
||||
int __fastcall Execute(TSound *p, double &Samp);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TClockAdjDlg *ClockAdjDlg;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
3590
ComLib.cpp
Normal file
3590
ComLib.cpp
Normal file
File diff suppressed because it is too large
Load diff
752
ComLib.h
Normal file
752
ComLib.h
Normal file
|
|
@ -0,0 +1,752 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba, Dave Bernstein
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#ifndef ComLibH
|
||||
#define ComLibH
|
||||
/* JA7UDE 0427 */
|
||||
#include <inifiles.hpp>
|
||||
#include <Grids.hpp>
|
||||
#include <Graphics.hpp> //JA7UDE 0427
|
||||
#include <Buttons.hpp>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <values.h>
|
||||
#include <math.h>
|
||||
#include <mbstring.h>
|
||||
#include <SHELLAPI.H>
|
||||
|
||||
#define VERID "Ver1.68" //AA6YQ 1.65D->1.66G, JE3HHT 1.67
|
||||
#define VERBETA "A"
|
||||
#define VERTTL2 "MMTTY "VERID VERBETA
|
||||
#define VERTTL VERTTL2" (C) JE3HHT 2000-2010."
|
||||
|
||||
#define SETUPTITLE "Setup MMTTY "VERID VERBETA //AA6YQ 1.66C
|
||||
#define SETUPTITLEREMOTE "Setup "VERID VERBETA //AA6YQ 1.66C
|
||||
|
||||
#define SHIFTL 10
|
||||
#define MARKL 300
|
||||
#define SPACEH 2700
|
||||
#define XYCOLLECT 512 // XY-Scope のデータ収集サイズ
|
||||
|
||||
#define REMMENU 1
|
||||
#define REMCTRL 2
|
||||
#define REMSHOWOFF 4
|
||||
#define REMNOMOVE 8
|
||||
#define REMNOPTT 16
|
||||
#define REMNOCNV 32
|
||||
#define REMVIATX 64
|
||||
#define REMDISFOCUS 128
|
||||
#define REMDISSHARED 256
|
||||
#define REMDISSTAYONTOP 512
|
||||
|
||||
#define FSBOLD 1
|
||||
#define FSITALIC 2
|
||||
|
||||
enum {
|
||||
txSound,
|
||||
txTXD,
|
||||
txTXDOnly,
|
||||
};
|
||||
|
||||
extern int WinNT;
|
||||
extern int WinVista; //AA6YQ 1.66G
|
||||
|
||||
extern int FSKCount;
|
||||
extern int FSKCount1;
|
||||
extern int FSKCount2;
|
||||
extern int FSKDeff;
|
||||
|
||||
extern LCID lcid; // ロケール情報
|
||||
extern int DisPaint;
|
||||
extern int Remote;
|
||||
|
||||
extern double SampFreq; // サンプリング周波数
|
||||
extern double SampBase;
|
||||
extern double DemSamp;
|
||||
extern int SampType;
|
||||
extern int DemOver;
|
||||
extern int FFT_SIZE;
|
||||
extern int SampSize;
|
||||
|
||||
extern char BgnDir[256];
|
||||
extern char LogDir[256];
|
||||
extern char OutFileDir[256];
|
||||
extern char MMLogDir[256];
|
||||
extern char ExtLogDir[256];
|
||||
extern char RecDir[256]; // 録音ファイルのディレクトリ
|
||||
|
||||
extern AnsiString JanHelp;
|
||||
|
||||
extern const char MONN[];
|
||||
extern const char MONU[];
|
||||
|
||||
#ifndef LPCUSTR
|
||||
typedef const unsigned char * LPCUSTR;
|
||||
typedef unsigned char * LPUSTR;
|
||||
#endif
|
||||
|
||||
extern DWORD ColorTable[128];
|
||||
|
||||
#define ABS(c) (((c)<0)?(-(c)):(c))
|
||||
#define AN(p) (sizeof(p)/sizeof(*(p)))
|
||||
#define CR 0x0d
|
||||
#define LF 0x0a
|
||||
#define TAB '\t'
|
||||
|
||||
typedef struct {
|
||||
WORD Key;
|
||||
LPCSTR pName;
|
||||
}DEFKEYTBL;
|
||||
extern const DEFKEYTBL KEYTBL[];
|
||||
|
||||
enum {
|
||||
kkRcvLog,
|
||||
kkFileOut,
|
||||
kkSaveRx,
|
||||
|
||||
kkOpenLog,
|
||||
kkFlush,
|
||||
|
||||
kkRecTime,
|
||||
kkRec,
|
||||
kkPlay,
|
||||
kkPlayPos, // Ctrl+A
|
||||
kkPlayStop,
|
||||
kkScope,
|
||||
kkLogList,
|
||||
kkQSOData,
|
||||
kkOption,
|
||||
kkLogOption,
|
||||
kkPanel,
|
||||
kkExtCmd1,
|
||||
kkExtCmd2,
|
||||
kkExtCmd3,
|
||||
kkExtCmd4,
|
||||
kkExtReset,
|
||||
kkExtSusp,
|
||||
|
||||
kkFIG,
|
||||
kkUOS,
|
||||
kkTX, // F9
|
||||
kkTXOFF, // F8
|
||||
kkQSO,
|
||||
kkCall, // Ctrl+C
|
||||
kkName, // Ctrl+N
|
||||
kkQTH, // Ctrl+Q
|
||||
kkRST, // Ctrl+R
|
||||
kkFind, // Ctrl+F
|
||||
kkClear, // F1
|
||||
|
||||
kkInUp,
|
||||
kkInDown,
|
||||
kkInPUp,
|
||||
kkInPDown,
|
||||
kkInHome,
|
||||
kkInEnd,
|
||||
kkRxUp,
|
||||
kkRxDown,
|
||||
kkRxPUp,
|
||||
kkRxPDown,
|
||||
kkRxHome,
|
||||
kkRxEnd,
|
||||
|
||||
kkCharWaitLeft,
|
||||
kkCharWaitRight,
|
||||
kkDiddleWaitLeft,
|
||||
kkDiddleWaitRight,
|
||||
|
||||
kkInHeightUp,
|
||||
kkInHeightDown,
|
||||
|
||||
kkMyRST,
|
||||
kkInitBox,
|
||||
|
||||
kkTxLTR,
|
||||
kkTxFIG,
|
||||
|
||||
kkDecShift,
|
||||
kkIncShift,
|
||||
kkToggleShift,
|
||||
kkClrRxWindow,
|
||||
kkFreq,
|
||||
kkRun,
|
||||
kkPaste,
|
||||
kkTNC,
|
||||
kkMac,
|
||||
kkEntTX,
|
||||
kkWordWrap,
|
||||
kkOnQSO,
|
||||
kkOffQSO,
|
||||
kkCAPTURE,
|
||||
|
||||
kkPro1,
|
||||
kkPro2,
|
||||
kkPro3,
|
||||
kkPro4,
|
||||
kkPro5,
|
||||
kkPro6,
|
||||
kkPro7,
|
||||
kkPro8,
|
||||
kkProDef,
|
||||
kkProRet,
|
||||
|
||||
kkCList,
|
||||
kkEOF,
|
||||
};
|
||||
#define MSGLISTMAX 64
|
||||
typedef struct {
|
||||
WORD m_SysKey[kkEOF];
|
||||
|
||||
int m_SoundPriority;
|
||||
int m_SoundDevice;
|
||||
int m_SoundOutDevice; //AA6YQ 1.66
|
||||
int m_SoundStereo;
|
||||
int m_SoundFifoRX;
|
||||
int m_SoundFifoTX;
|
||||
AnsiString m_SoundMMW;
|
||||
|
||||
AnsiString m_Call;
|
||||
AnsiString m_User[16];
|
||||
AnsiString m_UserName[16];
|
||||
WORD m_UserKey[16];
|
||||
WORD m_UserEditKey[16];
|
||||
TColor m_UserCol[16];
|
||||
int m_UserTimer[16];
|
||||
int m_SBFontSize;
|
||||
int m_SBINFontSize;
|
||||
|
||||
AnsiString m_FontName;
|
||||
int m_FontAdjX;
|
||||
int m_FontAdjY;
|
||||
int m_FontSize;
|
||||
int m_FontCharset;
|
||||
int m_FontZero;
|
||||
int m_FontStyle;
|
||||
|
||||
int m_FontAdjSize;
|
||||
int m_BtnFontAdjSize;
|
||||
|
||||
int m_WindowState;
|
||||
|
||||
AnsiString m_MsgName[MSGLISTMAX];
|
||||
AnsiString m_MsgList[MSGLISTMAX];
|
||||
WORD m_MsgKey[MSGLISTMAX];
|
||||
|
||||
AnsiString m_InBtn[4];
|
||||
AnsiString m_InBtnName[4];
|
||||
WORD m_InBtnKey[4];
|
||||
TColor m_InBtnCol[4];
|
||||
int m_MacroImm;
|
||||
|
||||
AnsiString m_ExtCmd[4];
|
||||
|
||||
AnsiString m_TxRxName;
|
||||
int m_TxRxInv;
|
||||
int m_txuos;
|
||||
int m_dblsft;
|
||||
|
||||
int m_lmsbpf;
|
||||
|
||||
double m_DefMarkFreq;
|
||||
double m_DefShift;
|
||||
int m_DefStopLen; // 0-1Bit, 1-1.42
|
||||
|
||||
int m_echo;
|
||||
|
||||
int m_AFC;
|
||||
int m_FixShift;
|
||||
int m_AFCSQ;
|
||||
double m_AFCTime;
|
||||
double m_AFCSweep;
|
||||
int m_AFCNet;
|
||||
|
||||
int m_TxNet;
|
||||
int m_Rev;
|
||||
int m_TxDisRev;
|
||||
|
||||
double m_LimitGain;
|
||||
|
||||
int m_log;
|
||||
int m_logTimeStamp;
|
||||
int m_ShowTimeStamp;
|
||||
int m_TimeStampUTC;
|
||||
int m_AutoTimeOffset;
|
||||
int m_TimeOffset;
|
||||
int m_TimeOffsetMin;
|
||||
int m_LogLink;
|
||||
|
||||
AnsiString m_LogName;
|
||||
|
||||
int m_TxPort; // 0-Sound, 1-DTR, 2-TXD
|
||||
int m_TxdStop;
|
||||
int m_TxdJob;
|
||||
int m_TxFixShift;
|
||||
int m_CodeSet;
|
||||
int m_DisTX;
|
||||
|
||||
int m_Palette;
|
||||
DWORD d_PaletteMask;
|
||||
|
||||
int m_XYInv;
|
||||
|
||||
TColor m_ColorRXBack;
|
||||
TColor m_ColorRX;
|
||||
TColor m_ColorRXTX;
|
||||
TColor m_ColorINBack;
|
||||
TColor m_ColorIN;
|
||||
TColor m_ColorINTX;
|
||||
|
||||
TColor m_ColorLow;
|
||||
TColor m_ColorHigh;
|
||||
|
||||
TColor m_ColorXY;
|
||||
|
||||
AnsiString m_WinFontName;
|
||||
BYTE m_WinFontCharset;
|
||||
int m_WinFontStyle;
|
||||
AnsiString m_BtnFontName;
|
||||
BYTE m_BtnFontCharset;
|
||||
int m_BtnFontStyle;
|
||||
|
||||
int m_FFTGain;
|
||||
int m_FFTResp;
|
||||
double m_SampFreq;
|
||||
double m_TxOffset;
|
||||
|
||||
AnsiString m_HTMLHelp;
|
||||
AnsiString m_Help;
|
||||
AnsiString m_HelpLog;
|
||||
AnsiString m_HelpDigital;
|
||||
AnsiString m_HelpFontName;
|
||||
BYTE m_HelpFontCharset;
|
||||
int m_HelpFontSize;
|
||||
int m_HelpNotePad;
|
||||
|
||||
int m_CharLenFile;
|
||||
int m_DisWindow;
|
||||
int m_StayOnTop;
|
||||
int m_MemWindow;
|
||||
|
||||
int m_LWait;
|
||||
AnsiString m_LogGridWidths;
|
||||
AnsiString m_QSOGridWidths;
|
||||
|
||||
int m_DefFix45;
|
||||
}SYSSET;
|
||||
|
||||
extern SYSSET sys;
|
||||
|
||||
#define TEXTLINEMAX 512
|
||||
class CPrintText
|
||||
{
|
||||
private:
|
||||
TPaintBox *pPaintBox;
|
||||
TScrollBar *pScroll;
|
||||
TCanvas *pCanvas;
|
||||
Graphics::TBitmap *pBitmap;
|
||||
|
||||
LPSTR pList[TEXTLINEMAX];
|
||||
LPSTR pColList[TEXTLINEMAX];
|
||||
|
||||
int m_jisfont;
|
||||
|
||||
int m_Top;
|
||||
int m_Line;
|
||||
int m_WriteLine;
|
||||
int m_Col;
|
||||
int m_Count;
|
||||
|
||||
int m_FH;
|
||||
int m_FW;
|
||||
int m_LineMax;
|
||||
int m_ColMax;
|
||||
|
||||
int m_Scroll;
|
||||
|
||||
TRect m_DestRC;
|
||||
TRect m_SourceRC;
|
||||
TRect m_FillRC;
|
||||
|
||||
int m_Cursor;
|
||||
int m_DisEvent;
|
||||
|
||||
int m_TX;
|
||||
|
||||
int m_TimeStampTrig;
|
||||
SYSTEMTIME m_TrigTime;
|
||||
AnsiString m_TrigName;
|
||||
|
||||
FILE *m_fp;
|
||||
|
||||
void Scroll(void);
|
||||
void DrawCursor(int sw);
|
||||
void CursorOff(void);
|
||||
void CursorOn();
|
||||
void WriteTimeStamp(void);
|
||||
|
||||
public:
|
||||
CPrintText();
|
||||
~CPrintText();
|
||||
|
||||
inline void SetTX(int sw){
|
||||
m_TX = sw;
|
||||
};
|
||||
inline void SetBitmap(Graphics::TBitmap *p){
|
||||
pBitmap = p;
|
||||
};
|
||||
inline int GetPos(int n){
|
||||
n += m_Top;
|
||||
if( n >= TEXTLINEMAX ) n -= TEXTLINEMAX;
|
||||
return n;
|
||||
};
|
||||
inline int GetNext(int n){
|
||||
n++;
|
||||
if( n >= TEXTLINEMAX ) n = 0;
|
||||
return n;
|
||||
};
|
||||
inline int GetBefore(int n){
|
||||
n--;
|
||||
if( n < 0 ) n = TEXTLINEMAX - 1;
|
||||
return n;
|
||||
};
|
||||
inline int AdjustPos(int n){
|
||||
while( n < 0 ) n+= TEXTLINEMAX;
|
||||
while( n >= TEXTLINEMAX ) n -= TEXTLINEMAX;
|
||||
return n;
|
||||
};
|
||||
void Clear();
|
||||
|
||||
void IncCount(void);
|
||||
void SetPaintBox(TPaintBox *tp, TScrollBar *sp);
|
||||
void AdjZero(void);
|
||||
|
||||
void PutChar(char c);
|
||||
void GetString(AnsiString &as);
|
||||
void PaintCanvas(void);
|
||||
void SetCursor(sw);
|
||||
void GetText(LPSTR t, int x, int y, int sw);
|
||||
int GetText(LPSTR t, int y);
|
||||
void ShiftText(int x, int y);
|
||||
|
||||
void ScrollBarChange(void);
|
||||
void ScrollBarUp(int page);
|
||||
void ScrollBarDown(int page);
|
||||
void WriteFile(char c);
|
||||
void WriteFile(LPCSTR p);
|
||||
void MakeLogName(void);
|
||||
void OpenLogFile(void);
|
||||
void CloseLogFile(void);
|
||||
void TrigTimeStamp(LPCSTR pName, int sw = 0);
|
||||
void TrigTimeStampImm(LPCSTR pName);
|
||||
};
|
||||
|
||||
#define FIFOLINEMAX 128
|
||||
class CFifoEdit
|
||||
{
|
||||
TPaintBox *pPaintBox;
|
||||
TScrollBar *pScroll;
|
||||
TCanvas *pCanvas;
|
||||
Graphics::TBitmap *pBitmap;
|
||||
|
||||
LPSTR pList[FIFOLINEMAX];
|
||||
|
||||
int m_Line; // 画面内の行位置
|
||||
|
||||
int m_DispTop; // 表示トップ行の位置
|
||||
int m_DispLast; // 表示最終行の位置
|
||||
|
||||
int m_WriteLine; // 書きこみ行の位置
|
||||
|
||||
int m_ReadLine; // 取りだし行の位置
|
||||
int m_ReadCol; // 取りだしカラム位置
|
||||
|
||||
int m_FH;
|
||||
int m_FW;
|
||||
int m_LineMax;
|
||||
|
||||
TRect m_DestRC;
|
||||
TRect m_SourceRC;
|
||||
TRect m_FillRC;
|
||||
|
||||
int m_Cursor;
|
||||
int m_DisEvent;
|
||||
public:
|
||||
int m_ColMax;
|
||||
int m_WriteCol; // 書きこみカラム位置
|
||||
private:
|
||||
void Scroll(void);
|
||||
void DrawCursor(int sw);
|
||||
void CursorOff(void);
|
||||
void CursorOn();
|
||||
int DeleteTop(void);
|
||||
void UpdateScroll(void);
|
||||
int BackSpace(void);
|
||||
|
||||
public:
|
||||
CFifoEdit();
|
||||
~CFifoEdit();
|
||||
|
||||
inline void SetBitmap(Graphics::TBitmap *p){
|
||||
pBitmap = p;
|
||||
};
|
||||
void Clear(void);
|
||||
void GetString(AnsiString &as);
|
||||
|
||||
int GetLen(void);
|
||||
char GetChar(void);
|
||||
LPCSTR GetCurLine(void);
|
||||
char GetLastChar(void);
|
||||
|
||||
|
||||
void SetPaintBox(TPaintBox *tp, TScrollBar *sp);
|
||||
void PutChar(char c);
|
||||
void PutText(LPCSTR p);
|
||||
void PaintCanvas(void);
|
||||
void SetCursor(sw);
|
||||
void ScrollBarChange(void);
|
||||
void ScrollBarUp(int page);
|
||||
void ScrollBarDown(int page);
|
||||
int LineBackSpace(void);
|
||||
int IsSAS(int sw);
|
||||
};
|
||||
|
||||
///---------------------------------------------------------
|
||||
/// コントロールのアラインの管理クラス
|
||||
class CAlign
|
||||
{
|
||||
public:
|
||||
int BTop, BLeft;
|
||||
int BWidth, BHeight;
|
||||
int OTop, OLeft;
|
||||
int OWidth, OHeight;
|
||||
int OFontHeight;
|
||||
double m_FontAdj;
|
||||
|
||||
TControl *tp;
|
||||
TFont *fp;
|
||||
public:
|
||||
inline CAlign(void){
|
||||
tp = NULL;
|
||||
fp = NULL;
|
||||
m_FontAdj = 1.0;
|
||||
};
|
||||
inline ~CAlign(){
|
||||
};
|
||||
void InitControl(TControl *p, TControl *pB, TFont *pF = NULL);
|
||||
void InitControl(TControl *p, RECT *rp, TFont *pF = NULL);
|
||||
void NewAlign(TControl *pB);
|
||||
inline double GetFontAdj(void){return fabs(m_FontAdj);};
|
||||
inline TControl *GetControl(void){return tp;};
|
||||
void NewAlign(TControl *pB, double hx);
|
||||
void NewFont(AnsiString &FontName, BYTE Charset, TFontStyles fs);
|
||||
};
|
||||
|
||||
///---------------------------------------------------------
|
||||
/// コントロールのアラインの管理クラス
|
||||
class CAlignList
|
||||
{
|
||||
private:
|
||||
int Max;
|
||||
int Cnt;
|
||||
CAlign **AlignList;
|
||||
void Alloc(void);
|
||||
public:
|
||||
CAlignList(void);
|
||||
~CAlignList();
|
||||
void EntryControl(TControl *tp, TControl *pB, TFont *pF = NULL);
|
||||
void EntryControl(TControl *tp, RECT *rp, TFont *pF = NULL);
|
||||
void NewAlign(TControl *pB);
|
||||
double GetFontAdj(TControl *pB);
|
||||
void NewAlign(TControl *pB, TControl *pS, double hx);
|
||||
void NewFont(AnsiString &FontName, BYTE Charset, TFontStyles fs);
|
||||
};
|
||||
|
||||
class CAlignGrid
|
||||
{
|
||||
private:
|
||||
int BWidth;
|
||||
int BHeight;
|
||||
int BRowHeight;
|
||||
|
||||
int Max;
|
||||
int *bp;
|
||||
public:
|
||||
inline CAlignGrid(void){
|
||||
Max = 0;
|
||||
bp = NULL;
|
||||
};
|
||||
inline ~CAlignGrid(){
|
||||
if( bp != NULL ){
|
||||
delete bp;
|
||||
}
|
||||
};
|
||||
void InitGrid(TStringGrid *p);
|
||||
void NewAlign(TStringGrid *p);
|
||||
};
|
||||
|
||||
class CWebRef
|
||||
{
|
||||
private:
|
||||
AnsiString HTML;
|
||||
public:
|
||||
CWebRef();
|
||||
inline bool IsHTML(void){
|
||||
return !HTML.IsEmpty();
|
||||
};
|
||||
void ShowHTML(LPCSTR url);
|
||||
};
|
||||
|
||||
class CWaitCursor
|
||||
{
|
||||
private:
|
||||
TCursor sv;
|
||||
public:
|
||||
CWaitCursor();
|
||||
~CWaitCursor();
|
||||
void Delete(void);
|
||||
void Wait(void);
|
||||
};
|
||||
|
||||
///-------------------------------------------------------
|
||||
/// CRecentMenuクラス
|
||||
#define RECMENUMAX 4 // 処理できる最大の数
|
||||
class CRecentMenu
|
||||
{
|
||||
private:
|
||||
public:
|
||||
int InsPos; // メニュー挿入位置の番号
|
||||
int Max; // 処理する数
|
||||
AnsiString Caption[RECMENUMAX];
|
||||
TMenuItem *pMenu;
|
||||
TMenuItem *Items[RECMENUMAX+1];
|
||||
|
||||
public:
|
||||
CRecentMenu();
|
||||
void Init(int pos, TMenuItem *pmenu, int max);
|
||||
void Init(TMenuItem *pi, TMenuItem *pmenu, int max);
|
||||
int GetCount(void);
|
||||
LPCSTR GetItemText(int n);
|
||||
void SetItemText(int n, LPCSTR p);
|
||||
int IsAdd(LPCSTR pNew);
|
||||
void Add(LPCSTR pNew);
|
||||
void ExtFilter(LPCSTR pExt);
|
||||
void Clear(void);
|
||||
void Insert(TObject *op, Classes::TNotifyEvent pEvent);
|
||||
void Delete(void);
|
||||
void Delete(LPCSTR pName);
|
||||
int FindItem(TMenuItem *mp);
|
||||
LPCSTR FindItemText(TMenuItem *mp);
|
||||
};
|
||||
|
||||
void __fastcall ShowHtmlHelp(LPCSTR pContext = NULL);
|
||||
//void ShowHelp(int index);
|
||||
void InitSampType(void);
|
||||
LPCSTR __fastcall ConvAndChar(LPSTR t, LPCSTR p);
|
||||
|
||||
void GetUTC(SYSTEMTIME *tp);
|
||||
void GetLocal(SYSTEMTIME *tp);
|
||||
LPSTR StrDupe(LPCSTR s);
|
||||
|
||||
void InitColorTable(TColor cl, TColor ch);
|
||||
LPCSTR GetKeyName(WORD Key);
|
||||
WORD GetKeyCode(LPCSTR pName);
|
||||
LPCSTR ToDXKey(LPCSTR s);
|
||||
LPCSTR ToJAKey(LPCSTR s);
|
||||
|
||||
int SetTBValue(double d, double dmax, int imax);
|
||||
double GetTBValue(int d, double dmax, int imax);
|
||||
LPUSTR jstrupr(LPUSTR s);
|
||||
inline LPSTR jstrupr(LPSTR s){return (LPSTR)jstrupr(LPUSTR(s));};
|
||||
|
||||
int IsFile(LPCSTR pName);
|
||||
int SetTimeOffsetInfo(int &Hour, int &Min);
|
||||
WORD AdjustRolTimeUTC(WORD tim, char c);
|
||||
void __fastcall SetGroupEnabled(TGroupBox *gp);
|
||||
void SetButtonCaption(TSpeedButton *tb, AnsiString &as, int maxlen, int fontsize, TColor col);
|
||||
void FormCenter(TForm *tp, int XW, int YW);
|
||||
char *lastp(char *p);
|
||||
char *clipsp(char *s);
|
||||
LPCSTR _strdmcpy(LPSTR t, LPCSTR p, char c);
|
||||
const char *StrDlmCpy(char *t, const char *p, char Dlm, int len);
|
||||
const char *StrDlmCpyK(char *t, const char *p, char Dlm, int len);
|
||||
void StrCopy(LPSTR t, LPCSTR s, int n);
|
||||
char LastC(LPCSTR p);
|
||||
LPCSTR GetEXT(LPCSTR Fname);
|
||||
void SetEXT(LPSTR pName, LPSTR pExt);
|
||||
void SetCurDir(LPSTR t, int size);
|
||||
void SetDirName(LPSTR t, LPCSTR pName);
|
||||
LPCSTR StrDbl(double d);
|
||||
LPCSTR StrDblE(double d);
|
||||
double ReadDoubleIniFile(TMemIniFile *p, LPCSTR c1, LPCSTR c2, double d);
|
||||
void WriteDoubleIniFile(TMemIniFile *p, LPCSTR c1, LPCSTR c2, double d);
|
||||
void ClipLF(LPSTR sp);
|
||||
LPSTR FillSpace(LPSTR s, int n);
|
||||
LPSTR SkipSpace(LPSTR sp);
|
||||
LPCSTR SkipSpace(LPCSTR sp);
|
||||
LPSTR StrDlm(LPSTR &t, LPSTR p);
|
||||
LPSTR StrDlm(LPSTR &t, LPSTR p, char c);
|
||||
void ChgString(LPSTR t, char a, char b);
|
||||
void DelChar(LPSTR t, char a);
|
||||
int atoin(const char *p, int n);
|
||||
int htoin(const char *p, int n);
|
||||
void InfoMB(LPCSTR fmt, ...);
|
||||
void ErrorMB(LPCSTR fmt, ...);
|
||||
void WarningMB(LPCSTR fmt, ...);
|
||||
int YesNoMB(LPCSTR fmt, ...);
|
||||
int YesNoCancelMB(LPCSTR fmt, ...);
|
||||
int OkCancelMB(LPCSTR fmt, ...);
|
||||
|
||||
int RemoveL2(LPSTR t, LPSTR ss, LPCSTR pKey, int size);
|
||||
void AddL2(LPSTR t, LPCSTR pKey, LPCSTR s, UCHAR c1, UCHAR c2, int size);
|
||||
|
||||
void Yen2CrLf(AnsiString &ws, AnsiString cs);
|
||||
void CrLf2Yen(AnsiString &ws, AnsiString cs);
|
||||
|
||||
void EntryMsg(AnsiString ttl, AnsiString as, WORD Key); //JA7UDE 0428
|
||||
void SetComboBox(TComboBox *pCombo, LPCSTR pList);
|
||||
void GetComboBox(AnsiString &as, TComboBox *pCombo);
|
||||
void SetGridWidths(TStringGrid *pGrid, LPCSTR pList);
|
||||
void GetGridWidths(AnsiString &as, TStringGrid *pGrid);
|
||||
|
||||
int IsNumbs(LPCSTR p);
|
||||
int IsAlphas(LPCSTR p);
|
||||
int IsRST(LPCSTR p);
|
||||
int IsCallChar(char c);
|
||||
int IsCall(LPCSTR p);
|
||||
int IsName(LPCSTR p);
|
||||
int IsJA(const char *s);
|
||||
LPCSTR ClipCall(LPCSTR s);
|
||||
LPCSTR ClipCC(LPCSTR s);
|
||||
|
||||
/* JA7UDE 0427
|
||||
inline LPUSTR StrDlm(LPUSTR &t, LPUSTR p, char c){return (LPUSTR)StrDlm(LPSTR(t), LPSTR(p), c);};
|
||||
inline LPUSTR StrDlm(LPUSTR &t, LPUSTR p){return (LPUSTR)StrDlm(LPSTR(t), LPSTR(p));};
|
||||
inline LPUSTR StrDlm(LPUSTR &t, LPSTR p, char c){return (LPUSTR)StrDlm(LPSTR(t), p, c);};
|
||||
inline LPUSTR StrDlm(LPUSTR &t, LPSTR p){return (LPUSTR)StrDlm(LPSTR(t), p);};
|
||||
*/
|
||||
|
||||
void TopWindow(TForm *tp);
|
||||
void NormalWindow(TForm *tp);
|
||||
|
||||
int FontStyle2Code(TFontStyles style);
|
||||
TFontStyles Code2FontStyle(int code);
|
||||
|
||||
void KeyEvent(const short *p);
|
||||
#endif
|
||||
|
||||
632
Comm.cpp
Normal file
632
Comm.cpp
Normal file
|
|
@ -0,0 +1,632 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "Comm.h"
|
||||
#include "ComLib.h"
|
||||
|
||||
#define WAITSTAT 0
|
||||
|
||||
#define DEFFSOUND 3
|
||||
|
||||
COMMPARA COMM;
|
||||
void InitCOMMPara(void)
|
||||
{
|
||||
COMM.change = 1;
|
||||
}
|
||||
|
||||
__fastcall CComm::CComm(bool CreateSuspended)
|
||||
: TThread(CreateSuspended)
|
||||
{
|
||||
m_CreateON = FALSE; // クリエイトフラグ
|
||||
m_Command = 0;
|
||||
m_fHnd = NULL; // ファイルハンドル
|
||||
m_inv = 0;
|
||||
m_Execute = 0;
|
||||
m_txwp = m_txrp = m_txcnt = 0;
|
||||
m_TxEnb = 0;
|
||||
|
||||
m_figout = 0;
|
||||
m_idle = 0;
|
||||
m_WaitTimerCount = 0;
|
||||
m_nextcount = 0;
|
||||
|
||||
pMod = NULL;
|
||||
m_pEXT = NULL;
|
||||
}
|
||||
|
||||
void __fastcall CComm::WaitTXD(int w)
|
||||
{
|
||||
if( w ){
|
||||
#if 0
|
||||
ULONG tim = ::GetTickCount();
|
||||
ULONG w = ((pMod->m_ReCount*(pMod->m_BitLen + 1.5) ) + (w * pMod->m_ReCount/3)) * 1000 / SampFreq;
|
||||
tim += w;
|
||||
if( w > 10 )::Sleep(w - 10);
|
||||
while(tim >= ::GetTickCount()) ::Sleep(0);
|
||||
#else
|
||||
::Sleep(((pMod->m_ReCount*(pMod->m_BitLen + 1.5) ) + (w * pMod->m_ReCount/3)) * 1000 / SampFreq);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall CComm::NextBuf(void)
|
||||
{
|
||||
m_txrp++;
|
||||
if( m_txrp >= COMM_TXBUFSIZE ){
|
||||
m_txrp = 0;
|
||||
}
|
||||
m_txcnt--;
|
||||
FSKCount1++;
|
||||
FSKCount--;
|
||||
}
|
||||
|
||||
void __fastcall CComm::EnbTX(int sw)
|
||||
{
|
||||
m_TxEnb = 0;
|
||||
if( !sw ){
|
||||
FSKCount1 = 1000;
|
||||
FSKCount2 = 0;
|
||||
}
|
||||
else {
|
||||
m_WaitTimerCount = 4;
|
||||
m_FirstGaurd = TRUE;
|
||||
FSKCount1 = 0;
|
||||
FSKCount2 = 0;
|
||||
FSKDeff = 0;
|
||||
}
|
||||
m_txwp = m_txrp = m_txcnt = 0;
|
||||
FSKCount = 0;
|
||||
m_figout = 0;
|
||||
m_idle = 0;
|
||||
m_TxEnb = sw;
|
||||
}
|
||||
|
||||
void __fastcall CComm::Timer(void)
|
||||
{
|
||||
if( m_CreateON ){
|
||||
if( sys.m_TxPort ){
|
||||
if( m_fHnd == NULL ) return;
|
||||
if( !m_TxEnb ) return;
|
||||
if( m_DisDiddle != pMod->m_DisDiddle ){
|
||||
m_DisDiddle = pMod->m_DisDiddle;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
// DTRで符号送信用
|
||||
void __fastcall CComm::OutData(BYTE d)
|
||||
{
|
||||
const BYTE tbl[]={
|
||||
0x00, 0x10, 0x08, 0x18, // 00000 10000 01000 11000
|
||||
0x04, 0x14, 0x0c, 0x1c, // 00100 10100 01100 11100
|
||||
0x02, 0x12, 0x0a, 0x1a, // 00010 10010 01010 11010
|
||||
0x06, 0x16, 0x0e, 0x1e, // 00110 10110 01110 11110
|
||||
0x01, 0x11, 0x09, 0x19, // 00001 10001 01001 11001
|
||||
0x05, 0x15, 0x0d, 0x1d, // 00101 10101 01101 11101
|
||||
0x03, 0x13, 0x0b, 0x1b, // 00011 10011 01011 11011
|
||||
0x07, 0x17, 0x0f, 0x1f, // 00111 10111 01111 11111
|
||||
};
|
||||
if( m_CreateON == FALSE ) return;
|
||||
|
||||
if( pMod->m_BitLen <= 6 ){
|
||||
d = tbl[d & 0x001f];
|
||||
}
|
||||
|
||||
if( sys.m_TxdJob >= 2 ){
|
||||
if( m_nextcount ){
|
||||
while( m_nextcount >= ::GetTickCount() ){
|
||||
if( m_Command == COMM_CLOSE ) return;
|
||||
::Sleep(1);
|
||||
}
|
||||
}
|
||||
m_nextcount = ::GetTickCount() + m_addcount;
|
||||
}
|
||||
if( m_pEXT != NULL ){
|
||||
m_pEXT->PutChar(d);
|
||||
}
|
||||
else {
|
||||
TransmitCommChar(m_fHnd, d);
|
||||
}
|
||||
#if BITDEBUG
|
||||
m_bitCountA = GetTickCount() - m_bitCount;
|
||||
m_bitCount = GetTickCount();
|
||||
#endif
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CComm::Execute()
|
||||
{
|
||||
m_Execute = 1;
|
||||
int BitLen = pMod->m_BitLen;
|
||||
//---- スレッドのコードをここに記述 ----
|
||||
// Priority = tpLower;
|
||||
while(1){
|
||||
_try:;
|
||||
if( Terminated == TRUE ){
|
||||
return;
|
||||
}
|
||||
if( m_Command == COMM_CLOSE ){
|
||||
m_Command = 0;
|
||||
return;
|
||||
}
|
||||
if( m_CreateON == TRUE ){
|
||||
if( !m_TxEnb ){
|
||||
::Sleep(10);
|
||||
}
|
||||
else if( !TxBusy() ){
|
||||
if( m_FirstGaurd ){ // 最初のガード時間の確保
|
||||
m_FirstGaurd = 0;
|
||||
::Sleep(250);
|
||||
if( m_DisDiddle == -1 ) m_DisDiddle = 0;
|
||||
}
|
||||
else if( m_txcnt && (FSKDeff <= DEFFSOUND) ){ // 送信データあり
|
||||
m_DisDiddle = pMod->m_DisDiddle;
|
||||
m_Data = m_txbuf[m_txrp];
|
||||
if( m_figout && (m_fig == 0x1b) && (m_Data != 0x1f) ){
|
||||
m_Data = 0x1b;
|
||||
}
|
||||
else {
|
||||
switch(m_Data){
|
||||
case 0xff: // Mark
|
||||
::Sleep((pMod->m_ReCount * 3 * 1000) / SampFreq);
|
||||
NextBuf();
|
||||
goto _try;
|
||||
case 0xfe: // キャリア断続
|
||||
NextBuf();
|
||||
goto _try;
|
||||
case 0xfd: // disable diddle
|
||||
m_DisDiddle = 0;
|
||||
NextBuf();
|
||||
goto _try;
|
||||
case 0xfc: // enable diddle
|
||||
m_DisDiddle = 1;
|
||||
NextBuf();
|
||||
goto _try;
|
||||
case 0x1b:
|
||||
case 0x1f:
|
||||
m_fig = m_Data;
|
||||
break;
|
||||
}
|
||||
NextBuf();
|
||||
}
|
||||
m_figout = 0;
|
||||
if( !pMod->m_CharWaitDiddle ){
|
||||
WaitTXD(pMod->m_CharWait);
|
||||
}
|
||||
m_WaitTimerCount = 4;
|
||||
OutData(m_Data);
|
||||
}
|
||||
else if( (BitLen < 6) && ((FSKDeff > DEFFSOUND) || (pMod->m_diddle && !m_DisDiddle)) ){
|
||||
if( FSKDeff > DEFFSOUND ){
|
||||
WaitTXD(pMod->m_CharWait);
|
||||
}
|
||||
else if( (sys.m_LWait == 2) || !pMod->m_WaitTimer || m_WaitTimerCount ){
|
||||
if( !pMod->m_CharWaitDiddle ){
|
||||
if( sys.m_LWait == 2 ){
|
||||
WaitTXD(pMod->m_CharWait);
|
||||
}
|
||||
else if( pMod->m_DiddleWait ){
|
||||
WaitTXD(pMod->m_DiddleWait);
|
||||
}
|
||||
}
|
||||
}
|
||||
m_idle = 1;
|
||||
switch(pMod->m_diddle){
|
||||
case 1: // BLK
|
||||
if( pMod->m_RandomDiddle && !(rand() & 3) ){
|
||||
m_Data = 0x1f;
|
||||
if( pMod->m_BitLen <= 6 ) m_figout = 1;
|
||||
}
|
||||
else {
|
||||
m_Data = 0x00;
|
||||
}
|
||||
break;
|
||||
default: // LTR
|
||||
if( pMod->m_RandomDiddle && !(rand() & 3) ){
|
||||
m_Data = 0x00;
|
||||
}
|
||||
else {
|
||||
m_Data = 0x1f;
|
||||
if( pMod->m_BitLen <= 6 ) m_figout = 1;
|
||||
}
|
||||
break;
|
||||
}
|
||||
if( m_WaitTimerCount ) m_WaitTimerCount--;
|
||||
OutData(m_Data);
|
||||
}
|
||||
else {
|
||||
if( !m_idle ){
|
||||
::Sleep((pMod->m_ReCount * pMod->m_BitLen)*1000/SampFreq);
|
||||
}
|
||||
m_idle = 1;
|
||||
}
|
||||
::Sleep(10);
|
||||
}
|
||||
else {
|
||||
::Sleep(1);
|
||||
}
|
||||
}
|
||||
else {
|
||||
::Sleep(10);
|
||||
}
|
||||
}
|
||||
}
|
||||
/*#$%
|
||||
==============================================================
|
||||
通信回線をクローズする
|
||||
--------------------------------------------------------------
|
||||
--------------------------------------------------------------
|
||||
--------------------------------------------------------------
|
||||
==============================================================
|
||||
*/
|
||||
void __fastcall CComm::Close(void)
|
||||
{
|
||||
if( m_CreateON == TRUE ){
|
||||
if( m_Execute ){
|
||||
m_TxEnb = 0;
|
||||
m_Command = COMM_CLOSE; // スレッド終了コマンド
|
||||
Priority = tpNormal; //スレッドは通常の優先度である
|
||||
#if 0
|
||||
DWORD tim = GetTickCount();
|
||||
while( m_Command && (GetTickCount() < (tim + 3000)) ){ // スレッド終了待ち
|
||||
::Sleep(1);
|
||||
}
|
||||
#else
|
||||
WaitFor();
|
||||
#endif
|
||||
FSKCount1+=1000;
|
||||
}
|
||||
if( m_pEXT != NULL ){
|
||||
delete m_pEXT;
|
||||
m_pEXT = NULL;
|
||||
}
|
||||
else {
|
||||
::CloseHandle(m_fHnd);
|
||||
}
|
||||
m_CreateON = FALSE;
|
||||
}
|
||||
}
|
||||
void __fastcall CComm::ReqClose(void)
|
||||
{
|
||||
if( m_CreateON == TRUE ){
|
||||
if( m_Execute ){
|
||||
m_TxEnb = 0;
|
||||
m_Command = COMM_CLOSE; // スレッド終了コマンド
|
||||
Priority = tpNormal; //スレッドは通常の優先度である
|
||||
FSKCount1+=1000;
|
||||
}
|
||||
}
|
||||
}
|
||||
void __fastcall CComm::WaitClose(void)
|
||||
{
|
||||
if( m_CreateON == TRUE ){
|
||||
if( m_Execute && m_Command ){
|
||||
#if 0
|
||||
DWORD tim = GetTickCount();
|
||||
while( GetTickCount() < (tim + 3000) ){ // 1[s]のウエイト
|
||||
if( !m_Command ) break;
|
||||
::Sleep(1);
|
||||
}
|
||||
#else
|
||||
WaitFor();
|
||||
#endif
|
||||
}
|
||||
if( m_pEXT != NULL ){
|
||||
delete m_pEXT;
|
||||
m_pEXT = NULL;
|
||||
}
|
||||
else {
|
||||
::CloseHandle(m_fHnd);
|
||||
}
|
||||
m_CreateON = FALSE;
|
||||
}
|
||||
}
|
||||
/*#$%
|
||||
==============================================================
|
||||
通信回線をオープンする
|
||||
--------------------------------------------------------------
|
||||
PortName : 回線の名前
|
||||
pCP : COMMPARAのポインタ(ヌルの時はデフォルトで初期化)
|
||||
RBufSize : 受信バッファのサイズ(default=2048)
|
||||
TBufSize : 送信バッファのサイズ(default=2048)
|
||||
--------------------------------------------------------------
|
||||
TRUE/FALSE
|
||||
--------------------------------------------------------------
|
||||
==============================================================
|
||||
*/
|
||||
BOOL __fastcall CComm::Open(LPCTSTR PortName, int inv, COMMPARA *cp)
|
||||
{
|
||||
|
||||
if( m_CreateON == TRUE ) Close();
|
||||
m_Execute = 0;
|
||||
m_fHnd = ::CreateFile( PortName, GENERIC_READ | GENERIC_WRITE,
|
||||
0, NULL,
|
||||
OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
NULL
|
||||
);
|
||||
if( m_fHnd == INVALID_HANDLE_VALUE ){
|
||||
m_pEXT = new CEXTFSK(PortName);
|
||||
if( m_pEXT->IsLib() ){
|
||||
LONG para;
|
||||
if( cp != NULL ){
|
||||
para = (cp->Baud << 16);
|
||||
para |= cp->Stop;
|
||||
para |= (cp->BitLen << 2);
|
||||
}
|
||||
else {
|
||||
para = (45 << 16);
|
||||
}
|
||||
m_pEXT->Open(para);
|
||||
m_CreateON = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
delete m_pEXT;
|
||||
m_pEXT = NULL;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
m_inv = inv;
|
||||
// setup device buffers
|
||||
if( ::SetupComm( m_fHnd, DWORD(1024), DWORD(2) ) == FALSE ){
|
||||
::CloseHandle(m_fHnd);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// purge any information in the buffer
|
||||
::PurgeComm( m_fHnd, PURGE_TXABORT | PURGE_RXABORT | PURGE_TXCLEAR | PURGE_RXCLEAR );
|
||||
|
||||
// set up for overlapped I/O
|
||||
COMMTIMEOUTS TimeOut;
|
||||
|
||||
TimeOut.ReadIntervalTimeout = 0xffffffff;
|
||||
TimeOut.ReadTotalTimeoutMultiplier = 0;
|
||||
TimeOut.ReadTotalTimeoutConstant = 0;
|
||||
TimeOut.WriteTotalTimeoutMultiplier = 0;
|
||||
TimeOut.WriteTotalTimeoutConstant = 20000;
|
||||
// TimeOut.WriteTotalTimeoutConstant = 1;
|
||||
if( !::SetCommTimeouts( m_fHnd, &TimeOut ) ){
|
||||
::CloseHandle( m_fHnd );
|
||||
return FALSE;
|
||||
}
|
||||
::GetCommState( m_fHnd, &m_dcb );
|
||||
m_dcb.BaudRate = (cp != NULL) ? cp->Baud : 9600;
|
||||
m_dcb.fBinary = TRUE;
|
||||
m_dcb.ByteSize = BYTE((cp != NULL) ? cp->BitLen : 8);
|
||||
m_dcb.Parity = BYTE((cp != NULL) ? cp->Parity : NOPARITY);
|
||||
m_dcb.StopBits = BYTE((cp != NULL ) ? cp->Stop : ONESTOPBIT);
|
||||
// Application->MainForm->Caption = int(cp ? cp->Stop == TWOSTOPBITS : FALSE);
|
||||
m_dcb.XonChar = 0x11; // XON
|
||||
m_dcb.XoffChar = 0x13; // XOFF
|
||||
m_dcb.fParity = 0;
|
||||
m_dcb.fOutxCtsFlow = FALSE;
|
||||
m_dcb.fInX = m_dcb.fOutX = FALSE;
|
||||
m_dcb.fOutxDsrFlow = FALSE;
|
||||
m_dcb.EvtChar = 0x0d;
|
||||
|
||||
m_dcb.fRtsControl = m_inv ? RTS_CONTROL_ENABLE : RTS_CONTROL_DISABLE; // 送信禁止
|
||||
m_dcb.fDtrControl = m_inv ? DTR_CONTROL_ENABLE : DTR_CONTROL_DISABLE; // 送信禁止
|
||||
|
||||
// m_dcb.fTXContinueOnXoff = TRUE;
|
||||
m_dcb.XonLim = USHORT(1024/4); // 1/4 of RBufSize
|
||||
m_dcb.XoffLim = USHORT(1024*3/4); // 3/4 of RBufSize
|
||||
m_dcb.DCBlength = sizeof( DCB );
|
||||
|
||||
if( m_dcb.StopBits != ONESTOPBIT ){
|
||||
m_addcount = DWORD((1000.0/double(m_dcb.BaudRate)) * double(m_dcb.ByteSize + 2.7));
|
||||
}
|
||||
else {
|
||||
m_addcount = DWORD((1000.0/double(m_dcb.BaudRate)) * double(m_dcb.ByteSize + 2.2));
|
||||
}
|
||||
#if 0 // debug
|
||||
m_dcb.BaudRate = 9600;
|
||||
m_dcb.ByteSize = 8;
|
||||
#endif
|
||||
|
||||
if( !::SetCommState( m_fHnd, &m_dcb ) ){
|
||||
::CloseHandle( m_fHnd );
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// get any early notifications
|
||||
if( !::SetCommMask( m_fHnd, EV_RXFLAG ) ){
|
||||
::CloseHandle(m_fHnd);
|
||||
return FALSE;
|
||||
}
|
||||
m_CreateON = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
//-----------------------------------------------------------------
|
||||
// PTT切り替え用
|
||||
void __fastcall CComm::SetTXRX(int sw)
|
||||
{
|
||||
if( m_CreateON == FALSE ) return;
|
||||
|
||||
if( m_inv ) sw = sw ? 0 : 1;
|
||||
if( m_pEXT != NULL ){
|
||||
m_pEXT->SetPTT(sw);
|
||||
}
|
||||
else if( sw ){
|
||||
::EscapeCommFunction(m_fHnd, SETRTS);
|
||||
::EscapeCommFunction(m_fHnd, SETDTR);
|
||||
}
|
||||
else {
|
||||
::EscapeCommFunction(m_fHnd, CLRRTS);
|
||||
::EscapeCommFunction(m_fHnd, CLRDTR);
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
//-----------------------------------------------------------------
|
||||
// DTRで符号送信用
|
||||
void __fastcall CComm::SetDTR(int sw)
|
||||
{
|
||||
if( m_CreateON == FALSE ) return;
|
||||
|
||||
if( sw ){
|
||||
::EscapeCommFunction(m_fHnd, SETDTR);
|
||||
}
|
||||
else {
|
||||
::EscapeCommFunction(m_fHnd, CLRDTR);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//-----------------------------------------------------------------
|
||||
// 送信ビジーかどうか調べる TRUE : 送信ビジー状態
|
||||
int __fastcall CComm::TxBusy(void)
|
||||
{
|
||||
if( m_CreateON == FALSE ) return 0;
|
||||
|
||||
if( m_pEXT != NULL ){
|
||||
return m_pEXT->IsTxBusy();
|
||||
}
|
||||
else {
|
||||
COMSTAT ComStat;
|
||||
DWORD dwErrorFlags;
|
||||
|
||||
ClearCommError( m_fHnd, &dwErrorFlags, &ComStat );
|
||||
return ComStat.fTxim;
|
||||
}
|
||||
}
|
||||
|
||||
/*#$%
|
||||
==============================================================
|
||||
通信回線にデータを送信する
|
||||
--------------------------------------------------------------
|
||||
--------------------------------------------------------------
|
||||
--------------------------------------------------------------
|
||||
==============================================================
|
||||
*/
|
||||
void __fastcall CComm::PutChar(BYTE c)
|
||||
{
|
||||
if( (m_CreateON == TRUE) && m_Execute ){
|
||||
if( m_txcnt < COMM_TXBUFSIZE ){
|
||||
m_txbuf[m_txwp] = c;
|
||||
m_txwp++;
|
||||
if( m_txwp >= COMM_TXBUFSIZE ) m_txwp = 0;
|
||||
m_txcnt++;
|
||||
m_idle = 0;
|
||||
FSKCount++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/*#$%
|
||||
==============================================================
|
||||
受信バッファ内の格納データ長を得る
|
||||
--------------------------------------------------------------
|
||||
--------------------------------------------------------------
|
||||
データの長さ
|
||||
--------------------------------------------------------------
|
||||
==============================================================
|
||||
*/
|
||||
DWORD CComm::RecvLen(void)
|
||||
{
|
||||
if( m_pEXT != NULL ){
|
||||
return m_pEXT->IsEmpty(0) ? 0 : 1;
|
||||
}
|
||||
else {
|
||||
COMSTAT ComStat;
|
||||
DWORD dwErrorFlags;
|
||||
|
||||
::ClearCommError( m_fHnd, &dwErrorFlags, &ComStat );
|
||||
return ComStat.cbInQue;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*******************************************************************
|
||||
EXTFSK.DLL
|
||||
*******************************************************************/
|
||||
__fastcall CEXTFSK::CEXTFSK(LPCSTR pName)
|
||||
{
|
||||
char Name[128];
|
||||
sprintf(Name, "%s.%s", pName, strcmpi(pName, "EXTFSK") ? "fsk" : "dll");
|
||||
fextfskOpen = NULL;
|
||||
fextfskClose = NULL;
|
||||
fextfskIsTxBusy = NULL;
|
||||
fextfskPutChar = NULL;
|
||||
fextfskSetPTT = NULL;
|
||||
|
||||
m_hLib = ::LoadLibrary(Name);
|
||||
if( m_hLib != NULL ){
|
||||
fextfskOpen = (extfskOpen)GetProc("_extfskOpen");
|
||||
fextfskClose = (extfskClose)GetProc("_extfskClose");
|
||||
fextfskIsTxBusy = (extfskIsTxBusy)GetProc("_extfskIsTxBusy");
|
||||
fextfskPutChar = (extfskPutChar)GetProc("_extfskPutChar");
|
||||
fextfskSetPTT = (extfskSetPTT)GetProc("_extfskSetPTT");
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall CEXTFSK::~CEXTFSK()
|
||||
{
|
||||
if( m_hLib != NULL ){
|
||||
Close();
|
||||
::FreeLibrary(m_hLib);
|
||||
m_hLib = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
FARPROC CEXTFSK::GetProc(LPCSTR pName)
|
||||
{
|
||||
FARPROC fn = ::GetProcAddress(m_hLib, pName+1);
|
||||
if( fn == NULL ){
|
||||
fn = ::GetProcAddress(m_hLib, pName);
|
||||
}
|
||||
return fn;
|
||||
}
|
||||
|
||||
long __fastcall CEXTFSK::Open(long para)
|
||||
{
|
||||
if( !m_hLib || !fextfskOpen ) return FALSE;
|
||||
return fextfskOpen(para);
|
||||
}
|
||||
|
||||
void __fastcall CEXTFSK::Close(void)
|
||||
{
|
||||
if( !m_hLib || !fextfskClose ) return;
|
||||
fextfskClose();
|
||||
}
|
||||
|
||||
long __fastcall CEXTFSK::IsTxBusy(void)
|
||||
{
|
||||
if( !m_hLib || !fextfskIsTxBusy ) return FALSE;
|
||||
return fextfskIsTxBusy();
|
||||
}
|
||||
|
||||
void __fastcall CEXTFSK::PutChar(BYTE c)
|
||||
{
|
||||
if( !m_hLib || !fextfskPutChar ) return;
|
||||
fextfskPutChar(c);
|
||||
}
|
||||
|
||||
void __fastcall CEXTFSK::SetPTT(long tx)
|
||||
{
|
||||
if( !m_hLib || !fextfskSetPTT ) return;
|
||||
fextfskSetPTT(tx);
|
||||
}
|
||||
|
||||
|
||||
162
Comm.h
Normal file
162
Comm.h
Normal file
|
|
@ -0,0 +1,162 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
///----------------------------------------------------------
|
||||
/// RS232C通信クラス
|
||||
///
|
||||
/// (C) JE3HHT Makoto.Mori
|
||||
///
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef CommH
|
||||
#define CommH
|
||||
#include "rtty.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
#define CR 0x0d
|
||||
#define LF 0x0a
|
||||
#define COMM_CLOSE 1
|
||||
|
||||
typedef struct {
|
||||
int change;
|
||||
|
||||
int Baud;
|
||||
int BitLen;
|
||||
int Stop;
|
||||
int Parity;
|
||||
}COMMPARA;
|
||||
extern COMMPARA COMM;
|
||||
|
||||
typedef long (__stdcall *extfskOpen)(long para);
|
||||
typedef void (__stdcall *extfskClose)(void);
|
||||
typedef long (__stdcall *extfskIsTxBusy)(void);
|
||||
typedef void (__stdcall *extfskPutChar)(BYTE c);
|
||||
typedef void (__stdcall *extfskSetPTT)(long tx);
|
||||
|
||||
class CEXTFSK
|
||||
{
|
||||
private:
|
||||
//HANDLE m_hLib;
|
||||
HINSTANCE m_hLib; //JA7UDE 0427
|
||||
extfskOpen fextfskOpen;
|
||||
extfskClose fextfskClose;
|
||||
extfskIsTxBusy fextfskIsTxBusy;
|
||||
extfskPutChar fextfskPutChar;
|
||||
extfskSetPTT fextfskSetPTT;
|
||||
private:
|
||||
FARPROC GetProc(LPCSTR pName);
|
||||
|
||||
public:
|
||||
__fastcall CEXTFSK(LPCSTR pName);
|
||||
__fastcall ~CEXTFSK();
|
||||
long __fastcall IsLib(void){return m_hLib != NULL;};
|
||||
long __fastcall Open(long para);
|
||||
void __fastcall Close(void);
|
||||
long __fastcall IsTxBusy(void);
|
||||
void __fastcall PutChar(BYTE c);
|
||||
void __fastcall SetPTT(long tx);
|
||||
};
|
||||
|
||||
#define COMM_TXBUFSIZE MODBUFMAX
|
||||
class CComm : public TThread
|
||||
{
|
||||
public:
|
||||
BOOL m_CreateON; // クリエイトフラグ
|
||||
volatile int m_Command;
|
||||
int m_Execute;
|
||||
DCB m_dcb; // DCB
|
||||
HANDLE m_fHnd; // ファイルハンドル
|
||||
int m_inv;
|
||||
|
||||
int m_TxEnb;
|
||||
char m_txbuf[COMM_TXBUFSIZE];
|
||||
int m_txcnt;
|
||||
int m_txwp;
|
||||
int m_txrp;
|
||||
|
||||
int m_idle;
|
||||
|
||||
BYTE m_Data;
|
||||
BYTE m_fig;
|
||||
int m_DisDiddle;
|
||||
int m_FirstGaurd;
|
||||
|
||||
int m_WaitTimerCount;
|
||||
|
||||
int m_figout;
|
||||
CFSKMOD *pMod;
|
||||
|
||||
DWORD m_nextcount;
|
||||
DWORD m_addcount;
|
||||
#if BITDEBUG
|
||||
int m_bitCount;
|
||||
int m_bitCountA;
|
||||
#endif
|
||||
|
||||
CEXTFSK *m_pEXT;
|
||||
protected:
|
||||
void virtual __fastcall Execute();
|
||||
private:
|
||||
void __fastcall NextBuf(void);
|
||||
void __fastcall WaitTXD(int w);
|
||||
void __fastcall OutData(BYTE d);
|
||||
public:
|
||||
__fastcall CComm(bool CreateSuspended);
|
||||
__fastcall ~CComm(){
|
||||
Close();
|
||||
};
|
||||
inline BOOL __fastcall IsOpen(void){
|
||||
return m_CreateON;
|
||||
};
|
||||
inline void __fastcall SetInv(int inv){m_inv = inv;};
|
||||
BOOL __fastcall Open(LPCTSTR PortName, int inv, COMMPARA *cp);
|
||||
void __fastcall Close(void);
|
||||
void __fastcall ReqClose(void);
|
||||
void __fastcall WaitClose(void);
|
||||
void __fastcall SetTXRX(int sw);
|
||||
// void __fastcall SetDTR(int sw);
|
||||
int __fastcall TxBusy(void);
|
||||
// void Out(BYTE d);
|
||||
void __fastcall PutChar(BYTE c);
|
||||
void __fastcall EnbTX(int sw);
|
||||
void __fastcall Timer(void);
|
||||
inline __fastcall GetBufCount(void){
|
||||
return m_txcnt;
|
||||
};
|
||||
void __fastcall DisDiddle(int sw){
|
||||
m_DisDiddle = sw;
|
||||
};
|
||||
void __fastcall InitTxBuf(void){
|
||||
m_txwp = m_txrp = m_txcnt = 0;
|
||||
FSKCount1 = 0;
|
||||
FSKCount2 = 0;
|
||||
FSKCount = 0;
|
||||
FSKDeff = 0;
|
||||
};
|
||||
// DWORD RecvLen(void);
|
||||
};
|
||||
|
||||
void InitCOMMPara(void);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
393
ConvDef.cpp
Normal file
393
ConvDef.cpp
Normal file
|
|
@ -0,0 +1,393 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "ConvDef.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TConvDefDlg *ConvDefDlg;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TConvDefDlg::TConvDefDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
Caption = "Define Conversion";
|
||||
ConvSel->Caption = "Delimiter Type";
|
||||
ConvSel->Items->Strings[0] = "comma(,)";
|
||||
ConvSel->Items->Strings[1] = "TAB";
|
||||
ConvSel->Items->Strings[2] = "NONE";
|
||||
LConv->Caption = "Conv.";
|
||||
CheckDBL->Caption = "Double";
|
||||
GrpRef->Caption = "Ref.";
|
||||
SBBack->Caption = "<";
|
||||
SBNext->Caption = ">";
|
||||
CancelBtn->Caption = "Cancel";
|
||||
InitBtn->Caption = "All Del";
|
||||
UpBtn->Caption = "Up";
|
||||
DownBtn->Caption = "Down";
|
||||
InitMax->Caption = "Init Max";
|
||||
}
|
||||
|
||||
Grid->RowCount = TEXTCONVMAX + 1;
|
||||
m_Mode = 0;
|
||||
m_Bgn = m_End = m_Cur = 0;
|
||||
m_DisEvent = 0;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::UpdateUI(int n)
|
||||
{
|
||||
SBBack->Enabled = m_Cur > m_Bgn ? TRUE : FALSE;
|
||||
SBNext->Enabled = m_Cur < m_End ? TRUE : FALSE;
|
||||
UpBtn->Enabled = (n > 0) ? TRUE : FALSE;
|
||||
DownBtn->Enabled = (n < TEXTCONVMAX - 1) ? TRUE : FALSE;
|
||||
CheckDBL->Enabled = m_Mode && (ConvSel->ItemIndex < 2);
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::GridDrawCell(TObject *Sender, int Col, int Row,
|
||||
TRect &Rect, TGridDrawState State)
|
||||
{
|
||||
char bf[1024];
|
||||
SDMMLOG sd;
|
||||
|
||||
Grid->Canvas->FillRect(Rect);
|
||||
int X = Rect.Left + 4;
|
||||
int Y = Rect.Top + 2;
|
||||
|
||||
if( Row ){
|
||||
Row--;
|
||||
bf[0] = 0;
|
||||
switch(Col){
|
||||
case 0: // Key
|
||||
strcpy(bf, Conv[Row].Key.c_str());
|
||||
break;
|
||||
case 1: // Size
|
||||
if( !Conv[Row].Key.IsEmpty() && (Conv[Row].Key != "%EOD") ){
|
||||
sprintf(bf, "%u", Conv[Row].w);
|
||||
}
|
||||
break;
|
||||
case 2: // Data
|
||||
if( m_Mode ){
|
||||
if( !Conv[Row].Key.IsEmpty() && (Conv[Row].Key != "%EOD") ){
|
||||
Log.GetData(&sd, m_Cur);
|
||||
MMLOG2Text(bf, &sd, Conv[Row].Key);
|
||||
}
|
||||
}
|
||||
else {
|
||||
strcpy(bf, m_line[Row].c_str());
|
||||
}
|
||||
break;
|
||||
}
|
||||
Grid->Canvas->TextOut(X, Y, bf);
|
||||
}
|
||||
else if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
LPCSTR _tte[]={
|
||||
"Conv.","Max","Ref.",
|
||||
};
|
||||
Grid->Canvas->TextOut(X, Y, _tte[Col]);
|
||||
}
|
||||
else { // タイトル
|
||||
LPCSTR _tt[]={
|
||||
"変換式","Max","参照",
|
||||
};
|
||||
Grid->Canvas->TextOut(X, Y, _tt[Col]);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::SetupComBox(void)
|
||||
{
|
||||
m_DisEvent++;
|
||||
ConvText->Clear();
|
||||
int i;
|
||||
for( i = 0; ConvTbl[i] != NULL; i++ ){
|
||||
ConvText->Items->Add(ConvTbl[i]);
|
||||
}
|
||||
m_DisEvent--;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TConvDefDlg::Execute(TCONV *tp, int &delm, int &utc, int &dbl, int b, int e)
|
||||
{
|
||||
m_DisEvent++;
|
||||
int i;
|
||||
for( i = 0; i < TEXTCONVMAX; i++ ){
|
||||
Conv[i].Key = tp[i].Key;
|
||||
Conv[i].w = tp[i].w;
|
||||
}
|
||||
m_Mode = 1;
|
||||
m_Cur = m_Bgn = b;
|
||||
m_End = e;
|
||||
CheckUTC->Checked = utc;
|
||||
ConvSel->ItemIndex = delm;
|
||||
CheckDBL->Checked = dbl;
|
||||
SetupComBox();
|
||||
ConvText->Text = Conv[0].Key;
|
||||
UpdateUI(Grid->Row - 1);
|
||||
m_DisEvent--;
|
||||
if( ShowModal() == IDOK ){
|
||||
for( i = 0; i < TEXTCONVMAX; i++ ){
|
||||
tp[i].Key = Conv[i].Key;
|
||||
tp[i].w = Conv[i].w;
|
||||
}
|
||||
delm = ConvSel->ItemIndex;
|
||||
utc = CheckUTC->Checked;
|
||||
dbl = CheckDBL->Checked;
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TConvDefDlg::Execute(TCONV *tp, int &delm, int &utc, int &dbl, LPCSTR pName)
|
||||
{
|
||||
m_DisEvent++;
|
||||
int i;
|
||||
for( i = 0; i < TEXTCONVMAX; i++ ){
|
||||
Conv[i].Key = tp[i].Key;
|
||||
Conv[i].w = tp[i].w;
|
||||
}
|
||||
m_Mode = 0;
|
||||
CheckUTC->Checked = utc;
|
||||
ConvSel->ItemIndex = delm;
|
||||
CheckDBL->Checked = dbl;
|
||||
SetupComBox();
|
||||
ConvText->Text = Conv[0].Key;
|
||||
LoadText(pName);
|
||||
UpdateUI(Grid->Row - 1);
|
||||
UpdateLine();
|
||||
m_DisEvent--;
|
||||
if( ShowModal() == IDOK ){
|
||||
for( i = 0; i < TEXTCONVMAX; i++ ){
|
||||
tp[i].Key = Conv[i].Key;
|
||||
tp[i].w = Conv[i].w;
|
||||
}
|
||||
delm = ConvSel->ItemIndex;
|
||||
utc = CheckUTC->Checked;
|
||||
dbl = CheckDBL->Checked;
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::LoadText(LPCSTR pName)
|
||||
{
|
||||
FILE *fp;
|
||||
char bf[2048];
|
||||
|
||||
m_Cur = m_Bgn = m_End = 0;
|
||||
if( (fp = fopen(pName, "rt")) != NULL ){
|
||||
while(!feof(fp)){
|
||||
if( fgets(bf, sizeof(bf), fp) != NULL ){
|
||||
ClipLF(bf);
|
||||
m_text[m_End] = bf;
|
||||
m_End++;
|
||||
if( m_End >= PREREADMAX ) break;
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
if( m_End ) m_End--;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::UpdateLine(void)
|
||||
{
|
||||
char rbf[2048];
|
||||
|
||||
StrCopy(rbf, m_text[m_Cur].c_str(), 2043);
|
||||
|
||||
char bf[512];
|
||||
char dlm = ConvSel->ItemIndex ? TAB : ',';
|
||||
LPSTR p, t;
|
||||
|
||||
int i;
|
||||
p = rbf;
|
||||
for( i = 0; i < TEXTCONVMAX; i++ ){
|
||||
if( ConvSel->ItemIndex == 2 ){
|
||||
StrCopy(bf, p, Conv[i].w);
|
||||
p += strlen(bf);
|
||||
t = bf;
|
||||
}
|
||||
else {
|
||||
p = StrDlm(t, p, dlm);
|
||||
}
|
||||
clipsp(t);
|
||||
t = SkipSpace(t);
|
||||
m_line[i] = t;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::ConvTextChange(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
m_DisEvent++;
|
||||
if( Grid->Row ){
|
||||
int Row = Grid->Row - 1;
|
||||
Conv[Row].Key = ConvText->Text;
|
||||
Grid->Invalidate();
|
||||
}
|
||||
m_DisEvent--;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::GridSelectCell(TObject *Sender, int Col, int Row,
|
||||
bool &CanSelect)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
m_DisEvent++;
|
||||
if( Row ){
|
||||
Row--;
|
||||
ConvText->Text = Conv[Row].Key;
|
||||
UpdateUI(Row);
|
||||
}
|
||||
m_DisEvent--;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::SBBackClick(TObject *Sender)
|
||||
{
|
||||
if( m_Cur > m_Bgn ){
|
||||
m_Cur--;
|
||||
UpdateUI(Grid->Row - 1);
|
||||
if( !m_Mode ) UpdateLine();
|
||||
Grid->Invalidate();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::SBNextClick(TObject *Sender)
|
||||
{
|
||||
if( m_Cur < m_End ){
|
||||
m_Cur++;
|
||||
UpdateUI(Grid->Row - 1);
|
||||
if( !m_Mode ) UpdateLine();
|
||||
Grid->Invalidate();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::GridGetEditText(TObject *Sender, int ACol,
|
||||
int ARow, AnsiString &Value)
|
||||
{
|
||||
char bf[512];
|
||||
|
||||
if( ARow ) ARow--;
|
||||
bf[0] = 0;
|
||||
switch(ACol){
|
||||
case 0: // Key
|
||||
strcpy(bf, Conv[ARow].Key.c_str());
|
||||
break;
|
||||
case 1: // Size
|
||||
if( !Conv[ARow].Key.IsEmpty() && (Conv[ARow].Key != "%EOD") ){
|
||||
sprintf(bf, "%u", Conv[ARow].w);
|
||||
}
|
||||
break;
|
||||
case 2: // Data
|
||||
break;
|
||||
}
|
||||
Value = bf;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::GridSetEditText(TObject *Sender, int ACol,
|
||||
int ARow, const AnsiString Value)
|
||||
{
|
||||
int d;
|
||||
|
||||
if( ARow ) ARow--;
|
||||
switch(ACol){
|
||||
case 0: // Key
|
||||
Conv[ARow].Key = Value;
|
||||
Grid->Invalidate();
|
||||
break;
|
||||
case 1: // Size
|
||||
sscanf(Value.c_str(), "%u", &d);
|
||||
if( (d >= 0) && (d<=256) ){
|
||||
Conv[ARow].w = d;
|
||||
if( !m_Mode ){
|
||||
UpdateLine();
|
||||
Grid->Invalidate();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 2: // Data
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::InitBtnClick(TObject *Sender)
|
||||
{
|
||||
if( YesNoMB( ( Font->Charset != SHIFTJIS_CHARSET ) ? "Delete All setup. Are you sure?":"すべての定義を消去しますか?" ) == IDYES ){
|
||||
for( int i = 0; i < TEXTCONVMAX; i++ ){
|
||||
Conv[i].Key = "";
|
||||
Conv[i].w = 0;
|
||||
}
|
||||
Grid->Invalidate();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::UpBtnClick(TObject *Sender)
|
||||
{
|
||||
int n = Grid->Row - 1;
|
||||
if( n ){
|
||||
TCONV td = Conv[n];
|
||||
Conv[n] = Conv[n-1];
|
||||
Conv[n-1] = td;
|
||||
Grid->Row--;
|
||||
UpdateUI(Grid->Row - 1);
|
||||
Grid->Invalidate();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::DownBtnClick(TObject *Sender)
|
||||
{
|
||||
int n = Grid->Row - 1;
|
||||
|
||||
if( n < (TEXTCONVMAX - 1) ){
|
||||
TCONV td = Conv[n];
|
||||
Conv[n] = Conv[n+1];
|
||||
Conv[n+1] = td;
|
||||
Grid->Row++;
|
||||
UpdateUI(Grid->Row - 1);
|
||||
Grid->Invalidate();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::InitMaxClick(TObject *Sender)
|
||||
{
|
||||
if( YesNoMB( ( Font->Charset != SHIFTJIS_CHARSET )?"Delete All Length. Are you sure?":"すべての文字列長の制限を無くしますか?" ) == IDYES ){
|
||||
for( int i = 0; i < TEXTCONVMAX; i++ ){
|
||||
Conv[i].w = 0;
|
||||
}
|
||||
Grid->Invalidate();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TConvDefDlg::ConvSelClick(TObject *Sender)
|
||||
{
|
||||
UpdateUI(Grid->Row-1);
|
||||
if( !m_Mode ){
|
||||
UpdateLine();
|
||||
Grid->Invalidate();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
ConvDef.dfm
Normal file
BIN
ConvDef.dfm
Normal file
Binary file not shown.
105
ConvDef.h
Normal file
105
ConvDef.h
Normal file
|
|
@ -0,0 +1,105 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef ConvDefH
|
||||
#define ConvDefH
|
||||
//----------------------------------------------------------------------------
|
||||
/* JA7UDE 0428
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Graphics.hpp>
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\SysUtils.hpp>
|
||||
#include <vcl\Windows.hpp>
|
||||
#include <vcl\System.hpp>
|
||||
#include <vcl\Grids.hpp>
|
||||
*/
|
||||
//----------------------------------------------------------------------------
|
||||
#include "LogConv.h"
|
||||
//----------------------------------------------------------------------------
|
||||
#define PREREADMAX 100
|
||||
class TConvDefDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TStringGrid *Grid;
|
||||
TComboBox *ConvText;
|
||||
TLabel *LConv;
|
||||
TGroupBox *GrpRef;
|
||||
TSpeedButton *SBBack;
|
||||
TSpeedButton *SBNext;
|
||||
TRadioGroup *ConvSel;
|
||||
TButton *InitBtn;
|
||||
TButton *UpBtn;
|
||||
TButton *DownBtn;
|
||||
TButton *InitMax;
|
||||
TCheckBox *CheckUTC;
|
||||
TCheckBox *CheckDBL;
|
||||
void __fastcall GridDrawCell(TObject *Sender, int Col, int Row, TRect &Rect,
|
||||
TGridDrawState State);
|
||||
void __fastcall ConvTextChange(TObject *Sender);
|
||||
void __fastcall GridSelectCell(TObject *Sender, int Col, int Row,
|
||||
bool &CanSelect);
|
||||
void __fastcall SBBackClick(TObject *Sender);
|
||||
void __fastcall SBNextClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall GridGetEditText(TObject *Sender, int ACol, int ARow,
|
||||
AnsiString &Value);
|
||||
void __fastcall GridSetEditText(TObject *Sender, int ACol, int ARow,
|
||||
const AnsiString Value);
|
||||
void __fastcall InitBtnClick(TObject *Sender);
|
||||
void __fastcall UpBtnClick(TObject *Sender);
|
||||
void __fastcall DownBtnClick(TObject *Sender);
|
||||
void __fastcall InitMaxClick(TObject *Sender);
|
||||
void __fastcall ConvSelClick(TObject *Sender);
|
||||
private:
|
||||
TCONV Conv[TEXTCONVMAX];
|
||||
|
||||
int m_Mode;
|
||||
int m_DisEvent;
|
||||
|
||||
int m_Bgn;
|
||||
int m_End;
|
||||
int m_Cur;
|
||||
|
||||
void __fastcall UpdateUI(int n);
|
||||
void __fastcall SetupComBox(void);
|
||||
|
||||
AnsiString m_text[PREREADMAX];
|
||||
AnsiString m_line[TEXTCONVMAX];
|
||||
|
||||
void __fastcall LoadText(LPCSTR pName);
|
||||
void __fastcall UpdateLine(void);
|
||||
|
||||
public:
|
||||
virtual __fastcall TConvDefDlg(TComponent* AOwner);
|
||||
|
||||
int __fastcall Execute(TCONV *tp, int &delm, int &utc, int &dbl, int b, int e);
|
||||
int __fastcall Execute(TCONV *tp, int &delm, int &utc, int &dbl, LPCSTR pName);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TConvDefDlg *ConvDefDlg;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
428
EditDlg.cpp
Normal file
428
EditDlg.cpp
Normal file
|
|
@ -0,0 +1,428 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "EditDlg.h"
|
||||
#include "MacroKey.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TEditDlgBox *EditDlgBox;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TEditDlgBox::TEditDlgBox(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
Memo->Font->Name = sys.m_BtnFontName;
|
||||
Memo->Font->Charset = sys.m_BtnFontCharset;
|
||||
m_JobSel = 0;
|
||||
m_DisEvent = 0;
|
||||
m_CurIndex = -1;
|
||||
m_MacroSet = 0;
|
||||
|
||||
ShortCutName->Clear();
|
||||
int i;
|
||||
ShortCutName->Items->Add("NULL");
|
||||
for( i = 0; KEYTBL[i].Key; i++ ){
|
||||
ShortCutName->Items->Add(ToDXKey(KEYTBL[i].pName));
|
||||
}
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
Caption = "Assign Macro";
|
||||
CancelBtn->Caption = "Cancel";
|
||||
LShort->Caption = "ShortCut";
|
||||
LEntryName->Caption = "Name";
|
||||
DelBtn->Caption = "Del";
|
||||
NewNameBtn->Caption = "New Name";
|
||||
TxBtn->Caption = "TX(F9)";
|
||||
}
|
||||
// SBHelp->Visible = !JanHelp.IsEmpty();
|
||||
SBHelp->Visible = FALSE;
|
||||
TxBtn->Enabled = !(sys.m_DisTX&1);
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TEditDlgBox::Execute(AnsiString &as, WORD &nKey, TColor *pcol, int *Intval, int set)
|
||||
{
|
||||
m_MacroSet = set;
|
||||
m_DisEvent++;
|
||||
if( ButtonName->Text.IsEmpty() ){
|
||||
ButtonName->Visible = FALSE;
|
||||
LEntryName->Visible = FALSE;
|
||||
}
|
||||
else {
|
||||
ButtonName->Visible = TRUE;
|
||||
}
|
||||
EntryName->Visible = FALSE;
|
||||
DelBtn->Visible = FALSE;
|
||||
NewNameBtn->Visible = FALSE;
|
||||
Memo->Text = as;
|
||||
if( pcol != NULL ){
|
||||
PanelCol->Visible = TRUE;
|
||||
LCol->Visible = TRUE;
|
||||
PanelCol->Color = *pcol;
|
||||
}
|
||||
if( Intval != NULL ){
|
||||
LMInt->Visible = TRUE;
|
||||
EMInt->Visible = TRUE;
|
||||
UDInt->Visible = TRUE;
|
||||
LMUN->Visible = TRUE;
|
||||
UDInt->Position = SHORT(*Intval);
|
||||
}
|
||||
ShortCutName->Text = GetKeyName(nKey);
|
||||
if( ShowModal() == IDOK ){
|
||||
as = Memo->Text;
|
||||
nKey = GetKeyCode(AnsiString(ShortCutName->Text).c_str()); //JA7UDE 0428
|
||||
if( pcol != NULL ){
|
||||
*pcol = PanelCol->Color;
|
||||
}
|
||||
if( Intval != NULL ){
|
||||
*Intval = UDInt->Position;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::UpdateUI(void)
|
||||
{
|
||||
if( EntryName->Visible != FALSE ){
|
||||
NewNameBtn->Enabled = (m_CurIndex >= 0) ? TRUE : FALSE;
|
||||
DelBtn->Enabled = (m_CurIndex >= 0) ? TRUE : FALSE;
|
||||
OKBtn->Enabled = ((!EntryName->Text.IsEmpty()) && (!Memo->Text.IsEmpty()) && Memo->Modified) ? TRUE : FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TEditDlgBox::EditMsg(void)
|
||||
{
|
||||
Caption = (Font->Charset != SHIFTJIS_CHARSET) ? "Edit Message":"定型メッセージの編集";
|
||||
|
||||
ButtonName->Visible = FALSE;
|
||||
EntryName->Visible = TRUE;
|
||||
DelBtn->Visible = TRUE;
|
||||
NewNameBtn->Visible = TRUE;
|
||||
|
||||
if(Font->Charset != SHIFTJIS_CHARSET){
|
||||
CancelBtn->Caption = "Close";
|
||||
OKBtn->Caption = "Assign";
|
||||
}
|
||||
else {
|
||||
CancelBtn->Caption = "閉じる";
|
||||
OKBtn->Caption = "登録";
|
||||
}
|
||||
|
||||
UpdateList();
|
||||
// EntryName->SetFocus();
|
||||
Memo->Clear();
|
||||
if( !sys.m_MsgName[0].IsEmpty() ){
|
||||
Memo->Text = sys.m_MsgList[0];
|
||||
m_CurIndex = 0;
|
||||
}
|
||||
UpdateUI();
|
||||
m_MacroSet = 0;
|
||||
if( ShowModal() == IDOK ){
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::UpdateList(void)
|
||||
{
|
||||
m_DisEvent++;
|
||||
EntryName->Clear();
|
||||
int i;
|
||||
for( i = 0; i < MSGLISTMAX; i++ ){
|
||||
if( sys.m_MsgName[i].IsEmpty() ) break;
|
||||
EntryName->Items->Add(sys.m_MsgName[i]);
|
||||
}
|
||||
if( !sys.m_MsgName[0].IsEmpty() ){
|
||||
EntryName->Text = sys.m_MsgName[0];
|
||||
}
|
||||
ShortCutName->Text = GetKeyName(sys.m_MsgKey[0]);
|
||||
m_DisEvent--;
|
||||
}
|
||||
|
||||
void __fastcall TEditDlgBox::EntryNameChange(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
m_DisEvent++;
|
||||
AnsiString ttl = EntryName->Text;
|
||||
AnsiString as;
|
||||
m_CurIndex = -1;
|
||||
ShortCutName->Text = "NULL";
|
||||
int i;
|
||||
for( i = 0; i < MSGLISTMAX; i++ ){
|
||||
if( sys.m_MsgName[i].IsEmpty() ) break;
|
||||
if( sys.m_MsgName[i] == ttl ){
|
||||
as = sys.m_MsgList[i];
|
||||
Memo->Clear();
|
||||
Memo->Text = as;
|
||||
m_CurIndex = i;
|
||||
ShortCutName->Text = GetKeyName(sys.m_MsgKey[i]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if( (m_CurIndex == -1) && (!EntryName->Text.IsEmpty()) && (!Memo->Text.IsEmpty()) ) Memo->Modified = TRUE;
|
||||
UpdateUI();
|
||||
m_DisEvent--;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::NewNameBtnClick(TObject *Sender)
|
||||
{
|
||||
//AnsiString ttl = EntryName->Text; //JA7UDE 0428
|
||||
UnicodeString ttl = EntryName->Text; //JA7UDE 0428
|
||||
if( InputQuery("MMTTY", (Font->Charset != SHIFTJIS_CHARSET) ? "Input Name":"登録名(メッセージの別名)を入力", ttl) == TRUE ){
|
||||
if( ttl.IsEmpty() ){
|
||||
ttl = "無題";
|
||||
}
|
||||
sys.m_MsgName[m_CurIndex] = ttl;
|
||||
EntryName->Text = ttl;
|
||||
}
|
||||
UpdateUI();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::DelBtnClick(TObject *Sender)
|
||||
{
|
||||
if( YesNoMB((Font->Charset != SHIFTJIS_CHARSET)?"Delete [%s]. Are you sure?":"[%s]をリストから削除します.\r\n\r\nよろしおまっか?", EntryName->Text.c_str()) == IDYES ){
|
||||
int i;
|
||||
for( i = m_CurIndex; i < (MSGLISTMAX - 1); i++ ){
|
||||
if( sys.m_MsgName[i].IsEmpty() ) break;
|
||||
sys.m_MsgList[i] = sys.m_MsgList[i+1];
|
||||
sys.m_MsgName[i] = sys.m_MsgName[i+1];
|
||||
sys.m_MsgKey[i] = sys.m_MsgKey[i+1];
|
||||
}
|
||||
sys.m_MsgName[i] = "";
|
||||
sys.m_MsgList[i] = "";
|
||||
sys.m_MsgKey[i] = 0;
|
||||
if( m_CurIndex ) m_CurIndex--;
|
||||
if( m_CurIndex >= 0 ){
|
||||
EntryName->Text = sys.m_MsgName[m_CurIndex];
|
||||
Memo->Text = sys.m_MsgList[m_CurIndex];
|
||||
ShortCutName->Text = GetKeyName(sys.m_MsgKey[m_CurIndex]);
|
||||
}
|
||||
else {
|
||||
EntryName->Text = "";
|
||||
Memo->Clear();
|
||||
ShortCutName->Text = "";
|
||||
}
|
||||
UpdateList();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::MemoChange(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::OKBtnClick(TObject *Sender)
|
||||
{
|
||||
if( EntryName->Visible == FALSE ){
|
||||
ModalResult = mrOk;
|
||||
return;
|
||||
}
|
||||
if( EntryName->Text.IsEmpty() ) return;
|
||||
if( Memo->Text.IsEmpty() ) return;
|
||||
if( YesNoMB((Font->Charset != SHIFTJIS_CHARSET)?"Assign text to [%s]. Are you sure?":"[%s]に現在のテキストを定義します.\r\n\r\nよろしおまっか?", EntryName->Text.c_str()) == IDYES ){
|
||||
EntryMsg(AnsiString(EntryName->Text), AnsiString(Memo->Text), GetKeyCode(AnsiString(ShortCutName->Text).c_str())); //JA7UDE 0428
|
||||
Memo->Modified = FALSE;
|
||||
}
|
||||
UpdateUI();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::ShortCutNameChange(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
Memo->Modified = TRUE;
|
||||
UpdateUI();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::TxBtnClick(TObject *Sender)
|
||||
{
|
||||
if( Memo->Text.IsEmpty() ) return;
|
||||
if( sys.m_DisTX&1 ) return;
|
||||
|
||||
m_JobSel = 1;
|
||||
ModalResult = mrOk;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::FormKeyDown(TObject *Sender, WORD &Key,
|
||||
TShiftState Shift)
|
||||
{
|
||||
switch(Key){
|
||||
case VK_F9:
|
||||
Key = 0;
|
||||
TxBtnClick(NULL);
|
||||
break;
|
||||
case VK_ESCAPE:
|
||||
Key = 0;
|
||||
ModalResult = mrCancel;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::FormKeyUp(TObject *Sender, WORD &Key,
|
||||
TShiftState Shift)
|
||||
{
|
||||
switch(Key){
|
||||
case VK_F9:
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_ESCAPE:
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::ClearBtnClick(TObject *Sender)
|
||||
{
|
||||
if( YesNoMB((Font->Charset != SHIFTJIS_CHARSET)?"Clear text and shortcut. Are you sure?":"テキストとショートカットを初期化します.\r\n\r\nよろしおまっか?") == IDYES ){
|
||||
Memo->Text = "";
|
||||
ShortCutName->Text = "NULL";
|
||||
UDInt->Position = 0;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::PanelColClick(TObject *Sender)
|
||||
{
|
||||
ColorDialog->Color = PanelCol->Color;
|
||||
NormalWindow(this);
|
||||
if( ColorDialog->Execute() == TRUE ){
|
||||
PanelCol->Color = ColorDialog->Color;
|
||||
}
|
||||
TopWindow(this);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int __fastcall TEditDlgBox::CheckLast(LPCSTR s, char c)
|
||||
{
|
||||
LPCSTR p = s + strlen(s) - 1;
|
||||
for( ; p >= s; p-- ){
|
||||
if( *p == c ) return 1;
|
||||
if( isalpha(*p) || (*p == '%') ) return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int __fastcall TEditDlgBox::CheckTop(LPCSTR s, char c)
|
||||
{
|
||||
LPCSTR p = s;
|
||||
for( ; *p; p++ ){
|
||||
if( *p == c ) return 1;
|
||||
if( isalpha(*p) || (*p == '%') ) return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::DeleteSpace(void)
|
||||
{
|
||||
AnsiString ws = Memo->Text.c_str();
|
||||
LPSTR p = ws.c_str();
|
||||
AnsiString as;
|
||||
LPSTR bp = new char[strlen(p)+1];
|
||||
|
||||
LPSTR t = bp;
|
||||
for( ; *p; p++ ){
|
||||
if( *p != CR ){
|
||||
if( *p == LF ){
|
||||
*t = 0;
|
||||
clipsp(bp);
|
||||
if( *bp ) as += bp;
|
||||
as += "\r\n";
|
||||
t = bp;
|
||||
}
|
||||
else {
|
||||
*t++ = *p;
|
||||
}
|
||||
}
|
||||
}
|
||||
*t = 0;
|
||||
if( *bp ){
|
||||
clipsp(bp);
|
||||
if( *bp ) as += bp;
|
||||
}
|
||||
p = as.c_str();
|
||||
t = lastp(p);
|
||||
if( (*t == LF)||(*t == CR) ){
|
||||
for( ; t >= p; t-- ){
|
||||
if( (*t == LF)||(*t == CR) ){
|
||||
*t = 0;
|
||||
}
|
||||
else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
t++;
|
||||
*t++ = CR;
|
||||
*t = LF;
|
||||
}
|
||||
Memo->Text = p;
|
||||
Memo->Modified = TRUE;
|
||||
delete bp;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::ComBtnClick(TObject *Sender)
|
||||
{
|
||||
TMacroKeyDlg *pBox = new TMacroKeyDlg(this);
|
||||
AnsiString as, bs;
|
||||
LPCSTR p;
|
||||
int r = pBox->Execute(as, m_MacroSet);
|
||||
switch(r){
|
||||
case 1:
|
||||
Memo->SetFocus();
|
||||
for( p = as.c_str(); *p; p++ ){
|
||||
::PostMessage(Memo->Handle, WM_CHAR, *p, 0);
|
||||
}
|
||||
break;
|
||||
case 2: // 最後に追加
|
||||
bs = Memo->Text;
|
||||
if( !CheckLast(bs.c_str(), *as.c_str()) ){
|
||||
bs += as.c_str();
|
||||
Memo->Text = bs;
|
||||
Memo->Modified = TRUE;
|
||||
}
|
||||
break;
|
||||
case 3: // 先頭に追加
|
||||
if( !CheckTop(AnsiString(Memo->Text).c_str(), *as.c_str()) ){ //JA7UDE 0428
|
||||
as += Memo->Text.c_str();
|
||||
Memo->Text = as.c_str();
|
||||
Memo->Modified = TRUE;
|
||||
}
|
||||
break;
|
||||
case -1: // 行末のスペースを削除
|
||||
DeleteSpace();
|
||||
break;
|
||||
}
|
||||
delete pBox;
|
||||
UpdateUI();
|
||||
Memo->SetFocus();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TEditDlgBox::SBHelpClick(TObject *Sender)
|
||||
{
|
||||
ShowHtmlHelp();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
EditDlg.dfm
Normal file
BIN
EditDlg.dfm
Normal file
Binary file not shown.
102
EditDlg.h
Normal file
102
EditDlg.h
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef EditDlgH
|
||||
#define EditDlgH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
|
||||
#include "ComLib.h"
|
||||
#include <Dialogs.hpp>
|
||||
#include <ComCtrls.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TEditDlgBox : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TMemo *Memo;
|
||||
TLabel *LEntryName;
|
||||
TComboBox *EntryName;
|
||||
TButton *DelBtn;
|
||||
TButton *NewNameBtn;
|
||||
TEdit *ButtonName;
|
||||
TLabel *LShort;
|
||||
TComboBox *ShortCutName;
|
||||
TButton *TxBtn;
|
||||
TButton *ClearBtn;
|
||||
TPanel *PanelCol;
|
||||
TColorDialog *ColorDialog;
|
||||
TLabel *LCol;
|
||||
TLabel *LMInt;
|
||||
TUpDown *UDInt;
|
||||
TLabel *LMUN;
|
||||
TComboBox *EMInt;
|
||||
TButton *ComBtn;
|
||||
TSpeedButton *SBHelp;
|
||||
void __fastcall EntryNameChange(TObject *Sender);
|
||||
void __fastcall NewNameBtnClick(TObject *Sender);
|
||||
void __fastcall DelBtnClick(TObject *Sender);
|
||||
void __fastcall MemoChange(TObject *Sender);
|
||||
void __fastcall OKBtnClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall ShortCutNameChange(TObject *Sender);
|
||||
void __fastcall TxBtnClick(TObject *Sender);
|
||||
|
||||
void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
|
||||
void __fastcall FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
||||
void __fastcall ClearBtnClick(TObject *Sender);
|
||||
void __fastcall PanelColClick(TObject *Sender);
|
||||
void __fastcall ComBtnClick(TObject *Sender);
|
||||
void __fastcall SBHelpClick(TObject *Sender);
|
||||
private:
|
||||
int m_DisEvent;
|
||||
int m_CurIndex;
|
||||
int m_MacroSet;
|
||||
|
||||
void __fastcall UpdateList(void);
|
||||
void __fastcall UpdateUI(void);
|
||||
|
||||
int __fastcall CheckLast(LPCSTR s, char c);
|
||||
int __fastcall CheckTop(LPCSTR s, char c);
|
||||
void __fastcall DeleteSpace(void);
|
||||
|
||||
public:
|
||||
virtual __fastcall TEditDlgBox(TComponent* AOwner);
|
||||
int __fastcall Execute(AnsiString &as, WORD &nKey, TColor *pcol, int *Intval, int set);
|
||||
int __fastcall EditMsg(void);
|
||||
|
||||
int m_JobSel;
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TEditDlgBox *EditDlgBox;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
712
Fft.cpp
Normal file
712
Fft.cpp
Normal file
|
|
@ -0,0 +1,712 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include <math.h>
|
||||
#include "fft.h"
|
||||
#include "ComLib.h"
|
||||
|
||||
#define PI 3.1415926535897932384626433832795
|
||||
#define PI2 (2*PI)
|
||||
|
||||
#define SCALEADJ_1 (-5.5)
|
||||
#define SCALEADJ_2 (-6.5)
|
||||
#define SCALEADJ_3 (-7.8)
|
||||
#define SCALEADJ_4 (-9.0)
|
||||
#define LOGADJ (2.81458e4)
|
||||
|
||||
#define SCALEPOW_1 (1.0/4.0)
|
||||
#define SCALEPOW_ADJ_1 0.0018
|
||||
#define SCALEPOW_2 (1.0/5.0)
|
||||
#define SCALEPOW_ADJ_2 0.008
|
||||
#define SCALEPOW_3 (1.0/6.0)
|
||||
#define SCALEPOW_ADJ_3 0.022
|
||||
#define SCALEPOW_4 (1.0/7.0)
|
||||
#define SCALEPOW_ADJ_4 0.048
|
||||
//-------------------------------------------------
|
||||
// FFT処理クラス
|
||||
CFFT::CFFT()
|
||||
{
|
||||
m_FFTDIS = 0;
|
||||
memset(m_fft, 0, sizeof(m_fft));
|
||||
m_CollectFFTBuf = new double[FFT_BUFSIZE];
|
||||
memset(m_CollectFFTBuf, 0, sizeof(double)*FFT_BUFSIZE);
|
||||
m_CollectFFT = 0;
|
||||
m_CollectFFTCount = 0;
|
||||
m_tWindow = new double[FFT_BUFSIZE];
|
||||
//m_tSinCos = new double[FFT_BUFSIZE/2];
|
||||
m_tSinCos = new double[FFT_BUFSIZE/2+8]; //JA7UDE 0428
|
||||
m_Work = new int[SQRT_FFT_SIZE+2];
|
||||
memset(m_Work, 0, sizeof(int[SQRT_FFT_SIZE+2]));
|
||||
pStgBuf = new double[FFT_BUFSIZE];
|
||||
m_Work[0] = 0;
|
||||
makewt(FFT_SIZE/4, m_Work, m_tSinCos);
|
||||
makect(FFT_SIZE/4, m_Work, m_tSinCos + m_Work[0]);
|
||||
for(int i = 0; i < FFT_SIZE; i++){
|
||||
pStgBuf[i] = 1.0;
|
||||
m_tWindow[i] = (0.5 - 0.5*cos( (PI2*i)/(FFT_SIZE-1) )); //ハニング窓
|
||||
}
|
||||
m_StgSize = 1;
|
||||
m_StgScale = 1.0;
|
||||
m_StgK = 0.0;
|
||||
m_StgSW = FALSE;
|
||||
m_CollectFlag = 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// FFT処理クラスの再初期化
|
||||
void CFFT::InitFFT(void)
|
||||
{
|
||||
m_CollectFFT = 0;
|
||||
m_CollectFFTCount = 0;
|
||||
memset(m_CollectFFTBuf, 0, sizeof(double)*FFT_SIZE);
|
||||
m_CollectFFT = 0;
|
||||
m_CollectFFTCount = 0;
|
||||
memset(m_Work, 0, sizeof(int[SQRT_FFT_SIZE+2]));
|
||||
makewt(FFT_SIZE/4, m_Work, m_tSinCos);
|
||||
makect(FFT_SIZE/4, m_Work, m_tSinCos + m_Work[0]);
|
||||
for(int i = 0; i < FFT_SIZE; i++){
|
||||
pStgBuf[i] = 1.0;
|
||||
m_tWindow[i] = (0.5 - 0.5*cos( (PI2*i)/(FFT_SIZE-1) )); //ハニング窓
|
||||
}
|
||||
m_StgSize = 1;
|
||||
m_StgScale = 1.0;
|
||||
m_StgK = 0.0;
|
||||
m_StgSW = FALSE;
|
||||
m_CollectFlag = 0;
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
CFFT::~CFFT()
|
||||
{
|
||||
if( m_CollectFFTBuf ){
|
||||
delete[] m_CollectFFTBuf;
|
||||
m_CollectFFTBuf = NULL;
|
||||
}
|
||||
if(pStgBuf){
|
||||
delete[] pStgBuf;
|
||||
pStgBuf = NULL;
|
||||
}
|
||||
if(m_Work){
|
||||
delete[] m_Work;
|
||||
m_Work = NULL;
|
||||
}
|
||||
if(m_tSinCos){
|
||||
delete[] m_tSinCos;
|
||||
m_tSinCos = NULL;
|
||||
}
|
||||
if(m_tWindow){
|
||||
delete[] m_tWindow;
|
||||
m_tWindow = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//-------------------------------------------------
|
||||
// データ収集(スレッド外で実行する)
|
||||
void CFFT::TrigFFT(void)
|
||||
{
|
||||
m_CollectFFTCount = 0;
|
||||
m_CollectFFT = 0; // 次の収集をトリガ
|
||||
}
|
||||
//-------------------------------------------------
|
||||
// データ収集(スレッド内で実行する)
|
||||
void CFFT::CollectFFT(double *lp, int size)
|
||||
{
|
||||
if( !m_CollectFFT ){
|
||||
if( (size + m_CollectFFTCount) > FFT_SIZE ){
|
||||
size = FFT_SIZE - m_CollectFFTCount;
|
||||
}
|
||||
memcpy(&m_CollectFFTBuf[m_CollectFFTCount], lp, sizeof(double)*size);
|
||||
m_CollectFFTCount += size;
|
||||
if( m_CollectFFTCount >= FFT_SIZE ){
|
||||
m_CollectFFTCount = 0;
|
||||
m_CollectFFT = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------
|
||||
// データ収集(スレッド外で実行する)
|
||||
void CFFT::CalcFFT(int size, double gain, int stg)
|
||||
{
|
||||
Calc(m_CollectFFTBuf, size, gain, stg, m_fft);
|
||||
}
|
||||
|
||||
void CFFT::makewt(int nw, int *ip, double *w)
|
||||
{
|
||||
int nwh, j;
|
||||
double delta, x, y;
|
||||
|
||||
ip[0] = nw;
|
||||
ip[1] = 1;
|
||||
if(nw > 2){
|
||||
nwh = nw >> 1;
|
||||
delta = atan(1.0) / nwh;
|
||||
w[0] = 1;
|
||||
w[1] = 0;
|
||||
w[nwh] = cos(delta * nwh);
|
||||
w[nwh + 1] = w[nwh];
|
||||
for(j = 2; j < nwh; j += 2){
|
||||
x = cos(delta * j);
|
||||
y = sin(delta * j);
|
||||
w[j] = x;
|
||||
w[j + 1] = y;
|
||||
w[nw - j] = y;
|
||||
w[nw - j + 1] = x;
|
||||
}
|
||||
bitrv2(nw, ip + 2, w);
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------
|
||||
// データの処理化
|
||||
void CFFT::makect(int nc, int *ip, double *c)
|
||||
{
|
||||
int nch, j;
|
||||
double delta;
|
||||
|
||||
ip[1] = nc;
|
||||
if(nc > 1){
|
||||
nch = nc >> 1;
|
||||
delta = atan(1.0) / nch;
|
||||
c[0] = cos(delta * nch);
|
||||
c[nch] = 0.5 * c[0];
|
||||
for(j = 1; j < nch; j++){
|
||||
c[j] = 0.5 * cos(delta * j);
|
||||
c[nc - j] = 0.5 * sin(delta * j);
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------
|
||||
// データの処理化
|
||||
void CFFT::bitrv2(int n, int *ip, double *a)
|
||||
{
|
||||
int j, j1, k, k1, l, m, m2;
|
||||
double xr, xi;
|
||||
|
||||
ip[0] = 0;
|
||||
l = n;
|
||||
m = 1;
|
||||
while((m << 2) < l){
|
||||
l >>= 1;
|
||||
for (j = 0; j < m; j++) {
|
||||
ip[m + j] = ip[j] + l;
|
||||
}
|
||||
m <<= 1;
|
||||
}
|
||||
if((m << 2) > l){
|
||||
for (k = 1; k < m; k++) {
|
||||
for (j = 0; j < k; j++) {
|
||||
j1 = (j << 1) + ip[k];
|
||||
k1 = (k << 1) + ip[j];
|
||||
xr = a[j1];
|
||||
xi = a[j1 + 1];
|
||||
a[j1] = a[k1];
|
||||
a[j1 + 1] = a[k1 + 1];
|
||||
a[k1] = xr;
|
||||
a[k1 + 1] = xi;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
m2 = m << 1;
|
||||
for(k = 1; k < m; k++){
|
||||
for(j = 0; j < k; j++){
|
||||
j1 = (j << 1) + ip[k];
|
||||
k1 = (k << 1) + ip[j];
|
||||
xr = a[j1];
|
||||
xi = a[j1 + 1];
|
||||
a[j1] = a[k1];
|
||||
a[j1 + 1] = a[k1 + 1];
|
||||
a[k1] = xr;
|
||||
a[k1 + 1] = xi;
|
||||
j1 += m2;
|
||||
k1 += m2;
|
||||
xr = a[j1];
|
||||
xi = a[j1 + 1];
|
||||
a[j1] = a[k1];
|
||||
a[j1 + 1] = a[k1 + 1];
|
||||
a[k1] = xr;
|
||||
a[k1 + 1] = xi;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------
|
||||
void CFFT::cftfsub(int n, double *a, double *w)
|
||||
{
|
||||
int j, j1, j2, j3, l;
|
||||
double x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
|
||||
|
||||
l = 2;
|
||||
if(n > 8){
|
||||
cft1st(n, a, w);
|
||||
l = 8;
|
||||
while((l << 2) < n){
|
||||
cftmdl(n, l, a, w);
|
||||
l <<= 2;
|
||||
}
|
||||
}
|
||||
if((l << 2) == n){
|
||||
for(j = 0; j < l; j += 2){
|
||||
j1 = j + l;
|
||||
j2 = j1 + l;
|
||||
j3 = j2 + l;
|
||||
x0r = a[j] + a[j1];
|
||||
x0i = a[j + 1] + a[j1 + 1];
|
||||
x1r = a[j] - a[j1];
|
||||
x1i = a[j + 1] - a[j1 + 1];
|
||||
x2r = a[j2] + a[j3];
|
||||
x2i = a[j2 + 1] + a[j3 + 1];
|
||||
x3r = a[j2] - a[j3];
|
||||
x3i = a[j2 + 1] - a[j3 + 1];
|
||||
a[j] = x0r + x2r;
|
||||
a[j + 1] = x0i + x2i;
|
||||
a[j2] = x0r - x2r;
|
||||
a[j2 + 1] = x0i - x2i;
|
||||
a[j1] = x1r - x3i;
|
||||
a[j1 + 1] = x1i + x3r;
|
||||
a[j3] = x1r + x3i;
|
||||
a[j3 + 1] = x1i - x3r;
|
||||
}
|
||||
} else {
|
||||
for(j = 0; j < l; j += 2){
|
||||
j1 = j + l;
|
||||
x0r = a[j] - a[j1];
|
||||
x0i = a[j + 1] - a[j1 + 1];
|
||||
a[j] += a[j1];
|
||||
a[j + 1] += a[j1 + 1];
|
||||
a[j1] = x0r;
|
||||
a[j1 + 1] = x0i;
|
||||
}
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------
|
||||
void CFFT::cft1st(int n, double *a, double *w)
|
||||
{
|
||||
int j, k1, k2;
|
||||
double wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;
|
||||
double x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
|
||||
|
||||
x0r = a[0] + a[2];
|
||||
x0i = a[1] + a[3];
|
||||
x1r = a[0] - a[2];
|
||||
x1i = a[1] - a[3];
|
||||
x2r = a[4] + a[6];
|
||||
x2i = a[5] + a[7];
|
||||
x3r = a[4] - a[6];
|
||||
x3i = a[5] - a[7];
|
||||
a[0] = x0r + x2r;
|
||||
a[1] = x0i + x2i;
|
||||
a[4] = x0r - x2r;
|
||||
a[5] = x0i - x2i;
|
||||
a[2] = x1r - x3i;
|
||||
a[3] = x1i + x3r;
|
||||
a[6] = x1r + x3i;
|
||||
a[7] = x1i - x3r;
|
||||
wk1r = w[2];
|
||||
x0r = a[8] + a[10];
|
||||
x0i = a[9] + a[11];
|
||||
x1r = a[8] - a[10];
|
||||
x1i = a[9] - a[11];
|
||||
x2r = a[12] + a[14];
|
||||
x2i = a[13] + a[15];
|
||||
x3r = a[12] - a[14];
|
||||
x3i = a[13] - a[15];
|
||||
a[8] = x0r + x2r;
|
||||
a[9] = x0i + x2i;
|
||||
a[12] = x2i - x0i;
|
||||
a[13] = x0r - x2r;
|
||||
x0r = x1r - x3i;
|
||||
x0i = x1i + x3r;
|
||||
a[10] = wk1r * (x0r - x0i);
|
||||
a[11] = wk1r * (x0r + x0i);
|
||||
x0r = x3i + x1r;
|
||||
x0i = x3r - x1i;
|
||||
a[14] = wk1r * (x0i - x0r);
|
||||
a[15] = wk1r * (x0i + x0r);
|
||||
k1 = 0;
|
||||
for(j = 16; j < n; j += 16){
|
||||
k1 += 2;
|
||||
k2 = k1 << 1;
|
||||
wk2r = w[k1];
|
||||
wk2i = w[k1 + 1];
|
||||
wk1r = w[k2];
|
||||
wk1i = w[k2 + 1];
|
||||
wk3r = wk1r - 2 * wk2i * wk1i;
|
||||
wk3i = 2 * wk2i * wk1r - wk1i;
|
||||
x0r = a[j] + a[j + 2];
|
||||
x0i = a[j + 1] + a[j + 3];
|
||||
x1r = a[j] - a[j + 2];
|
||||
x1i = a[j + 1] - a[j + 3];
|
||||
x2r = a[j + 4] + a[j + 6];
|
||||
x2i = a[j + 5] + a[j + 7];
|
||||
x3r = a[j + 4] - a[j + 6];
|
||||
x3i = a[j + 5] - a[j + 7];
|
||||
a[j] = x0r + x2r;
|
||||
a[j + 1] = x0i + x2i;
|
||||
x0r -= x2r;
|
||||
x0i -= x2i;
|
||||
a[j + 4] = wk2r * x0r - wk2i * x0i;
|
||||
a[j + 5] = wk2r * x0i + wk2i * x0r;
|
||||
x0r = x1r - x3i;
|
||||
x0i = x1i + x3r;
|
||||
a[j + 2] = wk1r * x0r - wk1i * x0i;
|
||||
a[j + 3] = wk1r * x0i + wk1i * x0r;
|
||||
x0r = x1r + x3i;
|
||||
x0i = x1i - x3r;
|
||||
a[j + 6] = wk3r * x0r - wk3i * x0i;
|
||||
a[j + 7] = wk3r * x0i + wk3i * x0r;
|
||||
wk1r = w[k2 + 2];
|
||||
wk1i = w[k2 + 3];
|
||||
wk3r = wk1r - 2 * wk2r * wk1i;
|
||||
wk3i = 2 * wk2r * wk1r - wk1i;
|
||||
x0r = a[j + 8] + a[j + 10];
|
||||
x0i = a[j + 9] + a[j + 11];
|
||||
x1r = a[j + 8] - a[j + 10];
|
||||
x1i = a[j + 9] - a[j + 11];
|
||||
x2r = a[j + 12] + a[j + 14];
|
||||
x2i = a[j + 13] + a[j + 15];
|
||||
x3r = a[j + 12] - a[j + 14];
|
||||
x3i = a[j + 13] - a[j + 15];
|
||||
a[j + 8] = x0r + x2r;
|
||||
a[j + 9] = x0i + x2i;
|
||||
x0r -= x2r;
|
||||
x0i -= x2i;
|
||||
a[j + 12] = -wk2i * x0r - wk2r * x0i;
|
||||
a[j + 13] = -wk2i * x0i + wk2r * x0r;
|
||||
x0r = x1r - x3i;
|
||||
x0i = x1i + x3r;
|
||||
a[j + 10] = wk1r * x0r - wk1i * x0i;
|
||||
a[j + 11] = wk1r * x0i + wk1i * x0r;
|
||||
x0r = x1r + x3i;
|
||||
x0i = x1i - x3r;
|
||||
a[j + 14] = wk3r * x0r - wk3i * x0i;
|
||||
a[j + 15] = wk3r * x0i + wk3i * x0r;
|
||||
}
|
||||
}
|
||||
//-------------------------------------------------
|
||||
void CFFT::cftmdl(int n, int l, double *a, double *w)
|
||||
{
|
||||
int j, j1, j2, j3, k, k1, k2, m, m2;
|
||||
double wk1r, wk1i, wk2r, wk2i, wk3r, wk3i;
|
||||
double x0r, x0i, x1r, x1i, x2r, x2i, x3r, x3i;
|
||||
|
||||
m = l << 2;
|
||||
for(j = 0; j < l; j += 2){
|
||||
j1 = j + l;
|
||||
j2 = j1 + l;
|
||||
j3 = j2 + l;
|
||||
x0r = a[j] + a[j1];
|
||||
x0i = a[j + 1] + a[j1 + 1];
|
||||
x1r = a[j] - a[j1];
|
||||
x1i = a[j + 1] - a[j1 + 1];
|
||||
x2r = a[j2] + a[j3];
|
||||
x2i = a[j2 + 1] + a[j3 + 1];
|
||||
x3r = a[j2] - a[j3];
|
||||
x3i = a[j2 + 1] - a[j3 + 1];
|
||||
a[j] = x0r + x2r;
|
||||
a[j + 1] = x0i + x2i;
|
||||
a[j2] = x0r - x2r;
|
||||
a[j2 + 1] = x0i - x2i;
|
||||
a[j1] = x1r - x3i;
|
||||
a[j1 + 1] = x1i + x3r;
|
||||
a[j3] = x1r + x3i;
|
||||
a[j3 + 1] = x1i - x3r;
|
||||
}
|
||||
wk1r = w[2];
|
||||
for(j = m; j < l + m; j += 2){
|
||||
j1 = j + l;
|
||||
j2 = j1 + l;
|
||||
j3 = j2 + l;
|
||||
x0r = a[j] + a[j1];
|
||||
x0i = a[j + 1] + a[j1 + 1];
|
||||
x1r = a[j] - a[j1];
|
||||
x1i = a[j + 1] - a[j1 + 1];
|
||||
x2r = a[j2] + a[j3];
|
||||
x2i = a[j2 + 1] + a[j3 + 1];
|
||||
x3r = a[j2] - a[j3];
|
||||
x3i = a[j2 + 1] - a[j3 + 1];
|
||||
a[j] = x0r + x2r;
|
||||
a[j + 1] = x0i + x2i;
|
||||
a[j2] = x2i - x0i;
|
||||
a[j2 + 1] = x0r - x2r;
|
||||
x0r = x1r - x3i;
|
||||
x0i = x1i + x3r;
|
||||
a[j1] = wk1r * (x0r - x0i);
|
||||
a[j1 + 1] = wk1r * (x0r + x0i);
|
||||
x0r = x3i + x1r;
|
||||
x0i = x3r - x1i;
|
||||
a[j3] = wk1r * (x0i - x0r);
|
||||
a[j3 + 1] = wk1r * (x0i + x0r);
|
||||
}
|
||||
k1 = 0;
|
||||
m2 = m << 1;
|
||||
for(k = m2; k < n; k += m2){
|
||||
k1 += 2;
|
||||
k2 = k1 << 1;
|
||||
wk2r = w[k1];
|
||||
wk2i = w[k1 + 1];
|
||||
wk1r = w[k2];
|
||||
wk1i = w[k2 + 1];
|
||||
wk3r = wk1r - 2 * wk2i * wk1i;
|
||||
wk3i = 2 * wk2i * wk1r - wk1i;
|
||||
for(j = k; j < l + k; j += 2){
|
||||
j1 = j + l;
|
||||
j2 = j1 + l;
|
||||
j3 = j2 + l;
|
||||
x0r = a[j] + a[j1];
|
||||
x0i = a[j + 1] + a[j1 + 1];
|
||||
x1r = a[j] - a[j1];
|
||||
x1i = a[j + 1] - a[j1 + 1];
|
||||
x2r = a[j2] + a[j3];
|
||||
x2i = a[j2 + 1] + a[j3 + 1];
|
||||
x3r = a[j2] - a[j3];
|
||||
x3i = a[j2 + 1] - a[j3 + 1];
|
||||
a[j] = x0r + x2r;
|
||||
a[j + 1] = x0i + x2i;
|
||||
x0r -= x2r;
|
||||
x0i -= x2i;
|
||||
a[j2] = wk2r * x0r - wk2i * x0i;
|
||||
a[j2 + 1] = wk2r * x0i + wk2i * x0r;
|
||||
x0r = x1r - x3i;
|
||||
x0i = x1i + x3r;
|
||||
a[j1] = wk1r * x0r - wk1i * x0i;
|
||||
a[j1 + 1] = wk1r * x0i + wk1i * x0r;
|
||||
x0r = x1r + x3i;
|
||||
x0i = x1i - x3r;
|
||||
a[j3] = wk3r * x0r - wk3i * x0i;
|
||||
a[j3 + 1] = wk3r * x0i + wk3i * x0r;
|
||||
}
|
||||
wk1r = w[k2 + 2];
|
||||
wk1i = w[k2 + 3];
|
||||
wk3r = wk1r - 2 * wk2r * wk1i;
|
||||
wk3i = 2 * wk2r * wk1r - wk1i;
|
||||
for(j = k + m; j < l + (k + m); j += 2){
|
||||
j1 = j + l;
|
||||
j2 = j1 + l;
|
||||
j3 = j2 + l;
|
||||
x0r = a[j] + a[j1];
|
||||
x0i = a[j + 1] + a[j1 + 1];
|
||||
x1r = a[j] - a[j1];
|
||||
x1i = a[j + 1] - a[j1 + 1];
|
||||
x2r = a[j2] + a[j3];
|
||||
x2i = a[j2 + 1] + a[j3 + 1];
|
||||
x3r = a[j2] - a[j3];
|
||||
x3i = a[j2 + 1] - a[j3 + 1];
|
||||
a[j] = x0r + x2r;
|
||||
a[j + 1] = x0i + x2i;
|
||||
x0r -= x2r;
|
||||
x0i -= x2i;
|
||||
a[j2] = -wk2i * x0r - wk2r * x0i;
|
||||
a[j2 + 1] = -wk2i * x0i + wk2r * x0r;
|
||||
x0r = x1r - x3i;
|
||||
x0i = x1i + x3r;
|
||||
a[j1] = wk1r * x0r - wk1i * x0i;
|
||||
a[j1 + 1] = wk1r * x0i + wk1i * x0r;
|
||||
x0r = x1r + x3i;
|
||||
x0i = x1i - x3r;
|
||||
a[j3] = wk3r * x0r - wk3i * x0i;
|
||||
a[j3 + 1] = wk3r * x0i + wk3i * x0r;
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void CFFT::Calc(double * InBuf, int size, double gain, int stg, int* OutBuf)
|
||||
{
|
||||
if( m_FFTDIS ) return; // for math error
|
||||
m_FFTDIS++;
|
||||
int i;
|
||||
|
||||
if( stg > 1 ){
|
||||
m_StgSW = TRUE;
|
||||
}
|
||||
else {
|
||||
m_StgSW = FALSE;
|
||||
}
|
||||
m_StgSize = stg;
|
||||
if( stg ){
|
||||
m_StgScale = 1.0 / double(m_StgSize);
|
||||
m_StgK = 1.0 - m_StgScale;
|
||||
}
|
||||
else {
|
||||
m_StgScale = 1.0;
|
||||
m_StgK = 0.0;
|
||||
}
|
||||
double *dp = InBuf;
|
||||
for(i=0; i < FFT_SIZE; i++, dp++){
|
||||
if( *dp > 32768.0 ){
|
||||
*dp = 32768.0;
|
||||
}
|
||||
else if( *dp < -32768.0 ){
|
||||
*dp = -32768.0;
|
||||
}
|
||||
(*dp) *= m_tWindow[i];
|
||||
}
|
||||
bitrv2(FFT_SIZE, m_Work + 2, InBuf);
|
||||
cftfsub(FFT_SIZE, InBuf, m_tSinCos);
|
||||
rftfsub(FFT_SIZE, InBuf, m_Work[1], m_tSinCos + m_Work[0]);
|
||||
for( i = 0, dp = pStgBuf; i <= size; i++, dp+=2 ){
|
||||
OutBuf[i] = int((gain * (*dp)));
|
||||
}
|
||||
m_FFTDIS--;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void CFFT::rftfsub(int n, double *a, int nc, double *c)
|
||||
{
|
||||
int j, k, kk, ks, m;
|
||||
double wkr, wki, xr, xi, yr, yi;
|
||||
double d;
|
||||
|
||||
ks = (nc << 2) / n;
|
||||
kk = 0;
|
||||
m = n >> 1;
|
||||
j = n - 2;
|
||||
if(m_StgSW){
|
||||
for (k = 2; k <= m; k += 2, j -= 2 ){
|
||||
kk += ks;
|
||||
wkr = 0.5 - c[nc - kk];
|
||||
wki = c[kk];
|
||||
xr = a[k] - a[j];
|
||||
xi = a[k + 1] + a[j + 1];
|
||||
yr = wkr * xr - wki * xi;
|
||||
yi = wkr * xi + wki * xr;
|
||||
a[k] -= yr;
|
||||
xi = a[k]*a[k];
|
||||
a[k+1] -= yi;
|
||||
xi += ( a[k+1]*a[k+1]);
|
||||
a[j] += yr;
|
||||
xr = a[j]*a[j];
|
||||
a[j+1] -= yi;
|
||||
xr += (a[j+1]*a[j+1]);
|
||||
if( xi <= 0 ) xi = 0.0001;
|
||||
if( xi >= 1e38 ) xi = 1e38;
|
||||
if( xr <= 0 ) xr = 0.0001;
|
||||
if( xr >= 1e38 ) xr = 1e38;
|
||||
if( FFT_SIZE == 1024 ){
|
||||
xi *= 4;
|
||||
xr *= 4;
|
||||
}
|
||||
switch(sys.m_FFTGain){
|
||||
case 0:
|
||||
pStgBuf[k] = m_StgK*pStgBuf[k] + m_StgScale*(log10(xi+LOGADJ) + SCALEADJ_1);
|
||||
pStgBuf[j] = m_StgK*pStgBuf[j] + m_StgScale*(log10(xr+LOGADJ) + SCALEADJ_1);
|
||||
break;
|
||||
case 1:
|
||||
pStgBuf[k] = m_StgK*pStgBuf[k] + m_StgScale*(log10(xi+LOGADJ) + SCALEADJ_2);
|
||||
pStgBuf[j] = m_StgK*pStgBuf[j] + m_StgScale*(log10(xr+LOGADJ) + SCALEADJ_2);
|
||||
break;
|
||||
case 2:
|
||||
pStgBuf[k] = m_StgK*pStgBuf[k] + m_StgScale*(log10(xi+LOGADJ) + SCALEADJ_3);
|
||||
pStgBuf[j] = m_StgK*pStgBuf[j] + m_StgScale*(log10(xr+LOGADJ) + SCALEADJ_3);
|
||||
break;
|
||||
case 3:
|
||||
pStgBuf[k] = m_StgK*pStgBuf[k] + m_StgScale*(log10(xi+LOGADJ) + SCALEADJ_4);
|
||||
pStgBuf[j] = m_StgK*pStgBuf[j] + m_StgScale*(log10(xr+LOGADJ) + SCALEADJ_4);
|
||||
break;
|
||||
case 4:
|
||||
d = xi * 32e-10;
|
||||
pStgBuf[k] = m_StgK*pStgBuf[k] + m_StgScale*d;
|
||||
d = xr * 32e-10;
|
||||
pStgBuf[j] = m_StgK*pStgBuf[j] + d;
|
||||
break;
|
||||
case 5:
|
||||
d = xi * 96e-10;
|
||||
pStgBuf[k] = m_StgK*pStgBuf[k] + m_StgScale*d;
|
||||
d = xr * 96e-10;
|
||||
pStgBuf[j] = m_StgK*pStgBuf[j] + d;
|
||||
break;
|
||||
case 6:
|
||||
d = xi * 256e-10;
|
||||
pStgBuf[k] = m_StgK*pStgBuf[k] + m_StgScale*d;
|
||||
d = xr * 256e-10;
|
||||
pStgBuf[j] = m_StgK*pStgBuf[j] + d;
|
||||
break;
|
||||
default:
|
||||
d = xi * 256e-10;
|
||||
pStgBuf[k] = m_StgK*pStgBuf[k] + m_StgScale*d;
|
||||
d = xr * 256e-10;
|
||||
pStgBuf[j] = m_StgK*pStgBuf[j] + d;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
for (k = 2; k <= m; k += 2, j -= 2 ){
|
||||
kk += ks;
|
||||
wkr = 0.5 - c[nc - kk];
|
||||
wki = c[kk];
|
||||
xr = a[k] - a[j];
|
||||
xi = a[k + 1] + a[j + 1];
|
||||
yr = wkr * xr - wki * xi;
|
||||
yi = wkr * xi + wki * xr;
|
||||
a[k] -= yr;
|
||||
xi = a[k]*a[k];
|
||||
a[k+1] -= yi;
|
||||
xi += ( a[k+1]*a[k+1]);
|
||||
a[j] += yr;
|
||||
xr = a[j]*a[j];
|
||||
a[j+1] -= yi;
|
||||
xr += (a[j+1]*a[j+1]);
|
||||
if( xi <= 0 ) xi = 0.0001;
|
||||
if( xi >= 1e38 ) xi = 1e38;
|
||||
if( xr <= 0 ) xr = 0.0001;
|
||||
if( xr >= 1e38 ) xr = 1e38;
|
||||
if( FFT_SIZE == 1024 ){
|
||||
xi *= 4;
|
||||
xr *= 4;
|
||||
}
|
||||
switch(sys.m_FFTGain){
|
||||
case 0:
|
||||
pStgBuf[k] = log10(xi+LOGADJ)+SCALEADJ_1;
|
||||
pStgBuf[j] = log10(xr+LOGADJ)+SCALEADJ_1;
|
||||
break;
|
||||
case 1:
|
||||
pStgBuf[k] = log10(xi+LOGADJ)+SCALEADJ_2;
|
||||
pStgBuf[j] = log10(xr+LOGADJ)+SCALEADJ_2;
|
||||
break;
|
||||
case 2:
|
||||
pStgBuf[k] = log10(xi+LOGADJ)+SCALEADJ_3;
|
||||
pStgBuf[j] = log10(xr+LOGADJ)+SCALEADJ_3;
|
||||
break;
|
||||
case 3:
|
||||
pStgBuf[k] = log10(xi+LOGADJ)+SCALEADJ_4;
|
||||
pStgBuf[j] = log10(xr+LOGADJ)+SCALEADJ_4;
|
||||
break;
|
||||
case 4:
|
||||
pStgBuf[k] = xi * 32e-10;
|
||||
pStgBuf[j] = xr * 32e-10;
|
||||
break;
|
||||
case 5:
|
||||
pStgBuf[k] = xi * 96e-10;
|
||||
pStgBuf[j] = xr * 96e-10;
|
||||
break;
|
||||
case 6:
|
||||
pStgBuf[k] = xi * 256e-10;
|
||||
pStgBuf[j] = xr * 256e-10;
|
||||
break;
|
||||
default:
|
||||
pStgBuf[k] = xi * 256e-10;
|
||||
pStgBuf[j] = xr * 256e-10;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
pStgBuf[FFT_SIZE/2] = pStgBuf[(FFT_SIZE/2) - 2];
|
||||
}
|
||||
|
||||
68
Fft.h
Normal file
68
Fft.h
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#ifndef FFT_H
|
||||
#define FFT_H
|
||||
//---------------------------------------------------------------------------
|
||||
#define FFT_BUFSIZE 2048
|
||||
#define SQRT_FFT_SIZE 46//sqrt(2048)
|
||||
|
||||
class CFFT
|
||||
{
|
||||
public:
|
||||
CFFT();
|
||||
virtual ~CFFT();
|
||||
void InitFFT(void);
|
||||
|
||||
int m_CollectFFT;
|
||||
void CollectFFT(double *lp, int size);
|
||||
void CalcFFT(int size, double gain, int stg);
|
||||
void TrigFFT(void);
|
||||
void ClearBuf(void){
|
||||
memset(m_fft, 0, sizeof(m_fft));
|
||||
memset(pStgBuf, 0, sizeof(double[FFT_BUFSIZE]));
|
||||
TrigFFT();
|
||||
};
|
||||
int m_FFTDIS;
|
||||
int m_fft[2048];
|
||||
private:
|
||||
void Calc(double * InBuf, int size, double gain, int stg, int* OutBuf);
|
||||
BOOL m_StgSW;
|
||||
int m_StgSize;
|
||||
double m_StgScale;
|
||||
double m_StgK;
|
||||
|
||||
int m_CollectFlag;
|
||||
int m_CollectFFTCount;
|
||||
double *m_CollectFFTBuf;
|
||||
|
||||
double *m_tSinCos;
|
||||
double *m_tWindow;
|
||||
double *pStgBuf;
|
||||
int *m_Work;
|
||||
void makewt(int nw, int *ip, double *w);
|
||||
void makect(int nc, int *ip, double *c);
|
||||
void bitrv2(int n, int *ip, double *a);
|
||||
void cftfsub(int n, double *a, double *w);
|
||||
void rftfsub(int n, double *a, int nc, double *c);
|
||||
void cft1st(int n, double *a, double *w);
|
||||
void cftmdl(int n, int l, double *a, double *w);
|
||||
};
|
||||
|
||||
#endif
|
||||
205
FreqDisp.cpp
Normal file
205
FreqDisp.cpp
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "FreqDisp.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TFreqDispDlg *FreqDispDlg;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TFreqDispDlg::TFreqDispDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
|
||||
m_H1 = NULL;
|
||||
m_Tap1 = 0;
|
||||
m_Over1 = 1;
|
||||
m_H2 = NULL;
|
||||
m_Tap2 = 0;
|
||||
m_Over2 = 1;
|
||||
m_Max = 0;
|
||||
|
||||
pBitmap = new Graphics::TBitmap();
|
||||
pBitmap->Width = PaintBox->Width;
|
||||
pBitmap->Height = PaintBox->Height;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
CancelBtn->Caption = "Close";
|
||||
BwBtn->Caption = "Width";
|
||||
Caption = "frequency characteristic";
|
||||
}
|
||||
}
|
||||
__fastcall TFreqDispDlg::~TFreqDispDlg()
|
||||
{
|
||||
delete pBitmap;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TFreqDispDlg::Execute(const double *H, int Tap, int Over)
|
||||
{
|
||||
m_type = 0;
|
||||
m_H1 = H;
|
||||
m_Tap1 = Tap;
|
||||
m_Over1 = Over;
|
||||
m_Tap2 = 0;
|
||||
ShowModal();
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TFreqDispDlg::Execute(const double *H1, const double *H2, int Tap, int Over)
|
||||
{
|
||||
m_type = 0;
|
||||
m_H1 = H1;
|
||||
m_Tap1 = Tap;
|
||||
m_Over1 = Over;
|
||||
m_H2 = H2;
|
||||
m_Tap2 = Tap;
|
||||
m_Over2 = Over;
|
||||
ShowModal();
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TFreqDispDlg::Execute(const double *H1, int Tap1, const double *H2, int Tap2, int Over)
|
||||
{
|
||||
m_type = 4;
|
||||
m_H1 = H1;
|
||||
m_Tap1 = Tap1;
|
||||
m_Over1 = Over;
|
||||
m_H2 = H2;
|
||||
m_Tap2 = Tap2;
|
||||
m_Over2 = Over;
|
||||
ShowModal();
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TFreqDispDlg::Execute(double a10, double b11, double b12, double a20, double b21, double b22, int Over)
|
||||
{
|
||||
m_type = 1;
|
||||
m_Over1 = Over;
|
||||
m_a10 = a10;
|
||||
m_b11 = b11;
|
||||
m_b12 = b12;
|
||||
m_a20 = a20;
|
||||
m_b21 = b21;
|
||||
m_b22 = b22;
|
||||
ShowModal();
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TFreqDispDlg::Execute(CIIR *ip, int Over, double max)
|
||||
{
|
||||
m_type = 2;
|
||||
m_piir = ip;
|
||||
m_Over1 = Over;
|
||||
m_Max = max;
|
||||
ShowModal();
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TFreqDispDlg::Execute(const double *H, int Tap, int Over, double max)
|
||||
{
|
||||
m_type = 3;
|
||||
m_H1 = H;
|
||||
m_Tap1 = Tap;
|
||||
m_Over1 = Over;
|
||||
m_Tap2 = 0;
|
||||
m_Max = max;
|
||||
ShowModal();
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TFreqDispDlg::PaintBoxPaint(TObject *Sender)
|
||||
{
|
||||
if( m_type == 0 ){ // FIR
|
||||
if( Timer->Enabled ){
|
||||
memcpy(m_HT, m_H1, sizeof(double)*(m_Tap1+1));
|
||||
DrawGraph(pBitmap, m_HT, m_Tap1, m_Over1, m_Max, 1, clBlue);
|
||||
if( m_Tap2 ){
|
||||
memcpy(m_HT, m_H2, sizeof(double)*(m_Tap2+1));
|
||||
DrawGraph(pBitmap, m_HT, m_Tap2, m_Over1, m_Max, 0, clRed);
|
||||
}
|
||||
}
|
||||
else {
|
||||
DrawGraph(pBitmap, m_H1, m_Tap1, m_Over1, m_Max, 1, clBlue);
|
||||
if( m_Tap2 ){
|
||||
DrawGraph(pBitmap, m_H2, m_Tap2, m_Over2, m_Max, 0, clRed);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( m_type == 1 ){ // IIR Tank
|
||||
DrawGraphIIR(pBitmap, m_a10, 0, 0, -m_b11, -m_b12, m_Over1, m_Max, 1, clBlue);
|
||||
DrawGraphIIR(pBitmap, m_a20, 0, 0, -m_b21, -m_b22, m_Over1, m_Max, 0, clRed);
|
||||
}
|
||||
else if( m_type == 2 ){ // IIR
|
||||
#if 1
|
||||
DrawGraphIIR(pBitmap, m_piir, m_Over1, m_Max, 1, clBlue);
|
||||
#else
|
||||
CIIR iir;
|
||||
iir.MakeIIR(2600, SampFreq, 10, 0, 0);
|
||||
m_Max = 6000.0;
|
||||
DrawGraphIIR(pBitmap, &iir, 1, m_Max, 1, clBlue);
|
||||
#endif
|
||||
}
|
||||
else if( m_type == 3 ){ // FIR-Avg
|
||||
DrawGraph(pBitmap, m_H1, m_Tap1, m_Over1, m_Max, 1, clBlue);
|
||||
}
|
||||
else if( m_type == 4 ){ // two-FIR
|
||||
DrawGraph2(pBitmap, m_H1, m_Tap1, m_H2, m_Tap2, m_Over1, m_Max, 1, clBlue);
|
||||
}
|
||||
PaintBox->Canvas->Draw(0, 0, (TGraphic*)pBitmap);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TFreqDispDlg::BwBtnClick(TObject *Sender)
|
||||
{
|
||||
if( m_type >= 2 ){
|
||||
switch(m_Max){
|
||||
case 100:
|
||||
m_Max = 200;
|
||||
break;
|
||||
case 200:
|
||||
m_Max = 400;
|
||||
break;
|
||||
case 400:
|
||||
m_Max = 800;
|
||||
break;
|
||||
case 800:
|
||||
m_Max = 3000;
|
||||
break;
|
||||
default:
|
||||
m_Max = 100;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else {
|
||||
switch(m_Max){
|
||||
case 3000:
|
||||
m_Max = 4000;
|
||||
break;
|
||||
case 4000:
|
||||
m_Max = 6000;
|
||||
break;
|
||||
case 6000:
|
||||
m_Max = 2000;
|
||||
break;
|
||||
default:
|
||||
m_Max = 3000;
|
||||
break;
|
||||
}
|
||||
}
|
||||
PaintBoxPaint(NULL);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
FreqDisp.dfm
Normal file
BIN
FreqDisp.dfm
Normal file
Binary file not shown.
84
FreqDisp.h
Normal file
84
FreqDisp.h
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef FreqDispH
|
||||
#define FreqDispH
|
||||
//----------------------------------------------------------------------------
|
||||
/* JA7UDE 0428
|
||||
#include <vcl\System.hpp>
|
||||
#include <vcl\Windows.hpp>
|
||||
#include <vcl\SysUtils.hpp>
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Graphics.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
*/
|
||||
//----------------------------------------------------------------------------
|
||||
#include "fir.h"
|
||||
//----------------------------------------------------------------------------
|
||||
class TFreqDispDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *CancelBtn;
|
||||
TPanel *Panel;
|
||||
TPaintBox *PaintBox;
|
||||
TTimer *Timer;
|
||||
TButton *BwBtn;
|
||||
void __fastcall PaintBoxPaint(TObject *Sender);
|
||||
|
||||
void __fastcall BwBtnClick(TObject *Sender);
|
||||
private:
|
||||
Graphics::TBitmap *pBitmap;
|
||||
|
||||
int m_type;
|
||||
double m_a10, m_a20;
|
||||
double m_b11, m_b12;
|
||||
double m_b21, m_b22;
|
||||
|
||||
CIIR *m_piir;
|
||||
|
||||
const double *m_H1;
|
||||
int m_Tap1;
|
||||
int m_Over1;
|
||||
const double *m_H2;
|
||||
int m_Tap2;
|
||||
int m_Over2;
|
||||
|
||||
double m_HT[TAPMAX+1];
|
||||
public:
|
||||
virtual __fastcall TFreqDispDlg(TComponent* AOwner);
|
||||
__fastcall ~TFreqDispDlg();
|
||||
|
||||
void __fastcall Execute(const double *H, int Tap, int Over);
|
||||
void __fastcall Execute(const double *H1, const double *H2, int Tap, int Over);
|
||||
void __fastcall Execute(const double *H1, int Tap1, const double *H2, int Tap2, int Over);
|
||||
void __fastcall Execute(double a10, double b11, double b12, double a20, double b21, double b22, int Over);
|
||||
void __fastcall Execute(CIIR *ip, int Over, double max);
|
||||
void __fastcall Execute(const double *H, int Tap, int Over, double max);
|
||||
|
||||
int m_Max;
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TFreqDispDlg *FreqDispDlg;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
230
HISTORY.TXT
Normal file
230
HISTORY.TXT
Normal file
|
|
@ -0,0 +1,230 @@
|
|||
MMTTYの変更履歴
|
||||
|
||||
[V1.00 2000-06-30]
|
||||
◎初回公開
|
||||
|
||||
[V1.01 -> V1.10 2000-07-08]
|
||||
◎サウンドカードのバッファサイズ設定を追加
|
||||
◎マニュアルの一部記載漏れを修正
|
||||
◎送信画面のサイズをINIファイルに記憶
|
||||
◎ログ機能を追加
|
||||
◎一部の256色ビデオアダプタでWaterFallが正しく表示できないバグを修正
|
||||
◎前置フィルタを追加
|
||||
◎設定画面にフィルタ特性表示の追加
|
||||
◎メイン画面に積分器(LPF)の設定ボックスを配置
|
||||
◎WaterFall,受信画面,送信画面の色の設定を追加
|
||||
◎新しいログファイルのオープンを実行後に検索ができなくなるバグを修正
|
||||
◎FSK送信の対応(Tnx JA7DHJ)
|
||||
◎デモジュレータ入力部に適応フィルタ(LMS)を入れれるようにした
|
||||
◎FSK(TXD)出力の送出ビットが逆順になっていたバグを修正(Tnx JA7DHJ)
|
||||
◎その他、細かい点の修正と若干の機能追加
|
||||
|
||||
[V1.11 -> V1.20 2000-07-13]
|
||||
◎PTT制御ポートにCOM5~COM8を追加(Tnx JH3XDO)
|
||||
◎マクロおよび定型メッセージの変換子に「%g」と「%f」を追加
|
||||
◎QSOログのテキストファイルへのエクスポート機能を追加
|
||||
◎QSOログのテキストファイルからのインポート機能を追加
|
||||
◎FSK(TXD)運用時の送受切り替えのバグの修正(Tnx JA1FQI)
|
||||
◎文字ウイエト、Diddleウエイトを追加(Tnx JA1IQV)
|
||||
◎表示メニューに「受信画面のクリア」を追加(Tnx JG3LGD)
|
||||
◎LMS動作の改善
|
||||
◎V1.14で発生したある条件で起動できなくなるバグの修正
|
||||
◎マクロボタンのショートカットキーの割り当て(Tnx JA1IQV)
|
||||
◎自動で受信に戻る際の微妙なタイミングを修正
|
||||
◎LOG200データファイルとの相互変換を追加
|
||||
◎XYスコープ表示を追加(Tnx JA1IQV)
|
||||
◎周波数弁別器のデフォルトをFIR型BPFからIIR型共振器に変更
|
||||
◎XYスコープ、マーク周波数を水平にした(Tnx JA1IQV)
|
||||
◎XYスコープ表示を改善
|
||||
◎デモジュレータにリミッタアンプを追加(Tnx 7L1CUH, JA1IQV)
|
||||
◎デモジュレータのAGC機能を廃止
|
||||
|
||||
[V1.21 -> V1.30 2000-07-23]
|
||||
◎サウンドの記録と再生機能を追加(Tnx 7L1CUH)
|
||||
◎IIR型共振器の周波数特性表示を追加
|
||||
◎XY-Scopeの表示サイズを選択可能にした
|
||||
◎LMSにInv(誤差信号出力)を追加
|
||||
◎サウンドの録音・再生機能を強化
|
||||
◎サウンド再生時にサウンドカードに信号を出力するようにした
|
||||
◎PLL方式のデモジュレータの追加
|
||||
◎再生位置設定画面を追加
|
||||
◎文字ウイエト、DiddleウエイトのスライドをA型ボリュームに変更
|
||||
◎オシロスコープ画面に「Play」ボタンを追加
|
||||
◎MMTTYの信号処理の解説「digital.txt」を追加
|
||||
◎DTRへの符号データ出力選択を廃止(旨く働かない)
|
||||
◎Turbo Hamlogデータファイルとの相互変換を追加
|
||||
◎ショートカットキーのカスタマイズを追加(Tnx 7L1CUH)
|
||||
◎ログ機能の若干の強化
|
||||
◎マクロの先頭と末尾のスペースが記録できないバグの修正(Tnx 7L1CUH)
|
||||
◎設定画面にSound処理Priorityの選択を追加(Tnx JH1SWD)
|
||||
◎Priorityのデフォルトを「Critical」→「Highest」に変更(Tnx JH1SWD)
|
||||
◎Hamlog->MMTTYでMyRSTの変換のT抜けを修正(Tnx JH1SWD)
|
||||
◎起動時のサウンドカードオープンのリトライを追加(Tnx JA6VAG)
|
||||
◎Rx-Stopビットのデフォルトを1.42bit -> 1bitに変更
|
||||
◎Hamlog->MMTTY変換の一部のバグを修正(Tnx JH1SWD)
|
||||
◎コントロールパネル表示のOn/Offの追加
|
||||
◎コントロールパネルサイズの選択を追加
|
||||
◎その他細かい点の改善
|
||||
|
||||
[V1.31 -> V1.40 2000-07-30]
|
||||
◎ログファイルの変換動作を改善(Tnx JH1SWD)
|
||||
◎問い合わせメッセージを改善(Tnx JH1SWD)
|
||||
◎プログラムメニューの追加(Tnx JH1SWD, JA1IQV)
|
||||
◎外部プログラム実行時のカレントディレクトリを設定(Tnx JH1SWD)
|
||||
◎スケルチ動作の若干の改善
|
||||
◎英語モードを追加(Tnx HL1AQ)
|
||||
◎低速CPUのためのLocalEchoオプションを追加
|
||||
◎マクロテキストを送信画面経由で出力するオプションを追加(Tnx JA1IQV)
|
||||
◎一番最初のログデータ記録でエラーになるバグを修正
|
||||
◎ログのUTC表示(TimeZone選択)を追加
|
||||
◎初回起動時の言語問い合わせを廃止(自動判定に変更)
|
||||
◎XYScopeの回転方向を逆にするオプションを追加(Tnx JA9AVA)
|
||||
◎スケルチ動作の改善
|
||||
◎WaitDiddleOutオプションを追加
|
||||
◎Limitボタンを廃止
|
||||
◎NETボタンの追加
|
||||
◎DXボタンのデフォルトゲインを100に変更
|
||||
◎マウスでのMyRST取りこみにコンテストモードを追加
|
||||
◎Control PanelサイズにLargeを追加(Tnx JE8LWZ)
|
||||
◎SQレベル表示をSQ-OFF時にも動作するようにした
|
||||
◎AFCのShift変更アルゴリズムにHAMモードを追加
|
||||
◎NETボタンの動作不具合を修正
|
||||
◎各マクロボタンの編集にショートカットキーを割り当て可能にした(Tnx JA1IQV)
|
||||
◎マクロ参照キーワードに「%s」を追加(Tnx JH3XDO)
|
||||
◎その他細かい点の改善
|
||||
|
||||
[V1.41 -> V1.50 2000-08-08]
|
||||
◎積分器にIIR-LPFを追加
|
||||
◎積分器の特性確認ボタンを追加
|
||||
◎XYScope表示の処理品質の選択を追加
|
||||
◎XYScope表示のリミッターでの位相歪みによる影響を緩和
|
||||
◎リミッターの「Over Sampling」の選択を追加(参照→Digital.txt)
|
||||
◎サウンドカードのクロック補正値を設定可能にした(Tnx JA1WSK)
|
||||
◎クロック補正でJJYの1秒チック音を利用可能にした(Tnx JA1WSK)
|
||||
◎FSK送信(TXD)時にUARTのタイミングで送信できる選択を追加
|
||||
◎Diddle ON時に受信への切り替えが遅れていた点を改善
|
||||
◎Diddleの「WaitTimer」を追加(Tnx JA1IQV)
|
||||
◎LTR/FIGコードの強制出力を追加(Tnx JA1IQV)
|
||||
◎定型メッセージ参照キーワードに「^」を追加(Tnx JA1IQV)
|
||||
◎低速CPU時に問い合わせメッセージ表示が遅れるのを少し改善
|
||||
◎その他細かい点の改善
|
||||
|
||||
[V1.51 2000-08-08]
|
||||
◎Pentium75MHzでの操作応答を少し改善
|
||||
◎不要(無意味)な設定スイッチの廃止
|
||||
◎サスペンド時のCPU時間を更に解放
|
||||
◎マニュアル(本書)に処理軽減化の処置を記載
|
||||
|
||||
[V1.52 2000-08-10]
|
||||
◎キー操作によるシフト幅変更機能を追加(Tnx JA3KWZ)
|
||||
◎AFCのアルゴリズムに「FSK」を追加(Tnx JA3KWZ)
|
||||
◎マクロ参照キーワードに「~」「[」「]」を追加
|
||||
◎送信切り替え直後のDiddle送出を0.25秒間禁止
|
||||
◎細かい点の修正
|
||||
|
||||
[V1.53 2000-08-12]
|
||||
◎AFCのHAM,FSKのアルゴリズムにシフト幅220Hz/240Hzを追加
|
||||
◎FFTのゲイン選択を追加
|
||||
◎細かい点の修正
|
||||
|
||||
[V1.54 2000-08-13]
|
||||
◎「Ctrl+BS」キーで未送信の1行を消去できるようにした(Tnx JA1IQV)
|
||||
◎マクロ参照キーワードの先頭に記述する「#」を追加(JH8WIG)
|
||||
◎マクロ参照キーワードに「%E」を追加(Tnx JA1IQV)
|
||||
◎送信画面でのキーワード参照動作に「即時変換」を追加(Tnx JG1GGU)
|
||||
|
||||
[V1.55 2000-08-15]
|
||||
◎Diddleのデフォルトを「NONE」から「LTR」に変更(Tnx K6STI)
|
||||
◎「Disable Rev」(送信時にRevを無効にする)を追加(Tnx W6/G0AZT)
|
||||
◎定型メッセージのドロップリストの表示数を16に増やした(Tnx JE4CIL)
|
||||
|
||||
[V1.56 2000-08-20]
|
||||
◎MMTTY.TXT内のDsubピン番号の誤りを修正(Tnx MMTTY-Gropu)
|
||||
◎マーク周波数の下限を300Hzに変更(Tnx MMTTY-Group)
|
||||
◎「受信画面のクリア」にショートカットを定義できるようにした(Tnx MMTTY-Group)
|
||||
◎「ESC」をショートカットキーのリストに追加(Tnx MMTTY-Group)
|
||||
◎ADIFファイルへのエクスポートを追加(Tnx JA5HRE, MMTTY-Group)
|
||||
◎タイムスタンプをUTC表示できるようにした(Tnx MMTTY-Group)
|
||||
◎QSOデータ表示でUTC表示できなかったバグを修正(Tnx MMTTY-Group)
|
||||
◎599ボタンを廃止し代わりにバンドボックスを配置
|
||||
|
||||
[V1.57 2000-08-24]
|
||||
◎コールサインクリック時に即検索するように変更(Tnx MMTTY-Group)
|
||||
◎ワード単位での文字の送信を追加(Tnx MMTTY-Group)
|
||||
◎コテンストのランニングモードとS&Pモードを追加(Tnx MMTTY-Group)
|
||||
◎英語版用にSetup HelpメニューとHTML Help表示機能を追加(Tnx MMTTY-Group)
|
||||
|
||||
[V1.58 2000-09-07]
|
||||
◎英語版用にWindows Helpのアクセス機能を追加(Tnx KX2A)
|
||||
◎マクロキーワードに「%D」と「%T」を追加(Tnx MMTTY-Group)
|
||||
◎マクロキーワードの「~」と「_」の動作を改善(Tnx MMTTY-Group)
|
||||
◎DXボタンを削除しATCボタンを追加
|
||||
◎定型メッセージ参照キーワードに「#」を追加(Tnx MMTTY-Group)
|
||||
|
||||
[V1.59 2000-10-15]
|
||||
◎即時変換時でも「%F」と「%L」は常に送信時に変換するように改善(Tnx JA1IQV)
|
||||
◎日本語版にRTTY BASICSのヘルプポインタを追加(Tnx W7TI, JA7UDE)
|
||||
◎マウスでの取りこみにCQ/RJモードを追加(Tnx JA1IQV, K5YG)
|
||||
◎コンテストモード時のマウスでの取りこみ動作の改善(Tnx JA1IQV)
|
||||
◎Hamlogとの変換でモードを定義可能にした(Tnx JE4CIL, 7L1CUH)
|
||||
◎ADIFへのRST出力のデフォルト動作を変更(Tnx MMTTY-Group)
|
||||
◎TNC模擬モードを追加
|
||||
◎テキストファイル送信の文字数制限をなくした(Tnx MMTTY-Group)
|
||||
◎リモートモードを追加(Tnx K4CY)
|
||||
◎時刻取得にオフセットを設定できるようにした(Tnx JR3KFX)
|
||||
◎ウインドウサイズと位置をオプションで記憶可能にした(Tnx MMTTY-Group)
|
||||
◎マクロボタンに色を定義可能にした(Tnx MMTTY-Group)
|
||||
◎TXボタン操作時に自動改行を出力できるようにした(Tnx JH1BIH)
|
||||
◎マクロボタン(16個)表示をON/OFF可能にした
|
||||
◎メイン画面から'BW'をクリックしてBaudを操作可能にした(Tnx MMTTY-Group)
|
||||
◎サウンドカードのID番号を設定できるようにした(Tnx MMTTY-Group)
|
||||
◎日付の表現を選択できるようにした(Tnx MMTTY-Group)
|
||||
◎PTT制御にRadioCommandを追加(Tnx KB2EOQ, JA1WSK, MMTTY-Group)
|
||||
◎マクロボタン(16個)にリピート機能を追加(Tnx MMTTY-Group)
|
||||
◎TXボタンの自動改行設定がINIファイルにセーブできないバグを修正(Tnx JA1IQV)
|
||||
◎サウンドカードのサンプリング周波数を変更可能にした
|
||||
◎LMSの代わりにノッチフィルタを選択できるようにした
|
||||
◎マーク周波数のドロップリストに1275Hzを追加(Tnx JA1ADN)
|
||||
◎'%D'マクロの出力書式を日付形式で変更可能にした
|
||||
◎マクロボタンの横1列並び表示を追加(Tnx MMTTY Group)
|
||||
◎FSKの出力タイミングを改善
|
||||
◎2つのノッチ周波数を使用できるようにした
|
||||
◎ログのテキストインポートのバグの修正(Tnx MMTTY Group)
|
||||
◎YYYY形式のバグの修正(Tnx MMTTY Group)
|
||||
|
||||
[V1.60 2000-12-17]
|
||||
◎キーボードのワードラップ機能を追加(Tnx JH1BIH)
|
||||
◎リモートモードの改善(Tnx K4CY, MMTTY group)
|
||||
◎マクロ定義画面に「Commands」ボタンを追加(Tnx MMTTY group)
|
||||
◎受信画面の送信文字に色を定義可能にした(Tnx MMTTY group)
|
||||
◎ADIFファイルのインポートを追加(Tnx MMTTY-Group)
|
||||
◎USB-Comポート対策でFSK-TXDの処理方法の選択を追加(Tnx KD6AZN, JA7UDE, MMTTY-Group)
|
||||
◎OnQSO,OffQSO,Captureのショートカット定義の追加(Tnx JA1WSK, MMTTY-Group)
|
||||
◎マクロキーワードに「%M」「%t」を追加(Tnx MMTTY-Group)
|
||||
◎文字フォントにスタイルを適用(Tnx MMTTY-Group)
|
||||
◎英語モード時にJCC/JCG画面のQTHを英語で表記する(Tnx MMTTY-Group)
|
||||
◎FFTウインドウ上のノッチ周波数位置にマーカーを表示(Tnx MMTTY-Group)
|
||||
◎RadioCommandにVFOポーリング機能を追加(Tnx JA1WSK, KX2A, MMTTY-Group)
|
||||
◎ステレオモードでサウンドカードを扱うオプションを追加(Tnx MMTTY-Group)
|
||||
|
||||
[V1.61 2001-01-26]
|
||||
◎時刻オフセットに分を追加(Tnx MMTTY-Group)
|
||||
◎リモートモードの改善(Tnx K4CY, Zakanaka-Group)
|
||||
◎DSP部分の処理速度の改善
|
||||
◎WindowsNT/2000でのロックの問題を解決(Tnx MMTTY-Group)
|
||||
◎送信時の「Always fix shift」オプションを追加(Tnx K4CY)
|
||||
◎VFOポーリングにKenwoodを追加(Tnx MMTTY-Group)
|
||||
◎プロファイルメニューの追加
|
||||
◎クロック調整画面の操作改善
|
||||
◎TNCエミュレーションに「Baudot modem」を追加
|
||||
◎時刻オフセットに「夏時間調整の無視」を追加(Tnx K4CY)
|
||||
◎ログのエクスポートに「Cabrillo file」を追加(Tnx W6/G0AZT, MMTTY-Group)
|
||||
|
||||
[V1.62 2001-09-22]
|
||||
◎復調器のリミッタにAGCオプションを追加
|
||||
◎リモートモードの改善 (Tnx to K4CY, JK1IQK and MMTTY group)
|
||||
◎VFOポーリングにFT1000Dを追加(Tnx to MMTTY group)
|
||||
◎VFOポーリングにFT920を追加(Tnx to MMTTY group)
|
||||
◎Turbo Hamlogとのリアルタイムリンクを追加(Tnx to JG1MOU)
|
||||
◎その他、細かいバグの修正と改善
|
||||
|
||||
632
Hamlog5.cpp
Normal file
632
Hamlog5.cpp
Normal file
|
|
@ -0,0 +1,632 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "ComLib.h"
|
||||
#include "LogFile.h"
|
||||
#include "Hamlog5.h"
|
||||
#include "LogConv.h"
|
||||
//--------------------------------------------
|
||||
const LPCSTR g_Hamlog5Key[]={
|
||||
"CALLS", "IGN", "DATE", "TIME", "CODE", "GL", "QSL", "FLAG", "HIS", "MY",
|
||||
"FREQ", "MODE", "NAME", "QTH", "RMK1", "RMK2", NULL
|
||||
};
|
||||
const BYTE g_Hamlog5Len[]={
|
||||
8, 12, 4, 2, 6, 6, 3, 2, 3, 3,
|
||||
7, 4, 12, 28, 54, 54, 0
|
||||
};
|
||||
//--------------------------------------------
|
||||
void __fastcall GetHamlog5FieldsLen(AnsiString &as)
|
||||
{
|
||||
as = "";
|
||||
for( int i = 8; i < 15; i++ ){
|
||||
if( i > 8 ) as += ",";
|
||||
as += Log.m_LogSet.m_Hamlog5Len[i];
|
||||
}
|
||||
}
|
||||
//--------------------------------------------
|
||||
void __fastcall SetHamlog5FieldsLen(AnsiString &as)
|
||||
{
|
||||
LPSTR pBF = StrDupe(as.c_str());
|
||||
LPSTR p, t;
|
||||
p = pBF;
|
||||
for( int i = 8; i < 15; i++ ){
|
||||
p = StrDlm(t, p);
|
||||
Log.m_LogSet.m_Hamlog5Len[i] = BYTE(atoin(t, -1));
|
||||
}
|
||||
delete[] pBF;
|
||||
}
|
||||
//--------------------------------------------
|
||||
//コンストラクタ
|
||||
CHamlog5::CHamlog5()
|
||||
{
|
||||
m_fCreate = FALSE;
|
||||
m_RecMax = 0; // レコード数
|
||||
m_FilMax = 0; // フィールド数
|
||||
m_RecWidth = 0; // レコードの幅
|
||||
m_FilOff = 0; // ヘッダオフセット
|
||||
m_bp = NULL;
|
||||
m_OpenFlag = FALSE;
|
||||
m_WriteFlag = FALSE; // 書き込みフラグ
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//デストラクタ
|
||||
CHamlog5::~CHamlog5()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//ヘッダデータセットアップ
|
||||
BOOL CHamlog5::SetupHeader(void)
|
||||
{
|
||||
if( fread(&m_Head, 1, sizeof(m_Head), m_fp)!=sizeof(m_Head) ){
|
||||
return FALSE; // 異なるフォーマット
|
||||
}
|
||||
|
||||
if( (m_Head.Type != 0x03)&&(m_Head.Type != 0x1a ) ) return FALSE;
|
||||
|
||||
m_RecMax = m_Head.RecMax;
|
||||
m_FilOff = m_Head.FilOff;
|
||||
m_RecWidth = m_Head.RecWidth;
|
||||
if( !m_FilOff ) return FALSE;
|
||||
|
||||
hamlog5DBRHD slot;
|
||||
ULONG fPos;
|
||||
for( m_FilMax = 0; m_FilMax < HamlogDBMAX; m_FilMax++ ){
|
||||
fPos = (32L*m_FilMax)+32L;
|
||||
if( fPos > ULONG(m_FilOff) ) break;
|
||||
if( fread(&slot, 1, sizeof(slot), m_fp)!=sizeof(slot) ) break;
|
||||
if( slot.Name[0] == 0x0d ) break;
|
||||
slot.Name[10] = 0;
|
||||
m_StrTable[m_FilMax] = slot.Name;
|
||||
m_TypeTable[m_FilMax] = slot.Type;
|
||||
m_LenTable[m_FilMax] = USHORT(slot.Len);
|
||||
}
|
||||
for( int i = 8; (i < 15) && (i < m_FilMax); i++ ){
|
||||
Log.m_LogSet.m_Hamlog5Len[i] = m_LenTable[i];
|
||||
}
|
||||
|
||||
// if( (m_Head.Type == 0x1a) && !m_RecMax ){
|
||||
// m_RecMax = (m_fStatus.m_size - ULONG(m_FilOff)) / ULONG(m_RecWidth);
|
||||
// }
|
||||
|
||||
USHORT i;
|
||||
USHORT Pos = 1;
|
||||
for( i = 0; i < m_FilMax; i++ ){
|
||||
m_PosTable[i] = Pos;
|
||||
Pos += m_LenTable[i];
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//ヘッダデータ作成
|
||||
BOOL CHamlog5::MakeHeader(const LPCSTR _NT[], const BYTE _LT[])
|
||||
{
|
||||
hamlog5DBRHD slot;
|
||||
|
||||
memset(&m_Head, 0, sizeof(m_Head));
|
||||
fseek(m_fp, 0, SEEK_SET);
|
||||
fwrite(&m_Head, 1, sizeof(m_Head), m_fp);
|
||||
m_FilOff = sizeof(m_Head);
|
||||
m_RecWidth = 1;
|
||||
for( m_FilMax = 0; _LT[m_FilMax]; m_FilMax++ ){
|
||||
memset(&slot, 0, sizeof(slot));
|
||||
strcpy(slot.Name, _NT[m_FilMax]);
|
||||
slot.Len = _LT[m_FilMax];
|
||||
slot.Type = 'C';
|
||||
fwrite(&slot, 1, sizeof(slot), m_fp);
|
||||
m_PosTable[m_FilMax] = m_RecWidth;
|
||||
m_RecWidth += USHORT(_LT[m_FilMax]);
|
||||
m_FilOff += USHORT(sizeof(slot));
|
||||
m_StrTable[m_FilMax] = _NT[m_FilMax];
|
||||
m_TypeTable[m_FilMax] = 'C';
|
||||
m_LenTable[m_FilMax] = USHORT(_LT[m_FilMax]);
|
||||
}
|
||||
char Term = 0x0d;
|
||||
fwrite(&Term, 1, 1, m_fp);
|
||||
m_FilOff++;
|
||||
m_Head.Type = 3;
|
||||
SYSTEMTIME st;
|
||||
::GetLocalTime(&st);
|
||||
m_Head.Year = BYTE(st.wYear % 100);
|
||||
m_Head.Mon = BYTE(st.wMonth);
|
||||
m_Head.Day = BYTE(st.wDay);
|
||||
m_Head.RecMax = 0;
|
||||
m_Head.FilOff = m_FilOff;
|
||||
m_Head.RecWidth = m_RecWidth;
|
||||
fseek(m_fp, 0, SEEK_SET);
|
||||
fwrite(&m_Head, 1, sizeof(m_Head), m_fp);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//オープン
|
||||
BOOL CHamlog5::Open(LPCSTR Name, BOOL fMsg)
|
||||
{
|
||||
if( (m_OpenFlag == TRUE) ) Close();
|
||||
m_WriteFlag = FALSE; // 書き込みフラグ
|
||||
if( (m_fp = fopen(Name, "rb")) == NULL ){
|
||||
if( fMsg ) ErrorMB("%sがオープンできません.", Name);
|
||||
return FALSE; // ファイルがオープンできない
|
||||
}
|
||||
m_OpenFlag = TRUE;
|
||||
m_fCreate = FALSE;
|
||||
if( SetupHeader() == FALSE ){
|
||||
Close();
|
||||
if( fMsg ) ErrorMB("ファイルフォーマットが認識できません.");
|
||||
return FALSE;
|
||||
}
|
||||
if( m_bp ) delete[] m_bp;
|
||||
m_bp = new char[m_RecWidth];
|
||||
if( Seek(0) == FALSE ){
|
||||
Close();
|
||||
if( fMsg ) ErrorMB("データーレコードが存在しません.");
|
||||
return FALSE;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//オープン
|
||||
BOOL CHamlog5::Create(LPCSTR Name)
|
||||
{
|
||||
if( (m_OpenFlag == TRUE) ) Close();
|
||||
m_WriteFlag = FALSE; // 書き込みフラグ
|
||||
if( (m_fp = fopen(Name, "wb")) == NULL ){
|
||||
ErrorMB("%sを作成できません.", Name);
|
||||
return FALSE; // ファイルがオープンできない
|
||||
}
|
||||
m_OpenFlag = TRUE;
|
||||
m_fCreate = TRUE;
|
||||
if( MakeHeader(g_Hamlog5Key, Log.m_LogSet.m_Hamlog5Len) == FALSE ){
|
||||
Close();
|
||||
ErrorMB("%sを作成できません.", Name);
|
||||
return FALSE;
|
||||
}
|
||||
if( m_bp ) delete[] m_bp;
|
||||
m_bp = new char[m_RecWidth];
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//クローズ
|
||||
void CHamlog5::Close(void)
|
||||
{
|
||||
if( m_OpenFlag == TRUE ){
|
||||
Update();
|
||||
if( m_RecMax != m_Head.RecMax ){ // データが追加されている
|
||||
m_Head.RecMax = m_RecMax;
|
||||
fseek(m_fp, 0, SEEK_SET);
|
||||
fwrite(&m_Head, 1, sizeof(m_Head), m_fp);
|
||||
}
|
||||
int r = fclose(m_fp);
|
||||
m_fp = NULL;
|
||||
if( r && m_fCreate ){
|
||||
ErrorMB("ファイルの作成に失敗しました.");
|
||||
}
|
||||
m_OpenFlag = FALSE;
|
||||
}
|
||||
if( m_bp != NULL ){
|
||||
delete[] m_bp;
|
||||
m_bp = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//レコードシーク
|
||||
BOOL CHamlog5::Seek(ULONG Index)
|
||||
{
|
||||
if( m_OpenFlag == FALSE ) return FALSE;
|
||||
if( Update() == FALSE ) return FALSE;
|
||||
m_Index = Index;
|
||||
m_Pos = (Index * ULONG(m_RecWidth)) + ULONG(m_FilOff);
|
||||
fseek(m_fp, m_Pos, SEEK_SET);
|
||||
if( Index < m_RecMax ){
|
||||
if( fread(m_bp, 1, m_RecWidth, m_fp) != ULONG(m_RecWidth) ){
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
else {
|
||||
memset(m_bp, ' ', m_RecWidth);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//マークのチェック
|
||||
BOOL CHamlog5::IsData(void)
|
||||
{
|
||||
return (*m_bp == ' ') ? TRUE : FALSE;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//データの読み込み
|
||||
BOOL CHamlog5::GetData(USHORT SubIndex, AnsiString &cs)
|
||||
{
|
||||
char bf[1024];
|
||||
|
||||
if( SubIndex >= m_FilMax ) return FALSE;
|
||||
|
||||
int len = m_LenTable[SubIndex];
|
||||
if( len >= 1023 ) len = 1023;
|
||||
StrCopy(bf, m_bp + m_PosTable[SubIndex], len);
|
||||
cs = bf;
|
||||
return TRUE;
|
||||
}
|
||||
//--------------------------------------------
|
||||
//データの読み込み
|
||||
BOOL CHamlog5::GetData(USHORT SubIndex, LPSTR pStore)
|
||||
{
|
||||
if( SubIndex >= m_FilMax ) return FALSE;
|
||||
|
||||
int len = m_LenTable[SubIndex];
|
||||
if( len >= 1023 ) len = 1023;
|
||||
StrCopy(pStore, m_bp + m_PosTable[SubIndex], len);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//データの読み込み
|
||||
int CHamlog5::GetData(USHORT SubIndex, LPBYTE pData, int len)
|
||||
{
|
||||
if( SubIndex >= m_FilMax ) return 0;
|
||||
|
||||
int rlen = m_LenTable[SubIndex];
|
||||
if( rlen >= 1023 ) rlen = 1023;
|
||||
if( rlen > len ) rlen = len;
|
||||
memcpy(pData, m_bp + m_PosTable[SubIndex], rlen);
|
||||
return rlen;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//データの書き込み(バッファを更新するのみ)
|
||||
BOOL CHamlog5::SetData(USHORT SubIndex, LPCSTR p)
|
||||
{
|
||||
if( SubIndex >= m_FilMax ) return FALSE;
|
||||
|
||||
int len = m_LenTable[SubIndex];
|
||||
LPSTR t;
|
||||
int i;
|
||||
for( i = 0, t = m_bp + m_PosTable[SubIndex]; i < len; i++, t++ ){
|
||||
if( *p ){
|
||||
*t = *p++;
|
||||
}
|
||||
else {
|
||||
*t = ' ';
|
||||
}
|
||||
}
|
||||
m_WriteFlag = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
//--------------------------------------------
|
||||
//データの書き込み(バッファを更新するのみ)
|
||||
BOOL CHamlog5::SetBinary(USHORT SubIndex, LPBYTE p)
|
||||
{
|
||||
if( SubIndex >= m_FilMax ) return FALSE;
|
||||
|
||||
int len = m_LenTable[SubIndex];
|
||||
LPSTR t;
|
||||
int i;
|
||||
for( i = 0, t = m_bp + m_PosTable[SubIndex]; i < len; i++, t++ ){
|
||||
*t = *p++;
|
||||
}
|
||||
m_WriteFlag = TRUE;
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
//--------------------------------------------
|
||||
//データの書き込み(バッファの内容を反映させる)
|
||||
BOOL CHamlog5::Update(void)
|
||||
{
|
||||
if( m_OpenFlag == FALSE ) return FALSE;
|
||||
|
||||
if( m_WriteFlag == TRUE ){
|
||||
m_WriteFlag = FALSE;
|
||||
fseek(m_fp, m_Pos, SEEK_SET);
|
||||
fwrite(m_bp, 1, m_RecWidth, m_fp);
|
||||
if( m_Index >= m_RecMax ){
|
||||
m_RecMax++;
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
//--------------------------------------------
|
||||
//データのデコード
|
||||
void CHamlog5::DecodeData(SDMMLOG *sp)
|
||||
{
|
||||
memset(sp, 0, sizeof(SDMMLOG));
|
||||
char bf[1024];
|
||||
|
||||
|
||||
int YY, MM, DD, HH, mm;
|
||||
GetData(itemhamlog5DATE, LPBYTE(bf), 4);
|
||||
YY = bf[1];
|
||||
MM = bf[2];
|
||||
DD = bf[3];
|
||||
GetData(itemhamlog5TIME, LPBYTE(bf), 2);
|
||||
HH = bf[0];
|
||||
mm = bf[1] & 0x7f;
|
||||
if( bf[1] & 0x80 ){
|
||||
UTCtoJST(YY, MM, DD, HH);
|
||||
}
|
||||
sp->year = BYTE(YY);
|
||||
sp->date = WORD(MM * 100 + DD);
|
||||
sp->btime = WORD(((HH * 60 + mm) * 30));
|
||||
if(!sp->btime) sp->btime++;
|
||||
|
||||
USHORT usFlag; // コールサインの形式
|
||||
GetData(itemhamlog5FLAG, LPBYTE(&usFlag), sizeof(usFlag));
|
||||
|
||||
LPSTR t, p;
|
||||
AnsiString call;
|
||||
if( (usFlag & bithamlog5DX) && (usFlag & bithamlog5RevOdr) ){ // KH6/JE3HHT
|
||||
AnsiString Add;
|
||||
GetData(itemhamlog5IGN, bf);
|
||||
p = bf;
|
||||
if( *p != ' ' ){
|
||||
p = StrDlm(t, p, ' ');
|
||||
Add = t;
|
||||
}
|
||||
p = SkipSpace(p);
|
||||
p = StrDlm(t, p, '/');
|
||||
call = t;
|
||||
GetData(itemhamlog5CALLS, bf); clipsp(bf);
|
||||
if( !call.IsEmpty() ) call += '/';
|
||||
call += SkipSpace(bf);
|
||||
call += Add;
|
||||
if( *p ){
|
||||
call += '/';
|
||||
call += p;
|
||||
}
|
||||
}
|
||||
else { // JE3HHT/KH6
|
||||
GetData(itemhamlog5CALLS, bf); clipsp(bf);
|
||||
call = SkipSpace(bf);
|
||||
GetData(itemhamlog5IGN, bf);
|
||||
p = bf;
|
||||
if( *p != ' ' ){
|
||||
p = StrDlm(t, p, ' ');
|
||||
call += t;
|
||||
}
|
||||
p = SkipSpace(p);
|
||||
if( *p ){
|
||||
call += '/';
|
||||
call += p;
|
||||
}
|
||||
}
|
||||
|
||||
StrCopy(sp->call, call.c_str(), MLCALL);
|
||||
GetData(itemhamlog5HIS, bf); clipsp(bf);
|
||||
StrCopy(sp->ur, bf, MLRST);
|
||||
GetData(itemhamlog5MY, bf); clipsp(bf);
|
||||
StrCopy(sp->my, bf, MLRST);
|
||||
GetData(itemhamlog5MODE, bf); clipsp(bf);
|
||||
Log.SetMode(sp, bf);
|
||||
GetData(itemhamlog5FREQ, bf); clipsp(bf);
|
||||
Log.SetFreq(sp, bf);
|
||||
GetData(itemhamlog5NAME, bf); clipsp(bf);
|
||||
StrCopy(sp->name, bf, MLNAME);
|
||||
GetData(itemhamlog5QTH, bf); clipsp(bf);
|
||||
StrCopy(sp->qth, bf, MLQTH);
|
||||
|
||||
GetData(itemhamlog5RMK1, bf);
|
||||
SetMMLOGKey(sp, bf);
|
||||
clipsp(bf);
|
||||
StrCopy(sp->rem, SkipSpace(bf), MLREM);
|
||||
GetData(itemhamlog5RMK2, bf);
|
||||
SetMMLOGKey(sp, bf);
|
||||
clipsp(bf);
|
||||
StrCopy(sp->qsl, SkipSpace(bf), MLQSL);
|
||||
GetData(itemhamlog5QSL, LPBYTE(bf), 3);
|
||||
sprintf(&bf[32], "QSL[%.3s]", bf);
|
||||
Log.SetOptStr(2, sp, &bf[32]);
|
||||
if( bf[0] == 'N' ){
|
||||
sp->send = 'N';
|
||||
}
|
||||
else if( bf[1] == ' ' ){ // 未発送
|
||||
if( (bf[0] == 'J')||(bf[0] == ' ') ){
|
||||
sp->send = 0;
|
||||
}
|
||||
else {
|
||||
sp->send = BYTE(tolower(bf[0]));
|
||||
}
|
||||
}
|
||||
else { // 発送済み
|
||||
sp->send = BYTE(toupper(bf[1]));
|
||||
}
|
||||
sp->recv = bf[2];
|
||||
if( sp->recv == ' ' ) sp->recv = 0;
|
||||
GetData(itemhamlog5CODE, LPBYTE(bf), 6); clipsp(bf);
|
||||
StrCopy(sp->opt1, bf, 6);
|
||||
GetData(itemhamlog5GL, LPBYTE(bf), 6); clipsp(bf);
|
||||
StrCopy(sp->opt2, bf, 6);
|
||||
if( !sp->etime ) sp->etime = sp->btime;
|
||||
}
|
||||
//--------------------------------------------
|
||||
//データのエンコード
|
||||
void CHamlog5::EncodeData(SDMMLOG *sp)
|
||||
{
|
||||
char bf[1024];
|
||||
|
||||
int YY = sp->year;
|
||||
int MM = sp->date / 100;
|
||||
int DD = sp->date % 100;
|
||||
int tim = sp->btime / 30;
|
||||
int HH = tim / 60;
|
||||
int mm = tim % 60;
|
||||
switch(Log.m_LogSet.m_THTZ){
|
||||
case 0:
|
||||
if( !IsJA(sp->call) ){
|
||||
JSTtoUTC(YY, MM, DD, HH);
|
||||
mm |= 0x80;
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
JSTtoUTC(YY, MM, DD, HH);
|
||||
mm |= 0x80;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
bf[0] = BYTE(YY > 50 ? 19 : 20);
|
||||
bf[1] = BYTE(YY);
|
||||
bf[2] = BYTE(MM);
|
||||
bf[3] = BYTE(DD);
|
||||
SetBinary(itemhamlog5DATE, LPBYTE(bf));
|
||||
bf[0] = BYTE(HH);
|
||||
bf[1] = BYTE(mm);
|
||||
SetBinary(itemhamlog5TIME, LPBYTE(bf));
|
||||
|
||||
SetData(itemhamlog5NAME, sp->name);
|
||||
SetData(itemhamlog5CODE, sp->opt1);
|
||||
SetData(itemhamlog5GL, sp->opt2);
|
||||
SetData(itemhamlog5QTH, sp->qth);
|
||||
strcpy(bf, Log.GetModeString(sp->mode));
|
||||
SetData(itemhamlog5MODE, bf);
|
||||
strcpy(bf, Log.GetFreqString(sp->band, sp->fq));
|
||||
SetData(itemhamlog5FREQ, bf);
|
||||
|
||||
SetData(itemhamlog5HIS, sp->ur);
|
||||
SetData(itemhamlog5MY, sp->my);
|
||||
|
||||
AnsiString REM1, REM2;
|
||||
REM1 = sp->rem;
|
||||
REM2 = sp->qsl;
|
||||
int l = GetLMode(sp->mode);
|
||||
if( sp->ur[l] ) AddMMLOGKey(REM1, REM2, &sp->ur[l], "SN");
|
||||
if( sp->my[l] ) AddMMLOGKey(REM1, REM2, &sp->my[l], "RN");
|
||||
|
||||
if( sp->etime ){
|
||||
tim = sp->etime / 30;
|
||||
sprintf(bf, "%02u%02u", tim / 60, tim % 60);
|
||||
AddMMLOGKey(REM1, REM2, bf, "END");
|
||||
}
|
||||
if( sp->env ){
|
||||
sprintf(bf, "%u", sp->env);
|
||||
AddMMLOGKey(REM1, REM2, bf, "ENV");
|
||||
}
|
||||
AddMMLOGKey(REM1, REM2, sp->pow, "POW");
|
||||
if( sp->cq ){
|
||||
bf[0] = sp->cq; bf[1] = 0;
|
||||
AddMMLOGKey(REM1, REM2, bf, "M");
|
||||
}
|
||||
strcpy(bf, Log.GetOptStr(2, sp));
|
||||
char rbf[32];
|
||||
char qsl[3];
|
||||
if(RemoveL2(rbf, bf, "QSL", sizeof(rbf)-1) == TRUE){
|
||||
qsl[0] = rbf[0];
|
||||
qsl[1] = rbf[1];
|
||||
qsl[2] = rbf[2];
|
||||
}
|
||||
else {
|
||||
qsl[2] = sp->recv;
|
||||
if( !qsl[2] ) qsl[2] = ' ';
|
||||
if( sp->send == 'N' ){
|
||||
qsl[0] = 'N';
|
||||
qsl[1] = ' ';
|
||||
}
|
||||
else if( !sp->send ){
|
||||
qsl[0] = 'J';
|
||||
qsl[1] = ' ';
|
||||
}
|
||||
else if( (sp->send >= 0x60)||(sp->send == '?') ){
|
||||
qsl[0] = BYTE(toupper(sp->send));
|
||||
qsl[1] = ' ';
|
||||
}
|
||||
else if( isalpha(sp->send) ){
|
||||
qsl[0] = sp->send;
|
||||
qsl[1] = '*';
|
||||
}
|
||||
else {
|
||||
qsl[0] = 'J';
|
||||
qsl[1] = sp->send;
|
||||
}
|
||||
}
|
||||
SetData(itemhamlog5QSL, qsl);
|
||||
SetData(itemhamlog5RMK1, REM1.c_str());
|
||||
SetData(itemhamlog5RMK2, REM2.c_str());
|
||||
|
||||
BOOL fJA = IsJA(sp->call);
|
||||
USHORT usFlag = USHORT(fJA ? 0 : bithamlog5DX);
|
||||
AnsiString Calls, Ign;
|
||||
strcpy(bf, sp->call);
|
||||
LPSTR pp, p2, t;
|
||||
t = bf;
|
||||
if( (pp = strchr(bf, '/')) != NULL ){ // KH6/JE3HHT or JE3HHT/KH6 の形式
|
||||
*pp = 0;
|
||||
pp++;
|
||||
int LenC = strlen(t);
|
||||
int LenP = strlen(pp);
|
||||
if( (p2 = strchr(pp, '/')) != NULL ){ // KH6/JE3HHT/P JE3HHT/QRP/3
|
||||
// t = KH6, pp = JE3HHT, p2 = P
|
||||
*p2 = 0; p2++;
|
||||
if( fJA ){
|
||||
Calls = t;
|
||||
Ign = pp;
|
||||
Ign += "/";
|
||||
Ign += p2;
|
||||
}
|
||||
else {
|
||||
Calls = pp;
|
||||
Ign = t;
|
||||
Ign += "/";
|
||||
Ign += p2;
|
||||
usFlag |= bithamlog5RevOdr;
|
||||
}
|
||||
}
|
||||
else {
|
||||
if( LenC < LenP ){
|
||||
Calls = pp;
|
||||
Ign = t;
|
||||
if( usFlag ) usFlag |= bithamlog5RevOdr;
|
||||
}
|
||||
else {
|
||||
Calls = t;
|
||||
Ign = pp;
|
||||
if( usFlag ) usFlag |= bithamlog5NorOdr;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
Calls = sp->call;
|
||||
}
|
||||
SetBinary(itemhamlog5FLAG, LPBYTE(&usFlag));
|
||||
SetData(itemhamlog5CALLS, Calls.c_str());
|
||||
LPCSTR pCall = Calls.c_str();
|
||||
memset(bf, ' ', 12); bf[13] = 0;
|
||||
l = strlen(pCall);
|
||||
if( l > 8 ){
|
||||
pCall += 8;
|
||||
l -= 8;
|
||||
memcpy(bf, pCall, l);
|
||||
}
|
||||
l = strlen(Ign.c_str());
|
||||
if( l ){
|
||||
if( l > 12 ) l = 12;
|
||||
memcpy(&bf[12 - l], Ign.c_str(), l);
|
||||
}
|
||||
SetData(itemhamlog5IGN, bf);
|
||||
}
|
||||
|
||||
119
Hamlog5.h
Normal file
119
Hamlog5.h
Normal file
|
|
@ -0,0 +1,119 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
#ifndef Hamlog5H
|
||||
#define Hamlog5H
|
||||
|
||||
// MMQSL用Hamlog Ver5のドライバ
|
||||
|
||||
#include "ComLib.h"
|
||||
#include "LogFile.h"
|
||||
extern const LPCSTR g_Hamlog5Key[];
|
||||
extern const BYTE g_Hamlog5Len[];
|
||||
|
||||
typedef enum {
|
||||
itemhamlog5CALLS,
|
||||
itemhamlog5IGN,
|
||||
itemhamlog5DATE,
|
||||
itemhamlog5TIME,
|
||||
itemhamlog5CODE,
|
||||
itemhamlog5GL,
|
||||
itemhamlog5QSL,
|
||||
itemhamlog5FLAG,
|
||||
itemhamlog5HIS,
|
||||
itemhamlog5MY,
|
||||
itemhamlog5FREQ,
|
||||
itemhamlog5MODE,
|
||||
itemhamlog5NAME,
|
||||
itemhamlog5QTH,
|
||||
itemhamlog5RMK1,
|
||||
itemhamlog5RMK2,
|
||||
}HAMLOG5_ITEMS;
|
||||
|
||||
#define bithamlog5DX 8
|
||||
#define bithamlog5NorOdr 1
|
||||
#define bithamlog5RevOdr 2
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
BYTE Type;
|
||||
BYTE Year;
|
||||
BYTE Mon;
|
||||
BYTE Day;
|
||||
ULONG RecMax;
|
||||
USHORT FilOff;
|
||||
USHORT RecWidth;
|
||||
BYTE dm1[20];
|
||||
}hamlog5DBHD;
|
||||
typedef struct {
|
||||
char Name[11];
|
||||
BYTE Type;
|
||||
BYTE dm1[4];
|
||||
BYTE Len;
|
||||
BYTE dm2[15];
|
||||
}hamlog5DBRHD;
|
||||
#pragma pack()
|
||||
|
||||
#define HamlogDBMAX 16
|
||||
class CHamlog5
|
||||
{
|
||||
private:
|
||||
BOOL m_fCreate;
|
||||
hamlog5DBHD m_Head; // ヘッダ情報
|
||||
ULONG m_RecMax; // レコード数
|
||||
USHORT m_FilMax; // フィールド数
|
||||
USHORT m_RecWidth; // レコードの幅
|
||||
USHORT m_FilOff; // ヘッダオフセット
|
||||
FILE *m_fp;
|
||||
AnsiString m_StrTable[HamlogDBMAX]; // テーブル名の配列
|
||||
USHORT m_PosTable[HamlogDBMAX]; // フィールド位置の配列
|
||||
USHORT m_LenTable[HamlogDBMAX]; // フィールド長さの配列
|
||||
char m_TypeTable[HamlogDBMAX]; // 型情報の配列
|
||||
BOOL m_OpenFlag; // ファイルオープンフラグ
|
||||
|
||||
ULONG m_Index; // シーク時のインデックス
|
||||
ULONG m_Pos; // シーク時のファイル位置
|
||||
LPSTR m_bp; // バッファのポインタ
|
||||
BOOL m_WriteFlag; // 書き込みフラグ
|
||||
BOOL SetupHeader(void); // ヘッダセットアップ
|
||||
BOOL MakeHeader(const LPCSTR _NT[], const BYTE _LT[]);
|
||||
public:
|
||||
CHamlog5();
|
||||
~CHamlog5();
|
||||
BOOL Open(LPCSTR Name, BOOL fMsg);
|
||||
BOOL Create(LPCSTR Name);
|
||||
void Close(void);
|
||||
inline ULONG GetRCount(void){return m_RecMax;};
|
||||
inline USHORT GetFCount(void){return m_FilMax;};
|
||||
AnsiString *GetStrBase(void){return m_StrTable;};
|
||||
BOOL Seek(ULONG Index);
|
||||
BOOL IsData(void);
|
||||
BOOL GetData(USHORT SubIndex, AnsiString &cs);
|
||||
BOOL GetData(USHORT SubIndex, LPSTR pStore);
|
||||
BOOL SetData(USHORT SubIndex, LPCSTR p);
|
||||
BOOL SetBinary(USHORT SubIndex, LPBYTE p);
|
||||
int GetData(USHORT SubIndex, LPBYTE pData, int len);
|
||||
BOOL Update(void);
|
||||
void DecodeData(SDMMLOG *sp);
|
||||
void EncodeData(SDMMLOG *sp);
|
||||
};
|
||||
|
||||
void __fastcall GetHamlog5FieldsLen(AnsiString &as);
|
||||
void __fastcall SetHamlog5FieldsLen(AnsiString &as);
|
||||
#endif
|
||||
70
InputWin.cpp
Normal file
70
InputWin.cpp
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "InputWin.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TInputWinDlg::TInputWinDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
if( AOwner == NULL ) return;
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
CancelBtn->Caption = "Cancel";
|
||||
}
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
int InputMB(LPCSTR pTitle, LPCSTR pMsg, AnsiString &as)
|
||||
{
|
||||
TForm *fp;
|
||||
if( Screen->ActiveForm != NULL ){
|
||||
fp = Screen->ActiveForm;
|
||||
}
|
||||
else if( Application->MainForm != NULL ){
|
||||
fp = Application->MainForm;
|
||||
}
|
||||
else {
|
||||
fp = NULL;
|
||||
}
|
||||
|
||||
TInputWinDlg *pBox = new TInputWinDlg(fp);
|
||||
pBox->LMsg->Caption = pMsg;
|
||||
pBox->Caption = pTitle;
|
||||
pBox->Edit->Text = as.c_str();
|
||||
int r = FALSE;
|
||||
if( pBox->ShowModal() == IDOK ){
|
||||
as = pBox->Edit->Text.c_str();
|
||||
r = TRUE;
|
||||
}
|
||||
delete pBox;
|
||||
return r;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
BIN
InputWin.dfm
Normal file
BIN
InputWin.dfm
Normal file
Binary file not shown.
50
InputWin.h
Normal file
50
InputWin.h
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef InputWinH
|
||||
#define InputWinH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TInputWinDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TEdit *Edit;
|
||||
TLabel *LMsg;
|
||||
private:
|
||||
public:
|
||||
virtual __fastcall TInputWinDlg(TComponent* AOwner);
|
||||
};
|
||||
int InputMB(LPCSTR pTitle, LPCSTR pMsg, AnsiString &as);
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
2232
LogConv.cpp
Normal file
2232
LogConv.cpp
Normal file
File diff suppressed because it is too large
Load diff
248
LogConv.h
Normal file
248
LogConv.h
Normal file
|
|
@ -0,0 +1,248 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef LogConvH
|
||||
#define LogConvH
|
||||
#include "LogFile.h"
|
||||
|
||||
extern const char *MONT1[];
|
||||
extern const char *MONT2[];
|
||||
//*************************************************************
|
||||
// ログ変換の基本クラス
|
||||
//
|
||||
class CLogConv
|
||||
{
|
||||
protected:
|
||||
int m_Type; // 0-TEXT, 1-LOG200, 2-HAMLOG, 3-DBASE
|
||||
int m_Mode; // 0-Read, 1-Write
|
||||
FILE *m_fp;
|
||||
|
||||
AnsiString m_FileName; // 変換中のファイル名
|
||||
public:
|
||||
CLogConv();
|
||||
virtual ~CLogConv();
|
||||
virtual int IsOpen(void){return m_fp != NULL ? 1 : 0;};
|
||||
virtual int Open(LPCSTR pName)=0;
|
||||
virtual int Create(LPCSTR pName)=0;
|
||||
virtual int Close(void)=0;
|
||||
virtual int Read(SDMMLOG *sp)=0;
|
||||
virtual int Write(SDMMLOG *sp)=0;
|
||||
};
|
||||
|
||||
#define TEXTCONVMAX 64
|
||||
typedef struct {
|
||||
int w;
|
||||
AnsiString Key;
|
||||
}TCONV;
|
||||
|
||||
//*************************************************************
|
||||
// テキストファイルアクセスのクラス
|
||||
//
|
||||
class CLogText : public CLogConv
|
||||
{
|
||||
public:
|
||||
int m_Double;
|
||||
int m_Delm;
|
||||
TCONV m_rConv[TEXTCONVMAX];
|
||||
TCONV m_tConv[TEXTCONVMAX];
|
||||
int m_UTC;
|
||||
int m_err;
|
||||
protected:
|
||||
char m_bf[2048]; // ファイルバッファ
|
||||
|
||||
private:
|
||||
int Text2MMLOG(SDMMLOG *sp, LPSTR p, int &err);
|
||||
void MMLOG2Text(LPSTR t, SDMMLOG *sp);
|
||||
|
||||
public:
|
||||
CLogText();
|
||||
virtual int Open(LPCSTR pName);
|
||||
virtual int Create(LPCSTR pName);
|
||||
virtual int Close(void);
|
||||
virtual int Read(SDMMLOG *sp);
|
||||
virtual int Write(SDMMLOG *sp);
|
||||
|
||||
};
|
||||
|
||||
void MMLOG2Text(LPSTR t, SDMMLOG *sp, AnsiString &Key);
|
||||
int Text2MMLOG(SDMMLOG *sp, LPCSTR s, AnsiString &Key);
|
||||
extern const LPCSTR ConvTbl[];
|
||||
extern CLogText LogText;
|
||||
|
||||
//*************************************************************
|
||||
// LOG200ファイルアクセスのクラス
|
||||
//
|
||||
#define LOG200WIDTH 200
|
||||
class CLog200 : public CLogConv
|
||||
{
|
||||
public:
|
||||
int m_Index;
|
||||
int m_err;
|
||||
protected:
|
||||
char m_bf[200]; // ファイルバッファ
|
||||
private:
|
||||
public:
|
||||
CLog200();
|
||||
virtual int Open(LPCSTR pName);
|
||||
virtual int Create(LPCSTR pName);
|
||||
virtual int Close(void);
|
||||
virtual int Read(SDMMLOG *sp);
|
||||
virtual int Write(SDMMLOG *sp);
|
||||
};
|
||||
|
||||
//*************************************************************
|
||||
// HAMLOGファイルアクセスのクラス
|
||||
//
|
||||
#pragma option -a- // パックの指示
|
||||
typedef struct {
|
||||
char Memo; // 03h=メモフィールド無し 83h=メモフィールド有り(HAMLOGでは 1Ah)
|
||||
char YY, MM, DD; // 最終更新年月日
|
||||
long Max; // レコード件数
|
||||
WORD HeadLen; // ヘッダの長さ(HAMLOG.DBSは 449)
|
||||
WORD DataLen; // レコードの長さ(HAMLOG.DBSは 58)
|
||||
char dummy[20]; // 00h
|
||||
}DBSHD;
|
||||
|
||||
typedef struct {
|
||||
char Memo; // 03h=メモフィールド無し 83h=メモフィールド有り(HAMLOGでは 1Ah)
|
||||
char YY, MM, DD; // 最終更新年月日
|
||||
long Max; // レコード件数
|
||||
char dm1;
|
||||
char m1; // 01h
|
||||
char dm2;
|
||||
char dummy[21]; // 00h
|
||||
char dummy2[255-32]; // 00h
|
||||
char term; // 1ah
|
||||
}DBRHD;
|
||||
|
||||
typedef struct {
|
||||
char Name[11];
|
||||
BYTE Type;
|
||||
BYTE dm1[4];
|
||||
BYTE Len;
|
||||
BYTE dm2[15];
|
||||
}DBSLOT;
|
||||
|
||||
typedef struct {
|
||||
char del[1]; /* 削除マーク */
|
||||
char calls[7]; /* コールサイン */
|
||||
char potbl[3]; /* 移動エリア */
|
||||
char code[6]; /* JCCコード */
|
||||
char glid[6]; /* グリッドロケーター */
|
||||
char freq[4]; /* 周波数 */
|
||||
char mode[3]; /* モード */
|
||||
char name[12]; /* 氏名 */
|
||||
char qsl [1]; /* QSL via */
|
||||
char send[1]; /* QSL SEND */
|
||||
char rcv[1]; /* QSL RCV */
|
||||
char date[3]; /* 日付 */
|
||||
char time[2]; /* 時間 */
|
||||
char hiss[2]; /* HIS RST */
|
||||
char myrs[2]; /* MY RST */
|
||||
long ofs; /* HAMLOG.DBR オフセットアドレス */
|
||||
}SDHAMLOG;
|
||||
|
||||
typedef struct { /* DBRのフィールド位置データ */
|
||||
BYTE LenQTH;
|
||||
BYTE LenREM1;
|
||||
BYTE LenREM2;
|
||||
}FHDDBR;
|
||||
#pragma option -a. // パック解除の指示
|
||||
|
||||
class CHamLog : public CLogConv
|
||||
{
|
||||
public:
|
||||
int m_Index;
|
||||
int m_err;
|
||||
protected:
|
||||
DBSHD m_hd; // DBSヘッダ
|
||||
SDHAMLOG m_RecBuf; // レコードバッファ
|
||||
|
||||
AnsiString m_DBRName; // DBRファイルの名前
|
||||
FILE *m_dbrfp; // DBRファイルのファイルポインタ
|
||||
DBRHD m_dbrhd; // DBRヘッダ
|
||||
private:
|
||||
int Seek(DWORD Index);
|
||||
BOOL MakeHD(void);
|
||||
|
||||
public:
|
||||
CHamLog();
|
||||
virtual int Open(LPCSTR pName);
|
||||
virtual int Create(LPCSTR pName);
|
||||
virtual int Close(void);
|
||||
virtual int Read(SDMMLOG *sp);
|
||||
virtual int Write(SDMMLOG *sp);
|
||||
};
|
||||
|
||||
void HAMLOGtoMMLOG(SDMMLOG *sp, SDHAMLOG *hp, FILE *dbrfp);
|
||||
int MMLOGtoHAMLOG(SDHAMLOG *hp, SDMMLOG *sp, FILE *dbrfp);
|
||||
void AddMMLOGKey(AnsiString &REM1, AnsiString &REM2, LPCSTR s, LPCSTR pKey);
|
||||
void SetMMLOGKey(SDMMLOG *sp, LPSTR bf);
|
||||
|
||||
//*************************************************************
|
||||
// ADIFアクセスのクラス
|
||||
//
|
||||
class CLogADIF : public CLogConv
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
char m_bf[1024]; // ファイルバッファ
|
||||
LPSTR m_p;
|
||||
int m_conv;
|
||||
private:
|
||||
void MMLOG2ADIF(LPSTR t, SDMMLOG *sp);
|
||||
void SetData(SDMMLOG *sp, LPCSTR pKey, LPSTR pData);
|
||||
void AdjustData(SDMMLOG *sp);
|
||||
void OutF(int &col, FILE *fp, LPCSTR fmt, ...);
|
||||
|
||||
public:
|
||||
CLogADIF();
|
||||
virtual int Open(LPCSTR pName);
|
||||
virtual int Create(LPCSTR pName);
|
||||
virtual int Close(void);
|
||||
virtual int Read(SDMMLOG *sp);
|
||||
virtual int Write(SDMMLOG *sp);
|
||||
|
||||
};
|
||||
|
||||
//*************************************************************
|
||||
// Cabrillo アクセスのクラス
|
||||
//
|
||||
class CLogCabrillo : public CLogConv
|
||||
{
|
||||
public:
|
||||
protected:
|
||||
char m_bf[1024]; // ファイルバッファ
|
||||
LPSTR m_p;
|
||||
AnsiString m_SNR;
|
||||
private:
|
||||
void MMLOG2Cabrillo(LPSTR t, SDMMLOG *sp);
|
||||
void AdjustData(SDMMLOG *sp);
|
||||
|
||||
public:
|
||||
CLogCabrillo();
|
||||
virtual int Open(LPCSTR pName);
|
||||
virtual int Create(LPCSTR pName);
|
||||
virtual int Close(void);
|
||||
virtual int Read(SDMMLOG *sp);
|
||||
virtual int Write(SDMMLOG *sp);
|
||||
};
|
||||
|
||||
#endif
|
||||
1660
LogFile.cpp
Normal file
1660
LogFile.cpp
Normal file
File diff suppressed because it is too large
Load diff
287
LogFile.h
Normal file
287
LogFile.h
Normal file
|
|
@ -0,0 +1,287 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef LogFileH
|
||||
#define LogFileH
|
||||
|
||||
#include "ComLib.h"
|
||||
//---------------------------------------------------------------------------
|
||||
#define MMLOGID "MMLOG DATA Ver1.00\032"
|
||||
|
||||
enum {
|
||||
testOFF,
|
||||
testON,
|
||||
testCQRJ,
|
||||
testPED,
|
||||
testBARTG,
|
||||
};
|
||||
|
||||
typedef struct { // Logの動作オプション
|
||||
char m_TimeZone; // 表示用タイムゾーン
|
||||
|
||||
int m_UpperName; // 大文字への変換
|
||||
int m_UpperQTH; // 大文字への変換
|
||||
int m_UpperREM; // 大文字への変換
|
||||
int m_UpperQSL; // 大文字への変換
|
||||
|
||||
int m_DefMyRST; // 0-OFF, 1-ON
|
||||
int m_Contest; // 0-OFF, 1-ON
|
||||
|
||||
int m_CopyFreq; // 0-Band, 1-Freq
|
||||
int m_CopyHis; // 0-599, 1-599001, 2-599UTC
|
||||
int m_CopyName; // 0-OFF, 1-ON
|
||||
int m_CopyQTH; // 0-OFF, 1-ON
|
||||
int m_CopyREM; // 0-OFF, 1-ON
|
||||
int m_CopyQSL; // 0-OFF, 1-ON
|
||||
int m_CopyREMB4; // 0-OFF, 1-ON
|
||||
|
||||
int m_AutoSave; // 自動セーブ
|
||||
|
||||
int m_QSOMacroFlag; // 0-OFF, 1-ON
|
||||
int m_CheckBand; // 同一バンドでの重複をチェック
|
||||
int m_QSOMacro[5]; // 0-Run 1st, 1-Run 2nd, 2-Run Dupe, 3-S&P 1st, 4-S&P 2nd
|
||||
WORD m_QSOMacroKey[5];
|
||||
AnsiString m_QSOMacroStr[5];
|
||||
|
||||
AnsiString m_THRTTY;
|
||||
AnsiString m_THSSTV;
|
||||
int m_ClipRSTADIF;
|
||||
int m_DateType;
|
||||
int m_THTZ;
|
||||
|
||||
int m_Backup;
|
||||
BYTE m_Hamlog5Len[17];
|
||||
}LOGSET;
|
||||
|
||||
#define MLCALL 16 /* コールサインの長さ */
|
||||
#define MLRST 20 /* RSTナンバの長さ */
|
||||
#define MLREM 56 /* 記事の長さ */
|
||||
#define MLNAME 16 /* 名前の長さ */
|
||||
#define MLQTH 28 /* QTHの長さ */
|
||||
#define MLQSL 54 /* QSLの長さ */
|
||||
#define MLPOW 4 /* 電力 */
|
||||
#define MLOPT 8 /* オプション */
|
||||
|
||||
#define MODEMAX 48
|
||||
|
||||
#define YEAR(c) (((c)<50)?(2000+(c)):(1900+(c)))
|
||||
|
||||
#pragma option -a- // パックの指示
|
||||
typedef struct { /* MMLOGデータ形式 */
|
||||
BYTE year; /* 年 */
|
||||
WORD date; /* 日付 */
|
||||
WORD btime; /* 開始時刻 */
|
||||
WORD etime; /* 終了時刻 */
|
||||
char call[MLCALL+1]; /* コールサイン */
|
||||
char ur[MLRST+1]; /* T リポート */
|
||||
char my[MLRST+1]; /* R リポート */
|
||||
BYTE band; /* バンド */
|
||||
SHORT fq; /* 周波数 */
|
||||
BYTE mode; /* モード */
|
||||
char pow[MLPOW+1]; /* 電力 */
|
||||
char name[MLNAME+1]; /* 名前 */
|
||||
char qth[MLQTH+1]; /* QTH */
|
||||
char qsl[MLQSL+1]; /* QSL */
|
||||
char send; /* QSL 送信 */
|
||||
char recv; /* QSL 受信 */
|
||||
char cq; /* cq/call */
|
||||
WORD env; /* 自局環境 */
|
||||
char rem[MLREM+1]; /* 記事 */
|
||||
char opt1[MLOPT+1]; /* オプション */
|
||||
char opt2[MLOPT+1]; /* オプション2 */
|
||||
}SDMMLOG;
|
||||
|
||||
#define FHDOFF 256 /* 先頭のヘッダのオフセット */
|
||||
#define UMODEMAX 32
|
||||
typedef struct {
|
||||
char id[20]; /* ファイルバージョン */
|
||||
char dmy[4]; /* ダミー領域 */
|
||||
USHORT mlt; /* マルチ情報のサイズ */
|
||||
char td; /* 時差コード */
|
||||
char hash; /* ハッシュデータ格納フラグ */
|
||||
long size; /* データサイズ */
|
||||
char master; /* マスターファイルフラグ */
|
||||
char dm2[15]; /* ダミー2 */
|
||||
char mode[UMODEMAX][6]; /* ユーザ定義モード */
|
||||
}FHD;
|
||||
#pragma option -a. // パック解除の指示
|
||||
|
||||
class CIndex
|
||||
{
|
||||
private:
|
||||
int m_IndexMax; // 確保中のインデックスの数
|
||||
int m_IndexCnt; // 現在のインデックスの数
|
||||
LPSTR pIndex; // インデックス領域のポインタ(16バイトインデックス)
|
||||
BYTE *pMult; // マルチ情報のポインタ
|
||||
public:
|
||||
CIndex();
|
||||
~CIndex();
|
||||
void AllocIndex(int n);
|
||||
void ClearIndex(void);
|
||||
void WriteIndex(LPCSTR pCall, int n);
|
||||
void ReadIndex(LPSTR pCall, int n);
|
||||
LPSTR PointIndex(int n);
|
||||
void AddBlock(LPCSTR p, int len);
|
||||
int ReadIndex(int handle, FHD *hp);
|
||||
void MakeIndex(int handle, FHD *hp);
|
||||
int WriteIndex(int handle, FHD *hp);
|
||||
|
||||
|
||||
};
|
||||
|
||||
#define FINDMAX 32768
|
||||
class CLogFind
|
||||
{
|
||||
public:
|
||||
int m_FindCnt;
|
||||
int m_FindCmp1Max;
|
||||
int m_FindCmp2Max;
|
||||
int m_FindStr1Max;
|
||||
int m_FindStr2Max;
|
||||
|
||||
int *pFindTbl;
|
||||
AnsiString m_FindStr;
|
||||
public:
|
||||
CLogFind();
|
||||
~CLogFind();
|
||||
inline int GetCount(void){return m_FindCnt;};
|
||||
inline void Clear(void){
|
||||
m_FindCnt = m_FindCmp1Max = m_FindCmp2Max = m_FindStr1Max = m_FindStr2Max = 0;
|
||||
};
|
||||
int Add(int n);
|
||||
void Ins(int n);
|
||||
|
||||
inline void Write(int n){
|
||||
pFindTbl[m_FindCnt] = n;
|
||||
m_FindCnt++;
|
||||
};
|
||||
inline void SetText(LPCSTR p){
|
||||
if( p != m_FindStr.c_str() ){
|
||||
m_FindStr = p;
|
||||
}
|
||||
};
|
||||
inline LPCSTR GetText(void){
|
||||
return m_FindStr.c_str();
|
||||
};
|
||||
inline void ClearText(void){
|
||||
m_FindStr = "";
|
||||
};
|
||||
};
|
||||
|
||||
class CLogFile
|
||||
{
|
||||
private:
|
||||
int m_Open; // オープンフラグ
|
||||
int m_EditFlag; // 編集フラグ
|
||||
int m_Handle; // ファイルハンドル
|
||||
CIndex m_Index; // 現在オープン中のインデックス
|
||||
FHD m_fhd; // 現在オープン中のファイルヘッダ
|
||||
AnsiString m_Name; // ログファイルの名前
|
||||
char m_modebuf[8];
|
||||
public:
|
||||
AnsiString m_FileName; // ログファイルの名前(フルパス)
|
||||
|
||||
int m_CurNo;
|
||||
int m_CurChg;
|
||||
SDMMLOG m_sd;
|
||||
SDMMLOG m_bak;
|
||||
SDMMLOG m_asd;
|
||||
|
||||
CLogFind m_Find; // カレント検索データ
|
||||
LOGSET m_LogSet;
|
||||
SYSTEMTIME m_UTC;
|
||||
private:
|
||||
void SetHisRST(SDMMLOG *sp);
|
||||
void InitHeader(void);
|
||||
|
||||
public:
|
||||
CLogFile();
|
||||
~CLogFile();
|
||||
|
||||
void DoBackup(void);
|
||||
int Open(LPCSTR pName, BOOL fNew);
|
||||
int Open(LPCSTR pName){Open(pName, TRUE); return 0;}; //JA7UDE 0428
|
||||
int Close(void);
|
||||
|
||||
void ReadIniFile(LPCSTR pKey, TMemIniFile *pIniFile);
|
||||
void WriteIniFile(LPCSTR pKey, TMemIniFile *pIniFile);
|
||||
|
||||
void MakeIndex(void);
|
||||
|
||||
inline IsEdit(void){return m_EditFlag;};
|
||||
void MakePathName(LPCSTR pName);
|
||||
void MakeName(LPCSTR pName);
|
||||
inline LPCSTR GetName(void){return m_Name.c_str();};
|
||||
|
||||
inline int GetCount(void){return m_fhd.size;};
|
||||
inline int IsOpen(void){return m_Open;};
|
||||
int GetData(SDMMLOG *sp, int n);
|
||||
int PutData(SDMMLOG *sp, int n);
|
||||
|
||||
LPCSTR GetDateString(SDMMLOG *sp, int sw);
|
||||
inline LPCSTR GetDateString(SDMMLOG *sp){ return GetDateString(sp, m_LogSet.m_DateType); };
|
||||
LPCSTR GetTimeString(WORD d);
|
||||
|
||||
|
||||
LPCSTR GetModeString(BYTE m);
|
||||
void SetMode(SDMMLOG *sp, LPCSTR s);
|
||||
|
||||
LPCSTR GetFreqString(BYTE b, short fq);
|
||||
void SetFreq(SDMMLOG *sp, LPCSTR p);
|
||||
LPCSTR GetOptStr(int n, SDMMLOG *sp);
|
||||
void SetOptStr(int n, SDMMLOG *sp, LPCSTR pOpt);
|
||||
|
||||
void CopyAF(void);
|
||||
void SetHisUTC(void);
|
||||
|
||||
void SortDate(int bb, int eb);
|
||||
int FindSameBand(void);
|
||||
|
||||
void FindStrSet(CLogFind *fp, LPCSTR pCall);
|
||||
int FindCmpSet(CLogFind *fp, LPCSTR pCall);
|
||||
int FindClipSet(CLogFind *fp, LPCSTR pCall);
|
||||
int FindSet(CLogFind *fp, LPCSTR pCall);
|
||||
int Find(LPCSTR pCall, int b, int dir);
|
||||
int IsAlready(LPCSTR pCall);
|
||||
void DeleteAll(void);
|
||||
void DeleteLast(void);
|
||||
void Delete(int top, int end);
|
||||
void Insert(int n, SDMMLOG *sp);
|
||||
|
||||
void InitCur(void);
|
||||
void SetLastPos(void);
|
||||
|
||||
int ReadAscii(SDMMLOG *sp, LPSTR p);
|
||||
|
||||
};
|
||||
|
||||
void JSTtoUTC(int &Year, int &Mon, int &Day, int &Hour);
|
||||
void JSTtoUTC(SDMMLOG *sp);
|
||||
void UTCtoJST(int &Year, int &Mon, int &Day, int &Hour);
|
||||
void UTCtoJST(SDMMLOG *sp);
|
||||
void mBandToBand(SDMMLOG *sp, LPCSTR p);
|
||||
LPCSTR FreqTomBand(SDMMLOG *sp);
|
||||
int GetLMode(BYTE m);
|
||||
|
||||
extern CLogFile Log;
|
||||
extern const char MONN[];
|
||||
extern const char MONU[];
|
||||
#endif
|
||||
|
||||
1169
LogList.cpp
Normal file
1169
LogList.cpp
Normal file
File diff suppressed because it is too large
Load diff
BIN
LogList.dfm
Normal file
BIN
LogList.dfm
Normal file
Binary file not shown.
159
LogList.h
Normal file
159
LogList.h
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef LogListH
|
||||
#define LogListH
|
||||
//----------------------------------------------------------------------------
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "LogFile.h"
|
||||
#include <Grids.hpp>
|
||||
#include <Menus.hpp>
|
||||
#include <Dialogs.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TLogListDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TStringGrid *Grid;
|
||||
TMainMenu *MainMenu;
|
||||
TMenuItem *KFile;
|
||||
TMenuItem *KOpen;
|
||||
TOpenDialog *OpenDialog;
|
||||
TMenuItem *KEdit;
|
||||
TMenuItem *KFlush;
|
||||
TMenuItem *KDelCur;
|
||||
TMenuItem *KDelSel;
|
||||
TMenuItem *N1;
|
||||
TMenuItem *KExit;
|
||||
TMenuItem *KFind;
|
||||
TMenuItem *KFindTop;
|
||||
TMenuItem *KFindBottom;
|
||||
TMenuItem *KFindConT;
|
||||
TMenuItem *KFindConB;
|
||||
TMenuItem *N2;
|
||||
TMenuItem *KTop;
|
||||
TMenuItem *KBottom;
|
||||
TMenuItem *N3;
|
||||
TMenuItem *KSortDate;
|
||||
TMenuItem *KInsCur;
|
||||
TMenuItem *N4;
|
||||
TMenuItem *N5;
|
||||
TMenuItem *KMTextRead;
|
||||
TMenuItem *KMTextWrite;
|
||||
TSaveDialog *SaveDialog;
|
||||
TMenuItem *KSelAll;
|
||||
TMenuItem *KHelp;
|
||||
TMenuItem *KHlpLog;
|
||||
TMenuItem *N6;
|
||||
TMenuItem *KReIndex;
|
||||
TMenuItem *N7;
|
||||
TMenuItem *KExport;
|
||||
TMenuItem *KExportText;
|
||||
TMenuItem *KImport;
|
||||
TMenuItem *KImportText;
|
||||
TMenuItem *KImportLog200;
|
||||
TMenuItem *KExportLog200;
|
||||
TMenuItem *KImportHamlog;
|
||||
TMenuItem *KExportHamlog;
|
||||
TMenuItem *KLogOpt;
|
||||
TMenuItem *KOpt;
|
||||
TMenuItem *KExportADIF;
|
||||
TMenuItem *KImportADIF;
|
||||
TMenuItem *KExportCabrillo;
|
||||
void __fastcall GridDrawCell(TObject *Sender, int Col, int Row,
|
||||
TRect &Rect, TGridDrawState State);
|
||||
|
||||
void __fastcall GridKeyPress(TObject *Sender, char &Key);
|
||||
void __fastcall KOpenClick(TObject *Sender);
|
||||
void __fastcall KFlushClick(TObject *Sender);
|
||||
void __fastcall KDelCurClick(TObject *Sender);
|
||||
void __fastcall KDelSelClick(TObject *Sender);
|
||||
void __fastcall KExitClick(TObject *Sender);
|
||||
void __fastcall KFindTopClick(TObject *Sender);
|
||||
void __fastcall KFindBottomClick(TObject *Sender);
|
||||
void __fastcall KTopClick(TObject *Sender);
|
||||
void __fastcall KBottomClick(TObject *Sender);
|
||||
void __fastcall KSortDateClick(TObject *Sender);
|
||||
|
||||
void __fastcall GridDblClick(TObject *Sender);
|
||||
void __fastcall KInsCurClick(TObject *Sender);
|
||||
void __fastcall KMTextReadClick(TObject *Sender);
|
||||
void __fastcall KMTextWriteClick(TObject *Sender);
|
||||
void __fastcall KSelAllClick(TObject *Sender);
|
||||
void __fastcall KHlpLogClick(TObject *Sender);
|
||||
void __fastcall KReIndexClick(TObject *Sender);
|
||||
|
||||
void __fastcall KExportTextClick(TObject *Sender);
|
||||
void __fastcall KImportTextClick(TObject *Sender);
|
||||
void __fastcall KExportLog200Click(TObject *Sender);
|
||||
void __fastcall KImportLog200Click(TObject *Sender);
|
||||
void __fastcall KImportHamlogClick(TObject *Sender);
|
||||
void __fastcall KExportHamlogClick(TObject *Sender);
|
||||
void __fastcall KLogOptClick(TObject *Sender);
|
||||
void __fastcall KExportADIFClick(TObject *Sender);
|
||||
void __fastcall KImportADIFClick(TObject *Sender);
|
||||
void __fastcall KExportCabrilloClick(TObject *Sender);
|
||||
private:
|
||||
void __fastcall AdjustTopRow(void);
|
||||
void __fastcall UpdateLogCount(int sw);
|
||||
void __fastcall UpdateMenu(void);
|
||||
void __fastcall OnIdle(TObject *Sender, bool &Done);
|
||||
|
||||
int __fastcall SureRead(void);
|
||||
|
||||
void __fastcall LoadMmlogText(LPCSTR pName);
|
||||
void __fastcall SaveMmlogText(LPCSTR pName);
|
||||
int __fastcall LoadText(LPCSTR pName);
|
||||
int __fastcall SaveText(LPCSTR pName);
|
||||
int __fastcall LoadLog200(LPCSTR pName);
|
||||
int __fastcall SaveLog200(LPCSTR pName);
|
||||
int __fastcall LoadHamLog(LPCSTR pName);
|
||||
int __fastcall SaveHamLog(LPCSTR pName);
|
||||
int __fastcall LoadHamLog5(LPCSTR pName);
|
||||
int __fastcall SaveHamLog5(LPCSTR pName);
|
||||
|
||||
int __fastcall LoadADIF(LPCSTR pName);
|
||||
int __fastcall SaveADIF(LPCSTR pName);
|
||||
|
||||
int __fastcall SaveCabrillo(LPCSTR pName);
|
||||
|
||||
AnsiString m_FindCall;
|
||||
|
||||
void __fastcall SetTimeZone(void);
|
||||
AnsiString m_TimeZone;
|
||||
int m_DateWidth;
|
||||
public:
|
||||
virtual __fastcall TLogListDlg(TComponent* AOwner);
|
||||
|
||||
void __fastcall TLogListDlg::Execute(void);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TLogListDlg *LogListDlg;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
337
LogSet.cpp
Normal file
337
LogSet.cpp
Normal file
|
|
@ -0,0 +1,337 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "LogSet.h"
|
||||
#include "EditDlg.h"
|
||||
#include "country.h"
|
||||
#include "Loglink.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TLogSetDlg *LogSetDlg;
|
||||
static int PageIndex = 0;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TLogSetDlg::TLogSetDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
m_DisEvent = TRUE;
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
TabConv->Caption = "Conversion";
|
||||
TabMisc->Caption = "Misc";
|
||||
CancelBtn->Caption = "Cancel";
|
||||
Caption = "Setup Logging";
|
||||
TabFlag->Caption = "Input";
|
||||
TabMacro->Caption = "QSO Button";
|
||||
GrpConv->Caption = "Convert UpperCase";
|
||||
GrpCopy->Caption = "Copy Before Data";
|
||||
CopyFreq->Caption = "Copy Band or Freq.";
|
||||
CopyFreq->Items->Strings[0] = "Copy Band";
|
||||
CopyFreq->Items->Strings[1] = "Copy Freq.";
|
||||
DefMyRST->Caption = "599 Default";
|
||||
CBBackup->Caption = "Make backup";
|
||||
|
||||
MacroFlag->Caption = "Auto Macro";
|
||||
CheckBand->Caption = "Check SameBand";
|
||||
AutoZone->Caption = "Ignore daylight saving";
|
||||
CBRemC->Visible = FALSE;
|
||||
GB9->Caption = "Mode";
|
||||
}
|
||||
if( lcid == LANG_KOREAN ){
|
||||
TimeZone->Items->Strings[0] = "Korea";
|
||||
}
|
||||
else {
|
||||
TimeZone->Items->Strings[0] = "Japan";
|
||||
}
|
||||
SBHelp->Visible = !JanHelp.IsEmpty();
|
||||
|
||||
m_MMList.QueryList("MML");
|
||||
for( int i = 0; i < m_MMList.GetCount(); i++ ){
|
||||
CBMMLink->Items->Add(m_MMList.GetItemName(i));
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::UpdateUI(void)
|
||||
{
|
||||
int f = !AutoZone->Checked;
|
||||
TimeOff->Enabled = f;
|
||||
MinOff->Enabled = f;
|
||||
UDOffset->Enabled = f;
|
||||
UDMin->Enabled = f;
|
||||
ClearOff->Enabled = f;
|
||||
CBPoll->Enabled = RGLink->ItemIndex;
|
||||
CBMMLink->Enabled = (RGLink->ItemIndex == 2) ? TRUE : FALSE;
|
||||
LT->Enabled = CBMMLink->Enabled;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TLogSetDlg::Execute(void)
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < 5; i++ ){
|
||||
m_MacroStr[i] = Log.m_LogSet.m_QSOMacroStr[i];
|
||||
m_MacroKey[i] = Log.m_LogSet.m_QSOMacroKey[i];
|
||||
}
|
||||
UpperName->Checked = Log.m_LogSet.m_UpperName;
|
||||
UpperQTH->Checked = Log.m_LogSet.m_UpperQTH;
|
||||
UpperREM->Checked = Log.m_LogSet.m_UpperREM;
|
||||
UpperQSL->Checked = Log.m_LogSet.m_UpperQSL;
|
||||
|
||||
DefMyRST->Checked = Log.m_LogSet.m_DefMyRST;
|
||||
Contest->ItemIndex = Log.m_LogSet.m_Contest;
|
||||
|
||||
CopyFreq->ItemIndex = Log.m_LogSet.m_CopyFreq;
|
||||
CopyHis->ItemIndex = Log.m_LogSet.m_CopyHis;
|
||||
CopyName->Checked = Log.m_LogSet.m_CopyName;
|
||||
CopyQTH->Checked = Log.m_LogSet.m_CopyQTH;
|
||||
CopyREM->Checked = Log.m_LogSet.m_CopyREM;
|
||||
CopyQSL->Checked = Log.m_LogSet.m_CopyQSL;
|
||||
CBRemC->Checked = Log.m_LogSet.m_CopyREMB4;
|
||||
CBBackup->Checked = Log.m_LogSet.m_Backup;
|
||||
|
||||
if( Log.m_LogSet.m_TimeZone != 'I' ){
|
||||
TimeZone->ItemIndex = 1;
|
||||
}
|
||||
else {
|
||||
TimeZone->ItemIndex = 0;
|
||||
}
|
||||
AutoSave->Checked = Log.m_LogSet.m_AutoSave;
|
||||
MacroFlag->Checked = Log.m_LogSet.m_QSOMacroFlag;
|
||||
CheckBand->Checked = Log.m_LogSet.m_CheckBand;
|
||||
Macro1->Checked = Log.m_LogSet.m_QSOMacro[0];
|
||||
Macro2->Checked = Log.m_LogSet.m_QSOMacro[1];
|
||||
Macro3->Checked = Log.m_LogSet.m_QSOMacro[2];
|
||||
Macro4->Checked = Log.m_LogSet.m_QSOMacro[3];
|
||||
Macro5->Checked = Log.m_LogSet.m_QSOMacro[4];
|
||||
|
||||
THRTTY->Text = Log.m_LogSet.m_THRTTY;
|
||||
THSSTV->Text = Log.m_LogSet.m_THSSTV;
|
||||
THTZ->ItemIndex = Log.m_LogSet.m_THTZ;
|
||||
ClipRSTADIF->Checked = Log.m_LogSet.m_ClipRSTADIF;
|
||||
DateType->ItemIndex = Log.m_LogSet.m_DateType;
|
||||
AutoZone->Checked = sys.m_AutoTimeOffset;
|
||||
UDOffset->Position = short(sys.m_TimeOffset);
|
||||
UDMin->Position = short(sys.m_TimeOffsetMin);
|
||||
RGLink->ItemIndex = sys.m_LogLink;
|
||||
CBPoll->Checked = LogLink.IsPolling();
|
||||
CBPTT->Checked = LogLink.GetPTTEnabled();
|
||||
CBMMLink->ItemIndex = CBMMLink->Items->IndexOf(LogLink.GetItemName());
|
||||
if( m_MMList.GetCount() ){
|
||||
RGLink->Controls[2]->Enabled = TRUE;
|
||||
if( CBMMLink->ItemIndex < 0 ){
|
||||
CBMMLink->ItemIndex = 0;
|
||||
}
|
||||
}
|
||||
else {
|
||||
RGLink->Controls[2]->Enabled = FALSE;
|
||||
}
|
||||
|
||||
if( (PageIndex >= 0) && (PageIndex < Page->PageCount) ){
|
||||
if( Page->Pages[PageIndex]->TabVisible == FALSE ){
|
||||
PageIndex = 0;
|
||||
}
|
||||
Page->ActivePage = Page->Pages[PageIndex];
|
||||
}
|
||||
int r = FALSE;
|
||||
UpdateUI();
|
||||
m_DisEvent = FALSE;
|
||||
if( ShowModal() == IDOK ){
|
||||
Log.m_LogSet.m_UpperName = UpperName->Checked;
|
||||
Log.m_LogSet.m_UpperQTH = UpperQTH->Checked;
|
||||
Log.m_LogSet.m_UpperREM = UpperREM->Checked;
|
||||
Log.m_LogSet.m_UpperQSL = UpperQSL->Checked;
|
||||
|
||||
Log.m_LogSet.m_DefMyRST = DefMyRST->Checked;
|
||||
Log.m_LogSet.m_Contest = Contest->ItemIndex;
|
||||
|
||||
Log.m_LogSet.m_CopyFreq = CopyFreq->ItemIndex;
|
||||
Log.m_LogSet.m_CopyHis = CopyHis->ItemIndex;
|
||||
Log.m_LogSet.m_CopyName = CopyName->Checked;
|
||||
Log.m_LogSet.m_CopyQTH = CopyQTH->Checked;
|
||||
Log.m_LogSet.m_CopyREM = CopyREM->Checked;
|
||||
Log.m_LogSet.m_CopyQSL = CopyQSL->Checked;
|
||||
Log.m_LogSet.m_CopyREMB4 = ( Font->Charset != SHIFTJIS_CHARSET ) ? 0 : CBRemC->Checked;
|
||||
Log.m_LogSet.m_Backup = CBBackup->Checked;
|
||||
|
||||
if( TimeZone->ItemIndex ){
|
||||
Log.m_LogSet.m_TimeZone = 'Z';
|
||||
}
|
||||
else {
|
||||
Log.m_LogSet.m_TimeZone = 'I';
|
||||
}
|
||||
|
||||
Log.m_LogSet.m_AutoSave = AutoSave->Checked;
|
||||
Log.m_LogSet.m_QSOMacroFlag = MacroFlag->Checked;
|
||||
Log.m_LogSet.m_CheckBand = CheckBand->Checked;
|
||||
Log.m_LogSet.m_QSOMacro[0] = Macro1->Checked;
|
||||
Log.m_LogSet.m_QSOMacro[1] = Macro2->Checked;
|
||||
Log.m_LogSet.m_QSOMacro[2] = Macro3->Checked;
|
||||
Log.m_LogSet.m_QSOMacro[3] = Macro4->Checked;
|
||||
Log.m_LogSet.m_QSOMacro[4] = Macro5->Checked;
|
||||
|
||||
for( i = 0; i < 5; i++ ){
|
||||
Log.m_LogSet.m_QSOMacroStr[i] = m_MacroStr[i];
|
||||
Log.m_LogSet.m_QSOMacroKey[i] = m_MacroKey[i];
|
||||
}
|
||||
Log.m_LogSet.m_THRTTY = THRTTY->Text;
|
||||
Log.m_LogSet.m_THSSTV = THSSTV->Text;
|
||||
Log.m_LogSet.m_THTZ = THTZ->ItemIndex;
|
||||
Log.m_LogSet.m_ClipRSTADIF = ClipRSTADIF->Checked;
|
||||
Log.m_LogSet.m_DateType = DateType->ItemIndex;
|
||||
|
||||
sys.m_AutoTimeOffset = AutoZone->Checked;
|
||||
sys.m_TimeOffset = UDOffset->Position;
|
||||
sys.m_TimeOffsetMin = UDMin->Position;
|
||||
if( sys.m_AutoTimeOffset ){
|
||||
SetTimeOffsetInfo(sys.m_TimeOffset, sys.m_TimeOffsetMin);
|
||||
}
|
||||
sys.m_LogLink = RGLink->ItemIndex;
|
||||
LogLink.SetPolling(CBPoll->Checked);
|
||||
LogLink.SetPTTEnabled(CBPTT->Checked);
|
||||
if( CBMMLink->ItemIndex >= 0 ){
|
||||
LogLink.SetItemName(AnsiString(CBMMLink->Items->Strings[CBMMLink->ItemIndex]).c_str()); //JA7UDE 0428
|
||||
}
|
||||
r = TRUE;
|
||||
}
|
||||
for( PageIndex = 0; PageIndex < Page->PageCount; PageIndex++ ){
|
||||
if( Page->ActivePage == Page->Pages[PageIndex] ) break;
|
||||
}
|
||||
return r;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::MacroBtnClick(int n)
|
||||
{
|
||||
if( n >= 0 ){
|
||||
TEditDlgBox *pBox = new TEditDlgBox(this);
|
||||
pBox->ButtonName->Text = "";
|
||||
pBox->Execute(m_MacroStr[n], m_MacroKey[n], NULL, NULL, 2);
|
||||
delete pBox;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::MacroBtn1Click(TObject *Sender)
|
||||
{
|
||||
MacroBtnClick(0);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::MacroBtn2Click(TObject *Sender)
|
||||
{
|
||||
MacroBtnClick(1);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::MacroBtn3Click(TObject *Sender)
|
||||
{
|
||||
MacroBtnClick(2);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::MacroBtn4Click(TObject *Sender)
|
||||
{
|
||||
MacroBtnClick(3);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::MacroBtn5Click(TObject *Sender)
|
||||
{
|
||||
MacroBtnClick(4);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::ClearOffClick(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
UDOffset->Position = 0;
|
||||
UDMin->Position = 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::AutoZoneClick(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
if( AutoZone->Checked ){
|
||||
int hour, min;
|
||||
SetTimeOffsetInfo(hour, min);
|
||||
UDOffset->Position = short(hour);
|
||||
UDMin->Position = short(min);
|
||||
}
|
||||
UpdateUI();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::SBHelpClick(TObject *Sender)
|
||||
{
|
||||
#if 1
|
||||
ShowHtmlHelp("logging.htm");
|
||||
#else
|
||||
int n;
|
||||
|
||||
if( Page->ActivePage == TabMacro ){
|
||||
n = 20;
|
||||
}
|
||||
else {
|
||||
n = 18;
|
||||
}
|
||||
ShowHelp(n);
|
||||
#endif
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::ContestClick(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
m_DisEvent++;
|
||||
switch(Contest->ItemIndex){
|
||||
case testOFF:
|
||||
CopyHis->ItemIndex = 0;
|
||||
DefMyRST->Checked = FALSE;
|
||||
MacroFlag->Checked = FALSE;
|
||||
break;
|
||||
case testON:
|
||||
CopyHis->ItemIndex = 1;
|
||||
DefMyRST->Checked = TRUE;
|
||||
MacroFlag->Checked = TRUE;
|
||||
break;
|
||||
case testCQRJ:
|
||||
CopyHis->ItemIndex = 0;
|
||||
DefMyRST->Checked = TRUE;
|
||||
MacroFlag->Checked = TRUE;
|
||||
break;
|
||||
case testPED:
|
||||
CopyHis->ItemIndex = 0;
|
||||
DefMyRST->Checked = TRUE;
|
||||
MacroFlag->Checked = TRUE;
|
||||
break;
|
||||
case testBARTG:
|
||||
CopyHis->ItemIndex = 2;
|
||||
DefMyRST->Checked = TRUE;
|
||||
MacroFlag->Checked = TRUE;
|
||||
break;
|
||||
}
|
||||
m_DisEvent--;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TLogSetDlg::RGLinkClick(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
BIN
LogSet.dfm
Normal file
BIN
LogSet.dfm
Normal file
Binary file not shown.
138
LogSet.h
Normal file
138
LogSet.h
Normal file
|
|
@ -0,0 +1,138 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef LogSetH
|
||||
#define LogSetH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <ComCtrls.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "LogFile.h"
|
||||
#include "MMLink.h"
|
||||
//----------------------------------------------------------------------------
|
||||
class TLogSetDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TPageControl *Page;
|
||||
TTabSheet *TabFlag;
|
||||
TGroupBox *GrpConv;
|
||||
TCheckBox *UpperName;
|
||||
TCheckBox *UpperQTH;
|
||||
TCheckBox *UpperREM;
|
||||
TCheckBox *UpperQSL;
|
||||
TGroupBox *GrpCopy;
|
||||
TCheckBox *CopyName;
|
||||
TCheckBox *CopyQTH;
|
||||
TCheckBox *CopyREM;
|
||||
TCheckBox *CopyQSL;
|
||||
TTabSheet *TabMacro;
|
||||
TCheckBox *MacroFlag;
|
||||
TGroupBox *GroupBox3;
|
||||
TGroupBox *GroupBox4;
|
||||
TCheckBox *Macro1;
|
||||
TCheckBox *Macro2;
|
||||
TCheckBox *Macro3;
|
||||
TCheckBox *Macro4;
|
||||
TCheckBox *Macro5;
|
||||
TButton *MacroBtn1;
|
||||
TButton *MacroBtn2;
|
||||
TButton *MacroBtn3;
|
||||
TButton *MacroBtn4;
|
||||
TButton *MacroBtn5;
|
||||
TCheckBox *CheckBand;
|
||||
TRadioGroup *CopyHis;
|
||||
TRadioGroup *CopyFreq;
|
||||
TGroupBox *GroupBox5;
|
||||
TCheckBox *DefMyRST;
|
||||
TRadioGroup *TimeZone;
|
||||
TRadioGroup *Contest;
|
||||
TLabel *Label1;
|
||||
TTabSheet *TabConv;
|
||||
TGroupBox *GroupBox1;
|
||||
TGroupBox *GroupBox2;
|
||||
TCheckBox *ClipRSTADIF;
|
||||
TTabSheet *TabMisc;
|
||||
TGroupBox *GTime;
|
||||
TEdit *TimeOff;
|
||||
TUpDown *UDOffset;
|
||||
TRadioGroup *DateType;
|
||||
TEdit *MinOff;
|
||||
TUpDown *UDMin;
|
||||
TLabel *Label4;
|
||||
TLabel *Label5;
|
||||
TButton *ClearOff;
|
||||
TCheckBox *AutoSave;
|
||||
TCheckBox *AutoZone;
|
||||
TSpeedButton *SBHelp;
|
||||
TCheckBox *CBRemC;
|
||||
TGroupBox *GB6;
|
||||
TRadioGroup *RGLink;
|
||||
TCheckBox *CBPoll;
|
||||
TRadioGroup *THTZ;
|
||||
TComboBox *CBMMLink;
|
||||
TLabel *LT;
|
||||
TCheckBox *CBBackup;
|
||||
TCheckBox *CBPTT;
|
||||
TGroupBox *GB9;
|
||||
TLabel *Label2;
|
||||
TLabel *Label3;
|
||||
TEdit *THRTTY;
|
||||
TEdit *THSSTV;
|
||||
void __fastcall MacroBtn1Click(TObject *Sender);
|
||||
void __fastcall MacroBtn2Click(TObject *Sender);
|
||||
void __fastcall MacroBtn3Click(TObject *Sender);
|
||||
void __fastcall MacroBtn4Click(TObject *Sender);
|
||||
void __fastcall MacroBtn5Click(TObject *Sender);
|
||||
void __fastcall ClearOffClick(TObject *Sender);
|
||||
void __fastcall AutoZoneClick(TObject *Sender);
|
||||
void __fastcall SBHelpClick(TObject *Sender);
|
||||
void __fastcall ContestClick(TObject *Sender);
|
||||
void __fastcall RGLinkClick(TObject *Sender);
|
||||
private:
|
||||
int m_DisEvent;
|
||||
AnsiString m_MacroStr[5];
|
||||
WORD m_MacroKey[5];
|
||||
CMMList m_MMList;
|
||||
|
||||
void __fastcall MacroBtnClick(int n);
|
||||
void __fastcall UpdateUI(void);
|
||||
|
||||
public:
|
||||
virtual __fastcall TLogSetDlg(TComponent* AOwner);
|
||||
|
||||
int __fastcall Execute(void);
|
||||
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TLogSetDlg *LogSetDlg;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
864
Loglink.cpp
Normal file
864
Loglink.cpp
Normal file
|
|
@ -0,0 +1,864 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#define MMSSTV 0 // MMTTYでは0
|
||||
#if MMSSTV
|
||||
#include "Main.h"
|
||||
#endif
|
||||
|
||||
#include "LogLink.h"
|
||||
CLogLink LogLink;
|
||||
//---------------------------------------------------------------------------
|
||||
// CLogLinkクラス
|
||||
CLogLink::CLogLink()
|
||||
{
|
||||
m_Enabled = FALSE;
|
||||
m_Count = m_Count2 = 0;
|
||||
m_hLog = NULL;
|
||||
m_hLogIn = NULL;
|
||||
m_CStat = 0;
|
||||
m_hApp = NULL;
|
||||
m_hMain = NULL;
|
||||
m_Error = 0;
|
||||
m_1stSession = TRUE;
|
||||
m_fHLV5 = TRUE;
|
||||
|
||||
m_Polling = 1;
|
||||
m_PTTEnabled = FALSE;
|
||||
|
||||
m_AStat = FALSE;
|
||||
m_MMStat = FALSE;
|
||||
m_pLink = NULL;
|
||||
m_strMode[0] = 0;
|
||||
}
|
||||
|
||||
CLogLink::~CLogLink()
|
||||
{
|
||||
CloseMMLink();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CLogLink::CloseMMLink(void)
|
||||
{
|
||||
if( m_pLink != NULL ){
|
||||
delete m_pLink;
|
||||
m_pLink = NULL;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// 送信用ウインドウハンドルの設定
|
||||
void CLogLink::SetHandle(HWND hMain, UINT uMsg)
|
||||
{
|
||||
m_hMain = hMain;
|
||||
m_uMsg = uMsg;
|
||||
m_hApp = Application->Handle;
|
||||
if( m_pLink == NULL ) return;
|
||||
m_pLink->SetHandle(hMain, uMsg);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BOOL __fastcall CLogLink::IsLink(void)
|
||||
{
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
return m_hLog != NULL ? TRUE : FALSE;
|
||||
case 2:
|
||||
return m_MMStat;
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
LPCSTR __fastcall CLogLink::GetSessionName(void)
|
||||
{
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
// return "Turbo HAMLOG/Win";
|
||||
return m_AppName.c_str();
|
||||
case 2:
|
||||
if( m_pLink == NULL ) return NULL;
|
||||
return m_pLink->GetSessionName();
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// リンクの許可設定
|
||||
void CLogLink::UpdateLink(int sw)
|
||||
{
|
||||
if( (m_Enabled != sw) ||
|
||||
((m_pLink != NULL) && strcmp(m_ItemName.c_str(), m_pLink->GetItemName()) )
|
||||
){
|
||||
m_Enabled = sw;
|
||||
switch(sw){
|
||||
case 0:
|
||||
m_hLog = NULL;
|
||||
m_hLogIn = NULL;
|
||||
CloseMMLink();
|
||||
break;
|
||||
case 1:
|
||||
m_Count = 0;
|
||||
m_Error = 0;
|
||||
CloseMMLink();
|
||||
break;
|
||||
case 2:
|
||||
m_Count = 0;
|
||||
m_Error = 0;
|
||||
if( !m_pLink ){
|
||||
m_pLink = new CMMLink(m_hMain, m_uMsg);
|
||||
}
|
||||
m_pLink->Open(m_ItemName.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// コールサインを分離
|
||||
static void DevCall(AnsiString &CALL, AnsiString &PTB, LPCSTR pCall)
|
||||
{
|
||||
char bf[1024];
|
||||
|
||||
CALL = "";
|
||||
PTB = "";
|
||||
strcpy(bf, pCall);
|
||||
LPSTR pp, p2, t;
|
||||
t = bf;
|
||||
if( (pp = strchr(bf, '/')) != NULL ){ // KH6/JE3HHT or JE3HHT/KH6 の形式
|
||||
*pp = 0;
|
||||
pp++;
|
||||
int LenC = strlen(t);
|
||||
int LenP = strlen(pp);
|
||||
if( ((p2 = strchr(pp, '/')) != NULL)||
|
||||
(LenC > 7) ||
|
||||
(LenP > 7) ||
|
||||
((LenC > LenP) && (LenP>3)) ||
|
||||
((LenC < LenP) && (LenC>3))
|
||||
){
|
||||
// HAMLOGでは表現できない表記の場合
|
||||
if( p2 != NULL ){
|
||||
*p2 = 0;
|
||||
LenP = strlen(pp);
|
||||
}
|
||||
}
|
||||
if( LenC < LenP ){
|
||||
p2 = t;
|
||||
t = pp;
|
||||
pp = p2;
|
||||
}
|
||||
PTB = pp;
|
||||
}
|
||||
CALL = t;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
static void __fastcall SetHamlogMode(LPSTR bf)
|
||||
{
|
||||
if( !strcmp(bf, "RTTY") ){
|
||||
StrCopy(bf, Log.m_LogSet.m_THRTTY.c_str(), 3);
|
||||
}
|
||||
else if( !strcmp(bf, "SSTV") ){
|
||||
StrCopy(bf, Log.m_LogSet.m_THSSTV.c_str(), 3);
|
||||
}
|
||||
else if( !strcmp(bf, "GMSK") ){
|
||||
strcpy(bf, "MSK");
|
||||
}
|
||||
else if( !strcmp(bf, "FSTV") ){
|
||||
strcpy(bf, "FTV");
|
||||
}
|
||||
else if( !strcmp(bf, "BPSK") ){
|
||||
strcpy(bf, "PSK");
|
||||
}
|
||||
else if( !strcmp(bf, "QPSK") ){
|
||||
strcpy(bf, "PSK");
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// MM -> HamLog フォーマットの一括変換
|
||||
static void MMtoHAMLOG(LPSTR tp, SDMMLOG *sp, BOOL fHLV5)
|
||||
{
|
||||
char bf[512];
|
||||
|
||||
AnsiString DATE;
|
||||
AnsiString TIME;
|
||||
|
||||
int CallOrder = FALSE;
|
||||
|
||||
if( sp->btime ){
|
||||
int YY = sp->year;
|
||||
int MM = sp->date / 100;
|
||||
int DD = sp->date % 100;
|
||||
int tim = sp->btime / 30;
|
||||
int HH = tim / 60;
|
||||
int mm = tim % 60;
|
||||
char tz = 'J';
|
||||
switch(Log.m_LogSet.m_THTZ){
|
||||
case 0:
|
||||
if( !IsJA(sp->call) ){
|
||||
JSTtoUTC(YY, MM, DD, HH);
|
||||
tz = 'U';
|
||||
}
|
||||
break;
|
||||
case 1:
|
||||
JSTtoUTC(YY, MM, DD, HH);
|
||||
tz = 'U';
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
sprintf(bf, "%02u/%02u/%02u", YY, MM, DD);
|
||||
DATE = bf;
|
||||
sprintf(bf, "%02u:%02u%c", HH, mm, tz);
|
||||
TIME = bf;
|
||||
}
|
||||
|
||||
AnsiString NAME = sp->name;
|
||||
AnsiString QTH = sp->qth;
|
||||
AnsiString REM1 = sp->rem;
|
||||
AnsiString REM2 = sp->qsl;
|
||||
|
||||
AnsiString CALL;
|
||||
AnsiString PTB;
|
||||
|
||||
if( fHLV5 ){ // Ver 5.00以降
|
||||
CALL = sp->call;
|
||||
}
|
||||
else { // Ver 4.xx
|
||||
strcpy(bf, sp->call);
|
||||
LPSTR pp, p2, t;
|
||||
t = bf;
|
||||
if( (pp = strchr(bf, '/')) != NULL ){ // KH6/JE3HHT or JE3HHT/KH6 の形式
|
||||
*pp = 0;
|
||||
pp++;
|
||||
int LenC = strlen(t);
|
||||
int LenP = strlen(pp);
|
||||
if( ((p2 = strchr(pp, '/')) != NULL)||
|
||||
(LenC > 7) ||
|
||||
(LenP > 7) ||
|
||||
((LenC > LenP) && (LenP>3)) ||
|
||||
((LenC < LenP) && (LenC>3))
|
||||
){
|
||||
// HAMLOGでは表現できない表記の場合
|
||||
AddMMLOGKey(REM1, REM2, sp->call, "ToRadio");
|
||||
if( p2 != NULL ){
|
||||
*p2 = 0;
|
||||
LenP = strlen(pp);
|
||||
}
|
||||
}
|
||||
if( LenC < LenP ){
|
||||
p2 = t;
|
||||
t = pp;
|
||||
pp = p2;
|
||||
CallOrder = TRUE;
|
||||
}
|
||||
PTB = pp;
|
||||
}
|
||||
else if( strlen(t) > 7 ){
|
||||
AddMMLOGKey(REM1, REM2, sp->call, "ToRadio");
|
||||
}
|
||||
CALL = t;
|
||||
}
|
||||
strcpy(bf, Log.GetModeString(sp->mode));
|
||||
if( !fHLV5 ){
|
||||
SetHamlogMode(bf);
|
||||
}
|
||||
AnsiString MODE = bf;
|
||||
|
||||
AnsiString HIS, MY;
|
||||
int l = GetLMode(sp->mode);
|
||||
if( fHLV5 ){
|
||||
HIS = sp->ur;
|
||||
MY = sp->my;
|
||||
}
|
||||
else {
|
||||
strcpy(bf, sp->ur);
|
||||
bf[l] = 0;
|
||||
HIS = bf;
|
||||
strcpy(bf, sp->my);
|
||||
bf[l] = 0;
|
||||
MY = bf;
|
||||
}
|
||||
if( sp->ur[l] ) AddMMLOGKey(REM1, REM2, &sp->ur[l], "SN");
|
||||
if( sp->my[l] ) AddMMLOGKey(REM1, REM2, &sp->my[l], "RN");
|
||||
|
||||
strcpy(bf, Log.GetFreqString(sp->band, sp->fq));
|
||||
AnsiString FREQ = bf;
|
||||
|
||||
if( !fHLV5 ){
|
||||
if( CallOrder && (!strstr(sp->rem, "$DX")) && (!strstr(sp->qsl, "$DX")) ){
|
||||
AddMMLOGKey(REM1, REM2, "$DX", NULL);
|
||||
}
|
||||
}
|
||||
|
||||
if( sp->etime ){
|
||||
int tim = sp->etime / 30;
|
||||
sprintf(bf, "%02u%02u", tim / 60, tim % 60);
|
||||
AddMMLOGKey(REM1, REM2, bf, "END");
|
||||
}
|
||||
if( sp->env ){
|
||||
sprintf(bf, "%u", sp->env);
|
||||
AddMMLOGKey(REM1, REM2, bf, "ENV");
|
||||
}
|
||||
AddMMLOGKey(REM1, REM2, sp->pow, "POW");
|
||||
if( sp->cq ){
|
||||
bf[0] = sp->cq; bf[1] = 0;
|
||||
AddMMLOGKey(REM1, REM2, bf, "M");
|
||||
}
|
||||
AnsiString CODE;
|
||||
if( (strlen(sp->opt1) >= 3) && isdigit(sp->opt1[0]) && isdigit(sp->opt1[1]) ){
|
||||
CODE = sp->opt1;
|
||||
}
|
||||
sprintf(bf, "%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n%s\r\n",
|
||||
CALL.c_str(), PTB.c_str(), DATE.c_str(), TIME.c_str(),
|
||||
HIS.c_str(), MY.c_str(), FREQ.c_str(), MODE.c_str(), CODE.c_str(), "", "",
|
||||
NAME.c_str(), QTH.c_str(), REM1.c_str(), REM2.c_str()
|
||||
);
|
||||
strcpy(tp, bf);
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// ウインドウフォーカスを自身に戻す
|
||||
void CLogLink::Foreground(void)
|
||||
{
|
||||
if( m_Enabled != 1 ) return;
|
||||
|
||||
::SetWindowPos(m_hApp, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
|
||||
::SetFocus(m_hApp);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// ログのリンクのチェック
|
||||
BOOL CLogLink::CheckLink(void)
|
||||
{
|
||||
if( m_Error ) return FALSE;
|
||||
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
{
|
||||
HWND hLog = ::FindWindow("TThwin", NULL);
|
||||
if( hLog != m_hLog ){
|
||||
if( hLog ){
|
||||
m_AppVer = 0;
|
||||
char bf[128];
|
||||
LPSTR p;
|
||||
::GetWindowText(hLog, bf, sizeof(bf));
|
||||
clipsp(bf);
|
||||
m_AppName = bf;
|
||||
if( (p = strstr(bf, "Ver")) != NULL ){
|
||||
p += 3;
|
||||
LPSTR t;
|
||||
for( t = p; *t; t++ ){
|
||||
if( (*t != '.') && !isdigit(*t) ) break;
|
||||
}
|
||||
*t = 0;
|
||||
double d;
|
||||
if( sscanf(p, "%lf", &d) == 1 ){
|
||||
m_AppVer = d * 100;
|
||||
}
|
||||
}
|
||||
else {
|
||||
m_Count = 1000/LINKINTERVAL;
|
||||
return FALSE;
|
||||
}
|
||||
m_fHLV5 = (m_AppVer >= 500);
|
||||
}
|
||||
m_hLog = hLog;
|
||||
m_CStat = TRUE;
|
||||
}
|
||||
return m_hLog != NULL ? TRUE : FALSE;
|
||||
}
|
||||
case 2:
|
||||
{
|
||||
if( m_pLink == NULL ) return FALSE;
|
||||
m_MMStat = m_pLink->IsConnected();
|
||||
if( m_MMStat != m_AStat ){
|
||||
m_AStat = m_MMStat;
|
||||
m_CStat = TRUE;
|
||||
}
|
||||
return m_MMStat;
|
||||
}
|
||||
default:
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// 定期的なログのリンクの監視(200ms毎にコール)
|
||||
BOOL CLogLink::TimerLogLink(void)
|
||||
{
|
||||
if( !m_Enabled ) return FALSE;
|
||||
|
||||
if( !m_Count ){
|
||||
m_Count = 5000/LINKINTERVAL; // 5[s]毎のチェック
|
||||
BOOL f = m_hLog != NULL;
|
||||
CheckLink();
|
||||
if( m_hLog && !f ) m_1stSession = TRUE;
|
||||
}
|
||||
m_Count--;
|
||||
if( m_CStat ){
|
||||
m_CStat = 0;
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// 定期的な周波数ポーリング
|
||||
void CLogLink::EventGetFreq(void)
|
||||
{
|
||||
if( !m_Polling ) return;
|
||||
|
||||
if( !m_Count2 ){
|
||||
m_Count2 = 2000/LINKINTERVAL; // 2[s]毎のチェック
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
{
|
||||
if( m_hLog == NULL ) return;
|
||||
int af = Application->Active;
|
||||
m_cds.dwData = 106;
|
||||
m_cds.cbData = 0;
|
||||
m_cds.lpData = NULL;
|
||||
::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hMain), LPARAM(&m_cds));
|
||||
if( af && m_1stSession ) Foreground();
|
||||
m_1stSession = FALSE;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if( m_pLink == NULL ) return;
|
||||
m_pLink->EventVFO();
|
||||
break;
|
||||
}
|
||||
}
|
||||
m_Count2--;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// 周波数の設定
|
||||
void CLogLink::SetFreq(LPSTR pFreq)
|
||||
{
|
||||
if( !CheckLink() ) return;
|
||||
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
m_cds.dwData = 6;
|
||||
m_cds.cbData = strlen(pFreq);
|
||||
m_cds.lpData = pFreq;
|
||||
m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
break;
|
||||
case 2:
|
||||
if( m_pLink == NULL ) return;
|
||||
m_pLink->SetFreq(pFreq);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// モードの設定
|
||||
void CLogLink::SetMode(LPCSTR pMode)
|
||||
{
|
||||
if( !CheckLink() ) return;
|
||||
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
if( pMode && (pMode != m_strMode) ){
|
||||
StrCopy(m_strMode, pMode, sizeof(m_strMode)-1);
|
||||
if( !m_fHLV5 ){
|
||||
SetHamlogMode(m_strMode);
|
||||
}
|
||||
}
|
||||
if( m_strMode[0] ){
|
||||
m_cds.dwData = 7;
|
||||
m_cds.cbData = strlen(m_strMode);
|
||||
m_cds.lpData = m_strMode;
|
||||
m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
// if( m_pLink == NULL ) return;
|
||||
// m_pLink->SetMode(pMode);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CLogLink::SetPTT(int ptt)
|
||||
{
|
||||
if( !m_PTTEnabled ) return;
|
||||
if( !CheckLink() ) return;
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
{
|
||||
int af = Application->Active;
|
||||
m_cds.dwData = ptt ? 23 : 24;
|
||||
m_cds.cbData = 0;
|
||||
m_cds.lpData = NULL;
|
||||
::SendMessage(m_hLog, WM_COPYDATA, af ? WPARAM(m_hApp) : NULL, LPARAM(&m_cds));
|
||||
if( af && m_1stSession ) Foreground();
|
||||
m_1stSession = FALSE;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if( !m_pLink ) return;
|
||||
m_pLink->SetPTT(ptt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// クリア
|
||||
void CLogLink::Clear(void)
|
||||
{
|
||||
if( !CheckLink() ) return;
|
||||
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
{
|
||||
int af = Application->Active;
|
||||
m_cds.dwData = 16;
|
||||
m_cds.cbData = 0;
|
||||
m_cds.lpData = NULL;
|
||||
m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, af ? WPARAM(m_hApp) : NULL, LPARAM(&m_cds));
|
||||
// m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, NULL, LPARAM(&m_cds));
|
||||
if( !::IsWindow(m_hLogIn) ){
|
||||
m_hLog = NULL;
|
||||
m_CStat = TRUE;
|
||||
m_Error = TRUE;
|
||||
}
|
||||
if( af ) Foreground();
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
m_QueryCall = "";
|
||||
if( m_pLink == NULL ) return;
|
||||
m_pLink->Clear();
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// Hamlogにフォーカスを設定
|
||||
void CLogLink::SetFocus(void)
|
||||
{
|
||||
if( m_Enabled != 1 ) return;
|
||||
if( m_hLog == NULL ) return;
|
||||
if( m_hLogIn == NULL ) return;
|
||||
|
||||
::SetForegroundWindow(m_hLogIn);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// コールサインの転送
|
||||
void CLogLink::SetCall(LPSTR pCall, int sw)
|
||||
{
|
||||
if( !CheckLink() ) return;
|
||||
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
{
|
||||
int af = Application->Active;
|
||||
Clear();
|
||||
if( m_hLog == NULL ) return;
|
||||
#if MMSSTV
|
||||
MultProc();
|
||||
#endif
|
||||
|
||||
AnsiString CALL;
|
||||
AnsiString PTB;
|
||||
|
||||
if( m_fHLV5 ){
|
||||
CALL = pCall;
|
||||
m_cds.dwData = IsJA(pCall) ? 26 : 25;
|
||||
m_cds.cbData = 0;
|
||||
m_cds.lpData = NULL;
|
||||
m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
m_cds.dwData = 0;
|
||||
if( sw ) m_cds.dwData |= THW_ENTER;
|
||||
m_cds.cbData = strlen(CALL.c_str());
|
||||
m_cds.lpData = CALL.c_str();
|
||||
m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
}
|
||||
else {
|
||||
DevCall(CALL, PTB, pCall);
|
||||
m_cds.dwData = 0;
|
||||
if( sw ) m_cds.dwData |= THW_ENTER;
|
||||
m_cds.cbData = strlen(CALL.c_str());
|
||||
m_cds.lpData = CALL.c_str();
|
||||
m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
#if MMSSTV
|
||||
MultProc();
|
||||
#endif
|
||||
m_cds.dwData = 1;
|
||||
if( sw ) m_cds.dwData |= THW_ENTER;
|
||||
m_cds.cbData = strlen(PTB.c_str());
|
||||
m_cds.lpData = PTB.c_str();
|
||||
m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
}
|
||||
if( af ) Foreground();
|
||||
}
|
||||
case 2:
|
||||
m_QueryCall = pCall;
|
||||
if( m_pLink == NULL ) return;
|
||||
m_pLink->Query(pCall);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// コールサインの検索
|
||||
void CLogLink::FindCall(LPSTR pCall)
|
||||
{
|
||||
if( !CheckLink() ) return;
|
||||
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
{
|
||||
int af = Application->Active;
|
||||
SetCall(pCall, FALSE);
|
||||
if( m_hLog == NULL ) return;
|
||||
#if MMSSTV
|
||||
MultProc();
|
||||
#endif
|
||||
m_cds.dwData = 17;
|
||||
m_cds.cbData = 0;
|
||||
m_cds.lpData = NULL;
|
||||
::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
|
||||
#if MMSSTV
|
||||
MultProc();
|
||||
#endif
|
||||
|
||||
m_cds.dwData = 115;
|
||||
m_cds.cbData = 0;
|
||||
m_cds.lpData = NULL;
|
||||
::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hMain), LPARAM(&m_cds));
|
||||
if( af ) Foreground();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
m_QueryCall = pCall;
|
||||
if( m_pLink == NULL ) return;
|
||||
m_pLink->Query(pCall);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// ログの記録
|
||||
// 0-データの設定のみ
|
||||
// 1-データの設定とRETキー/問い合わせの実行(QSOの開始時)
|
||||
// 2-書きこみを実行(QSOの終了時)
|
||||
void CLogLink::Write(SDMMLOG *sp, int sw)
|
||||
{
|
||||
if( !CheckLink() ) return;
|
||||
|
||||
switch(m_Enabled){
|
||||
case 1:
|
||||
{
|
||||
int af = Application->Active;
|
||||
if( m_fHLV5 && (sw == 1) ){
|
||||
m_cds.dwData = IsJA(sp->call) ? 26 : 25;
|
||||
m_cds.cbData = 0;
|
||||
m_cds.lpData = NULL;
|
||||
m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
m_cds.dwData = 0;
|
||||
m_cds.cbData = strlen(sp->call);
|
||||
m_cds.lpData = sp->call;
|
||||
m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
}
|
||||
char bf[1024];
|
||||
MMtoHAMLOG(bf, sp, m_fHLV5);
|
||||
m_cds.dwData = 15;
|
||||
if( sw ) m_cds.dwData |= THW_ENTER;
|
||||
m_cds.cbData = strlen(bf);
|
||||
m_cds.lpData = bf;
|
||||
m_hLogIn = (HWND)::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
|
||||
#if MMSSTV
|
||||
MultProc();
|
||||
#endif
|
||||
switch(sw){
|
||||
case 1:
|
||||
m_cds.dwData = 115;
|
||||
m_cds.cbData = 0;
|
||||
m_cds.lpData = NULL;
|
||||
::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hMain), LPARAM(&m_cds));
|
||||
break;
|
||||
case 2:
|
||||
m_cds.dwData = 18 | THW_SAVEBOX_OFF;
|
||||
m_cds.cbData = 0;
|
||||
m_cds.lpData = NULL;
|
||||
::SendMessage(m_hLog, WM_COPYDATA, WPARAM(m_hApp), LPARAM(&m_cds));
|
||||
break;
|
||||
}
|
||||
if( af ) Foreground();
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
if( m_pLink == NULL ) return;
|
||||
m_QueryCall = sp->call;
|
||||
m_pLink->LogWrite(sp, sw);
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int __fastcall GetLFCount(LPCSTR p)
|
||||
{
|
||||
int n = 0;
|
||||
for(; *p; p++ ){
|
||||
if( *p == LF ) n++;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// Hamlogからの返信メッセージからName,QTH,REM1を得る
|
||||
int CLogLink::AnaData(SDMMLOG *sp, COPYDATASTRUCT *cp)
|
||||
{
|
||||
BOOL r = FALSE;
|
||||
|
||||
char bf[1024];
|
||||
int len = cp->cbData;
|
||||
if( len >= 1023 ) len = 1023;
|
||||
if( len && (cp->lpData != NULL) ){
|
||||
StrCopy(bf, LPCSTR(cp->lpData), len);
|
||||
int lfLen = GetLFCount(bf);
|
||||
LPSTR t, p;
|
||||
if( len < 10 ){ // 周波数情報
|
||||
if( m_Polling ){
|
||||
t = SkipSpace(bf); ClipLF(t); clipsp(t);
|
||||
if( *t ){
|
||||
Log.SetFreq(&Log.m_sd, t);
|
||||
r = 106;
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( lfLen >= 10 ){ // 検索結果情報
|
||||
p = StrDlm(t, bf, LF); // Call
|
||||
p = StrDlm(t, p, LF); // PTB
|
||||
p = StrDlm(t, p, LF); // Date
|
||||
p = StrDlm(t, p, LF); // Time
|
||||
p = StrDlm(t, p, LF); // His
|
||||
p = StrDlm(t, p, LF); // My
|
||||
p = StrDlm(t, p, LF); // Freq
|
||||
p = StrDlm(t, p, LF); // Mode
|
||||
p = StrDlm(t, p, LF); // Code
|
||||
t = SkipSpace(t); ClipLF(t); clipsp(t);
|
||||
if( *t ){
|
||||
StrCopy(sp->opt1, t, MLOPT);
|
||||
r = 115;
|
||||
}
|
||||
p = StrDlm(t, p, LF); // GL
|
||||
p = StrDlm(t, p, LF); // QSL
|
||||
p = StrDlm(t, p, LF); // Name
|
||||
if( !sp->name[0] ){
|
||||
t = SkipSpace(t); ClipLF(t); clipsp(t);
|
||||
if( *t ){
|
||||
StrCopy(sp->name, t, MLNAME);
|
||||
r = 115;
|
||||
}
|
||||
}
|
||||
p = StrDlm(t, p, LF); // QTH
|
||||
// if( !sp->qth[0] ){
|
||||
if( !sp->qth[0] || !IsJA(sp->call) ){
|
||||
t = SkipSpace(t); ClipLF(t); clipsp(t);
|
||||
if( *t ){
|
||||
StrCopy(sp->qth, t, MLQTH);
|
||||
r = 115;
|
||||
}
|
||||
}
|
||||
StrDlm(t, p, LF); // REM1
|
||||
if( !sp->rem[0] ){
|
||||
t = SkipSpace(t); ClipLF(t); clipsp(t);
|
||||
if( *t ){
|
||||
StrCopy(sp->rem, t, MLREM);
|
||||
r = 115;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CLogLink::NotifySession(LPCSTR pSession)
|
||||
{
|
||||
if( m_pLink == NULL ) return;
|
||||
|
||||
m_pLink->NotifySession(pSession);
|
||||
CheckLink();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int __fastcall CLogLink::QReturn(SDMMLOG *sp, const mmLOGDATA *pLog)
|
||||
{
|
||||
if( pLog == NULL ) return FALSE;
|
||||
int r = FALSE;
|
||||
|
||||
mmLOGDATA logdata;
|
||||
memcpy(&logdata, pLog, sizeof(logdata));
|
||||
|
||||
if( stricmp(logdata.m_Call, m_QueryCall.c_str()) ) return FALSE;
|
||||
LPSTR t;
|
||||
if(!sp->name[0] ){
|
||||
t = SkipSpace(logdata.m_Name); ClipLF(t); clipsp(t);
|
||||
if( *t ){
|
||||
StrCopy(sp->name, t, MLNAME);
|
||||
r = TRUE;
|
||||
}
|
||||
}
|
||||
if( !sp->qth[0] ){
|
||||
t = SkipSpace(logdata.m_QTH); ClipLF(t); clipsp(t);
|
||||
if( *t ){
|
||||
StrCopy(sp->qth, t, MLQTH);
|
||||
r = TRUE;
|
||||
}
|
||||
}
|
||||
if( !sp->rem[0] ){
|
||||
t = SkipSpace(logdata.m_Note); ClipLF(t); clipsp(t);
|
||||
if( *t ){
|
||||
StrCopy(sp->rem, t, MLREM);
|
||||
r = TRUE;
|
||||
}
|
||||
}
|
||||
return r;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CLogLink::SetTime(SYSTEMTIME *tp, int sw)
|
||||
{
|
||||
if( m_pLink == NULL ) return;
|
||||
|
||||
m_pLink->SetTime(tp, sw);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
LPCSTR __fastcall CLogLink::GetItemName(void)
|
||||
{
|
||||
return m_ItemName.c_str();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CLogLink::SetItemName(LPCSTR pName)
|
||||
{
|
||||
m_ItemName = pName;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CLogLink::LoadMMLink(TMemIniFile *pIni)
|
||||
{
|
||||
m_ItemName = pIni->ReadString("MMLink", "Name", "");
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CLogLink::SaveMMLink(TMemIniFile *pIni)
|
||||
{
|
||||
pIni->WriteString("MMLink", "Name", m_ItemName);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BOOL __fastcall CLogLink::IsCopyData(void)
|
||||
{
|
||||
if( m_Enabled != 2 ) return FALSE;
|
||||
if( !m_pLink ) return FALSE;
|
||||
return (m_pLink->GetCaps() & capWMCOPYDATA);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
123
Loglink.h
Normal file
123
Loglink.h
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef LogLinkH
|
||||
#define LogLinkH
|
||||
|
||||
#include <sys\stat.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
|
||||
#include "ComLib.h"
|
||||
#include "LogConv.h"
|
||||
#include "MMLink.h"
|
||||
|
||||
#define LINKINTERVAL 200
|
||||
|
||||
//------------ Command of Hamlog -------------
|
||||
#define THW_ENTER 0x10000
|
||||
#define THW_FOCUS 0x20000
|
||||
#define THW_SAVEBOX_ON 0x40000
|
||||
#define THW_SAVEBOX_OFF 0x80000
|
||||
#define THW_APPLIHWND 0x100000
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// CLogLinkクラス
|
||||
class CLogLink
|
||||
{
|
||||
private:
|
||||
int m_Enabled; // リンクの許可
|
||||
int m_Polling; // 周波数ポーリング
|
||||
BOOL m_PTTEnabled; // PTTコントロール
|
||||
BOOL m_1stSession;
|
||||
|
||||
HWND m_hLog; // Hamlogプログラムのハンドル
|
||||
HWND m_hLogIn; // Hamlog入力ウインドウのハンドル
|
||||
|
||||
COPYDATASTRUCT m_cds; // インターフェース構造体
|
||||
int m_Count; // 監視カウンタ
|
||||
int m_CStat; // 状態変更セマフォ
|
||||
int m_Count2; // ポーリングカウンタ
|
||||
|
||||
HWND m_hMain; // メイン画面のウインドウハンドル
|
||||
HWND m_hApp; // アプリケーションのウインドウハンドル
|
||||
BOOL m_fHLV5; // Hamlog Ver 5.0
|
||||
|
||||
int m_Error;
|
||||
|
||||
AnsiString m_ItemName;
|
||||
AnsiString m_QueryCall;
|
||||
AnsiString m_AppName;
|
||||
int m_AppVer;
|
||||
int m_MMStat;
|
||||
int m_AStat;
|
||||
UINT m_uMsg;
|
||||
|
||||
char m_strMode[16];
|
||||
public:
|
||||
CMMLink *m_pLink;
|
||||
private:
|
||||
void __fastcall CloseMMLink(void);
|
||||
|
||||
public:
|
||||
CLogLink();
|
||||
~CLogLink();
|
||||
void SetHandle(HWND hMain, UINT uMsg);
|
||||
BOOL IsEnabled(void){return m_Enabled;};
|
||||
void UpdateLink(int sw);
|
||||
void Foreground(void);
|
||||
BOOL IsError(void){return m_Error;};
|
||||
void ClearError(void){m_Error = 0;};
|
||||
BOOL __fastcall IsLink(void);
|
||||
LPCSTR __fastcall GetSessionName(void);
|
||||
|
||||
BOOL CheckLink(void);
|
||||
BOOL TimerLogLink(void);
|
||||
void Clear(void);
|
||||
void SetFocus(void);
|
||||
void SetCall(LPSTR pCall, int sw);
|
||||
void FindCall(LPSTR pCall);
|
||||
void Write(SDMMLOG *sp, int sw);
|
||||
int AnaData(SDMMLOG *sp, COPYDATASTRUCT *cp);
|
||||
|
||||
BOOL IsPolling(void){return m_Polling;};
|
||||
void SetPolling(int sw){m_Polling = sw;};
|
||||
void EventGetFreq(void);
|
||||
void SetFreq(LPSTR pFreq);
|
||||
void SetMode(LPCSTR pMode);
|
||||
void __fastcall SetPTT(int ptt);
|
||||
|
||||
void __fastcall SetTime(SYSTEMTIME *tp, int sw);
|
||||
|
||||
public:
|
||||
void __fastcall LoadMMLink(TMemIniFile *pIni);
|
||||
void __fastcall SaveMMLink(TMemIniFile *pIni);
|
||||
void __fastcall NotifySession(LPCSTR pSession);
|
||||
int __fastcall QReturn(SDMMLOG *sp, const mmLOGDATA *pLog);
|
||||
LPCSTR __fastcall GetItemName(void);
|
||||
void __fastcall SetItemName(LPCSTR pName);
|
||||
BOOL __fastcall IsCopyData(void);
|
||||
|
||||
inline BOOL __fastcall GetPTTEnabled(void){return m_PTTEnabled;};
|
||||
inline void __fastcall SetPTTEnabled(BOOL e){m_PTTEnabled = e;};
|
||||
};
|
||||
extern CLogLink LogLink;
|
||||
#endif
|
||||
|
||||
408
MMlink.cpp
Normal file
408
MMlink.cpp
Normal file
|
|
@ -0,0 +1,408 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "MMLink.h"
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall CMMList::CMMList(void)
|
||||
{
|
||||
m_pList = NULL;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall CMMList::~CMMList()
|
||||
{
|
||||
delete m_pList;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int __fastcall CMMList::QueryList(LPCSTR pFilter)
|
||||
{
|
||||
if( m_pList == NULL ) m_pList = new TStringList;
|
||||
m_pList->Clear();
|
||||
m_FilterLen = strlen(pFilter);
|
||||
|
||||
HANDLE hFind;
|
||||
WIN32_FIND_DATA fd;
|
||||
|
||||
char Name[MAX_PATH];
|
||||
sprintf(Name, "%s*.%s", BgnDir, pFilter);
|
||||
hFind = ::FindFirstFile(Name, &fd);
|
||||
if( hFind != INVALID_HANDLE_VALUE ){
|
||||
while(1){
|
||||
m_pList->Add(fd.cFileName);
|
||||
if( !FindNextFile(hFind, &fd) ) break;
|
||||
}
|
||||
::FindClose(hFind);
|
||||
}
|
||||
return m_pList->Count;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
LPCSTR __fastcall CMMList::GetItemName(int n)
|
||||
{
|
||||
if( n < 0 ) return NULL;
|
||||
if( n >= m_pList->Count ) return NULL;
|
||||
|
||||
m_Name = m_pList->Strings[n].c_str();
|
||||
LPSTR p = lastp(m_Name.c_str());
|
||||
p -= m_FilterLen;
|
||||
*p = 0;
|
||||
return m_Name.c_str();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
LPCSTR __fastcall CMMList::GetFileName(int n)
|
||||
{
|
||||
if( n < 0 ) return NULL;
|
||||
if( n >= m_pList->Count ) return NULL;
|
||||
|
||||
m_Name = m_pList->Strings[n];
|
||||
return m_Name.c_str();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int __fastcall CMMList::IndexOf(LPCSTR pKey)
|
||||
{
|
||||
for( int i = 0; i < m_pList->Count; i++ ){
|
||||
if( !strcmpi(GetItemName(i), pKey) ) return i;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
//***************************************************************************
|
||||
// CMMLink class
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall CMMLink::CMMLink(HWND hWnd, UINT uMsg)
|
||||
{
|
||||
m_hLib = NULL;
|
||||
m_hWnd = hWnd;
|
||||
m_uMsg = uMsg;
|
||||
m_Caps = 0;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall CMMLink::~CMMLink()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::FreeLib(void)
|
||||
{
|
||||
if( m_hLib ){
|
||||
FreeLibrary(m_hLib);
|
||||
m_hLib = NULL;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
FARPROC __fastcall CMMLink::GetProc(LPCSTR pName)
|
||||
{
|
||||
if( !m_hLib ) return NULL;
|
||||
|
||||
FARPROC fn = ::GetProcAddress(m_hLib, pName+1);
|
||||
if( fn == NULL ){
|
||||
fn = ::GetProcAddress(m_hLib, pName);
|
||||
if( fn == NULL ) FreeLib();
|
||||
}
|
||||
return fn;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::Close(void)
|
||||
{
|
||||
if( IsLib() ){
|
||||
fmmlClose();
|
||||
FreeLib();
|
||||
}
|
||||
m_Connected = FALSE;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BOOL __fastcall CMMLink::Open(LPCSTR pItemName)
|
||||
{
|
||||
Close();
|
||||
|
||||
m_ItemName = pItemName;
|
||||
m_SessionName = m_ItemName;
|
||||
char LibName[MAX_PATH];
|
||||
if( !*GetEXT(pItemName) ){
|
||||
sprintf(LibName, "%s.mml", pItemName);
|
||||
pItemName = LibName;
|
||||
}
|
||||
|
||||
m_hLib = ::LoadLibrary(pItemName);
|
||||
if( m_hLib ){
|
||||
|
||||
fmmlOpen = (tmmlOpen)GetProc("_mmlOpen");
|
||||
fmmlClose = (tmmlClose)GetProc("_mmlClose");
|
||||
fmmlSetHandle = (tmmlSetHandle)GetProc("_mmlSetHandle");
|
||||
fmmlIsCap = (tmmlIsCap)GetProc("_mmlIsCap");
|
||||
fmmlIsConnected = (tmmlIsConnected)GetProc("_mmlIsConnected");
|
||||
fmmlGetSessionName = (tmmlGetSessionName)GetProc("_mmlGetSessionName");
|
||||
fmmlQuery = (tmmlQuery)GetProc("_mmlQuery");
|
||||
fmmlSetFreq = (tmmlSetFreq)GetProc("_mmlSetFreq");
|
||||
fmmlLog = (tmmlLog)GetProc("_mmlLog");
|
||||
fmmlLogClear = (tmmlLogClear)GetProc("_mmlLogClear");
|
||||
fmmlSetPTT = (tmmlSetPTT)GetProc("_mmlSetPTT");
|
||||
fmmlOnCopyData = (tmmlOnCopyData)GetProc("_mmlOnCopyData");
|
||||
fmmlEventVFO = (tmmlEventVFO)GetProc("_mmlEventVFO");
|
||||
|
||||
if( m_hLib ){
|
||||
if( fmmlOpen(m_hWnd, m_uMsg) ){
|
||||
m_Caps = fmmlIsCap();
|
||||
}
|
||||
else {
|
||||
FreeLib();
|
||||
}
|
||||
}
|
||||
}
|
||||
return IsLib();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::SetHandle(HWND hWnd, UINT uMsg)
|
||||
{
|
||||
m_hWnd = hWnd;
|
||||
m_uMsg = uMsg;
|
||||
if( !IsLib() ) return;
|
||||
fmmlSetHandle(hWnd, m_uMsg);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::NotifySession(LPCSTR pSession)
|
||||
{
|
||||
if( pSession ){
|
||||
m_Connected = TRUE;
|
||||
m_SessionName = pSession;
|
||||
}
|
||||
else {
|
||||
m_Connected = FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BOOL __fastcall CMMLink::IsConnected(void)
|
||||
{
|
||||
if( !IsLib() ) return FALSE;
|
||||
if( m_Caps & capNOTIFYSESSION ) return m_Connected;
|
||||
return fmmlIsConnected();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
LPCSTR __fastcall CMMLink::GetSessionName(void)
|
||||
{
|
||||
if( !IsLib() ) return NULL;
|
||||
if( m_Caps & capNOTIFYSESSION ) return m_SessionName.c_str();
|
||||
return fmmlGetSessionName();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::Query(LPCSTR pCall)
|
||||
{
|
||||
if( !IsLib() ) return;
|
||||
fmmlQuery(pCall);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::SetFreq(LPCSTR pFreq)
|
||||
{
|
||||
if( !IsLib() ) return;
|
||||
fmmlSetFreq(pFreq);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::SetPTT(int ptt)
|
||||
{
|
||||
if( !IsLib() ) return;
|
||||
fmmlSetPTT(ptt);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::LogWrite(SDMMLOG *sp, int sw)
|
||||
{
|
||||
if( !IsLib() ) return;
|
||||
mmLOGDATA ml;
|
||||
ConvFormat(&ml, sp);
|
||||
fmmlLog(&ml, sw);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::Clear(void)
|
||||
{
|
||||
if( !IsLib() ) return;
|
||||
fmmlLogClear();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::EventVFO(void)
|
||||
{
|
||||
if( !IsLib() ) return;
|
||||
fmmlEventVFO();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
LONG __fastcall CMMLink::OnCopyData(HWND hSender, const COPYDATASTRUCT *pcds)
|
||||
{
|
||||
if( !IsLib() ) return FALSE;
|
||||
if( !(m_Caps & capWMCOPYDATA) ) return FALSE;
|
||||
return fmmlOnCopyData(hSender, pcds);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::SetTime(SYSTEMTIME *tp, int sw)
|
||||
{
|
||||
if( sw ){
|
||||
m_TimeLogOFF = *tp;
|
||||
}
|
||||
else {
|
||||
m_TimeLogON = *tp;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMLink::ConvFormat(mmLOGDATA *pLog, const SDMMLOG *sp)
|
||||
{
|
||||
memset(pLog, 0, sizeof(mmLOGDATA));
|
||||
|
||||
if( sp->btime ) pLog->m_TimeLogON = m_TimeLogON;
|
||||
if( sp->etime ) pLog->m_TimeLogOFF = m_TimeLogOFF;
|
||||
StrCopy(pLog->m_Call, sp->call, sizeof(pLog->m_Call)- 1);
|
||||
strcpy(pLog->m_Mode, Log.GetModeString(sp->mode));
|
||||
strcpy(pLog->m_Freq, Log.GetFreqString(sp->band, sp->fq));
|
||||
memcpy(pLog->m_His, sp->ur, sizeof(pLog->m_His));
|
||||
memcpy(pLog->m_My, sp->my, sizeof(pLog->m_My));
|
||||
StrCopy(pLog->m_Name, sp->name, sizeof(pLog->m_Name)- 1);
|
||||
StrCopy(pLog->m_QTH, sp->qth, sizeof(pLog->m_QTH)- 1);
|
||||
StrCopy(pLog->m_Pow, sp->pow, sizeof(pLog->m_Pow)- 1);
|
||||
StrCopy(pLog->m_Note, sp->rem, sizeof(pLog->m_Note)- 1);
|
||||
StrCopy(pLog->m_QSL, sp->qsl, sizeof(pLog->m_QSL)- 1);
|
||||
StrCopy(pLog->m_DXCC, sp->opt1, sizeof(pLog->m_DXCC)- 1);
|
||||
StrCopy(pLog->m_Cont, sp->opt2, sizeof(pLog->m_Cont)- 1);
|
||||
pLog->m_QSLS = sp->send;
|
||||
pLog->m_QSLR = sp->recv;
|
||||
}
|
||||
|
||||
|
||||
//***************************************************************************
|
||||
// CMMRadio class
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall CMMRadio::CMMRadio(HWND hWnd, UINT uMsg)
|
||||
{
|
||||
m_hLib = NULL;
|
||||
m_hWnd = hWnd;
|
||||
m_uMsg = uMsg;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
__fastcall CMMRadio::~CMMRadio()
|
||||
{
|
||||
Close();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMRadio::FreeLib(void)
|
||||
{
|
||||
if( m_hLib ){
|
||||
FreeLibrary(m_hLib);
|
||||
m_hLib = NULL;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
FARPROC __fastcall CMMRadio::GetProc(LPCSTR pName)
|
||||
{
|
||||
if( !m_hLib ) return NULL;
|
||||
|
||||
FARPROC fn = ::GetProcAddress(m_hLib, pName+1);
|
||||
if( fn == NULL ){
|
||||
fn = ::GetProcAddress(m_hLib, pName);
|
||||
if( fn == NULL ) FreeLib();
|
||||
}
|
||||
return fn;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMRadio::Close(void)
|
||||
{
|
||||
if( IsLib() ){
|
||||
fmmrpClose();
|
||||
FreeLib();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BOOL __fastcall CMMRadio::Open(LPCSTR pItemName)
|
||||
{
|
||||
Close();
|
||||
|
||||
m_ItemName = pItemName;
|
||||
char LibName[MAX_PATH];
|
||||
if( !*GetEXT(pItemName) ){
|
||||
sprintf(LibName, "%s.mmr", pItemName);
|
||||
pItemName = LibName;
|
||||
}
|
||||
m_hLib = ::LoadLibrary(pItemName);
|
||||
if( m_hLib ){
|
||||
|
||||
fmmrpOpen = PROC(mmrpOpen);
|
||||
fmmrpClose = PROC(mmrpClose);
|
||||
fmmrpSetHandle = PROC(mmrpSetHandle);
|
||||
fmmrpGetStatus = PROC(mmrpGetStatus);
|
||||
fmmrpSetPTT = PROC(mmrpSetPTT);
|
||||
fmmrpPutChar = PROC(mmrpPutChar);
|
||||
fmmrpGetChar = PROC(mmrpGetChar);
|
||||
fmmrpPolling = PROC(mmrpPolling);
|
||||
fmmrpGetFreq = PROC(mmrpGetFreq);
|
||||
fmmrpGetDefCommand = PROC(mmrpGetDefCommand);
|
||||
|
||||
if( m_hLib ){
|
||||
if( !fmmrpOpen(m_hWnd, m_uMsg) ){
|
||||
FreeLib();
|
||||
}
|
||||
}
|
||||
}
|
||||
return IsLib();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMRadio::SetHandle(HWND hWnd, UINT uMsg)
|
||||
{
|
||||
m_hWnd = hWnd;
|
||||
m_uMsg = uMsg;
|
||||
if( !IsLib() ) return;
|
||||
fmmrpSetHandle(hWnd, uMsg);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMRadio::SetPTT(int ptt)
|
||||
{
|
||||
if( !IsLib() ) return;
|
||||
fmmrpSetPTT(ptt);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMRadio::PutChar(BYTE c)
|
||||
{
|
||||
if( !IsLib() ) return;
|
||||
fmmrpPutChar(c);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BYTE __fastcall CMMRadio::GetChar(void)
|
||||
{
|
||||
if( !IsLib() ) return 0;
|
||||
return fmmrpGetChar();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
DWORD __fastcall CMMRadio::GetStatus(void)
|
||||
{
|
||||
if( !IsLib() ) return 0;
|
||||
return fmmrpGetStatus();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall CMMRadio::Polling(void)
|
||||
{
|
||||
if( !IsLib() ) return;
|
||||
fmmrpPolling();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
DWORD __fastcall CMMRadio::GetFreq(void)
|
||||
{
|
||||
if( !IsLib() ) return 0;
|
||||
return fmmrpGetFreq();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
DWORD __fastcall CMMRadio::GetDefCommand(void)
|
||||
{
|
||||
if( !IsLib() ) return 0;
|
||||
return fmmrpGetDefCommand();
|
||||
}
|
||||
|
||||
154
MMlink.h
Normal file
154
MMlink.h
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef MMLinkH
|
||||
#define MMLinkH
|
||||
|
||||
#include "ComLib.h"
|
||||
#include "LogConv.h"
|
||||
#include "mml.h"
|
||||
#include "mmrp.h"
|
||||
|
||||
#define PROC(Key) ((t##Key)GetProc("_" #Key))
|
||||
|
||||
class CMMList
|
||||
{
|
||||
private:
|
||||
TStringList *m_pList;
|
||||
AnsiString m_Name;
|
||||
int m_FilterLen;
|
||||
public:
|
||||
__fastcall CMMList(void);
|
||||
__fastcall ~CMMList();
|
||||
public: // List functions
|
||||
int __fastcall QueryList(LPCSTR pFilter);
|
||||
int __fastcall GetCount(void){return m_pList->Count;};
|
||||
LPCSTR __fastcall GetItemName(int n);
|
||||
LPCSTR __fastcall GetFileName(int n);
|
||||
int __fastcall IndexOf(LPCSTR pKey);
|
||||
inline BOOL __fastcall IsQuery(void){return m_pList != NULL;};
|
||||
};
|
||||
|
||||
class CMMLink
|
||||
{
|
||||
private:
|
||||
AnsiString m_ItemName;
|
||||
|
||||
HWND m_hWnd;
|
||||
UINT m_uMsg;
|
||||
|
||||
//HANDLE m_hLib;
|
||||
HINSTANCE m_hLib; //ja7ude 0522
|
||||
DWORD m_Caps;
|
||||
|
||||
int m_Connected;
|
||||
AnsiString m_SessionName;
|
||||
|
||||
SYSTEMTIME m_TimeLogON;
|
||||
SYSTEMTIME m_TimeLogOFF;
|
||||
private:
|
||||
tmmlOpen fmmlOpen;
|
||||
tmmlClose fmmlClose;
|
||||
tmmlSetHandle fmmlSetHandle;
|
||||
tmmlIsCap fmmlIsCap;
|
||||
tmmlIsConnected fmmlIsConnected;
|
||||
tmmlGetSessionName fmmlGetSessionName;
|
||||
tmmlQuery fmmlQuery;
|
||||
tmmlSetFreq fmmlSetFreq;
|
||||
tmmlLog fmmlLog;
|
||||
tmmlLogClear fmmlLogClear;
|
||||
tmmlSetPTT fmmlSetPTT;
|
||||
tmmlOnCopyData fmmlOnCopyData;
|
||||
tmmlEventVFO fmmlEventVFO;
|
||||
private:
|
||||
void __fastcall FreeLib(void);
|
||||
FARPROC __fastcall GetProc(LPCSTR pName);
|
||||
void __fastcall ConvFormat(mmLOGDATA *pLog, const SDMMLOG *sp);
|
||||
public:
|
||||
__fastcall CMMLink(HWND hWnd, UINT uMsg);
|
||||
__fastcall ~CMMLink();
|
||||
public: // LogLink functions
|
||||
BOOL __fastcall Open(LPCSTR pLibName);
|
||||
void __fastcall Close(void);
|
||||
void __fastcall SetHandle(HWND hWnd, UINT uMsg);
|
||||
inline BOOL __fastcall IsLib(void){ return (m_hLib != NULL);};
|
||||
inline LPCSTR __fastcall GetItemName(void){return m_ItemName.c_str();};
|
||||
|
||||
void __fastcall NotifySession(LPCSTR pSession);
|
||||
|
||||
BOOL __fastcall IsConnected(void);
|
||||
LPCSTR __fastcall GetSessionName(void);
|
||||
void __fastcall Query(LPCSTR pCall);
|
||||
void __fastcall SetFreq(LPCSTR pFreq);
|
||||
void __fastcall SetPTT(int ptt);
|
||||
void __fastcall LogWrite(SDMMLOG *sp, int sw);
|
||||
void __fastcall Clear(void);
|
||||
void __fastcall EventVFO(void);
|
||||
LONG __fastcall OnCopyData(HWND hSender, const COPYDATASTRUCT *pcds);
|
||||
inline DWORD __fastcall GetCaps(void){return m_Caps;};
|
||||
void __fastcall SetTime(SYSTEMTIME *tp, int sw);
|
||||
|
||||
};
|
||||
|
||||
|
||||
class CMMRadio
|
||||
{
|
||||
private:
|
||||
AnsiString m_ItemName;
|
||||
|
||||
//HANDLE m_hLib; //ja7ude 0522
|
||||
HINSTANCE m_hLib;
|
||||
HWND m_hWnd;
|
||||
UINT m_uMsg;
|
||||
|
||||
private:
|
||||
tmmrpSetHandle fmmrpSetHandle;
|
||||
tmmrpOpen fmmrpOpen;
|
||||
tmmrpClose fmmrpClose;
|
||||
tmmrpGetStatus fmmrpGetStatus;
|
||||
tmmrpSetPTT fmmrpSetPTT;
|
||||
tmmrpPutChar fmmrpPutChar;
|
||||
tmmrpGetChar fmmrpGetChar;
|
||||
tmmrpPolling fmmrpPolling;
|
||||
tmmrpGetFreq fmmrpGetFreq;
|
||||
tmmrpGetDefCommand fmmrpGetDefCommand;
|
||||
|
||||
private:
|
||||
void __fastcall FreeLib(void);
|
||||
FARPROC __fastcall GetProc(LPCSTR pName);
|
||||
public:
|
||||
__fastcall CMMRadio(HWND hWnd, UINT uMsg);
|
||||
__fastcall ~CMMRadio();
|
||||
public:
|
||||
void __fastcall SetHandle(HWND hWnd, UINT uMsg);
|
||||
BOOL __fastcall Open(LPCSTR pLibName);
|
||||
void __fastcall Close(void);
|
||||
inline BOOL __fastcall IsLib(void){ return (m_hLib != NULL);};
|
||||
inline LPCSTR __fastcall GetItemName(void){return m_ItemName.c_str();};
|
||||
|
||||
void __fastcall SetPTT(int ptt);
|
||||
void __fastcall PutChar(BYTE c);
|
||||
BYTE __fastcall GetChar(void);
|
||||
DWORD __fastcall GetStatus(void);
|
||||
void __fastcall Polling(void);
|
||||
DWORD __fastcall GetFreq(void);
|
||||
DWORD __fastcall GetDefCommand(void);
|
||||
};
|
||||
#endif
|
||||
193
MacroKey.cpp
Normal file
193
MacroKey.cpp
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "MacroKey.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TMacroKeyDlg *MacroKeyDlg;
|
||||
MACKEY mackeycom[]={
|
||||
{1, "_","マーク信号の送信","Transmit a mark signal"},
|
||||
{1, "~","AFSKキャリア停止","Stop AFSK carrier"},
|
||||
{1, "[","Diddleの禁止","Disable diddle"},
|
||||
{1, "]","Diddleの許可","Enable diddle"},
|
||||
{1, "%m","My callsign", NULL},
|
||||
{1, "%c","His/her callsign", NULL},
|
||||
{1, "%r","His/her RST", NULL},
|
||||
{1, "%n","His/her name", NULL},
|
||||
{1, "%q","His/her QTH", NULL},
|
||||
{1, "%s","My RST", NULL},
|
||||
{1, "%R","His/her RSTのRST部分のみ","Only the RST part of his/her RST"},
|
||||
{1, "%N","His/her RSTのコンテストナンバ部分のみ","Only the contest number part of his/her RST"},
|
||||
{1, "%M","My RSTのコンテストナンバ部分のみ","Only the contest number part of my RST"},
|
||||
{1, "%g","GOOD MORNING/AFTERNOON/EVENING", NULL},
|
||||
{1, "%f","GM/GA/GE", NULL},
|
||||
{1, "%L","LTRコードの強制送信","Force transmit LTR code"},
|
||||
{1, "%F","FIGコードの強制送信","Force transmit FIG code"},
|
||||
{1, "%D","UTC date (e.g., 2000-SEP-05)", NULL},
|
||||
{1, "%T","UTC time (e.g., 12:34)", NULL},
|
||||
{1, "%t","UTC time (e.g., 1234)", NULL},
|
||||
{1, "%x","Only the 1st number(001) for BARTG", NULL},
|
||||
{1, "%y","Only the 2nd number(UTC) for BARTG", NULL},
|
||||
{1, "%{","CWID (e.g., %{DE %m})", NULL},
|
||||
{-1, "","<行末のスペースを削除>", "<Delete space with end of line>"},
|
||||
{0, NULL, NULL},
|
||||
};
|
||||
MACKEY mackeybtn[]={
|
||||
{3, "\\","先頭に記述してTxWindow経由で送信","Sends via the TX window (at the top)"},
|
||||
{2, "\\","末尾に記述して受信に切りかえる","Switches to receive (at the last)"},
|
||||
{3, "#","先頭に記述してTxWindowに全文をコピー","Copies the message to the TX window (at the top)"},
|
||||
{2, "#","末尾に記述して繰り返し","Repeats the macro (at the last)"},
|
||||
{0, NULL, NULL},
|
||||
};
|
||||
MACKEY mackeymsg[]={
|
||||
{3, "\\","先頭に記述してTxWindowをクリア","Clears the TX window (at the top)"},
|
||||
{2, "\\","末尾に記述して受信に切りかえる","Switches to receive (at the last)"},
|
||||
{3, "#","先頭に記述して送信に切りかえる","Switches to transmit (at the top)"},
|
||||
{1, "^","約1秒間の停止","Wait for 1 second"},
|
||||
{0, NULL, NULL},
|
||||
};
|
||||
MACKEY mackeyusr[]={
|
||||
{2, "\\","末尾に記述して受信に切りかえる","Switches to receive (at the last)"},
|
||||
{0, NULL, NULL},
|
||||
};
|
||||
static int PosPos; //JA7UDE 0428
|
||||
static int TopPos;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TMacroKeyDlg::TMacroKeyDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
CancelBtn->Caption = "Cancel";
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TMacroKeyDlg::UpdateUI(int row)
|
||||
{
|
||||
int r = row - 1;
|
||||
if( r >= 0 ){
|
||||
r = mackey[r].r;
|
||||
if( r == -1 ){
|
||||
OKBtn->Caption = (Font->Charset != SHIFTJIS_CHARSET) ? "Execute" : "実行";
|
||||
}
|
||||
else {
|
||||
OKBtn->Caption = (Font->Charset != SHIFTJIS_CHARSET) ? "Insert" : "挿入";
|
||||
}
|
||||
OKBtn->Enabled = TRUE;
|
||||
}
|
||||
else {
|
||||
OKBtn->Caption = (Font->Charset != SHIFTJIS_CHARSET) ? "Insert" : "挿入";
|
||||
OKBtn->Enabled = FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TMacroKeyDlg::AddMacKey(MACKEY *mp, int n)
|
||||
{
|
||||
for( ; mp->r; mp++, n++ ){
|
||||
mackey[n] = *mp;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TMacroKeyDlg::Execute(AnsiString &as, int sw)
|
||||
{
|
||||
int n = 0;
|
||||
switch(sw){
|
||||
case 0:
|
||||
n = AddMacKey(mackeymsg, n);
|
||||
break;
|
||||
case 1:
|
||||
n = AddMacKey(mackeybtn, n);
|
||||
break;
|
||||
case 2:
|
||||
n = AddMacKey(mackeyusr, n);
|
||||
break;
|
||||
}
|
||||
n = AddMacKey(mackeycom, n);
|
||||
Grid->RowCount = 1 + n;
|
||||
if( (PosPos > 0) && (PosPos < Grid->RowCount) ){
|
||||
Grid->Row = PosPos;
|
||||
Grid->TopRow = TopPos;
|
||||
}
|
||||
UpdateUI(Grid->Row);
|
||||
int r = ShowModal();
|
||||
PosPos = Grid->Row;
|
||||
TopPos = Grid->TopRow;
|
||||
if( r == IDOK ){
|
||||
if( PosPos ){
|
||||
r = PosPos - 1;
|
||||
as = mackey[r].pKey;
|
||||
return mackey[r].r;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TMacroKeyDlg::GridDrawCell(TObject *Sender, int Col, int Row,
|
||||
TRect &Rect, TGridDrawState State)
|
||||
{
|
||||
char bf[256];
|
||||
|
||||
Grid->Canvas->FillRect(Rect);
|
||||
int X = Rect.Left + 4;
|
||||
int Y = Rect.Top + 2;
|
||||
|
||||
if( Row ){
|
||||
Row--;
|
||||
bf[0] = 0;
|
||||
LPCSTR pCom;
|
||||
switch(Col){
|
||||
case 0:
|
||||
strcpy(bf, mackey[Row].pKey);
|
||||
break;
|
||||
case 1:
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
pCom = mackey[Row].pEng;
|
||||
if( pCom == NULL ){
|
||||
pCom = mackey[Row].pJpn;
|
||||
}
|
||||
}
|
||||
else {
|
||||
pCom = mackey[Row].pJpn;
|
||||
}
|
||||
strcpy(bf, pCom);
|
||||
break;
|
||||
}
|
||||
Grid->Canvas->TextOut(X, Y, bf);
|
||||
}
|
||||
else { // タイトル
|
||||
LPCSTR _tt[]={
|
||||
"Key","Comments",
|
||||
};
|
||||
Grid->Canvas->TextOut(X, Y, _tt[Col]);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TMacroKeyDlg::GridSelectCell(TObject *Sender, int Col,
|
||||
int Row, bool &CanSelect)
|
||||
{
|
||||
UpdateUI(Row);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
MacroKey.dfm
Normal file
BIN
MacroKey.dfm
Normal file
Binary file not shown.
71
MacroKey.h
Normal file
71
MacroKey.h
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef MacroKeyH
|
||||
#define MacroKeyH
|
||||
//----------------------------------------------------------------------------
|
||||
/* JA7UDE 0428
|
||||
#include <vcl\System.hpp>
|
||||
#include <vcl\Windows.hpp>
|
||||
#include <vcl\SysUtils.hpp>
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Graphics.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
*/
|
||||
#include <Grids.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
typedef struct {
|
||||
int r;
|
||||
LPCSTR pKey;
|
||||
LPCSTR pJpn;
|
||||
LPCSTR pEng;
|
||||
}MACKEY;
|
||||
|
||||
class TMacroKeyDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TStringGrid *Grid;
|
||||
void __fastcall GridDrawCell(TObject *Sender, int Col, int Row, TRect &Rect,
|
||||
TGridDrawState State);
|
||||
void __fastcall GridSelectCell(TObject *Sender, int Col, int Row,
|
||||
bool &CanSelect);
|
||||
private:
|
||||
MACKEY mackey[32];
|
||||
int __fastcall AddMacKey(MACKEY *mp, int n);
|
||||
void __fastcall UpdateUI(int row);
|
||||
|
||||
public:
|
||||
virtual __fastcall TMacroKeyDlg(TComponent* AOwner);
|
||||
|
||||
int __fastcall Execute(AnsiString &as, int sw);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TMacroKeyDlg *MacroKeyDlg;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
967
Main.h
Normal file
967
Main.h
Normal file
|
|
@ -0,0 +1,967 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef MainH
|
||||
#define MainH
|
||||
//---------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
#include "ComLib.h"
|
||||
#include "Sound.h"
|
||||
#include "Comm.h"
|
||||
#include "Ctnc.h"
|
||||
#include "Cradio.h"
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ComCtrls.hpp>
|
||||
#include <Menus.hpp>
|
||||
#include <Dialogs.hpp>
|
||||
//---------------------------------------------------------------------------
|
||||
#include "SendFile.h"
|
||||
#define USEPAL 1
|
||||
#define SQSCALE 1024 // SQ の表示スケール
|
||||
#define HELPNAME_A "MMTTY.CHM"
|
||||
#define HELPNAME_B "MMTTY.HLP"
|
||||
//---------------------------------------------------------------------------
|
||||
enum {
|
||||
RXM_HANDLE=0x0000, // APP -> MMTTY
|
||||
RXM_REQHANDLE,
|
||||
RXM_EXIT,
|
||||
RXM_PTT,
|
||||
RXM_CHAR,
|
||||
|
||||
RXM_WINPOS, // 5
|
||||
RXM_WIDTH,
|
||||
RXM_REQPARA,
|
||||
RXM_SETBAUD,
|
||||
RXM_SETMARK,
|
||||
|
||||
RXM_SETSPACE, // 10
|
||||
RXM_SETSWITCH,
|
||||
RXM_SETHAM,
|
||||
RXM_SHOWSETUP,
|
||||
RXM_SETVIEW,
|
||||
|
||||
RXM_SETSQLVL, // 15
|
||||
RXM_SHOW,
|
||||
RXM_SETFIG,
|
||||
RXM_SETRESO,
|
||||
RXM_SETLPF,
|
||||
|
||||
RXM_SETTXDELAY, // 20
|
||||
RXM_UPDATECOM,
|
||||
RXM_SUSPEND,
|
||||
RXM_NOTCH,
|
||||
RXM_PROFILE,
|
||||
|
||||
RXM_TIMER, // 25
|
||||
RXM_ENBFOCUS,
|
||||
RXM_SETDEFFREQ,
|
||||
RXM_SETLENGTH,
|
||||
RXM_ENBSHARED,
|
||||
|
||||
RXM_PTTFSK, // 30 Added by JE3HHT on Sep.2010
|
||||
//--------------------------------------
|
||||
TXM_HANDLE=0x8000, // MMTTY -> APP
|
||||
TXM_REQHANDLE,
|
||||
TXM_START,
|
||||
TXM_CHAR,
|
||||
TXM_PTTEVENT,
|
||||
|
||||
TXM_HEIGHT,
|
||||
TXM_BAUD,
|
||||
TXM_MARK,
|
||||
TXM_SPACE,
|
||||
TXM_SWITCH,
|
||||
|
||||
TXM_VIEW,
|
||||
TXM_LEVEL,
|
||||
TXM_FIGEVENT,
|
||||
TXM_RESO,
|
||||
TXM_LPF,
|
||||
|
||||
TXM_THREAD,
|
||||
TXM_PROFILE,
|
||||
TXM_NOTCH,
|
||||
TXM_DEFSHIFT,
|
||||
TXM_RADIOFREQ,
|
||||
|
||||
TXM_SHOWSETUP,
|
||||
TXM_SHOWPROFILE,
|
||||
};
|
||||
#pragma option -a- // Pack of structer
|
||||
typedef struct {
|
||||
LONG smpFreq; // MMTTY->APP
|
||||
CHAR title[128]; // APP->MMTTY
|
||||
CHAR comName[16];// APP->MMTTY
|
||||
LONG smpFFT; // APP->MMTTY 0-11025, 1-8000
|
||||
|
||||
LONG flagFFT;
|
||||
LONG arrayFFT[2048];
|
||||
LONG flagXY;
|
||||
LONG arrayX[XYCOLLECT];
|
||||
LONG arrayY[XYCOLLECT];
|
||||
|
||||
CHAR verMMTTY[16];
|
||||
CHAR comRadio[16];
|
||||
LONG flagLostSound; // サウンドを一部失った(->APP)
|
||||
LONG flagOverflow; // 入力が大き過ぎる(->APP)
|
||||
LONG errorClock; // ppm
|
||||
LONG smpDemFreq; // デモジュレータのサンプリング周波数
|
||||
LONG txBuffCount; // 送信バッファの未送信文字数
|
||||
CHAR ProfileName[16][64];
|
||||
}COMARRAY;
|
||||
#pragma option -a.
|
||||
|
||||
class TMmttyWd : public TForm
|
||||
{
|
||||
__published: // IDE 管理のコンポーネント
|
||||
TTimer *Timer;
|
||||
TPanel *PanelRx;
|
||||
TPaintBox *PBoxRx;
|
||||
TScrollBar *ScrollBarRx;
|
||||
TPanel *PanelTop;
|
||||
TMainMenu *MainMenu;
|
||||
TMenuItem *KMFile;
|
||||
TGroupBox *GroupCtr;
|
||||
TSpeedButton *SBFIG;
|
||||
TSpeedButton *SBUOS;
|
||||
TGroupBox *GroupDem;
|
||||
TLabel *Label1;
|
||||
TLabel *Label2;
|
||||
TLabel *Label3;
|
||||
TLabel *Label4;
|
||||
TLabel *LTap;
|
||||
TSpeedButton *SBRev;
|
||||
TSpeedButton *SBHAM;
|
||||
TSpeedButton *SBATC;
|
||||
TSpeedButton *SBSQ;
|
||||
TSpeedButton *SBAFC;
|
||||
TComboBox *MarkFreq;
|
||||
TComboBox *ShiftFreq;
|
||||
TPanel *PanelFFT;
|
||||
TPaintBox *PBoxFFTIN;
|
||||
TPanel *PanelWater;
|
||||
TPaintBox *PBoxWater;
|
||||
TPanel *PanelQSO;
|
||||
TPanel *PanelIn;
|
||||
TPanel *PanelStat;
|
||||
TLabel *LCall;
|
||||
TEdit *HisCall;
|
||||
TLabel *LName;
|
||||
TEdit *HisName;
|
||||
TLabel *LHIS;
|
||||
TComboBox *HisRST;
|
||||
TComboBox *MyRST;
|
||||
TSpeedButton *SBQSO;
|
||||
TPaintBox *PBoxIn;
|
||||
TScrollBar *ScrollBarIn;
|
||||
TLabel *LMY;
|
||||
TSpeedButton *SBINClear;
|
||||
TSpeedButton *SBIN1;
|
||||
TSpeedButton *SBIN2;
|
||||
TSpeedButton *SBIN3;
|
||||
TSpeedButton *SBIN4;
|
||||
TComboBox *MsgList;
|
||||
TSpeedButton *SBINEdit;
|
||||
TSpeedButton *SBTXOFF;
|
||||
TSpeedButton *SBTX;
|
||||
TMenuItem *KMEdit;
|
||||
TMenuItem *KView;
|
||||
TMenuItem *KMOpt;
|
||||
TMenuItem *KMHelp;
|
||||
TMenuItem *KOption;
|
||||
TGroupBox *GroupM;
|
||||
TSpeedButton *SBM1;
|
||||
TSpeedButton *SBM2;
|
||||
TSpeedButton *SBM3;
|
||||
TSpeedButton *SBM4;
|
||||
TSpeedButton *SBM5;
|
||||
TSpeedButton *SBM6;
|
||||
TSpeedButton *SBM7;
|
||||
TSpeedButton *SBM8;
|
||||
TSpeedButton *SBM9;
|
||||
TSpeedButton *SBM10;
|
||||
TSpeedButton *SBM11;
|
||||
TSpeedButton *SBM12;
|
||||
TSpeedButton *SBM13;
|
||||
TSpeedButton *SBM14;
|
||||
TSpeedButton *SBM15;
|
||||
TSpeedButton *SBM16;
|
||||
TMenuItem *KOS;
|
||||
TMenuItem *KFFT;
|
||||
TMenuItem *KMacro;
|
||||
TMenuItem *KMsg;
|
||||
TMenuItem *KWebHHT;
|
||||
TMenuItem *N1;
|
||||
TMenuItem *KHlpTxt;
|
||||
TMenuItem *KVol;
|
||||
TMenuItem *KRcvLog;
|
||||
TMenuItem *KFileOut;
|
||||
TOpenDialog *OpenDialog;
|
||||
TMenuItem *N2;
|
||||
TMenuItem *KExit;
|
||||
TMenuItem *N3;
|
||||
TMenuItem *KLog;
|
||||
TMenuItem *KQSO;
|
||||
TSpeedButton *SBFind;
|
||||
TSpeedButton *SBData;
|
||||
TEdit *HisQTH;
|
||||
TSpeedButton *SBInit;
|
||||
TMenuItem *N5;
|
||||
TMenuItem *KOpenLog;
|
||||
TMenuItem *KFlush;
|
||||
TMenuItem *KTest;
|
||||
TMenuItem *N4;
|
||||
TMenuItem *KHlpLog;
|
||||
TSaveDialog *SaveDialog;
|
||||
TMenuItem *KSaveRx;
|
||||
TMenuItem *KFFTFW;
|
||||
TMenuItem *N6;
|
||||
TMenuItem *KFFTWA;
|
||||
TMenuItem *KFFTW1;
|
||||
TMenuItem *KFFTW2;
|
||||
TMenuItem *KFFTW3;
|
||||
TMenuItem *KFFTW05;
|
||||
TMenuItem *KFFTW15;
|
||||
TSpeedButton *SBBPF;
|
||||
TLabel *LLPF;
|
||||
TLabel *Label7;
|
||||
TMenuItem *N7;
|
||||
TMenuItem *KDispVer;
|
||||
TSpeedButton *SBLMS;
|
||||
TLabel *LWait;
|
||||
TTrackBar *TBCharWait;
|
||||
TMenuItem *N8;
|
||||
TMenuItem *KClrRx;
|
||||
TPanel *PanelXY;
|
||||
TPaintBox *PBoxXY;
|
||||
TMenuItem *KXYScope;
|
||||
TLabel *LHZ;
|
||||
TSpeedButton *SBNET;
|
||||
TMenuItem *N9;
|
||||
TMenuItem *KRxRec;
|
||||
TMenuItem *KRxPlay;
|
||||
TMenuItem *KRxStop;
|
||||
TMenuItem *KXYScopeSize;
|
||||
TMenuItem *KXYSmall;
|
||||
TMenuItem *KXYBig;
|
||||
TMenuItem *KRxTime;
|
||||
TMenuItem *KRxPause;
|
||||
TSpeedButton *SBDem;
|
||||
TMenuItem *KRxTop;
|
||||
TMenuItem *KRxPos;
|
||||
TMenuItem *KHlpDig;
|
||||
TMenuItem *KShortCut;
|
||||
TMenuItem *N10;
|
||||
TMenuItem *KHint;
|
||||
TMenuItem *KOptLog;
|
||||
TMenuItem *KPanel;
|
||||
TMenuItem *N11;
|
||||
TMenuItem *KPanelSize;
|
||||
TMenuItem *KPanelSmall;
|
||||
TMenuItem *KPanelBig;
|
||||
TMenuItem *KPanelMedium;
|
||||
TMenuItem *KExtCmd;
|
||||
TMenuItem *KExtCmd1;
|
||||
TMenuItem *KExtCmd2;
|
||||
TMenuItem *KExtCmd3;
|
||||
TMenuItem *KExtCmd4;
|
||||
TMenuItem *N12;
|
||||
TMenuItem *KExtEnt;
|
||||
TMenuItem *KExtEnt1;
|
||||
TMenuItem *KExtEnt2;
|
||||
TMenuItem *KExtEnt3;
|
||||
TMenuItem *KExtEnt4;
|
||||
TMenuItem *N13;
|
||||
TMenuItem *KExtReset;
|
||||
TMenuItem *KExtSusp;
|
||||
TMenuItem *KExtDel;
|
||||
TMenuItem *KExtDel1;
|
||||
TMenuItem *KExtDel2;
|
||||
TMenuItem *KExtDel3;
|
||||
TMenuItem *KExtDel4;
|
||||
TPanel *PanelSQ;
|
||||
TPaintBox *PBoxSQ;
|
||||
TMenuItem *KPanelSuper;
|
||||
TMenuItem *KXYScopeQuality;
|
||||
TMenuItem *KXYQuality1;
|
||||
TMenuItem *KXYQuality2;
|
||||
TMenuItem *KXYQuality3;
|
||||
TMenuItem *KXYQuality4;
|
||||
TMenuItem *KFFTGain;
|
||||
TMenuItem *KFFTGL;
|
||||
TMenuItem *KFFTGM;
|
||||
TMenuItem *KFFTGH;
|
||||
TMenuItem *KFFTGT;
|
||||
TMenuItem *KWebJARTS;
|
||||
TMenuItem *KWebGRP;
|
||||
TMenuItem *KWebENG;
|
||||
TComboBox *Freq;
|
||||
TMenuItem *N14;
|
||||
TMenuItem *KSetHelp;
|
||||
TMenuItem *N15;
|
||||
TMenuItem *KSend;
|
||||
TMenuItem *KRun;
|
||||
TMenuItem *KSChar;
|
||||
TMenuItem *KSWord;
|
||||
TMenuItem *KSLine;
|
||||
TMenuItem *KFFTR;
|
||||
TMenuItem *KFFTRS;
|
||||
TMenuItem *KFFTRM;
|
||||
TMenuItem *KFFTRF;
|
||||
TMenuItem *KPaste;
|
||||
TMenuItem *N16;
|
||||
TMenuItem *KW7TI;
|
||||
TMenuItem *KWebWSK;
|
||||
TMenuItem *N17;
|
||||
TMenuItem *KTNC;
|
||||
TMenuItem *KRM;
|
||||
TMenuItem *KMac;
|
||||
TMenuItem *N18;
|
||||
TMenuItem *KENT;
|
||||
TMenuItem *N19;
|
||||
TMenuItem *N20;
|
||||
TMenuItem *KFFTGS1;
|
||||
TMenuItem *KFFTGS2;
|
||||
TMenuItem *KFFTGS3;
|
||||
TMenuItem *KFFTGS4;
|
||||
TPanel *PanelMac;
|
||||
TMenuItem *KWP;
|
||||
TMenuItem *KS;
|
||||
TMenuItem *KS1;
|
||||
TMenuItem *KS2;
|
||||
TMenuItem *KS3;
|
||||
TMenuItem *KS4;
|
||||
TMenuItem *KS5;
|
||||
TMenuItem *KS6;
|
||||
TMenuItem *KS7;
|
||||
TMenuItem *KS8;
|
||||
TMenuItem *N21;
|
||||
TMenuItem *KSDel;
|
||||
TMenuItem *KSEnt;
|
||||
TMenuItem *KDS1;
|
||||
TMenuItem *KDS2;
|
||||
TMenuItem *KDS3;
|
||||
TMenuItem *KDS4;
|
||||
TMenuItem *KDS5;
|
||||
TMenuItem *KDS6;
|
||||
TMenuItem *KDS7;
|
||||
TMenuItem *KDS8;
|
||||
TMenuItem *KES1;
|
||||
TMenuItem *KES2;
|
||||
TMenuItem *KES3;
|
||||
TMenuItem *KES4;
|
||||
TMenuItem *KES5;
|
||||
TMenuItem *KES6;
|
||||
TMenuItem *KES7;
|
||||
TMenuItem *KES8;
|
||||
TMenuItem *N22;
|
||||
TMenuItem *KSSV;
|
||||
TMenuItem *KSLD;
|
||||
TMenuItem *N23;
|
||||
TMenuItem *KSDEF;
|
||||
TMenuItem *KSRET;
|
||||
TMenuItem *KPttTim;
|
||||
TMenuItem *KVolIn;
|
||||
TMenuItem *KRO;
|
||||
TMenuItem *KROT;
|
||||
TMenuItem *KROF;
|
||||
TMenuItem *KROTU;
|
||||
TMenuItem *KROTD;
|
||||
TMenuItem *N24;
|
||||
TPopupMenu *PopupC;
|
||||
TComboBox *DemoBox2;
|
||||
TComboBox *DemoBox1;
|
||||
TMenuItem *KTX;
|
||||
TMenuItem *N25;
|
||||
void __fastcall FormCloseQuery(TObject *Sender, bool &CanClose);
|
||||
|
||||
void __fastcall PBoxFFTINPaint(TObject *Sender);
|
||||
void __fastcall PBoxWaterPaint(TObject *Sender);
|
||||
|
||||
void __fastcall SBFIGClick(TObject *Sender);
|
||||
void __fastcall MarkFreqChange(TObject *Sender);
|
||||
void __fastcall ShiftFreqChange(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall SBUOSClick(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall PBoxRxPaint(TObject *Sender);
|
||||
void __fastcall FormPaint(TObject *Sender);
|
||||
|
||||
void __fastcall SBRevClick(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall SBATCClick(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
void __fastcall SBSQClick(TObject *Sender);
|
||||
|
||||
void __fastcall SBTXClick(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall PBoxRxMouseUp(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall FormKeyPress(TObject *Sender, char &Key);
|
||||
|
||||
|
||||
void __fastcall ScrollBarRxChange(TObject *Sender);
|
||||
void __fastcall SBAFCClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall PBoxInPaint(TObject *Sender);
|
||||
void __fastcall ScrollBarInChange(TObject *Sender);
|
||||
void __fastcall SBTXOFFClick(TObject *Sender);
|
||||
void __fastcall SBINClearClick(TObject *Sender);
|
||||
void __fastcall SBIN1Click(TObject *Sender);
|
||||
void __fastcall SBIN2Click(TObject *Sender);
|
||||
void __fastcall SBIN4Click(TObject *Sender);
|
||||
void __fastcall SBIN3Click(TObject *Sender);
|
||||
void __fastcall MsgListChange(TObject *Sender);
|
||||
void __fastcall SBINEditClick(TObject *Sender);
|
||||
void __fastcall KOptionClick(TObject *Sender);
|
||||
void __fastcall HisCallKeyPress(TObject *Sender, char &Key);
|
||||
void __fastcall SBMClick(TObject *Sender);
|
||||
void __fastcall KOSClick(TObject *Sender);
|
||||
void __fastcall KFFTClick(TObject *Sender);
|
||||
void __fastcall FormResize(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall TimerTimer(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall KWebHHTClick(TObject *Sender);
|
||||
void __fastcall KHlpTxtClick(TObject *Sender);
|
||||
void __fastcall KVolClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall KRcvLogClick(TObject *Sender);
|
||||
void __fastcall KFileOutClick(TObject *Sender);
|
||||
void __fastcall KExitClick(TObject *Sender);
|
||||
|
||||
void __fastcall KLogClick(TObject *Sender);
|
||||
void __fastcall KQSOClick(TObject *Sender);
|
||||
void __fastcall SBQSOClick(TObject *Sender);
|
||||
void __fastcall SBFindClick(TObject *Sender);
|
||||
void __fastcall HisCallChange(TObject *Sender);
|
||||
|
||||
void __fastcall LNameClick(TObject *Sender);
|
||||
void __fastcall SBInitClick(TObject *Sender);
|
||||
void __fastcall PBoxInClick(TObject *Sender);
|
||||
void __fastcall KTestClick(TObject *Sender);
|
||||
void __fastcall SBHAMClick(TObject *Sender);
|
||||
void __fastcall KOpenLogClick(TObject *Sender);
|
||||
void __fastcall KFlushClick(TObject *Sender);
|
||||
void __fastcall KHlpLogClick(TObject *Sender);
|
||||
void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
|
||||
void __fastcall KSaveRxClick(TObject *Sender);
|
||||
void __fastcall KFFTWAClick(TObject *Sender);
|
||||
void __fastcall KFFTW1Click(TObject *Sender);
|
||||
void __fastcall KFFTW2Click(TObject *Sender);
|
||||
void __fastcall KFFTW3Click(TObject *Sender);
|
||||
void __fastcall KFFTW05Click(TObject *Sender);
|
||||
void __fastcall KFFTW15Click(TObject *Sender);
|
||||
void __fastcall SBBPFClick(TObject *Sender);
|
||||
|
||||
void __fastcall FormShow(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall KDispVerClick(TObject *Sender);
|
||||
void __fastcall SBLMSClick(TObject *Sender);
|
||||
void __fastcall TBCharWaitChange(TObject *Sender);
|
||||
void __fastcall KClrRxClick(TObject *Sender);
|
||||
void __fastcall KXYScopeClick(TObject *Sender);
|
||||
void __fastcall PBoxXYPaint(TObject *Sender);
|
||||
|
||||
void __fastcall SBNETClick(TObject *Sender);
|
||||
void __fastcall KRxRecClick(TObject *Sender);
|
||||
void __fastcall KRxPlayClick(TObject *Sender);
|
||||
void __fastcall KRxStopClick(TObject *Sender);
|
||||
void __fastcall KXYSmallClick(TObject *Sender);
|
||||
void __fastcall KXYBigClick(TObject *Sender);
|
||||
void __fastcall KRxTimeClick(TObject *Sender);
|
||||
void __fastcall KRxPauseClick(TObject *Sender);
|
||||
void __fastcall SBDemClick(TObject *Sender);
|
||||
void __fastcall KRxTopClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall KRxPosClick(TObject *Sender);
|
||||
void __fastcall KHlpDigClick(TObject *Sender);
|
||||
void __fastcall KShortCutClick(TObject *Sender);
|
||||
void __fastcall KHintClick(TObject *Sender);
|
||||
|
||||
void __fastcall KOptLogClick(TObject *Sender);
|
||||
void __fastcall KPanelClick(TObject *Sender);
|
||||
void __fastcall KPanelSmallClick(TObject *Sender);
|
||||
void __fastcall KPanelBigClick(TObject *Sender);
|
||||
void __fastcall KPanelMediumClick(TObject *Sender);
|
||||
void __fastcall KExtEnt1Click(TObject *Sender);
|
||||
void __fastcall KExtEnt2Click(TObject *Sender);
|
||||
void __fastcall KExtEnt3Click(TObject *Sender);
|
||||
void __fastcall KExtEnt4Click(TObject *Sender);
|
||||
void __fastcall KExtCmd1Click(TObject *Sender);
|
||||
void __fastcall KExtCmd2Click(TObject *Sender);
|
||||
void __fastcall KExtCmd3Click(TObject *Sender);
|
||||
void __fastcall KExtCmd4Click(TObject *Sender);
|
||||
void __fastcall KExtResetClick(TObject *Sender);
|
||||
void __fastcall KExtSuspClick(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall KExtDel1Click(TObject *Sender);
|
||||
void __fastcall KExtDel2Click(TObject *Sender);
|
||||
void __fastcall KExtDel3Click(TObject *Sender);
|
||||
void __fastcall KExtDel4Click(TObject *Sender);
|
||||
void __fastcall SBMMouseUp(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall SBIN1MouseUp(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall SBIN2MouseUp(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall SBIN3MouseUp(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall SBIN4MouseUp(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
|
||||
void __fastcall PBoxSQMouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall PBoxSQPaint(TObject *Sender);
|
||||
void __fastcall KPanelSuperClick(TObject *Sender);
|
||||
void __fastcall LLPFClick(TObject *Sender);
|
||||
void __fastcall KXYQuality3Click(TObject *Sender);
|
||||
void __fastcall KXYQuality2Click(TObject *Sender);
|
||||
void __fastcall KXYQuality1Click(TObject *Sender);
|
||||
void __fastcall KXYQuality4Click(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall Label3Click(TObject *Sender);
|
||||
void __fastcall KFFTGLClick(TObject *Sender);
|
||||
void __fastcall KFFTGMClick(TObject *Sender);
|
||||
void __fastcall KFFTGHClick(TObject *Sender);
|
||||
void __fastcall KFFTGTClick(TObject *Sender);
|
||||
void __fastcall KWebJARTSClick(TObject *Sender);
|
||||
void __fastcall KWebGRPClick(TObject *Sender);
|
||||
void __fastcall KWebENGClick(TObject *Sender);
|
||||
void __fastcall LCallClick(TObject *Sender);
|
||||
void __fastcall KSetHelpClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall KSCharClick(TObject *Sender);
|
||||
void __fastcall KSWordClick(TObject *Sender);
|
||||
void __fastcall KSLineClick(TObject *Sender);
|
||||
void __fastcall FreqChange(TObject *Sender);
|
||||
void __fastcall KFFTRSClick(TObject *Sender);
|
||||
void __fastcall KFFTRMClick(TObject *Sender);
|
||||
void __fastcall KFFTRFClick(TObject *Sender);
|
||||
void __fastcall KPasteClick(TObject *Sender);
|
||||
void __fastcall KW7TIClick(TObject *Sender);
|
||||
void __fastcall KWebWSKClick(TObject *Sender);
|
||||
void __fastcall KTNCClick(TObject *Sender);
|
||||
void __fastcall KRMClick(TObject *Sender);
|
||||
|
||||
void __fastcall LTapClick(TObject *Sender);
|
||||
|
||||
void __fastcall KMacClick(TObject *Sender);
|
||||
void __fastcall KENTClick(TObject *Sender);
|
||||
|
||||
void __fastcall KFFTGS1Click(TObject *Sender);
|
||||
void __fastcall KFFTGS2Click(TObject *Sender);
|
||||
void __fastcall KFFTGS4Click(TObject *Sender);
|
||||
void __fastcall KFFTGS3Click(TObject *Sender);
|
||||
void __fastcall PBoxFFTINMouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall HisCallClick(TObject *Sender);
|
||||
void __fastcall SBLMSMouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall SBFindMouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall LWaitClick(TObject *Sender);
|
||||
void __fastcall KWPClick(TObject *Sender);
|
||||
void __fastcall SBDataMouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall KESClick(TObject *Sender);
|
||||
void __fastcall KDSClick(TObject *Sender);
|
||||
void __fastcall KSClick(TObject *Sender);
|
||||
void __fastcall KSSVClick(TObject *Sender);
|
||||
void __fastcall KSLDClick(TObject *Sender);
|
||||
void __fastcall KSDEFClick(TObject *Sender);
|
||||
void __fastcall KSRETClick(TObject *Sender);
|
||||
void __fastcall KPttTimClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall KROFClick(TObject *Sender);
|
||||
void __fastcall KROTClick(TObject *Sender);
|
||||
void __fastcall KROTUClick(TObject *Sender);
|
||||
void __fastcall KROTDClick(TObject *Sender);
|
||||
void __fastcall KMFileClick(TObject *Sender);
|
||||
void __fastcall HisCallDblClick(TObject *Sender);
|
||||
void __fastcall LCallMouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall DemoBox2Change(TObject *Sender);
|
||||
void __fastcall DemoBox1Change(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall SBTXMouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
void __fastcall KTXClick(TObject *Sender);
|
||||
void __fastcall KMOptClick(TObject *Sender);
|
||||
void __fastcall KViewClick(TObject *Sender);
|
||||
void __fastcall KExtCmdClick(TObject *Sender);
|
||||
private: // ユーザー宣言
|
||||
WAVEFORMAT wfm;
|
||||
|
||||
Graphics::TBitmap *pBitmapFFTIN;
|
||||
Graphics::TBitmap *pBitmapWater;
|
||||
Graphics::TBitmap *pBitmapXY;
|
||||
Graphics::TBitmap *pBitmapSQ;
|
||||
|
||||
Graphics::TBitmap *pBitmapRx;
|
||||
Graphics::TBitmap *pBitmapIn;
|
||||
|
||||
CAlignList AlignMain;
|
||||
CAlignList AlignTop;
|
||||
CAlignList AlignQSO;
|
||||
CAlignList AlignStat;
|
||||
|
||||
CWebRef WebRef;
|
||||
|
||||
CRTTY rtty;
|
||||
CRTTY rttysub;
|
||||
CFifoEdit FifoEdit;
|
||||
CComm *pComm;
|
||||
CCtnc *pTnc;
|
||||
CCradio *pRadio;
|
||||
|
||||
int m_ReqRecv;
|
||||
int m_DemType;
|
||||
int m_LpfType;
|
||||
int m_SendWay;
|
||||
|
||||
double m_RxMarkFreq;
|
||||
double m_RxSpaceFreq;
|
||||
void __fastcall UpdateNet(void);
|
||||
void __fastcall UpdateLogLink(void);
|
||||
|
||||
void __fastcall UpdateColor(void);
|
||||
|
||||
void __fastcall WndProc(TMessage &Message);
|
||||
void __fastcall WndCopyData(TMessage &Message);
|
||||
void __fastcall EntryAlignControl(void);
|
||||
void __fastcall OnIdle(TObject *Sender, bool &Done);
|
||||
void __fastcall OnMSG(tagMSG &Msg, bool &Handled);
|
||||
void __fastcall OnActivate(TObject *Sender);
|
||||
void __fastcall OnRestore(TObject *Sender);
|
||||
|
||||
TSpeedButton *__fastcall GetSB(int n);
|
||||
int __fastcall GetMacroIndex(TObject *Sender);
|
||||
void __fastcall UpdateControlPanel(void);
|
||||
void __fastcall UpdateXY2(void);
|
||||
void __fastcall AlignLogPanel(void);
|
||||
void __fastcall UpdatePanel(void);
|
||||
void __fastcall UpdateItem(void);
|
||||
void __fastcall UpdateMacro(void);
|
||||
void __fastcall UpdateLMS(void);
|
||||
void __fastcall UpdateUI(void);
|
||||
void __fastcall ReadSampFreq(void);
|
||||
void __fastcall ReadCombList(TMemIniFile *tp, AnsiString &as, LPCSTR pKey, LPCSTR pDef);
|
||||
void __fastcall ReadRegister(void);
|
||||
void __fastcall WriteRegister(void);
|
||||
void __fastcall StoreCWID(LPSTR &tt, char c, int &nc, int size);
|
||||
void __fastcall ConvString(LPSTR t, LPCSTR p, int size, int sw);
|
||||
void __fastcall SetGreetingString(LPSTR t, LPCSTR pCall, int type);
|
||||
void __fastcall UpdateFSK(void);
|
||||
void __fastcall OpenCloseCom(void);
|
||||
|
||||
void __fastcall DoOption(TObject *Sender, int sw);
|
||||
void __fastcall SetFSKPara(COMMPARA *cp);
|
||||
void __fastcall OpenClosePTT(void);
|
||||
void __fastcall WriteFifoEdit(LPCSTR p);
|
||||
void __fastcall PushKey(char Key);
|
||||
|
||||
void __fastcall TimerFocus(void);
|
||||
void __fastcall XMIT(int sw);
|
||||
void __fastcall ToTX(LPCSTR p);
|
||||
void __fastcall ToRX(int sw);
|
||||
void __fastcall FindMsgList(AnsiString fs);
|
||||
void __fastcall FindMsgLst(WORD nKey);
|
||||
void __fastcall UpdateMsgList(void);
|
||||
int __fastcall OutputFile(LPCSTR pName);
|
||||
|
||||
void __fastcall SetShift(double sf);
|
||||
void __fastcall UpdateLogData(void);
|
||||
void __fastcall UpdateTextData(void);
|
||||
int __fastcall DrawXY(void);
|
||||
void __fastcall UpdateXYScope(void);
|
||||
void __fastcall UpdateXYQuality(void);
|
||||
void __fastcall UpdateCallsign(void);
|
||||
|
||||
void __fastcall RecvJob(void);
|
||||
|
||||
void __fastcall CallCapture(void);
|
||||
void __fastcall QSOIN(void);
|
||||
void __fastcall QSOOUT(int sw);
|
||||
|
||||
CINTPXY2 i2m;
|
||||
CINTPXY2 i2s;
|
||||
CINTPXY4FIR i4m;
|
||||
CINTPXY4FIR i4s;
|
||||
CINTPXY8FIR i8m;
|
||||
CINTPXY8FIR i8s;
|
||||
|
||||
int m_XYSize;
|
||||
int m_XYQuality;
|
||||
int m_PanelSize;
|
||||
|
||||
int m_InitFirst;
|
||||
int m_DisAlign;
|
||||
int m_BefHeight;
|
||||
int m_DisEvent;
|
||||
int m_MacroStat;
|
||||
int m_Macro;
|
||||
int m_PaletteQuery;
|
||||
int m_NameQTH;
|
||||
int m_Ctrl;
|
||||
int m_ReqPaletteChange;
|
||||
int m_PaletteTimer;
|
||||
int m_Dupe;
|
||||
int m_Running;
|
||||
int m_Baud;
|
||||
int m_RemoteTimer;
|
||||
int m_RemoteDelay;
|
||||
|
||||
int m_OptionDialog;
|
||||
HWND m_hOptionWnd;
|
||||
|
||||
AnsiString m_NowStr;
|
||||
|
||||
int m_filemode;
|
||||
int m_FifoOutTimer;
|
||||
|
||||
int m_FIGTimer;
|
||||
void __fastcall UpdateLWait(void);
|
||||
int __fastcall IsTxIdle(void);
|
||||
int __fastcall GetTxBufCount(void);
|
||||
|
||||
TMenuItem *pAndyMenu;
|
||||
TMenuItem *pAndyMenu2;
|
||||
void __fastcall KAndyHelp(TObject *Sender);
|
||||
void __fastcall AddHelpMenu(void);
|
||||
|
||||
void __fastcall UpdateTitle(void);
|
||||
void __fastcall AutoLogSave(void);
|
||||
|
||||
// Profileのインプリメント
|
||||
TMenuItem *__fastcall GetKS(int n);
|
||||
TMenuItem *__fastcall GetKDS(int n);
|
||||
TMenuItem *__fastcall GetKES(int n);
|
||||
void __fastcall UpdateProfile(void);
|
||||
void __fastcall ReadProfileList(void);
|
||||
void __fastcall ReadProfile(int n, LPCSTR pName);
|
||||
void __fastcall WriteProfile(int n);
|
||||
void __fastcall WriteProfile(int n, LPCSTR pName, int Flag);
|
||||
void __fastcall RemoteProfile(DWORD flag);
|
||||
LPCSTR m_pRemOpenName;
|
||||
|
||||
#if USEPAL
|
||||
public:
|
||||
HPALETTE UsrPal;
|
||||
private:
|
||||
HPALETTE OldPal;
|
||||
void __fastcall ClosePalette(void);
|
||||
void __fastcall SetupPalette(RGBQUAD *pTbl, int max);
|
||||
int __fastcall EntryColor(RGBQUAD *pTbl, TColor col, int n);
|
||||
void __fastcall SetColorIndex(void);
|
||||
|
||||
DYNAMIC HPALETTE __fastcall GetPalette(void);
|
||||
#endif
|
||||
|
||||
CRecentMenu RecentMenu;
|
||||
void __fastcall UpdateRecentMenu(void);
|
||||
void __fastcall RecentAdd(LPCSTR pNew, int f);
|
||||
void __fastcall OnRecentClick(TObject *Sender);
|
||||
|
||||
void __fastcall SetHint(TControl *tp, WORD Key);
|
||||
void __fastcall SetShortCut(TMenuItem *mp, WORD Key);
|
||||
|
||||
void __fastcall UpdateExtProgram(void);
|
||||
void __fastcall KExtEntClick(int n, TMenuItem *mp);
|
||||
void __fastcall KExtCmdClick(int n);
|
||||
|
||||
void __fastcall SBINMouseUp(int n);
|
||||
|
||||
void __fastcall DrawSQ(void);
|
||||
|
||||
void __fastcall EditMB(int n);
|
||||
void __fastcall FindCall(void);
|
||||
// PttTimerのインプリメント
|
||||
int m_PttTimer;
|
||||
int m_PttTimerCount;
|
||||
void __fastcall UpdatePttTimer(void);
|
||||
|
||||
// ファイル送信のインプリメント
|
||||
TSendFileDlg *p_SendFileDlg;
|
||||
|
||||
// BARTG
|
||||
int m_BARTGTimer;
|
||||
void __fastcall UpdateBARTG(void);
|
||||
|
||||
public: // ユーザー宣言
|
||||
__fastcall TMmttyWd(TComponent* Owner);
|
||||
__fastcall ~TMmttyWd();
|
||||
void __fastcall StartOption(void);
|
||||
|
||||
CPrintText PrintText;
|
||||
TSound *pSound;
|
||||
|
||||
void __fastcall FirstFileMapping(void);
|
||||
void __fastcall UpdateComarray(void);
|
||||
void __fastcall UpdateRemort(void);
|
||||
void __fastcall OutputStr(LPCSTR pOut);
|
||||
|
||||
void __fastcall SetYourCallsign(LPCSTR pCall);
|
||||
void __fastcall SetYourName(LPCSTR pName);
|
||||
void __fastcall SetYourQTH(LPCSTR pQTH);
|
||||
void __fastcall SetYourRST(LPCSTR pRST);
|
||||
void __fastcall UpdateLimit(void);
|
||||
|
||||
void __fastcall UpdateShortCut(BOOL bMenu);
|
||||
|
||||
void __fastcall UpdateSystemFont(void);
|
||||
void __fastcall ReqPaletteChange(void);
|
||||
void __fastcall UpdateRev(void);
|
||||
void __fastcall PostApp(WPARAM wParam, LPARAM lParam);
|
||||
|
||||
//Macro Intvalのインプリメント
|
||||
void __fastcall ClearMacroTimer(void);
|
||||
void __fastcall MacBtnExec(int n);
|
||||
int m_MacRetry;
|
||||
int m_MacTimer;
|
||||
|
||||
void __fastcall AdjustFocus(void);
|
||||
|
||||
//コールリストのインプリメント
|
||||
#define CALLLISTMAX 32
|
||||
void __fastcall AddCall(LPCSTR p);
|
||||
void __fastcall KCClick(TObject *Sender);
|
||||
|
||||
//復調器コンンボボックスのインプリメント
|
||||
AnsiString m_asFilterTap;
|
||||
AnsiString m_asVCOGain;
|
||||
AnsiString m_asIIRBW;
|
||||
AnsiString m_asBaud;
|
||||
AnsiString m_asSmooth;
|
||||
AnsiString m_asLoopFC;
|
||||
int m_ShowBaud;
|
||||
void __fastcall SelectCombo(int sw);
|
||||
|
||||
//TNC模擬機能のインプリメント
|
||||
void __fastcall OnTncEvent(void);
|
||||
void __fastcall OpenCloseTNC(void);
|
||||
void __fastcall UpdateTNCPTT(void);
|
||||
void __fastcall SetNMMT(void);
|
||||
void __fastcall TncConvers(void);
|
||||
BOOL __fastcall RxCommon(BYTE c);
|
||||
void __fastcall RxTnc241(char c);
|
||||
void __fastcall RxKAM(char c);
|
||||
void __fastcall CmdTnc241(LPSTR p);
|
||||
void __fastcall CmdKAM(LPSTR p);
|
||||
void __fastcall PutTNC(char c);
|
||||
void __fastcall UpdateStayOnTop(void);
|
||||
void __fastcall UpdateMacroShow(int sw);
|
||||
|
||||
//リモート機能のインプリメント
|
||||
int m_cRemoteTimeout;
|
||||
AnsiString m_strCommonMemory;
|
||||
|
||||
HANDLE hMap;
|
||||
COMARRAY *pMap;
|
||||
int m_RemoteHeight;
|
||||
int m_RemoteBaud;
|
||||
int m_RemoteSwitch;
|
||||
int m_RemoteView;
|
||||
int m_RemoteIIR;
|
||||
int m_RemoteLPF;
|
||||
int m_RemoteMark;
|
||||
int m_RemoteSpace;
|
||||
int m_RemoteNotch;
|
||||
int m_RemoteDefShift;
|
||||
|
||||
void __fastcall RemoteFreq(void);
|
||||
void __fastcall InitRemoteStat(void);
|
||||
DWORD __fastcall GetRemoteSwitch(void);
|
||||
DWORD __fastcall GetRemoteView(void);
|
||||
void __fastcall RemoteStat(void);
|
||||
void __fastcall RemoteSwitch(DWORD d);
|
||||
void __fastcall RemoteView(DWORD d);
|
||||
void __fastcall RemoteSigLevel(DWORD d);
|
||||
void __fastcall RemoteMMTTY(tagMSG &Msg);
|
||||
void __fastcall SetRemoteFFT(void);
|
||||
//Radio command機能のインプリメント
|
||||
void __fastcall OpenCloseRadio(void);
|
||||
|
||||
// void __fastcall TopWindow(void);
|
||||
|
||||
CTextFifo m_cmdTNC;
|
||||
AnsiString m_TNCStg; // 送信保留データ
|
||||
#define CM_CTNC (WM_USER+400) // Hook on WndProc
|
||||
void __fastcall OnTncEvent(TMessage &Message);
|
||||
|
||||
#define CM_CRADIO (WM_USER+401)
|
||||
#define CM_CMML (WM_USER+402)
|
||||
#define CM_CMMR (WM_USER+403)
|
||||
protected:
|
||||
void __fastcall CMWheel(TMessage Message);
|
||||
void __fastcall CMMML(TMessage Message);
|
||||
void __fastcall CMMMR(TMessage Message);
|
||||
|
||||
BEGIN_MESSAGE_MAP
|
||||
MESSAGE_HANDLER(WM_MOUSEWHEEL, TMessage, CMWheel)
|
||||
MESSAGE_HANDLER(CM_CMML, TMessage, CMMML)
|
||||
MESSAGE_HANDLER(CM_CMMR, TMessage, CMMMR)
|
||||
END_MESSAGE_MAP(TForm)
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
extern TMmttyWd *MmttyWd;
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
243
MmcgDlg.cpp
Normal file
243
MmcgDlg.cpp
Normal file
|
|
@ -0,0 +1,243 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "MmcgDlg.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TMmcgDlgBox *MmcgDlgBox;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TMmcgDlgBox::TMmcgDlgBox(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
SBInc->Caption = "String";
|
||||
SBMask->Caption = "Area";
|
||||
CancelBtn->Caption = "Cancel";
|
||||
}
|
||||
|
||||
m_DisEvent = 0;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TMmcgDlgBox::UpdateCaption(void)
|
||||
{
|
||||
char bf[256];
|
||||
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
if( mmcg.m_Call[0] ){
|
||||
sprintf(bf, "MMCG [%s] Find: %d", mmcg.m_Call, mmcg.m_FindCnt);
|
||||
}
|
||||
else {
|
||||
sprintf(bf, "MMCG Find: %d", mmcg.m_FindCnt);
|
||||
}
|
||||
}
|
||||
else {
|
||||
if( mmcg.m_Call[0] ){
|
||||
sprintf(bf, "MMCG [%s] Œó•â : %d", mmcg.m_Call, mmcg.m_FindCnt);
|
||||
}
|
||||
else {
|
||||
sprintf(bf, "MMCG Œó•â: %d", mmcg.m_FindCnt);
|
||||
}
|
||||
}
|
||||
Caption = bf;
|
||||
}
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TMmcgDlgBox::Execute(AnsiString &call, AnsiString &qth, AnsiString &op)
|
||||
{
|
||||
StrCopy(mmcg.m_Call, call.c_str(), MLCALL);
|
||||
mmcg.SetMask();
|
||||
SBMask->Down = TRUE;
|
||||
if( mmcg.m_mask == -1 ) SBMask->Enabled = FALSE;
|
||||
|
||||
char bf[256];
|
||||
|
||||
bf[0] = 0;
|
||||
if( isdigit(*op.c_str()) ){
|
||||
strcpy(bf, op.c_str());
|
||||
}
|
||||
else if( !qth.IsEmpty() ){
|
||||
strcpy(bf, qth.c_str());
|
||||
}
|
||||
m_DisEvent++;
|
||||
EditYomi->Text = bf;
|
||||
mmcg.Find(bf);
|
||||
UpdateCaption();
|
||||
m_DisEvent--;
|
||||
Grid->RowCount = mmcg.m_FindCnt ? mmcg.m_FindCnt + 1 : 2;
|
||||
if( ShowModal() == IDOK ){
|
||||
int n = Grid->Row - 1;
|
||||
if( (n >= 0)&&(n < mmcg.m_FindCnt) ){
|
||||
qth = mmcg.GetQTH(mmcg.m_fp[n]);
|
||||
op = mmcg.m_fp[n]->Code;
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TMmcgDlgBox::GridDrawCell(TObject *Sender, int Col, int Row,
|
||||
TRect &Rect, TGridDrawState State)
|
||||
{
|
||||
char bf[256];
|
||||
MMCG *mp;
|
||||
|
||||
Grid->Canvas->FillRect(Rect);
|
||||
int X = Rect.Left + 4;
|
||||
int Y = Rect.Top + 2;
|
||||
|
||||
if( Row ){
|
||||
Row--;
|
||||
bf[0] = 0;
|
||||
if( Row < mmcg.m_FindCnt ){
|
||||
mp = mmcg.m_fp[Row];
|
||||
}
|
||||
else {
|
||||
mp = NULL;
|
||||
}
|
||||
switch(Col){
|
||||
case 0: // Code
|
||||
if( mp != NULL ) strcpy(bf, mp->Code);
|
||||
break;
|
||||
case 1: // QTH
|
||||
if( mp != NULL ) strcpy(bf, mmcg.GetQTH(mp));
|
||||
break;
|
||||
case 2: // Key
|
||||
if( mp != NULL ) strcpy(bf, mp->Key);
|
||||
break;
|
||||
}
|
||||
Grid->Canvas->TextOut(X, Y, bf);
|
||||
}
|
||||
else { // ƒ^ƒCƒgƒ‹
|
||||
LPCSTR _tt[]={
|
||||
"Code","QTH","Key",
|
||||
};
|
||||
Grid->Canvas->TextOut(X, Y, _tt[Col]);
|
||||
}
|
||||
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TMmcgDlgBox::EditYomiChange(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
char bf[256];
|
||||
|
||||
strcpy(bf, AnsiString(EditYomi->Text).c_str());
|
||||
mmcg.Find(bf);
|
||||
UpdateCaption();
|
||||
Grid->RowCount = mmcg.m_FindCnt ? mmcg.m_FindCnt + 1 : 2;
|
||||
Grid->Invalidate();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TMmcgDlgBox::EditYomiKeyPress(TObject *Sender, char &Key)
|
||||
{
|
||||
if( Key == 0x20 ){
|
||||
EditYomi->Text = "";
|
||||
Key = 0;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TMmcgDlgBox::EditYomiKeyDown(TObject *Sender, WORD &Key,
|
||||
TShiftState Shift)
|
||||
{
|
||||
switch(Key){
|
||||
case VK_UP:
|
||||
if( Grid->Row >= 2 ) Grid->Row--;
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_DOWN:
|
||||
if( Grid->Row < Grid->RowCount - 1 ) Grid->Row++;
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_HOME:
|
||||
Grid->Row = 1;
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_END:
|
||||
Grid->Row = Grid->RowCount - 1;
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_F1:
|
||||
SBInc->Down = SBInc->Down ? 0 : 1;
|
||||
SBIncClick(NULL);
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_F2:
|
||||
SBMask->Down = SBMask->Down ? 0 : 1;
|
||||
SBMaskClick(NULL);
|
||||
Key = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TMmcgDlgBox::EditYomiKeyUp(TObject *Sender, WORD &Key,
|
||||
TShiftState Shift)
|
||||
{
|
||||
switch(Key){
|
||||
case VK_UP:
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_DOWN:
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_HOME:
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_END:
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_F1:
|
||||
Key = 0;
|
||||
break;
|
||||
case VK_F2:
|
||||
Key = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TMmcgDlgBox::SBMaskClick(TObject *Sender)
|
||||
{
|
||||
if( SBMask->Down ){
|
||||
mmcg.SetMask();
|
||||
}
|
||||
else {
|
||||
mmcg.m_mask = -1;
|
||||
}
|
||||
EditYomiChange(NULL);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TMmcgDlgBox::SBIncClick(TObject *Sender)
|
||||
{
|
||||
if( SBInc->Down ){
|
||||
mmcg.m_sinc = 1;
|
||||
}
|
||||
else {
|
||||
mmcg.m_sinc = 0;
|
||||
}
|
||||
EditYomiChange(NULL);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
MmcgDlg.dfm
Normal file
BIN
MmcgDlg.dfm
Normal file
Binary file not shown.
78
MmcgDlg.h
Normal file
78
MmcgDlg.h
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef MmcgDlgH
|
||||
#define MmcgDlgH
|
||||
//----------------------------------------------------------------------------
|
||||
/* JA7UDE 0428
|
||||
#include <vcl\System.hpp>
|
||||
#include <vcl\Windows.hpp>
|
||||
#include <vcl\SysUtils.hpp>
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Graphics.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
#include <vcl\Grids.hpp>
|
||||
*/
|
||||
//----------------------------------------------------------------------------
|
||||
#include "Mmcg.h"
|
||||
#include <Buttons.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Grids.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TMmcgDlgBox : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TStringGrid *Grid;
|
||||
TEdit *EditYomi;
|
||||
TSpeedButton *SBMask;
|
||||
TSpeedButton *SBInc;
|
||||
void __fastcall GridDrawCell(TObject *Sender, int Col, int Row, TRect &Rect,
|
||||
TGridDrawState State);
|
||||
void __fastcall EditYomiChange(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall EditYomiKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
|
||||
void __fastcall EditYomiKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
||||
void __fastcall SBMaskClick(TObject *Sender);
|
||||
void __fastcall SBIncClick(TObject *Sender);
|
||||
void __fastcall EditYomiKeyPress(TObject *Sender, char &Key);
|
||||
private:
|
||||
int m_DisEvent;
|
||||
|
||||
void __fastcall UpdateCaption(void);
|
||||
public:
|
||||
virtual __fastcall TMmcgDlgBox(TComponent* AOwner);
|
||||
|
||||
int __fastcall Execute(AnsiString &call, AnsiString &qth, AnsiString &op);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TMmcgDlgBox *MmcgDlgBox;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
802
Mmtty English.ini
Normal file
802
Mmtty English.ini
Normal file
|
|
@ -0,0 +1,802 @@
|
|||
[SoundCard]
|
||||
SampFreq=1.102500e+04
|
||||
TxOffset=0.000000e+00
|
||||
|
||||
[ComboList]
|
||||
Mark=2125,2000,1700,1445,1275,1170,1000,915
|
||||
Shift=23,85,160,170,182,200,240,350,425,850
|
||||
Baud=22,45,45.45,50,56,75,100,110,150,200,300
|
||||
RST=599,579,569,559,449,339,448,337,225,111
|
||||
IIRBW=15,20,25,30,35,40,45,50,60,70,80,90,100,150,200
|
||||
VCO=1.0,1.2,1.5,2.0,2.5,3.0,3.25,3.5,3.75,4.0,4.5,5.0,8.0
|
||||
LoopFC=30,40,50,80,100,150,200,250,300,350,400,450,500,600,800,1000
|
||||
|
||||
[Grid]
|
||||
Log=
|
||||
QSO=
|
||||
|
||||
[Help]
|
||||
HTML=
|
||||
MMTTY=Mmtty.txt
|
||||
MMTTYLOG=Mmttylog.txt
|
||||
DIGITAL=Digital.txt
|
||||
FontName=Arial
|
||||
FontCharset=0
|
||||
FontSize=10
|
||||
UseNotePad=0
|
||||
|
||||
[Window]
|
||||
WindowState=0
|
||||
ShowMacro=1
|
||||
MemoryWindow=0
|
||||
Disable=0
|
||||
StayOnTop=0
|
||||
|
||||
[WindowFont]
|
||||
Name=Arial
|
||||
Charset=0
|
||||
Style=0
|
||||
Adjust=0
|
||||
|
||||
[ButtonFont]
|
||||
Name=Arial
|
||||
Charset=0
|
||||
Style=0
|
||||
Adjust=0
|
||||
|
||||
[Font]
|
||||
Name=Arial
|
||||
Size=10
|
||||
AdjX=0
|
||||
AdjY=0
|
||||
Charset=0
|
||||
Zero=1
|
||||
Style=0
|
||||
|
||||
[Define]
|
||||
ControlPanel=1
|
||||
FFT=1
|
||||
FFTFW=0
|
||||
FFTGain=1
|
||||
FFTResp=2
|
||||
UOS=1
|
||||
CodeSet=0
|
||||
XYScope=0
|
||||
XYScopeSize=0
|
||||
XYScopeReverse=0
|
||||
XYQuality=0
|
||||
PanelSize=2
|
||||
AFC=0
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
AutoCR=1
|
||||
WardWarp=1
|
||||
SendWay=0
|
||||
Running=0
|
||||
PttTimer=60
|
||||
TxNet=0
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
LimitAGC=1
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=1
|
||||
SQ=1
|
||||
SQLevel=6.000000e+02
|
||||
DefFix45=1
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
Rev=0
|
||||
SpaceFreq=2.295000e+03
|
||||
MarkFreq=2.125000e+03
|
||||
VERFFTDEM=1
|
||||
DEMTYPE=1
|
||||
BaudRate=4.545000e+01
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.500000e+01
|
||||
Smooz=3.000000e+02
|
||||
FFTTones=4
|
||||
SoundRxFifo=12
|
||||
SoundTxFifo=4
|
||||
SoundPriority=1
|
||||
SoundDevice=2
|
||||
SoundOutDevice=5
|
||||
SoundStereo=0
|
||||
SoundMMW=
|
||||
Tap=512
|
||||
IIRBW=60
|
||||
Diddle=2
|
||||
TxPort=0
|
||||
TxdJob=0
|
||||
TxFixShift=0
|
||||
PTT=NONE
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
MacroImm=0
|
||||
CharLenFile=1024
|
||||
DisTX=0
|
||||
TXLoop=1
|
||||
TXBPF=1
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
RXBPF=0
|
||||
RXBPFTAP=64
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=2.500000e+02
|
||||
RXlms=0
|
||||
RXlmsDelay=24
|
||||
RXlmsMU2=1.000000e-03
|
||||
RXlmsGM=9.998000e-01
|
||||
RXlmsInv=0
|
||||
RXlmsAGC=1
|
||||
RXlmsTAP=512
|
||||
RXNotchTAP=192
|
||||
RXlmsBPF=0
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2210
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Call=JA7UDE
|
||||
|
||||
[Button]
|
||||
Hint=1
|
||||
|
||||
[Log]
|
||||
Switch=0
|
||||
TimeStamp=1
|
||||
TimeStampUTC=0
|
||||
AutoUTCOffset=0
|
||||
UTCOffset=0
|
||||
UTCOffsetMin=0
|
||||
LogLink=1
|
||||
LinkPoll=0
|
||||
LinkPTT=0
|
||||
PathName=
|
||||
ShowTimeStamp=1
|
||||
|
||||
[MMLink]
|
||||
Name=
|
||||
|
||||
[Dir]
|
||||
OutFile=
|
||||
ExtLog=
|
||||
RecSound=
|
||||
|
||||
[LogFile]
|
||||
Name=
|
||||
|
||||
[WaterFall]
|
||||
Palette=0
|
||||
|
||||
[Input]
|
||||
Height=97
|
||||
|
||||
[Color]
|
||||
RXBack=16777215
|
||||
RXChar=0
|
||||
RXTXChar=0
|
||||
INBack=16777215
|
||||
INChar=0
|
||||
INTXChar=255
|
||||
WaterLow=0
|
||||
WaterHigh=16777215
|
||||
XYScope=16777215
|
||||
|
||||
[SysKey]
|
||||
S1=0
|
||||
S2=0
|
||||
S3=0
|
||||
S4=0
|
||||
S5=0
|
||||
S6=0
|
||||
S7=0
|
||||
S8=0
|
||||
S9=321
|
||||
S10=0
|
||||
S11=335
|
||||
S12=332
|
||||
S13=324
|
||||
S14=0
|
||||
S15=0
|
||||
S16=579
|
||||
S17=0
|
||||
S18=0
|
||||
S19=0
|
||||
S20=0
|
||||
S21=0
|
||||
S22=0
|
||||
S23=0
|
||||
S24=0
|
||||
S25=120
|
||||
S26=119
|
||||
S27=0
|
||||
S28=323
|
||||
S29=334
|
||||
S30=337
|
||||
S31=338
|
||||
S32=326
|
||||
S33=112
|
||||
S34=0
|
||||
S35=0
|
||||
S36=0
|
||||
S37=0
|
||||
S38=36
|
||||
S39=35
|
||||
S40=0
|
||||
S41=0
|
||||
S42=33
|
||||
S43=34
|
||||
S44=0
|
||||
S45=0
|
||||
S46=0
|
||||
S47=0
|
||||
S48=0
|
||||
S49=0
|
||||
S50=294
|
||||
S51=296
|
||||
S52=0
|
||||
S53=0
|
||||
S54=588
|
||||
S55=0
|
||||
S56=549
|
||||
S57=551
|
||||
S58=596
|
||||
S59=0
|
||||
S60=322
|
||||
S61=0
|
||||
S62=0
|
||||
S63=0
|
||||
S64=0
|
||||
S65=0
|
||||
S66=0
|
||||
S67=0
|
||||
S68=0
|
||||
S69=0
|
||||
S70=0
|
||||
S71=0
|
||||
S72=0
|
||||
S73=0
|
||||
S74=0
|
||||
S75=0
|
||||
S76=0
|
||||
S77=0
|
||||
S78=0
|
||||
S79=0
|
||||
S80=582
|
||||
|
||||
[InBtnCol]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
|
||||
[InBtnKey]
|
||||
M1=113
|
||||
M2=114
|
||||
M3=115
|
||||
M4=116
|
||||
|
||||
[InBtnName]
|
||||
M1=1X1
|
||||
M2=DEAR
|
||||
M3=ANS
|
||||
M4=BTU
|
||||
|
||||
[InBtn]
|
||||
M1="%c DE %m"
|
||||
M2="DEAR %n"
|
||||
M3="__\r\nRGR %c DE %m ALL OK DEAR %n\r\n"
|
||||
M4="BTU %c DE %m KN\r\n_\\"
|
||||
|
||||
[MacroTimer]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
M5=0
|
||||
M6=0
|
||||
M7=0
|
||||
M8=0
|
||||
M9=0
|
||||
M10=0
|
||||
M11=0
|
||||
M12=0
|
||||
M13=0
|
||||
M14=0
|
||||
M15=0
|
||||
M16=0
|
||||
|
||||
[MacroCol]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
M5=0
|
||||
M6=0
|
||||
M7=0
|
||||
M8=0
|
||||
M9=0
|
||||
M10=0
|
||||
M11=0
|
||||
M12=0
|
||||
M13=0
|
||||
M14=0
|
||||
M15=0
|
||||
M16=0
|
||||
|
||||
[MacroKey]
|
||||
M1=305
|
||||
M2=306
|
||||
M3=307
|
||||
M4=308
|
||||
M5=309
|
||||
M6=310
|
||||
M7=311
|
||||
M8=312
|
||||
M9=313
|
||||
M10=121
|
||||
M11=122
|
||||
M12=123
|
||||
M13=0
|
||||
M14=0
|
||||
M15=118
|
||||
M16=117
|
||||
|
||||
[MacroEditKey]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
M5=0
|
||||
M6=0
|
||||
M7=0
|
||||
M8=0
|
||||
M9=0
|
||||
M10=0
|
||||
M11=0
|
||||
M12=0
|
||||
M13=0
|
||||
M14=0
|
||||
M15=0
|
||||
M16=0
|
||||
|
||||
[MacroName]
|
||||
M1=1X2
|
||||
M2=2X3
|
||||
M3=DE3
|
||||
M4=UR599
|
||||
M5=QANS
|
||||
M6=M6
|
||||
M7=M7
|
||||
M8=M8
|
||||
M9=SK
|
||||
M10=EE
|
||||
M11=M11
|
||||
M12=M12
|
||||
M13=RY
|
||||
M14=M14
|
||||
M15=CQ2
|
||||
M16=CQ1
|
||||
|
||||
[Macro]
|
||||
M1="__\r\n%c DE %m %m K\r\n_\\"
|
||||
M2="__\r\n%c %c DE %m %m %m K\r\n_\\"
|
||||
M3="__\r\nDE %m %m %m K\r\n_\\"
|
||||
M4="__\r\nQSL UR 599-599 TU\r\n_\\"
|
||||
M5="__\r\nOK TNX %n\r\nUR %r %r NAME MAKO %c DE %m TU SK\r\n_\\"
|
||||
M6=""
|
||||
M7=""
|
||||
M8=""
|
||||
M9="\\\r\n73 TU SK SK\r\n%{TU}\\"
|
||||
M10="[__~~__~\\"
|
||||
M11=""
|
||||
M12=""
|
||||
M13="\r\nRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRY#"
|
||||
M14=""
|
||||
M15="__\r\nRYRY CQ CQ CQ DE %m %m %m\r\nRYRY CQ CQ CQ DE %m %m %m PSE K\r\n_\\"
|
||||
M16="__\r\nRYRY CQ CQ CQ DE %m %m %m PSE K\r\n_\\"
|
||||
|
||||
[MsgKey]
|
||||
M1=368
|
||||
M2=369
|
||||
M3=370
|
||||
M4=371
|
||||
M5=372
|
||||
M6=373
|
||||
M7=374
|
||||
M8=375
|
||||
M9=376
|
||||
M10=0
|
||||
|
||||
[MsgName]
|
||||
M1=AF CALL1
|
||||
M2=FINAL3
|
||||
M3=FINAL2
|
||||
M4=FINAL
|
||||
M5=AF CQ2 (GEAR)
|
||||
M6=AF CQ1
|
||||
M7=AF CALL2 (GEAR)
|
||||
M8=AF CALL1 (QUICK)
|
||||
M9=FINAL (QUICK)
|
||||
M10=
|
||||
|
||||
[MsgList]
|
||||
M1="\\__\r\nRGR %c DE %m %g DEAR %n\r\nTHANK YOU FOR THE NICE REPORT.\r\nYOU ARE %r %r %r IN OSAKA OSAKA OSAKA\r\nMY NAME IS MAKO MAKO MAKO\r\nHOW COPY? BTU %c DE %m KN\r\n_\\"
|
||||
M2="\\__\\"
|
||||
M3="\\__\r\nTNX AGAIN DEAR %n CU SK\r\n__\\"
|
||||
M4="\\__\r\nOK DEAR %n\r\nMANY THANK YOU FOR THE NICE QSO.\r\nI AM LOOKING FORWARD TO SEE YOU AGAIN ON CW AND PSK31.\r\nCUL! AND BEST 73\r\n%c DE %m TU SK SK..\r\n__"
|
||||
M5="\\__\r\nRGR %c DE %m ALL OK DEAR %n\r\nTHANK YOU FOR THE NICE REPORT.\r\n\r\nI AM RUNNING 50W 50W INTO A SMALL LOOP ANTENNA(ONLY 90CM DIA!)\r\n\r\nRTTY MODEM IS HOMEMADE SOFTWARE ON WINDOWS-95 SOUNDBLASTER.\r\n\r\nTHANK YOU FOR THE NICE QSO DEAR %n\r\nMY QSL IS OK VIA THE BURO.\r\n\r\nHOW? BTU %c DE %m KN\r\n_\\"
|
||||
M6="\\__\r\n%c %c DE %m %g\r\nTHANK YOU FOR YOUR CALL. I AM GLAD TO SEE YOU ON RTTY.\r\nYOU ARE %r %r %r IN OSAKA OSAKA OSAKA\r\nMY NAME IS MAKO MAKO MAKO\r\nHOW COPY? BTU %c %c DE %m KN\r\n_\\"
|
||||
M7="\\__\r\nRGR %c DE %m ALL OK DEAR %n\r\nTHANK YOU FOR THE NICE INFO.\r\n\r\nI AM RUNNING 50W 50W INTO A SMALL LOOP ANTENNA(ONLY 90CM DIA!)\r\n\r\nRTTY MODEM IS HOMEMADE SOFTWARE ON WINDOWS-95 SOUNDBLASTER.\r\n\r\nTHANK YOU FOR THE NICE QSO DEAR %n\r\nMY QSL IS OK VIA THE BURO.\r\n\r\nHOW? BTU %c DE %m KN\r\n_\\"
|
||||
M8="\\__\r\nRGR TNX %n\r\nUR %r %r %r NAME IS MAKO MAKO MAKO\r\nHOW? BTU %c DE %m KN\r\n_\\"
|
||||
M9="\\__\r\nOK DEAR %n\r\nTNX FB QSO, CUL BEST 73 %c DE %m TU SK..\r\n__\\"
|
||||
M10=
|
||||
|
||||
[ExtConv]
|
||||
WDEF1=%YYYY-MM-DD
|
||||
WLEN1=0
|
||||
WDEF2=%HHMM
|
||||
WLEN2=0
|
||||
WDEF3=%EHHMM
|
||||
WLEN3=0
|
||||
WDEF4=%CALL
|
||||
WLEN4=0
|
||||
WDEF5=%HIS
|
||||
WLEN5=0
|
||||
WDEF6=%MY
|
||||
WLEN6=0
|
||||
WDEF7=%FREQ
|
||||
WLEN7=0
|
||||
WDEF8=%MODE
|
||||
WLEN8=0
|
||||
WDEF9=%POWER
|
||||
WLEN9=0
|
||||
WDEF10=%NAME
|
||||
WLEN10=0
|
||||
WDEF11=%QTH
|
||||
WLEN11=0
|
||||
WDEF12=%REM
|
||||
WLEN12=0
|
||||
WDEF13=%QSL
|
||||
WLEN13=0
|
||||
WDEF14=%S
|
||||
WLEN14=0
|
||||
WDEF15=%R
|
||||
WLEN15=0
|
||||
WDEF16=%EOD
|
||||
WLEN16=0
|
||||
WDEF17=
|
||||
WLEN17=0
|
||||
WDEF18=
|
||||
WLEN18=0
|
||||
WDEF19=
|
||||
WLEN19=0
|
||||
WDEF20=
|
||||
WLEN20=0
|
||||
WDEF21=
|
||||
WLEN21=0
|
||||
WDEF22=
|
||||
WLEN22=0
|
||||
WDEF23=
|
||||
WLEN23=0
|
||||
WDEF24=
|
||||
WLEN24=0
|
||||
WDEF25=
|
||||
WLEN25=0
|
||||
WDEF26=
|
||||
WLEN26=0
|
||||
WDEF27=
|
||||
WLEN27=0
|
||||
WDEF28=
|
||||
WLEN28=0
|
||||
WDEF29=
|
||||
WLEN29=0
|
||||
WDEF30=
|
||||
WLEN30=0
|
||||
WDEF31=
|
||||
WLEN31=0
|
||||
WDEF32=
|
||||
WLEN32=0
|
||||
WDEF33=
|
||||
WLEN33=0
|
||||
WDEF34=
|
||||
WLEN34=0
|
||||
WDEF35=
|
||||
WLEN35=0
|
||||
WDEF36=
|
||||
WLEN36=0
|
||||
WDEF37=
|
||||
WLEN37=0
|
||||
WDEF38=
|
||||
WLEN38=0
|
||||
WDEF39=
|
||||
WLEN39=0
|
||||
WDEF40=
|
||||
WLEN40=0
|
||||
WDEF41=
|
||||
WLEN41=0
|
||||
WDEF42=
|
||||
WLEN42=0
|
||||
WDEF43=
|
||||
WLEN43=0
|
||||
WDEF44=
|
||||
WLEN44=0
|
||||
WDEF45=
|
||||
WLEN45=0
|
||||
WDEF46=
|
||||
WLEN46=0
|
||||
WDEF47=
|
||||
WLEN47=0
|
||||
WDEF48=
|
||||
WLEN48=0
|
||||
WDEF49=
|
||||
WLEN49=0
|
||||
WDEF50=
|
||||
WLEN50=0
|
||||
WDEF51=
|
||||
WLEN51=0
|
||||
WDEF52=
|
||||
WLEN52=0
|
||||
WDEF53=
|
||||
WLEN53=0
|
||||
WDEF54=
|
||||
WLEN54=0
|
||||
WDEF55=
|
||||
WLEN55=0
|
||||
WDEF56=
|
||||
WLEN56=0
|
||||
WDEF57=
|
||||
WLEN57=0
|
||||
WDEF58=
|
||||
WLEN58=0
|
||||
WDEF59=
|
||||
WLEN59=0
|
||||
WDEF60=
|
||||
WLEN60=0
|
||||
WDEF61=
|
||||
WLEN61=0
|
||||
WDEF62=
|
||||
WLEN62=0
|
||||
WDEF63=
|
||||
WLEN63=0
|
||||
WDEF64=
|
||||
WLEN64=0
|
||||
RDEF1=%YYYY-MM-DD
|
||||
RLEN1=0
|
||||
RDEF2=%HHMM
|
||||
RLEN2=0
|
||||
RDEF3=%EHHMM
|
||||
RLEN3=0
|
||||
RDEF4=%CALL
|
||||
RLEN4=0
|
||||
RDEF5=%HIS
|
||||
RLEN5=0
|
||||
RDEF6=%MY
|
||||
RLEN6=0
|
||||
RDEF7=%FREQ
|
||||
RLEN7=0
|
||||
RDEF8=%MODE
|
||||
RLEN8=0
|
||||
RDEF9=%POWER
|
||||
RLEN9=0
|
||||
RDEF10=%NAME
|
||||
RLEN10=0
|
||||
RDEF11=%QTH
|
||||
RLEN11=0
|
||||
RDEF12=%REM
|
||||
RLEN12=0
|
||||
RDEF13=%QSL
|
||||
RLEN13=0
|
||||
RDEF14=%S
|
||||
RLEN14=0
|
||||
RDEF15=%R
|
||||
RLEN15=0
|
||||
RDEF16=%EOD
|
||||
RLEN16=0
|
||||
RDEF17=
|
||||
RLEN17=0
|
||||
RDEF18=
|
||||
RLEN18=0
|
||||
RDEF19=
|
||||
RLEN19=0
|
||||
RDEF20=
|
||||
RLEN20=0
|
||||
RDEF21=
|
||||
RLEN21=0
|
||||
RDEF22=
|
||||
RLEN22=0
|
||||
RDEF23=
|
||||
RLEN23=0
|
||||
RDEF24=
|
||||
RLEN24=0
|
||||
RDEF25=
|
||||
RLEN25=0
|
||||
RDEF26=
|
||||
RLEN26=0
|
||||
RDEF27=
|
||||
RLEN27=0
|
||||
RDEF28=
|
||||
RLEN28=0
|
||||
RDEF29=
|
||||
RLEN29=0
|
||||
RDEF30=
|
||||
RLEN30=0
|
||||
RDEF31=
|
||||
RLEN31=0
|
||||
RDEF32=
|
||||
RLEN32=0
|
||||
RDEF33=
|
||||
RLEN33=0
|
||||
RDEF34=
|
||||
RLEN34=0
|
||||
RDEF35=
|
||||
RLEN35=0
|
||||
RDEF36=
|
||||
RLEN36=0
|
||||
RDEF37=
|
||||
RLEN37=0
|
||||
RDEF38=
|
||||
RLEN38=0
|
||||
RDEF39=
|
||||
RLEN39=0
|
||||
RDEF40=
|
||||
RLEN40=0
|
||||
RDEF41=
|
||||
RLEN41=0
|
||||
RDEF42=
|
||||
RLEN42=0
|
||||
RDEF43=
|
||||
RLEN43=0
|
||||
RDEF44=
|
||||
RLEN44=0
|
||||
RDEF45=
|
||||
RLEN45=0
|
||||
RDEF46=
|
||||
RLEN46=0
|
||||
RDEF47=
|
||||
RLEN47=0
|
||||
RDEF48=
|
||||
RLEN48=0
|
||||
RDEF49=
|
||||
RLEN49=0
|
||||
RDEF50=
|
||||
RLEN50=0
|
||||
RDEF51=
|
||||
RLEN51=0
|
||||
RDEF52=
|
||||
RLEN52=0
|
||||
RDEF53=
|
||||
RLEN53=0
|
||||
RDEF54=
|
||||
RLEN54=0
|
||||
RDEF55=
|
||||
RLEN55=0
|
||||
RDEF56=
|
||||
RLEN56=0
|
||||
RDEF57=
|
||||
RLEN57=0
|
||||
RDEF58=
|
||||
RLEN58=0
|
||||
RDEF59=
|
||||
RLEN59=0
|
||||
RDEF60=
|
||||
RLEN60=0
|
||||
RDEF61=
|
||||
RLEN61=0
|
||||
RDEF62=
|
||||
RLEN62=0
|
||||
RDEF63=
|
||||
RLEN63=0
|
||||
RDEF64=
|
||||
RLEN64=0
|
||||
|
||||
[LogSet]
|
||||
TimeZone=73
|
||||
DateType=0
|
||||
UpperName=0
|
||||
UpperQTH=0
|
||||
UpperREM=0
|
||||
UpperQSL=0
|
||||
DefMyRST=0
|
||||
Contest=0
|
||||
CopyFreq=0
|
||||
CopyHis=0
|
||||
CopyName=1
|
||||
CopyQTH=1
|
||||
CopyREM=0
|
||||
CopyQSL=1
|
||||
CopyREMB4=0
|
||||
CheckBand=1
|
||||
AutoSave=1
|
||||
QSOMacroFlag=0
|
||||
QSOMacro1=1
|
||||
QSOMacroKey1=0
|
||||
QSOMacroStr1="\r\n %c %c UR %R-%N-%N BK\r\n\\"
|
||||
QSOMacro2=1
|
||||
QSOMacroKey2=0
|
||||
QSOMacroStr2="\r\nQSL TU QRZ? DE %m %m K\r\n\\"
|
||||
QSOMacro3=1
|
||||
QSOMacroKey3=0
|
||||
QSOMacroStr3="\r\n %c SRI QSO B4 QRZ? DE %m %m K\r\n\\"
|
||||
QSOMacro4=0
|
||||
QSOMacroKey4=0
|
||||
QSOMacroStr4="\r\nDE %m %m K\r\n\\"
|
||||
QSOMacro5=0
|
||||
QSOMacroKey5=0
|
||||
QSOMacroStr5="\r\n %c %R-%N-%N TU\r\n\\"
|
||||
THRTTY=RTY
|
||||
THSSTV=STV
|
||||
THTZ=0
|
||||
ClipRSTADIF=1
|
||||
Backup=1
|
||||
TH5Fields=3,3,7,4,12,28,54
|
||||
|
||||
[Program]
|
||||
Name1=&G3PLX PSK31SBW
|
||||
Command1=
|
||||
Name2=&IZ8BLY Hellschreiber
|
||||
Command2=
|
||||
Name3=&External 3
|
||||
Command3=
|
||||
Name4=E&xternal 4
|
||||
Command4=
|
||||
|
||||
[TNC]
|
||||
PortName=NONE
|
||||
Type=0
|
||||
BaudRate=1200
|
||||
BitLen=1
|
||||
Stop=0
|
||||
Parity=0
|
||||
flwXON=1
|
||||
flwCTS=0
|
||||
Echo=2
|
||||
|
||||
[RADIO]
|
||||
PortName=NONE
|
||||
BaudRate=4800
|
||||
BitLen=1
|
||||
Stop=1
|
||||
Parity=0
|
||||
flwXON=0
|
||||
flwCTS=0
|
||||
usePTT=0
|
||||
ByteWait=0
|
||||
Cmdxx=0
|
||||
CmdInit=
|
||||
CmdRx=\$000000000F
|
||||
CmdTx=\$000000010F\w10
|
||||
FileGNR=
|
||||
OpenGNR=0
|
||||
PollType=0
|
||||
PollInterval=5
|
||||
PollOffset=0
|
||||
|
||||
[AA6YQ]
|
||||
Version=2
|
||||
Enabled=1
|
||||
TapsBPF=512
|
||||
WidthBPF=3.500000e+01
|
||||
TapsBEF=256
|
||||
WidthBEF=1.500000e+01
|
||||
afcERR=5.000000e+00
|
||||
|
||||
802
Mmtty Japanese.ini
Normal file
802
Mmtty Japanese.ini
Normal file
|
|
@ -0,0 +1,802 @@
|
|||
[SoundCard]
|
||||
SampFreq=1.102500e+04
|
||||
TxOffset=0.000000e+00
|
||||
|
||||
[ComboList]
|
||||
Mark=2125,2000,1700,1445,1275,1170,1000,915
|
||||
Shift=23,85,160,170,182,200,240,350,425,850
|
||||
Baud=22,45,45.45,50,56,75,100,110,150,200,300
|
||||
RST=599,579,569,559,449,339,448,337,225,111
|
||||
IIRBW=15,20,25,30,35,40,45,50,60,70,80,90,100,150,200
|
||||
VCO=1.0,1.2,1.5,2.0,2.5,3.0,3.25,3.5,3.75,4.0,4.5,5.0,8.0
|
||||
LoopFC=30,40,50,80,100,150,200,250,300,350,400,450,500,600,800,1000
|
||||
|
||||
[Grid]
|
||||
Log=
|
||||
QSO=
|
||||
|
||||
[Help]
|
||||
HTML=
|
||||
MMTTY=Mmtty.txt
|
||||
MMTTYLOG=Mmttylog.txt
|
||||
DIGITAL=Digital.txt
|
||||
FontName=MS ゴシック
|
||||
FontCharset=128
|
||||
FontSize=10
|
||||
UseNotePad=0
|
||||
|
||||
[Window]
|
||||
WindowState=0
|
||||
ShowMacro=1
|
||||
MemoryWindow=0
|
||||
Disable=0
|
||||
StayOnTop=0
|
||||
|
||||
[WindowFont]
|
||||
Name=MS Pゴシック
|
||||
Charset=128
|
||||
Style=0
|
||||
Adjust=0
|
||||
|
||||
[ButtonFont]
|
||||
Name=MS ゴシック
|
||||
Charset=128
|
||||
Style=0
|
||||
Adjust=0
|
||||
|
||||
[Font]
|
||||
Name=MS ゴシック
|
||||
Size=10
|
||||
AdjX=0
|
||||
AdjY=0
|
||||
Charset=128
|
||||
Zero=1
|
||||
Style=0
|
||||
|
||||
[Define]
|
||||
ControlPanel=1
|
||||
FFT=1
|
||||
FFTFW=0
|
||||
FFTGain=1
|
||||
FFTResp=2
|
||||
UOS=1
|
||||
CodeSet=0
|
||||
XYScope=0
|
||||
XYScopeSize=0
|
||||
XYScopeReverse=0
|
||||
XYQuality=0
|
||||
PanelSize=2
|
||||
AFC=0
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
AutoCR=1
|
||||
WardWarp=1
|
||||
SendWay=0
|
||||
Running=0
|
||||
PttTimer=60
|
||||
TxNet=0
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
LimitAGC=1
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=1
|
||||
SQ=1
|
||||
SQLevel=6.000000e+02
|
||||
DefFix45=1
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
Rev=0
|
||||
SpaceFreq=2.295000e+03
|
||||
MarkFreq=2.125000e+03
|
||||
VERFFTDEM=1
|
||||
DEMTYPE=1
|
||||
BaudRate=4.545000e+01
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.500000e+01
|
||||
Smooz=3.000000e+02
|
||||
FFTTones=4
|
||||
SoundRxFifo=12
|
||||
SoundTxFifo=4
|
||||
SoundPriority=1
|
||||
SoundDevice=2
|
||||
SoundOutDevice=5
|
||||
SoundStereo=0
|
||||
SoundMMW=
|
||||
Tap=512
|
||||
IIRBW=60
|
||||
Diddle=2
|
||||
TxPort=0
|
||||
TxdJob=0
|
||||
TxFixShift=0
|
||||
PTT=NONE
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
MacroImm=0
|
||||
CharLenFile=1024
|
||||
DisTX=0
|
||||
TXLoop=1
|
||||
TXBPF=1
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
RXBPF=0
|
||||
RXBPFTAP=64
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=2.500000e+02
|
||||
RXlms=0
|
||||
RXlmsDelay=24
|
||||
RXlmsMU2=1.000000e-03
|
||||
RXlmsGM=9.998000e-01
|
||||
RXlmsInv=0
|
||||
RXlmsAGC=1
|
||||
RXlmsTAP=512
|
||||
RXNotchTAP=192
|
||||
RXlmsBPF=0
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2210
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Call=JA7UDE
|
||||
|
||||
[Button]
|
||||
Hint=1
|
||||
|
||||
[Log]
|
||||
Switch=0
|
||||
TimeStamp=1
|
||||
TimeStampUTC=0
|
||||
AutoUTCOffset=0
|
||||
UTCOffset=0
|
||||
UTCOffsetMin=0
|
||||
LogLink=1
|
||||
LinkPoll=0
|
||||
LinkPTT=0
|
||||
PathName=D:\MyProjects\amprog\MMTTY_XE4\.\
|
||||
ShowTimeStamp=1
|
||||
|
||||
[MMLink]
|
||||
Name=
|
||||
|
||||
[Dir]
|
||||
OutFile=D:\MyProjects\amprog\MMTTY_XE4\.\
|
||||
ExtLog=D:\MyProjects\amprog\MMTTY_XE4\.\
|
||||
RecSound=D:\MyProjects\amprog\MMTTY_XE4\.\
|
||||
|
||||
[LogFile]
|
||||
Name=D:\MyProjects\amprog\MMTTY_XE4\.MDT
|
||||
|
||||
[WaterFall]
|
||||
Palette=0
|
||||
|
||||
[Input]
|
||||
Height=97
|
||||
|
||||
[Color]
|
||||
RXBack=16777215
|
||||
RXChar=0
|
||||
RXTXChar=0
|
||||
INBack=16777215
|
||||
INChar=0
|
||||
INTXChar=255
|
||||
WaterLow=0
|
||||
WaterHigh=16777215
|
||||
XYScope=16777215
|
||||
|
||||
[SysKey]
|
||||
S1=0
|
||||
S2=0
|
||||
S3=0
|
||||
S4=0
|
||||
S5=0
|
||||
S6=0
|
||||
S7=0
|
||||
S8=0
|
||||
S9=321
|
||||
S10=0
|
||||
S11=335
|
||||
S12=332
|
||||
S13=324
|
||||
S14=0
|
||||
S15=0
|
||||
S16=579
|
||||
S17=0
|
||||
S18=0
|
||||
S19=0
|
||||
S20=0
|
||||
S21=0
|
||||
S22=0
|
||||
S23=0
|
||||
S24=0
|
||||
S25=120
|
||||
S26=119
|
||||
S27=0
|
||||
S28=323
|
||||
S29=334
|
||||
S30=337
|
||||
S31=338
|
||||
S32=326
|
||||
S33=112
|
||||
S34=0
|
||||
S35=0
|
||||
S36=0
|
||||
S37=0
|
||||
S38=36
|
||||
S39=35
|
||||
S40=0
|
||||
S41=0
|
||||
S42=33
|
||||
S43=34
|
||||
S44=0
|
||||
S45=0
|
||||
S46=0
|
||||
S47=0
|
||||
S48=0
|
||||
S49=0
|
||||
S50=294
|
||||
S51=296
|
||||
S52=0
|
||||
S53=0
|
||||
S54=588
|
||||
S55=0
|
||||
S56=549
|
||||
S57=551
|
||||
S58=596
|
||||
S59=0
|
||||
S60=322
|
||||
S61=0
|
||||
S62=0
|
||||
S63=0
|
||||
S64=0
|
||||
S65=0
|
||||
S66=0
|
||||
S67=0
|
||||
S68=0
|
||||
S69=0
|
||||
S70=0
|
||||
S71=0
|
||||
S72=0
|
||||
S73=0
|
||||
S74=0
|
||||
S75=0
|
||||
S76=0
|
||||
S77=0
|
||||
S78=0
|
||||
S79=0
|
||||
S80=582
|
||||
|
||||
[InBtnCol]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
|
||||
[InBtnKey]
|
||||
M1=113
|
||||
M2=114
|
||||
M3=115
|
||||
M4=116
|
||||
|
||||
[InBtnName]
|
||||
M1=1X1
|
||||
M2=DEAR
|
||||
M3=ANS
|
||||
M4=BTU
|
||||
|
||||
[InBtn]
|
||||
M1="%c DE %m"
|
||||
M2="DEAR %n"
|
||||
M3="__\r\nRGR %c DE %m ALL OK DEAR %n\r\n"
|
||||
M4="BTU %c DE %m KN\r\n_\\"
|
||||
|
||||
[MacroTimer]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
M5=0
|
||||
M6=0
|
||||
M7=0
|
||||
M8=0
|
||||
M9=0
|
||||
M10=0
|
||||
M11=0
|
||||
M12=0
|
||||
M13=0
|
||||
M14=0
|
||||
M15=0
|
||||
M16=0
|
||||
|
||||
[MacroCol]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
M5=0
|
||||
M6=0
|
||||
M7=0
|
||||
M8=0
|
||||
M9=0
|
||||
M10=0
|
||||
M11=0
|
||||
M12=0
|
||||
M13=0
|
||||
M14=0
|
||||
M15=0
|
||||
M16=0
|
||||
|
||||
[MacroKey]
|
||||
M1=305
|
||||
M2=306
|
||||
M3=307
|
||||
M4=308
|
||||
M5=309
|
||||
M6=310
|
||||
M7=311
|
||||
M8=312
|
||||
M9=313
|
||||
M10=121
|
||||
M11=122
|
||||
M12=123
|
||||
M13=0
|
||||
M14=0
|
||||
M15=118
|
||||
M16=117
|
||||
|
||||
[MacroEditKey]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
M5=0
|
||||
M6=0
|
||||
M7=0
|
||||
M8=0
|
||||
M9=0
|
||||
M10=0
|
||||
M11=0
|
||||
M12=0
|
||||
M13=0
|
||||
M14=0
|
||||
M15=0
|
||||
M16=0
|
||||
|
||||
[MacroName]
|
||||
M1=1X2
|
||||
M2=2X3
|
||||
M3=DE3
|
||||
M4=UR599
|
||||
M5=QANS
|
||||
M6=M6
|
||||
M7=M7
|
||||
M8=M8
|
||||
M9=SK
|
||||
M10=EE
|
||||
M11=M11
|
||||
M12=M12
|
||||
M13=RY
|
||||
M14=M14
|
||||
M15=CQ2
|
||||
M16=CQ1
|
||||
|
||||
[Macro]
|
||||
M1="__\r\n%c DE %m %m K\r\n_\\"
|
||||
M2="__\r\n%c %c DE %m %m %m K\r\n_\\"
|
||||
M3="__\r\nDE %m %m %m K\r\n_\\"
|
||||
M4="__\r\nQSL UR 599-599 TU\r\n_\\"
|
||||
M5="__\r\nOK TNX %n\r\nUR %r %r NAME MAKO %c DE %m TU SK\r\n_\\"
|
||||
M6=""
|
||||
M7=""
|
||||
M8=""
|
||||
M9="\\\r\n73 TU SK SK\r\n%{TU}\\"
|
||||
M10="[__~~__~\\"
|
||||
M11=""
|
||||
M12=""
|
||||
M13="\r\nRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRY#"
|
||||
M14=""
|
||||
M15="__\r\nRYRY CQ CQ CQ DE %m %m %m\r\nRYRY CQ CQ CQ DE %m %m %m PSE K\r\n_\\"
|
||||
M16="__\r\nRYRY CQ CQ CQ DE %m %m %m PSE K\r\n_\\"
|
||||
|
||||
[MsgKey]
|
||||
M1=368
|
||||
M2=369
|
||||
M3=370
|
||||
M4=371
|
||||
M5=372
|
||||
M6=373
|
||||
M7=374
|
||||
M8=375
|
||||
M9=376
|
||||
M10=0
|
||||
|
||||
[MsgName]
|
||||
M1=AF CALL1
|
||||
M2=FINAL3
|
||||
M3=FINAL2
|
||||
M4=FINAL
|
||||
M5=AF CQ2 (GEAR)
|
||||
M6=AF CQ1
|
||||
M7=AF CALL2 (GEAR)
|
||||
M8=AF CALL1 (QUICK)
|
||||
M9=FINAL (QUICK)
|
||||
M10=
|
||||
|
||||
[MsgList]
|
||||
M1="\\__\r\nRGR %c DE %m %g DEAR %n\r\nTHANK YOU FOR THE NICE REPORT.\r\nYOU ARE %r %r %r IN OSAKA OSAKA OSAKA\r\nMY NAME IS MAKO MAKO MAKO\r\nHOW COPY? BTU %c DE %m KN\r\n_\\"
|
||||
M2="\\__\\"
|
||||
M3="\\__\r\nTNX AGAIN DEAR %n CU SK\r\n__\\"
|
||||
M4="\\__\r\nOK DEAR %n\r\nMANY THANK YOU FOR THE NICE QSO.\r\nI AM LOOKING FORWARD TO SEE YOU AGAIN ON CW AND PSK31.\r\nCUL! AND BEST 73\r\n%c DE %m TU SK SK..\r\n__"
|
||||
M5="\\__\r\nRGR %c DE %m ALL OK DEAR %n\r\nTHANK YOU FOR THE NICE REPORT.\r\n\r\nI AM RUNNING 50W 50W INTO A SMALL LOOP ANTENNA(ONLY 90CM DIA!)\r\n\r\nRTTY MODEM IS HOMEMADE SOFTWARE ON WINDOWS-95 SOUNDBLASTER.\r\n\r\nTHANK YOU FOR THE NICE QSO DEAR %n\r\nMY QSL IS OK VIA THE BURO.\r\n\r\nHOW? BTU %c DE %m KN\r\n_\\"
|
||||
M6="\\__\r\n%c %c DE %m %g\r\nTHANK YOU FOR YOUR CALL. I AM GLAD TO SEE YOU ON RTTY.\r\nYOU ARE %r %r %r IN OSAKA OSAKA OSAKA\r\nMY NAME IS MAKO MAKO MAKO\r\nHOW COPY? BTU %c %c DE %m KN\r\n_\\"
|
||||
M7="\\__\r\nRGR %c DE %m ALL OK DEAR %n\r\nTHANK YOU FOR THE NICE INFO.\r\n\r\nI AM RUNNING 50W 50W INTO A SMALL LOOP ANTENNA(ONLY 90CM DIA!)\r\n\r\nRTTY MODEM IS HOMEMADE SOFTWARE ON WINDOWS-95 SOUNDBLASTER.\r\n\r\nTHANK YOU FOR THE NICE QSO DEAR %n\r\nMY QSL IS OK VIA THE BURO.\r\n\r\nHOW? BTU %c DE %m KN\r\n_\\"
|
||||
M8="\\__\r\nRGR TNX %n\r\nUR %r %r %r NAME IS MAKO MAKO MAKO\r\nHOW? BTU %c DE %m KN\r\n_\\"
|
||||
M9="\\__\r\nOK DEAR %n\r\nTNX FB QSO, CUL BEST 73 %c DE %m TU SK..\r\n__\\"
|
||||
M10=
|
||||
|
||||
[ExtConv]
|
||||
WDEF1=%YYYY-MM-DD
|
||||
WLEN1=0
|
||||
WDEF2=%HHMM
|
||||
WLEN2=0
|
||||
WDEF3=%EHHMM
|
||||
WLEN3=0
|
||||
WDEF4=%CALL
|
||||
WLEN4=0
|
||||
WDEF5=%HIS
|
||||
WLEN5=0
|
||||
WDEF6=%MY
|
||||
WLEN6=0
|
||||
WDEF7=%FREQ
|
||||
WLEN7=0
|
||||
WDEF8=%MODE
|
||||
WLEN8=0
|
||||
WDEF9=%POWER
|
||||
WLEN9=0
|
||||
WDEF10=%NAME
|
||||
WLEN10=0
|
||||
WDEF11=%QTH
|
||||
WLEN11=0
|
||||
WDEF12=%REM
|
||||
WLEN12=0
|
||||
WDEF13=%QSL
|
||||
WLEN13=0
|
||||
WDEF14=%S
|
||||
WLEN14=0
|
||||
WDEF15=%R
|
||||
WLEN15=0
|
||||
WDEF16=%EOD
|
||||
WLEN16=0
|
||||
WDEF17=
|
||||
WLEN17=0
|
||||
WDEF18=
|
||||
WLEN18=0
|
||||
WDEF19=
|
||||
WLEN19=0
|
||||
WDEF20=
|
||||
WLEN20=0
|
||||
WDEF21=
|
||||
WLEN21=0
|
||||
WDEF22=
|
||||
WLEN22=0
|
||||
WDEF23=
|
||||
WLEN23=0
|
||||
WDEF24=
|
||||
WLEN24=0
|
||||
WDEF25=
|
||||
WLEN25=0
|
||||
WDEF26=
|
||||
WLEN26=0
|
||||
WDEF27=
|
||||
WLEN27=0
|
||||
WDEF28=
|
||||
WLEN28=0
|
||||
WDEF29=
|
||||
WLEN29=0
|
||||
WDEF30=
|
||||
WLEN30=0
|
||||
WDEF31=
|
||||
WLEN31=0
|
||||
WDEF32=
|
||||
WLEN32=0
|
||||
WDEF33=
|
||||
WLEN33=0
|
||||
WDEF34=
|
||||
WLEN34=0
|
||||
WDEF35=
|
||||
WLEN35=0
|
||||
WDEF36=
|
||||
WLEN36=0
|
||||
WDEF37=
|
||||
WLEN37=0
|
||||
WDEF38=
|
||||
WLEN38=0
|
||||
WDEF39=
|
||||
WLEN39=0
|
||||
WDEF40=
|
||||
WLEN40=0
|
||||
WDEF41=
|
||||
WLEN41=0
|
||||
WDEF42=
|
||||
WLEN42=0
|
||||
WDEF43=
|
||||
WLEN43=0
|
||||
WDEF44=
|
||||
WLEN44=0
|
||||
WDEF45=
|
||||
WLEN45=0
|
||||
WDEF46=
|
||||
WLEN46=0
|
||||
WDEF47=
|
||||
WLEN47=0
|
||||
WDEF48=
|
||||
WLEN48=0
|
||||
WDEF49=
|
||||
WLEN49=0
|
||||
WDEF50=
|
||||
WLEN50=0
|
||||
WDEF51=
|
||||
WLEN51=0
|
||||
WDEF52=
|
||||
WLEN52=0
|
||||
WDEF53=
|
||||
WLEN53=0
|
||||
WDEF54=
|
||||
WLEN54=0
|
||||
WDEF55=
|
||||
WLEN55=0
|
||||
WDEF56=
|
||||
WLEN56=0
|
||||
WDEF57=
|
||||
WLEN57=0
|
||||
WDEF58=
|
||||
WLEN58=0
|
||||
WDEF59=
|
||||
WLEN59=0
|
||||
WDEF60=
|
||||
WLEN60=0
|
||||
WDEF61=
|
||||
WLEN61=0
|
||||
WDEF62=
|
||||
WLEN62=0
|
||||
WDEF63=
|
||||
WLEN63=0
|
||||
WDEF64=
|
||||
WLEN64=0
|
||||
RDEF1=%YYYY-MM-DD
|
||||
RLEN1=0
|
||||
RDEF2=%HHMM
|
||||
RLEN2=0
|
||||
RDEF3=%EHHMM
|
||||
RLEN3=0
|
||||
RDEF4=%CALL
|
||||
RLEN4=0
|
||||
RDEF5=%HIS
|
||||
RLEN5=0
|
||||
RDEF6=%MY
|
||||
RLEN6=0
|
||||
RDEF7=%FREQ
|
||||
RLEN7=0
|
||||
RDEF8=%MODE
|
||||
RLEN8=0
|
||||
RDEF9=%POWER
|
||||
RLEN9=0
|
||||
RDEF10=%NAME
|
||||
RLEN10=0
|
||||
RDEF11=%QTH
|
||||
RLEN11=0
|
||||
RDEF12=%REM
|
||||
RLEN12=0
|
||||
RDEF13=%QSL
|
||||
RLEN13=0
|
||||
RDEF14=%S
|
||||
RLEN14=0
|
||||
RDEF15=%R
|
||||
RLEN15=0
|
||||
RDEF16=%EOD
|
||||
RLEN16=0
|
||||
RDEF17=
|
||||
RLEN17=0
|
||||
RDEF18=
|
||||
RLEN18=0
|
||||
RDEF19=
|
||||
RLEN19=0
|
||||
RDEF20=
|
||||
RLEN20=0
|
||||
RDEF21=
|
||||
RLEN21=0
|
||||
RDEF22=
|
||||
RLEN22=0
|
||||
RDEF23=
|
||||
RLEN23=0
|
||||
RDEF24=
|
||||
RLEN24=0
|
||||
RDEF25=
|
||||
RLEN25=0
|
||||
RDEF26=
|
||||
RLEN26=0
|
||||
RDEF27=
|
||||
RLEN27=0
|
||||
RDEF28=
|
||||
RLEN28=0
|
||||
RDEF29=
|
||||
RLEN29=0
|
||||
RDEF30=
|
||||
RLEN30=0
|
||||
RDEF31=
|
||||
RLEN31=0
|
||||
RDEF32=
|
||||
RLEN32=0
|
||||
RDEF33=
|
||||
RLEN33=0
|
||||
RDEF34=
|
||||
RLEN34=0
|
||||
RDEF35=
|
||||
RLEN35=0
|
||||
RDEF36=
|
||||
RLEN36=0
|
||||
RDEF37=
|
||||
RLEN37=0
|
||||
RDEF38=
|
||||
RLEN38=0
|
||||
RDEF39=
|
||||
RLEN39=0
|
||||
RDEF40=
|
||||
RLEN40=0
|
||||
RDEF41=
|
||||
RLEN41=0
|
||||
RDEF42=
|
||||
RLEN42=0
|
||||
RDEF43=
|
||||
RLEN43=0
|
||||
RDEF44=
|
||||
RLEN44=0
|
||||
RDEF45=
|
||||
RLEN45=0
|
||||
RDEF46=
|
||||
RLEN46=0
|
||||
RDEF47=
|
||||
RLEN47=0
|
||||
RDEF48=
|
||||
RLEN48=0
|
||||
RDEF49=
|
||||
RLEN49=0
|
||||
RDEF50=
|
||||
RLEN50=0
|
||||
RDEF51=
|
||||
RLEN51=0
|
||||
RDEF52=
|
||||
RLEN52=0
|
||||
RDEF53=
|
||||
RLEN53=0
|
||||
RDEF54=
|
||||
RLEN54=0
|
||||
RDEF55=
|
||||
RLEN55=0
|
||||
RDEF56=
|
||||
RLEN56=0
|
||||
RDEF57=
|
||||
RLEN57=0
|
||||
RDEF58=
|
||||
RLEN58=0
|
||||
RDEF59=
|
||||
RLEN59=0
|
||||
RDEF60=
|
||||
RLEN60=0
|
||||
RDEF61=
|
||||
RLEN61=0
|
||||
RDEF62=
|
||||
RLEN62=0
|
||||
RDEF63=
|
||||
RLEN63=0
|
||||
RDEF64=
|
||||
RLEN64=0
|
||||
|
||||
[LogSet]
|
||||
TimeZone=73
|
||||
DateType=0
|
||||
UpperName=0
|
||||
UpperQTH=0
|
||||
UpperREM=0
|
||||
UpperQSL=0
|
||||
DefMyRST=0
|
||||
Contest=0
|
||||
CopyFreq=0
|
||||
CopyHis=0
|
||||
CopyName=1
|
||||
CopyQTH=1
|
||||
CopyREM=0
|
||||
CopyQSL=1
|
||||
CopyREMB4=0
|
||||
CheckBand=1
|
||||
AutoSave=1
|
||||
QSOMacroFlag=0
|
||||
QSOMacro1=1
|
||||
QSOMacroKey1=0
|
||||
QSOMacroStr1="\r\n %c %c UR %R-%N-%N BK\r\n\\"
|
||||
QSOMacro2=1
|
||||
QSOMacroKey2=0
|
||||
QSOMacroStr2="\r\nQSL TU QRZ? DE %m %m K\r\n\\"
|
||||
QSOMacro3=1
|
||||
QSOMacroKey3=0
|
||||
QSOMacroStr3="\r\n %c SRI QSO B4 QRZ? DE %m %m K\r\n\\"
|
||||
QSOMacro4=0
|
||||
QSOMacroKey4=0
|
||||
QSOMacroStr4="\r\nDE %m %m K\r\n\\"
|
||||
QSOMacro5=0
|
||||
QSOMacroKey5=0
|
||||
QSOMacroStr5="\r\n %c %R-%N-%N TU\r\n\\"
|
||||
THRTTY=RTY
|
||||
THSSTV=STV
|
||||
THTZ=0
|
||||
ClipRSTADIF=1
|
||||
Backup=1
|
||||
TH5Fields=3,3,7,4,12,28,54
|
||||
|
||||
[Program]
|
||||
Name1=&G3PLX PSK31SBW
|
||||
Command1=
|
||||
Name2=&IZ8BLY Hellschreiber
|
||||
Command2=
|
||||
Name3=&External 3
|
||||
Command3=
|
||||
Name4=E&xternal 4
|
||||
Command4=
|
||||
|
||||
[TNC]
|
||||
PortName=NONE
|
||||
Type=0
|
||||
BaudRate=1200
|
||||
BitLen=1
|
||||
Stop=0
|
||||
Parity=0
|
||||
flwXON=1
|
||||
flwCTS=0
|
||||
Echo=2
|
||||
|
||||
[RADIO]
|
||||
PortName=NONE
|
||||
BaudRate=4800
|
||||
BitLen=1
|
||||
Stop=1
|
||||
Parity=0
|
||||
flwXON=0
|
||||
flwCTS=0
|
||||
usePTT=0
|
||||
ByteWait=0
|
||||
Cmdxx=0
|
||||
CmdInit=
|
||||
CmdRx=\$000000000F
|
||||
CmdTx=\$000000010F\w10
|
||||
FileGNR=
|
||||
OpenGNR=0
|
||||
PollType=0
|
||||
PollInterval=5
|
||||
PollOffset=0
|
||||
|
||||
[AA6YQ]
|
||||
Version=2
|
||||
Enabled=1
|
||||
TapsBPF=512
|
||||
WidthBPF=3.500000e+01
|
||||
TapsBEF=256
|
||||
WidthBEF=1.500000e+01
|
||||
afcERR=5.000000e+00
|
||||
|
||||
802
Mmtty.ini
Normal file
802
Mmtty.ini
Normal file
|
|
@ -0,0 +1,802 @@
|
|||
[SoundCard]
|
||||
SampFreq=1.102500e+04
|
||||
TxOffset=0.000000e+00
|
||||
|
||||
[ComboList]
|
||||
Mark=2125,2000,1700,1445,1275,1170,1000,915
|
||||
Shift=23,85,160,170,182,200,240,350,425,850
|
||||
Baud=22,45,45.45,50,56,75,100,110,150,200,300
|
||||
RST=599,579,569,559,449,339,448,337,225,111
|
||||
IIRBW=15,20,25,30,35,40,45,50,60,70,80,90,100,150,200
|
||||
VCO=1.0,1.2,1.5,2.0,2.5,3.0,3.25,3.5,3.75,4.0,4.5,5.0,8.0
|
||||
LoopFC=30,40,50,80,100,150,200,250,300,350,400,450,500,600,800,1000
|
||||
|
||||
[Grid]
|
||||
Log=
|
||||
QSO=
|
||||
|
||||
[Help]
|
||||
HTML=
|
||||
MMTTY=Mmtty.txt
|
||||
MMTTYLOG=Mmttylog.txt
|
||||
DIGITAL=Digital.txt
|
||||
FontName=Arial
|
||||
FontCharset=0
|
||||
FontSize=10
|
||||
UseNotePad=0
|
||||
|
||||
[Window]
|
||||
WindowState=0
|
||||
ShowMacro=1
|
||||
MemoryWindow=0
|
||||
Disable=0
|
||||
StayOnTop=0
|
||||
|
||||
[WindowFont]
|
||||
Name=Arial
|
||||
Charset=0
|
||||
Style=0
|
||||
Adjust=0
|
||||
|
||||
[ButtonFont]
|
||||
Name=Arial
|
||||
Charset=0
|
||||
Style=0
|
||||
Adjust=0
|
||||
|
||||
[Font]
|
||||
Name=Arial
|
||||
Size=10
|
||||
AdjX=0
|
||||
AdjY=0
|
||||
Charset=0
|
||||
Zero=1
|
||||
Style=0
|
||||
|
||||
[Define]
|
||||
ControlPanel=1
|
||||
FFT=1
|
||||
FFTFW=0
|
||||
FFTGain=1
|
||||
FFTResp=2
|
||||
UOS=1
|
||||
CodeSet=0
|
||||
XYScope=0
|
||||
XYScopeSize=0
|
||||
XYScopeReverse=0
|
||||
XYQuality=0
|
||||
PanelSize=2
|
||||
AFC=0
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
AutoCR=1
|
||||
WardWarp=1
|
||||
SendWay=0
|
||||
Running=0
|
||||
PttTimer=60
|
||||
TxNet=0
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
LimitAGC=1
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=1
|
||||
SQ=1
|
||||
SQLevel=6.000000e+02
|
||||
DefFix45=1
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
Rev=0
|
||||
SpaceFreq=2.295000e+03
|
||||
MarkFreq=2.125000e+03
|
||||
VERFFTDEM=1
|
||||
DEMTYPE=1
|
||||
BaudRate=4.545000e+01
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.500000e+01
|
||||
Smooz=3.000000e+02
|
||||
FFTTones=4
|
||||
SoundRxFifo=12
|
||||
SoundTxFifo=4
|
||||
SoundPriority=1
|
||||
SoundDevice=2
|
||||
SoundOutDevice=5
|
||||
SoundStereo=0
|
||||
SoundMMW=
|
||||
Tap=512
|
||||
IIRBW=60
|
||||
Diddle=2
|
||||
TxPort=0
|
||||
TxdJob=0
|
||||
TxFixShift=0
|
||||
PTT=NONE
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
MacroImm=0
|
||||
CharLenFile=1024
|
||||
DisTX=0
|
||||
TXLoop=1
|
||||
TXBPF=1
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
RXBPF=0
|
||||
RXBPFTAP=64
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=2.500000e+02
|
||||
RXlms=0
|
||||
RXlmsDelay=24
|
||||
RXlmsMU2=1.000000e-03
|
||||
RXlmsGM=9.998000e-01
|
||||
RXlmsInv=0
|
||||
RXlmsAGC=1
|
||||
RXlmsTAP=512
|
||||
RXNotchTAP=192
|
||||
RXlmsBPF=0
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2210
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Call=JA7UDE
|
||||
|
||||
[Button]
|
||||
Hint=1
|
||||
|
||||
[Log]
|
||||
Switch=0
|
||||
TimeStamp=1
|
||||
TimeStampUTC=0
|
||||
AutoUTCOffset=0
|
||||
UTCOffset=0
|
||||
UTCOffsetMin=0
|
||||
LogLink=1
|
||||
LinkPoll=0
|
||||
LinkPTT=0
|
||||
PathName=
|
||||
ShowTimeStamp=1
|
||||
|
||||
[MMLink]
|
||||
Name=
|
||||
|
||||
[Dir]
|
||||
OutFile=
|
||||
ExtLog=
|
||||
RecSound=
|
||||
|
||||
[LogFile]
|
||||
Name=
|
||||
|
||||
[WaterFall]
|
||||
Palette=0
|
||||
|
||||
[Input]
|
||||
Height=97
|
||||
|
||||
[Color]
|
||||
RXBack=16777215
|
||||
RXChar=0
|
||||
RXTXChar=0
|
||||
INBack=16777215
|
||||
INChar=0
|
||||
INTXChar=255
|
||||
WaterLow=0
|
||||
WaterHigh=16777215
|
||||
XYScope=16777215
|
||||
|
||||
[SysKey]
|
||||
S1=0
|
||||
S2=0
|
||||
S3=0
|
||||
S4=0
|
||||
S5=0
|
||||
S6=0
|
||||
S7=0
|
||||
S8=0
|
||||
S9=321
|
||||
S10=0
|
||||
S11=335
|
||||
S12=332
|
||||
S13=324
|
||||
S14=0
|
||||
S15=0
|
||||
S16=579
|
||||
S17=0
|
||||
S18=0
|
||||
S19=0
|
||||
S20=0
|
||||
S21=0
|
||||
S22=0
|
||||
S23=0
|
||||
S24=0
|
||||
S25=120
|
||||
S26=119
|
||||
S27=0
|
||||
S28=323
|
||||
S29=334
|
||||
S30=337
|
||||
S31=338
|
||||
S32=326
|
||||
S33=112
|
||||
S34=0
|
||||
S35=0
|
||||
S36=0
|
||||
S37=0
|
||||
S38=36
|
||||
S39=35
|
||||
S40=0
|
||||
S41=0
|
||||
S42=33
|
||||
S43=34
|
||||
S44=0
|
||||
S45=0
|
||||
S46=0
|
||||
S47=0
|
||||
S48=0
|
||||
S49=0
|
||||
S50=294
|
||||
S51=296
|
||||
S52=0
|
||||
S53=0
|
||||
S54=588
|
||||
S55=0
|
||||
S56=549
|
||||
S57=551
|
||||
S58=596
|
||||
S59=0
|
||||
S60=322
|
||||
S61=0
|
||||
S62=0
|
||||
S63=0
|
||||
S64=0
|
||||
S65=0
|
||||
S66=0
|
||||
S67=0
|
||||
S68=0
|
||||
S69=0
|
||||
S70=0
|
||||
S71=0
|
||||
S72=0
|
||||
S73=0
|
||||
S74=0
|
||||
S75=0
|
||||
S76=0
|
||||
S77=0
|
||||
S78=0
|
||||
S79=0
|
||||
S80=582
|
||||
|
||||
[InBtnCol]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
|
||||
[InBtnKey]
|
||||
M1=113
|
||||
M2=114
|
||||
M3=115
|
||||
M4=116
|
||||
|
||||
[InBtnName]
|
||||
M1=1X1
|
||||
M2=DEAR
|
||||
M3=ANS
|
||||
M4=BTU
|
||||
|
||||
[InBtn]
|
||||
M1="%c DE %m"
|
||||
M2="DEAR %n"
|
||||
M3="__\r\nRGR %c DE %m ALL OK DEAR %n\r\n"
|
||||
M4="BTU %c DE %m KN\r\n_\\"
|
||||
|
||||
[MacroTimer]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
M5=0
|
||||
M6=0
|
||||
M7=0
|
||||
M8=0
|
||||
M9=0
|
||||
M10=0
|
||||
M11=0
|
||||
M12=0
|
||||
M13=0
|
||||
M14=0
|
||||
M15=0
|
||||
M16=0
|
||||
|
||||
[MacroCol]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
M5=0
|
||||
M6=0
|
||||
M7=0
|
||||
M8=0
|
||||
M9=0
|
||||
M10=0
|
||||
M11=0
|
||||
M12=0
|
||||
M13=0
|
||||
M14=0
|
||||
M15=0
|
||||
M16=0
|
||||
|
||||
[MacroKey]
|
||||
M1=305
|
||||
M2=306
|
||||
M3=307
|
||||
M4=308
|
||||
M5=309
|
||||
M6=310
|
||||
M7=311
|
||||
M8=312
|
||||
M9=313
|
||||
M10=121
|
||||
M11=122
|
||||
M12=123
|
||||
M13=0
|
||||
M14=0
|
||||
M15=118
|
||||
M16=117
|
||||
|
||||
[MacroEditKey]
|
||||
M1=0
|
||||
M2=0
|
||||
M3=0
|
||||
M4=0
|
||||
M5=0
|
||||
M6=0
|
||||
M7=0
|
||||
M8=0
|
||||
M9=0
|
||||
M10=0
|
||||
M11=0
|
||||
M12=0
|
||||
M13=0
|
||||
M14=0
|
||||
M15=0
|
||||
M16=0
|
||||
|
||||
[MacroName]
|
||||
M1=1X2
|
||||
M2=2X3
|
||||
M3=DE3
|
||||
M4=UR599
|
||||
M5=QANS
|
||||
M6=M6
|
||||
M7=M7
|
||||
M8=M8
|
||||
M9=SK
|
||||
M10=EE
|
||||
M11=M11
|
||||
M12=M12
|
||||
M13=RY
|
||||
M14=M14
|
||||
M15=CQ2
|
||||
M16=CQ1
|
||||
|
||||
[Macro]
|
||||
M1="__\r\n%c DE %m %m K\r\n_\\"
|
||||
M2="__\r\n%c %c DE %m %m %m K\r\n_\\"
|
||||
M3="__\r\nDE %m %m %m K\r\n_\\"
|
||||
M4="__\r\nQSL UR 599-599 TU\r\n_\\"
|
||||
M5="__\r\nOK TNX %n\r\nUR %r %r NAME MAKO %c DE %m TU SK\r\n_\\"
|
||||
M6=""
|
||||
M7=""
|
||||
M8=""
|
||||
M9="\\\r\n73 TU SK SK\r\n%{TU}\\"
|
||||
M10="[__~~__~\\"
|
||||
M11=""
|
||||
M12=""
|
||||
M13="\r\nRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRYRY#"
|
||||
M14=""
|
||||
M15="__\r\nRYRY CQ CQ CQ DE %m %m %m\r\nRYRY CQ CQ CQ DE %m %m %m PSE K\r\n_\\"
|
||||
M16="__\r\nRYRY CQ CQ CQ DE %m %m %m PSE K\r\n_\\"
|
||||
|
||||
[MsgKey]
|
||||
M1=368
|
||||
M2=369
|
||||
M3=370
|
||||
M4=371
|
||||
M5=372
|
||||
M6=373
|
||||
M7=374
|
||||
M8=375
|
||||
M9=376
|
||||
M10=0
|
||||
|
||||
[MsgName]
|
||||
M1=AF CALL1
|
||||
M2=FINAL3
|
||||
M3=FINAL2
|
||||
M4=FINAL
|
||||
M5=AF CQ2 (GEAR)
|
||||
M6=AF CQ1
|
||||
M7=AF CALL2 (GEAR)
|
||||
M8=AF CALL1 (QUICK)
|
||||
M9=FINAL (QUICK)
|
||||
M10=
|
||||
|
||||
[MsgList]
|
||||
M1="\\__\r\nRGR %c DE %m %g DEAR %n\r\nTHANK YOU FOR THE NICE REPORT.\r\nYOU ARE %r %r %r IN OSAKA OSAKA OSAKA\r\nMY NAME IS MAKO MAKO MAKO\r\nHOW COPY? BTU %c DE %m KN\r\n_\\"
|
||||
M2="\\__\\"
|
||||
M3="\\__\r\nTNX AGAIN DEAR %n CU SK\r\n__\\"
|
||||
M4="\\__\r\nOK DEAR %n\r\nMANY THANK YOU FOR THE NICE QSO.\r\nI AM LOOKING FORWARD TO SEE YOU AGAIN ON CW AND PSK31.\r\nCUL! AND BEST 73\r\n%c DE %m TU SK SK..\r\n__"
|
||||
M5="\\__\r\nRGR %c DE %m ALL OK DEAR %n\r\nTHANK YOU FOR THE NICE REPORT.\r\n\r\nI AM RUNNING 50W 50W INTO A SMALL LOOP ANTENNA(ONLY 90CM DIA!)\r\n\r\nRTTY MODEM IS HOMEMADE SOFTWARE ON WINDOWS-95 SOUNDBLASTER.\r\n\r\nTHANK YOU FOR THE NICE QSO DEAR %n\r\nMY QSL IS OK VIA THE BURO.\r\n\r\nHOW? BTU %c DE %m KN\r\n_\\"
|
||||
M6="\\__\r\n%c %c DE %m %g\r\nTHANK YOU FOR YOUR CALL. I AM GLAD TO SEE YOU ON RTTY.\r\nYOU ARE %r %r %r IN OSAKA OSAKA OSAKA\r\nMY NAME IS MAKO MAKO MAKO\r\nHOW COPY? BTU %c %c DE %m KN\r\n_\\"
|
||||
M7="\\__\r\nRGR %c DE %m ALL OK DEAR %n\r\nTHANK YOU FOR THE NICE INFO.\r\n\r\nI AM RUNNING 50W 50W INTO A SMALL LOOP ANTENNA(ONLY 90CM DIA!)\r\n\r\nRTTY MODEM IS HOMEMADE SOFTWARE ON WINDOWS-95 SOUNDBLASTER.\r\n\r\nTHANK YOU FOR THE NICE QSO DEAR %n\r\nMY QSL IS OK VIA THE BURO.\r\n\r\nHOW? BTU %c DE %m KN\r\n_\\"
|
||||
M8="\\__\r\nRGR TNX %n\r\nUR %r %r %r NAME IS MAKO MAKO MAKO\r\nHOW? BTU %c DE %m KN\r\n_\\"
|
||||
M9="\\__\r\nOK DEAR %n\r\nTNX FB QSO, CUL BEST 73 %c DE %m TU SK..\r\n__\\"
|
||||
M10=
|
||||
|
||||
[ExtConv]
|
||||
WDEF1=%YYYY-MM-DD
|
||||
WLEN1=0
|
||||
WDEF2=%HHMM
|
||||
WLEN2=0
|
||||
WDEF3=%EHHMM
|
||||
WLEN3=0
|
||||
WDEF4=%CALL
|
||||
WLEN4=0
|
||||
WDEF5=%HIS
|
||||
WLEN5=0
|
||||
WDEF6=%MY
|
||||
WLEN6=0
|
||||
WDEF7=%FREQ
|
||||
WLEN7=0
|
||||
WDEF8=%MODE
|
||||
WLEN8=0
|
||||
WDEF9=%POWER
|
||||
WLEN9=0
|
||||
WDEF10=%NAME
|
||||
WLEN10=0
|
||||
WDEF11=%QTH
|
||||
WLEN11=0
|
||||
WDEF12=%REM
|
||||
WLEN12=0
|
||||
WDEF13=%QSL
|
||||
WLEN13=0
|
||||
WDEF14=%S
|
||||
WLEN14=0
|
||||
WDEF15=%R
|
||||
WLEN15=0
|
||||
WDEF16=%EOD
|
||||
WLEN16=0
|
||||
WDEF17=
|
||||
WLEN17=0
|
||||
WDEF18=
|
||||
WLEN18=0
|
||||
WDEF19=
|
||||
WLEN19=0
|
||||
WDEF20=
|
||||
WLEN20=0
|
||||
WDEF21=
|
||||
WLEN21=0
|
||||
WDEF22=
|
||||
WLEN22=0
|
||||
WDEF23=
|
||||
WLEN23=0
|
||||
WDEF24=
|
||||
WLEN24=0
|
||||
WDEF25=
|
||||
WLEN25=0
|
||||
WDEF26=
|
||||
WLEN26=0
|
||||
WDEF27=
|
||||
WLEN27=0
|
||||
WDEF28=
|
||||
WLEN28=0
|
||||
WDEF29=
|
||||
WLEN29=0
|
||||
WDEF30=
|
||||
WLEN30=0
|
||||
WDEF31=
|
||||
WLEN31=0
|
||||
WDEF32=
|
||||
WLEN32=0
|
||||
WDEF33=
|
||||
WLEN33=0
|
||||
WDEF34=
|
||||
WLEN34=0
|
||||
WDEF35=
|
||||
WLEN35=0
|
||||
WDEF36=
|
||||
WLEN36=0
|
||||
WDEF37=
|
||||
WLEN37=0
|
||||
WDEF38=
|
||||
WLEN38=0
|
||||
WDEF39=
|
||||
WLEN39=0
|
||||
WDEF40=
|
||||
WLEN40=0
|
||||
WDEF41=
|
||||
WLEN41=0
|
||||
WDEF42=
|
||||
WLEN42=0
|
||||
WDEF43=
|
||||
WLEN43=0
|
||||
WDEF44=
|
||||
WLEN44=0
|
||||
WDEF45=
|
||||
WLEN45=0
|
||||
WDEF46=
|
||||
WLEN46=0
|
||||
WDEF47=
|
||||
WLEN47=0
|
||||
WDEF48=
|
||||
WLEN48=0
|
||||
WDEF49=
|
||||
WLEN49=0
|
||||
WDEF50=
|
||||
WLEN50=0
|
||||
WDEF51=
|
||||
WLEN51=0
|
||||
WDEF52=
|
||||
WLEN52=0
|
||||
WDEF53=
|
||||
WLEN53=0
|
||||
WDEF54=
|
||||
WLEN54=0
|
||||
WDEF55=
|
||||
WLEN55=0
|
||||
WDEF56=
|
||||
WLEN56=0
|
||||
WDEF57=
|
||||
WLEN57=0
|
||||
WDEF58=
|
||||
WLEN58=0
|
||||
WDEF59=
|
||||
WLEN59=0
|
||||
WDEF60=
|
||||
WLEN60=0
|
||||
WDEF61=
|
||||
WLEN61=0
|
||||
WDEF62=
|
||||
WLEN62=0
|
||||
WDEF63=
|
||||
WLEN63=0
|
||||
WDEF64=
|
||||
WLEN64=0
|
||||
RDEF1=%YYYY-MM-DD
|
||||
RLEN1=0
|
||||
RDEF2=%HHMM
|
||||
RLEN2=0
|
||||
RDEF3=%EHHMM
|
||||
RLEN3=0
|
||||
RDEF4=%CALL
|
||||
RLEN4=0
|
||||
RDEF5=%HIS
|
||||
RLEN5=0
|
||||
RDEF6=%MY
|
||||
RLEN6=0
|
||||
RDEF7=%FREQ
|
||||
RLEN7=0
|
||||
RDEF8=%MODE
|
||||
RLEN8=0
|
||||
RDEF9=%POWER
|
||||
RLEN9=0
|
||||
RDEF10=%NAME
|
||||
RLEN10=0
|
||||
RDEF11=%QTH
|
||||
RLEN11=0
|
||||
RDEF12=%REM
|
||||
RLEN12=0
|
||||
RDEF13=%QSL
|
||||
RLEN13=0
|
||||
RDEF14=%S
|
||||
RLEN14=0
|
||||
RDEF15=%R
|
||||
RLEN15=0
|
||||
RDEF16=%EOD
|
||||
RLEN16=0
|
||||
RDEF17=
|
||||
RLEN17=0
|
||||
RDEF18=
|
||||
RLEN18=0
|
||||
RDEF19=
|
||||
RLEN19=0
|
||||
RDEF20=
|
||||
RLEN20=0
|
||||
RDEF21=
|
||||
RLEN21=0
|
||||
RDEF22=
|
||||
RLEN22=0
|
||||
RDEF23=
|
||||
RLEN23=0
|
||||
RDEF24=
|
||||
RLEN24=0
|
||||
RDEF25=
|
||||
RLEN25=0
|
||||
RDEF26=
|
||||
RLEN26=0
|
||||
RDEF27=
|
||||
RLEN27=0
|
||||
RDEF28=
|
||||
RLEN28=0
|
||||
RDEF29=
|
||||
RLEN29=0
|
||||
RDEF30=
|
||||
RLEN30=0
|
||||
RDEF31=
|
||||
RLEN31=0
|
||||
RDEF32=
|
||||
RLEN32=0
|
||||
RDEF33=
|
||||
RLEN33=0
|
||||
RDEF34=
|
||||
RLEN34=0
|
||||
RDEF35=
|
||||
RLEN35=0
|
||||
RDEF36=
|
||||
RLEN36=0
|
||||
RDEF37=
|
||||
RLEN37=0
|
||||
RDEF38=
|
||||
RLEN38=0
|
||||
RDEF39=
|
||||
RLEN39=0
|
||||
RDEF40=
|
||||
RLEN40=0
|
||||
RDEF41=
|
||||
RLEN41=0
|
||||
RDEF42=
|
||||
RLEN42=0
|
||||
RDEF43=
|
||||
RLEN43=0
|
||||
RDEF44=
|
||||
RLEN44=0
|
||||
RDEF45=
|
||||
RLEN45=0
|
||||
RDEF46=
|
||||
RLEN46=0
|
||||
RDEF47=
|
||||
RLEN47=0
|
||||
RDEF48=
|
||||
RLEN48=0
|
||||
RDEF49=
|
||||
RLEN49=0
|
||||
RDEF50=
|
||||
RLEN50=0
|
||||
RDEF51=
|
||||
RLEN51=0
|
||||
RDEF52=
|
||||
RLEN52=0
|
||||
RDEF53=
|
||||
RLEN53=0
|
||||
RDEF54=
|
||||
RLEN54=0
|
||||
RDEF55=
|
||||
RLEN55=0
|
||||
RDEF56=
|
||||
RLEN56=0
|
||||
RDEF57=
|
||||
RLEN57=0
|
||||
RDEF58=
|
||||
RLEN58=0
|
||||
RDEF59=
|
||||
RLEN59=0
|
||||
RDEF60=
|
||||
RLEN60=0
|
||||
RDEF61=
|
||||
RLEN61=0
|
||||
RDEF62=
|
||||
RLEN62=0
|
||||
RDEF63=
|
||||
RLEN63=0
|
||||
RDEF64=
|
||||
RLEN64=0
|
||||
|
||||
[LogSet]
|
||||
TimeZone=73
|
||||
DateType=0
|
||||
UpperName=0
|
||||
UpperQTH=0
|
||||
UpperREM=0
|
||||
UpperQSL=0
|
||||
DefMyRST=0
|
||||
Contest=0
|
||||
CopyFreq=0
|
||||
CopyHis=0
|
||||
CopyName=1
|
||||
CopyQTH=1
|
||||
CopyREM=0
|
||||
CopyQSL=1
|
||||
CopyREMB4=0
|
||||
CheckBand=1
|
||||
AutoSave=1
|
||||
QSOMacroFlag=0
|
||||
QSOMacro1=1
|
||||
QSOMacroKey1=0
|
||||
QSOMacroStr1="\r\n %c %c UR %R-%N-%N BK\r\n\\"
|
||||
QSOMacro2=1
|
||||
QSOMacroKey2=0
|
||||
QSOMacroStr2="\r\nQSL TU QRZ? DE %m %m K\r\n\\"
|
||||
QSOMacro3=1
|
||||
QSOMacroKey3=0
|
||||
QSOMacroStr3="\r\n %c SRI QSO B4 QRZ? DE %m %m K\r\n\\"
|
||||
QSOMacro4=0
|
||||
QSOMacroKey4=0
|
||||
QSOMacroStr4="\r\nDE %m %m K\r\n\\"
|
||||
QSOMacro5=0
|
||||
QSOMacroKey5=0
|
||||
QSOMacroStr5="\r\n %c %R-%N-%N TU\r\n\\"
|
||||
THRTTY=RTY
|
||||
THSSTV=STV
|
||||
THTZ=0
|
||||
ClipRSTADIF=1
|
||||
Backup=1
|
||||
TH5Fields=3,3,7,4,12,28,54
|
||||
|
||||
[Program]
|
||||
Name1=&G3PLX PSK31SBW
|
||||
Command1=
|
||||
Name2=&IZ8BLY Hellschreiber
|
||||
Command2=
|
||||
Name3=&External 3
|
||||
Command3=
|
||||
Name4=E&xternal 4
|
||||
Command4=
|
||||
|
||||
[TNC]
|
||||
PortName=NONE
|
||||
Type=0
|
||||
BaudRate=1200
|
||||
BitLen=1
|
||||
Stop=0
|
||||
Parity=0
|
||||
flwXON=1
|
||||
flwCTS=0
|
||||
Echo=2
|
||||
|
||||
[RADIO]
|
||||
PortName=NONE
|
||||
BaudRate=4800
|
||||
BitLen=1
|
||||
Stop=1
|
||||
Parity=0
|
||||
flwXON=0
|
||||
flwCTS=0
|
||||
usePTT=0
|
||||
ByteWait=0
|
||||
Cmdxx=0
|
||||
CmdInit=
|
||||
CmdRx=\$000000000F
|
||||
CmdTx=\$000000010F\w10
|
||||
FileGNR=
|
||||
OpenGNR=0
|
||||
PollType=0
|
||||
PollInterval=5
|
||||
PollOffset=0
|
||||
|
||||
[AA6YQ]
|
||||
Version=2
|
||||
Enabled=1
|
||||
TapsBPF=512
|
||||
WidthBPF=3.500000e+01
|
||||
TapsBEF=256
|
||||
WidthBEF=1.500000e+01
|
||||
afcERR=5.000000e+00
|
||||
|
||||
8
MyRIG.rcm
Normal file
8
MyRIG.rcm
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
[RADIO]
|
||||
CmdInit=\$0000000000
|
||||
CmdRx=\$0000000088
|
||||
CmdTx=\$0000000008\w10
|
||||
PollType=2
|
||||
PollOffset=0
|
||||
PollInterval=0
|
||||
Cmdxx=04
|
||||
1585
Option.cpp
Normal file
1585
Option.cpp
Normal file
File diff suppressed because it is too large
Load diff
BIN
Option.dfm
Normal file
BIN
Option.dfm
Normal file
Binary file not shown.
393
Option.h
Normal file
393
Option.h
Normal file
|
|
@ -0,0 +1,393 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef OptionH
|
||||
#define OptionH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
|
||||
#include <ComCtrls.hpp>
|
||||
#include <Dialogs.hpp>
|
||||
#include "MMLink.h"
|
||||
#include "Rtty.h"
|
||||
//----------------------------------------------------------------------------
|
||||
class TOptionDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TPageControl *Page;
|
||||
TTabSheet *TabDem;
|
||||
TTabSheet *TabPara;
|
||||
TRadioGroup *BitLen;
|
||||
TRadioGroup *StopLen;
|
||||
TRadioGroup *ParitySel;
|
||||
TComboBox *BaudRate;
|
||||
TLabel *LBaudRate;
|
||||
TGroupBox *GrpDisc;
|
||||
TLabel *L6;
|
||||
TLabel *L7;
|
||||
TLabel *LTAPFW;
|
||||
TComboBox *MarkFreq;
|
||||
TComboBox *ShiftFreq;
|
||||
TComboBox *FilterTap;
|
||||
TLabel *Label9;
|
||||
TLabel *Label10;
|
||||
TGroupBox *GrpLPF;
|
||||
TLabel *LLPF;
|
||||
TComboBox *SmoozFreq;
|
||||
TLabel *Label12;
|
||||
TButton *HamBtn;
|
||||
TCheckBox *CheckInv;
|
||||
TTabSheet *TabTx;
|
||||
TGroupBox *GPTT;
|
||||
TComboBox *PortName;
|
||||
TLabel *L13;
|
||||
TCheckBox *PttInv;
|
||||
TGroupBox *GB5;
|
||||
TLabel *L14;
|
||||
TEdit *EditCall;
|
||||
TGroupBox *GB6;
|
||||
TCheckBox *CheckTXUOS;
|
||||
TTabSheet *TabFont;
|
||||
TEdit *FontName;
|
||||
TLabel *LFont;
|
||||
TGroupBox *GrpDispAdj;
|
||||
TLabel *LW;
|
||||
TEdit *FontAdjX;
|
||||
TEdit *FontAdjY;
|
||||
TLabel *LH;
|
||||
TFontDialog *FontDialog;
|
||||
TButton *FontBtn;
|
||||
TCheckBox *CheckZero;
|
||||
TCheckBox *CheckDblSft;
|
||||
TGroupBox *GB9;
|
||||
TGroupBox *GB10;
|
||||
TCheckBox *CheckTXBPF;
|
||||
TLabel *L25;
|
||||
TComboBox *TxBpfTap;
|
||||
TTrackBar *TBOutLvl;
|
||||
TLabel *LOutLvl;
|
||||
TSpeedButton *SBM1;
|
||||
TSpeedButton *SBM2;
|
||||
TSpeedButton *SBM3;
|
||||
TSpeedButton *SBM4;
|
||||
TSpeedButton *SBM8;
|
||||
TSpeedButton *SBM7;
|
||||
TSpeedButton *SBM6;
|
||||
TSpeedButton *SBM5;
|
||||
TSpeedButton *SBM9;
|
||||
TSpeedButton *SBM10;
|
||||
TSpeedButton *SBM11;
|
||||
TSpeedButton *SBM12;
|
||||
TSpeedButton *SBM13;
|
||||
TSpeedButton *SBM14;
|
||||
TSpeedButton *SBM15;
|
||||
TSpeedButton *SBM16;
|
||||
TGroupBox *GrpInBtn;
|
||||
TSpeedButton *SBIN1;
|
||||
TSpeedButton *SBIN2;
|
||||
TSpeedButton *SBIN3;
|
||||
TSpeedButton *SBIN4;
|
||||
TTabSheet *TabMisc;
|
||||
TCheckBox *CheckTXLPF;
|
||||
TComboBox *TxLpfFreq;
|
||||
TLabel *Label28;
|
||||
TLabel *L29;
|
||||
TGroupBox *GrpFilter;
|
||||
TButton *DemBpfBtn;
|
||||
TButton *PreBpfBtn;
|
||||
TSpeedButton *DispTxBpf;
|
||||
TCheckBox *CheckMajority;
|
||||
TCheckBox *CheckIgnoreFream;
|
||||
TGroupBox *GrpRx;
|
||||
TLabel *LRXB;
|
||||
TLabel *LRXC;
|
||||
TPanel *PCRXBack;
|
||||
TPanel *PCRXChar;
|
||||
TColorDialog *ColorDialog;
|
||||
TGroupBox *GrpIn;
|
||||
TLabel *LINB;
|
||||
TLabel *LINC;
|
||||
TPanel *PCINBack;
|
||||
TPanel *PCINChar;
|
||||
TLabel *LINS;
|
||||
TPanel *PCINTx;
|
||||
TCheckBox *CheckPalette;
|
||||
TPanel *PCLow;
|
||||
TPanel *PCHigh;
|
||||
TLabel *Label37;
|
||||
TLabel *Label38;
|
||||
TRadioGroup *TxPort;
|
||||
TPageControl *PageBPF;
|
||||
TTabSheet *TabBPF;
|
||||
TTabSheet *TabLMS;
|
||||
TLabel *LDelay;
|
||||
TComboBox *lmsDelay;
|
||||
TLabel *LMU2;
|
||||
TLabel *LGM;
|
||||
TComboBox *lmsMU2;
|
||||
TComboBox *lmsGM;
|
||||
TCheckBox *lmsAGC;
|
||||
TCheckBox *CheckRXBPFAFC;
|
||||
TLabel *LFW;
|
||||
TComboBox *RxBpfFW;
|
||||
TCheckBox *SelLMS;
|
||||
TCheckBox *SelBPF;
|
||||
TLabel *L31;
|
||||
TComboBox *lmsTap;
|
||||
TLabel *L30;
|
||||
TComboBox *RxBpfTap;
|
||||
TLabel *LCharW;
|
||||
TTrackBar *TBCharWait;
|
||||
TLabel *Label40;
|
||||
TTrackBar *TBDiddleWait;
|
||||
TCheckBox *lmsBPF;
|
||||
TComboBox *IIRFW;
|
||||
TLabel *LHZ;
|
||||
TTabSheet *TabDem2;
|
||||
TGroupBox *GB7;
|
||||
TLabel *Label16;
|
||||
TLabel *L17;
|
||||
TLabel *L18;
|
||||
TCheckBox *CheckAFC;
|
||||
TGroupBox *GrpLimit;
|
||||
TLabel *L8;
|
||||
TComboBox *LimitGain;
|
||||
TComboBox *AFCTime;
|
||||
TComboBox *AFCSQ;
|
||||
TComboBox *AFCSweep;
|
||||
TRadioGroup *DemType;
|
||||
TCheckBox *lmsInv;
|
||||
TGroupBox *GB1;
|
||||
TLabel *Label1;
|
||||
TGroupBox *GroupBox17;
|
||||
TLabel *LLoopOrder;
|
||||
TComboBox *pllVCOGain;
|
||||
TComboBox *pllLoopOrder;
|
||||
TLabel *L3;
|
||||
TComboBox *pllLoopFC;
|
||||
TLabel *Label4;
|
||||
TGroupBox *GroupBox18;
|
||||
TLabel *LOutOrder;
|
||||
TLabel *L44;
|
||||
TLabel *Label45;
|
||||
TComboBox *pllOutOrder;
|
||||
TComboBox *pllOutFC;
|
||||
TRadioGroup *DefStopBit;
|
||||
TGroupBox *GSFont;
|
||||
TEdit *WinFont;
|
||||
TButton *WinFontBtn;
|
||||
TLabel *L46;
|
||||
TLabel *L47;
|
||||
TEdit *BtnFont;
|
||||
TButton *BtnFontBtn;
|
||||
TButton *JapaneseBtn;
|
||||
TButton *EnglishBtn;
|
||||
TComboBox *FontAdj;
|
||||
TComboBox *BtnFontAdj;
|
||||
TGroupBox *GB2;
|
||||
TPanel *PCXY;
|
||||
TCheckBox *XYInv;
|
||||
TCheckBox *WaitDiddle;
|
||||
TRadioGroup *FixShift;
|
||||
TRadioGroup *DemLpf;
|
||||
TLabel *LSmooz;
|
||||
TComboBox *DemLpfOrder;
|
||||
TSpeedButton *DispDemLpf;
|
||||
TComboBox *SmoozIIR;
|
||||
TSpeedButton *DispLoopLPF;
|
||||
TSpeedButton *DispOutLPF;
|
||||
TCheckBox *LimitOver;
|
||||
TGroupBox *GrpCard;
|
||||
TLabel *Label27;
|
||||
TComboBox *FifoRX;
|
||||
TRadioGroup *SoundPriority;
|
||||
TGroupBox *GB3;
|
||||
TSpeedButton *SBClockAdj;
|
||||
TLabel *Label5;
|
||||
TGroupBox *GB8;
|
||||
TRadioGroup *DiddleSel;
|
||||
TCheckBox *RandomDiddle;
|
||||
TCheckBox *WaitTimer;
|
||||
TCheckBox *MacroImm;
|
||||
TCheckBox *TxDisRev;
|
||||
TButton *DefBtn;
|
||||
TGroupBox *GrpATC;
|
||||
TCheckBox *ATC;
|
||||
TComboBox *ATCTime;
|
||||
TLabel *L2;
|
||||
TCheckBox *MemWin;
|
||||
TButton *RadioBtn;
|
||||
TComboBox *EditSamp;
|
||||
TCheckBox *lmsType;
|
||||
TCheckBox *lmsTwo;
|
||||
TLabel *LRXS;
|
||||
TPanel *PCRXTXChar;
|
||||
TButton *TxdJob;
|
||||
TRadioGroup *Source;
|
||||
TCheckBox *TxFixShift;
|
||||
TSpeedButton *SBHelp;
|
||||
TCheckBox *LimitAGC;
|
||||
TComboBox *FifoTX;
|
||||
TLabel *L15;
|
||||
TRadioGroup *RGLoop;
|
||||
TLabel *L16;
|
||||
TEdit *TxOff;
|
||||
TLabel *L1;
|
||||
TGroupBox *GB4;
|
||||
TRadioGroup *RGC;
|
||||
TGroupBox *GroupBox1;
|
||||
TComboBox *DevNo;
|
||||
TComboBox *DevOutNo;
|
||||
TLabel *Label2;
|
||||
TLabel *Label3;
|
||||
TTabSheet *TabSound;
|
||||
TRadioGroup *InputSoundcards;
|
||||
TRadioGroup *OutputSoundcards;
|
||||
TComboBox *Tones;
|
||||
TGroupBox *GB20;
|
||||
TEdit *DefMarkFreq;
|
||||
TEdit *DefShift;
|
||||
TCheckBox *CBFix45;
|
||||
TCheckBox *CBAA6YQ;
|
||||
TSpeedButton *SBAA6YQ;
|
||||
void __fastcall HamBtnClick(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall FontBtnClick(TObject *Sender);
|
||||
void __fastcall SBMClick(TObject *Sender);
|
||||
void __fastcall SBIN1Click(TObject *Sender);
|
||||
void __fastcall SBIN2Click(TObject *Sender);
|
||||
void __fastcall SBIN3Click(TObject *Sender);
|
||||
void __fastcall SBIN4Click(TObject *Sender);
|
||||
|
||||
void __fastcall DemBpfBtnClick(TObject *Sender);
|
||||
void __fastcall PreBpfBtnClick(TObject *Sender);
|
||||
void __fastcall DispTxBpfClick(TObject *Sender);
|
||||
void __fastcall PCRXBackClick(TObject *Sender);
|
||||
void __fastcall PCRXCharClick(TObject *Sender);
|
||||
void __fastcall PCINBackClick(TObject *Sender);
|
||||
void __fastcall PCINCharClick(TObject *Sender);
|
||||
void __fastcall PCINTxClick(TObject *Sender);
|
||||
void __fastcall PCLowClick(TObject *Sender);
|
||||
void __fastcall PCHighClick(TObject *Sender);
|
||||
void __fastcall PortNameChange(TObject *Sender);
|
||||
|
||||
void __fastcall PCXYClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall WinFontBtnClick(TObject *Sender);
|
||||
void __fastcall BtnFontBtnClick(TObject *Sender);
|
||||
void __fastcall JapaneseBtnClick(TObject *Sender);
|
||||
void __fastcall EnglishBtnClick(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall DispDemLpfClick(TObject *Sender);
|
||||
void __fastcall DispLoopLPFClick(TObject *Sender);
|
||||
void __fastcall DispOutLPFClick(TObject *Sender);
|
||||
void __fastcall SBClockAdjClick(TObject *Sender);
|
||||
void __fastcall DefBtnClick(TObject *Sender);
|
||||
void __fastcall RadioBtnClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall BaudRateChange(TObject *Sender);
|
||||
|
||||
void __fastcall BitLenClick(TObject *Sender);
|
||||
void __fastcall PCRXTXCharClick(TObject *Sender);
|
||||
|
||||
void __fastcall TxdJobClick(TObject *Sender);
|
||||
void __fastcall lmsTapChange(TObject *Sender);
|
||||
void __fastcall SBHelpClick(TObject *Sender);
|
||||
|
||||
void __fastcall PortNameDropDown(TObject *Sender);
|
||||
void __fastcall DevNoDropDown(TObject *Sender);
|
||||
|
||||
void __fastcall DemBpfBtnMouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
|
||||
|
||||
void __fastcall DevOutNoDropDown(TObject *Sender);
|
||||
|
||||
void __fastcall InputSoundcardsClick(TObject *Sender);
|
||||
void __fastcall OutputSoundcardsClick(TObject *Sender);
|
||||
|
||||
void __fastcall DevNoClick(TObject *Sender);
|
||||
void __fastcall DevOutNoClick(TObject *Sender);
|
||||
|
||||
void __fastcall SBAA6YQClick(TObject *Sender);
|
||||
private:
|
||||
int m_FontCharset;
|
||||
int m_FontStyle;
|
||||
int m_FontSize;
|
||||
|
||||
int m_DisEvent;
|
||||
|
||||
CFSKDEM *pDem;
|
||||
|
||||
TSpeedButton *__fastcall GetSB(int n);
|
||||
int __fastcall GetMacroIndex(TObject *Sender);
|
||||
void __fastcall UpdateUI(void);
|
||||
void __fastcall UpdateMacro(void);
|
||||
void __fastcall SBINClick(int n);
|
||||
void __fastcall SetCustomColor(void);
|
||||
void __fastcall AddCustomColor(TColor col);
|
||||
|
||||
int __fastcall IsSoundcard(LPCSTR t);
|
||||
|
||||
BYTE m_WinFontCharset;
|
||||
BYTE m_BtnFontCharset;
|
||||
int m_WinFontStyle;
|
||||
int m_BtnFontStyle;
|
||||
|
||||
int m_TxdJob;
|
||||
double m_lmsTap;
|
||||
double m_NotchTap;
|
||||
CMMList m_MMList;
|
||||
CMMList m_MMListW;
|
||||
public:
|
||||
virtual __fastcall TOptionDlg(TComponent* AOwner);
|
||||
|
||||
int __fastcall Execute(CFSKDEM *fp, CFSKMOD *mp);
|
||||
int m_ColorChange;
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TAgcSetDlg *AgcSetDlg;
|
||||
extern int PageIndex;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
102
PlayDlg.cpp
Normal file
102
PlayDlg.cpp
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "PlayDlg.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TPlayDlgBox *PlayDlgBox;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TPlayDlgBox::TPlayDlgBox(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
|
||||
pWave = NULL;
|
||||
m_DisEvent = 0;
|
||||
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
Caption = "Adjust Play position";
|
||||
OKBtn->Caption = "Hide";
|
||||
StopBtn->Caption = "Stop";
|
||||
LRec->Caption = "RecTime";
|
||||
LNow->Caption = "NowTime";
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TPlayDlgBox::UpdateItem(void)
|
||||
{
|
||||
char bf[32];
|
||||
|
||||
sprintf(bf, "%u[s]", int(pWave->m_length * 0.5 / SampFreq));
|
||||
LTime->Caption = bf;
|
||||
sprintf(bf, "%u[s]", int(pWave->GetPos() * 0.5 / SampFreq));
|
||||
LPos->Caption = bf;
|
||||
m_DisEvent++;
|
||||
ScrollBar->Max = int(pWave->m_length * 0.5 / SampFreq);
|
||||
ScrollBar->Position = int(pWave->GetPos() * 0.5 / SampFreq);
|
||||
CheckPause->Checked = pWave->m_pause;
|
||||
m_DisEvent--;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TPlayDlgBox::Execute(CWaveFile *wp)
|
||||
{
|
||||
pWave = wp;
|
||||
pWave->m_autopause = 1;
|
||||
LName->Caption = pWave->m_FileName;
|
||||
UpdateItem();
|
||||
ShowModal();
|
||||
pWave->m_autopause = 0;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TPlayDlgBox::TimerTimer(TObject *Sender)
|
||||
{
|
||||
UpdateItem();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TPlayDlgBox::ScrollBarChange(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
int pos = ScrollBar->Position;
|
||||
pWave->Seek(pos * SampFreq*2);
|
||||
if( !CheckPause->Checked ) pWave->m_pause = 0;
|
||||
char bf[32];
|
||||
sprintf(bf, "%u[s]", pos);
|
||||
LPos->Caption = bf;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TPlayDlgBox::CheckPauseClick(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
pWave->m_pause = CheckPause->Checked;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TPlayDlgBox::StopBtnClick(TObject *Sender)
|
||||
{
|
||||
pWave->FileClose();
|
||||
ModalResult = mrOk;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
PlayDlg.dfm
Normal file
BIN
PlayDlg.dfm
Normal file
Binary file not shown.
69
PlayDlg.h
Normal file
69
PlayDlg.h
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef PlayDlgH
|
||||
#define PlayDlgH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
|
||||
#include "Sound.h"
|
||||
//----------------------------------------------------------------------------
|
||||
class TPlayDlgBox : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TScrollBar *ScrollBar;
|
||||
TLabel *LRec;
|
||||
TLabel *LNow;
|
||||
TLabel *LTime;
|
||||
TLabel *LPos;
|
||||
TTimer *Timer;
|
||||
TLabel *LName;
|
||||
TCheckBox *CheckPause;
|
||||
TButton *StopBtn;
|
||||
void __fastcall TimerTimer(TObject *Sender);
|
||||
void __fastcall ScrollBarChange(TObject *Sender);
|
||||
void __fastcall CheckPauseClick(TObject *Sender);
|
||||
void __fastcall StopBtnClick(TObject *Sender);
|
||||
private:
|
||||
CWaveFile *pWave;
|
||||
|
||||
int m_DisEvent;
|
||||
public:
|
||||
virtual __fastcall TPlayDlgBox(TComponent* AOwner);
|
||||
|
||||
void __fastcall Execute(CWaveFile *wp);
|
||||
void __fastcall UpdateItem(void);
|
||||
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TPlayDlgBox *PlayDlgBox;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
548
QsoDlg.cpp
Normal file
548
QsoDlg.cpp
Normal file
|
|
@ -0,0 +1,548 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "QsoDlg.h"
|
||||
#include "Country.h"
|
||||
#include "MmcgDlg.h"
|
||||
#include "Main.h"
|
||||
#include "TextEdit.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TQSODlgBox *QSODlgBox;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TQSODlgBox::TQSODlgBox(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
LStat->Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
LStat->Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
m_fp = NULL;
|
||||
|
||||
EditHis->Items->Assign(MmttyWd->HisRST->Items);
|
||||
EditMy->Items->Assign(MmttyWd->MyRST->Items);
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
Grid->Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Grid->Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
Caption = "QSO Data";
|
||||
CancelBtn->Caption = "Close";
|
||||
OKBtn->Caption = "Write";
|
||||
RefBtn->Caption = "ReceiveWindow";
|
||||
}
|
||||
switch(Log.m_LogSet.m_TimeZone){
|
||||
case 'I':
|
||||
if( lcid == LANG_KOREAN ){
|
||||
LTimeZone->Caption = "KST";
|
||||
}
|
||||
else {
|
||||
LTimeZone->Caption = "JST";
|
||||
}
|
||||
break;
|
||||
default:
|
||||
LTimeZone->Caption = "UTC";
|
||||
break;
|
||||
}
|
||||
if( Log.m_LogSet.m_DateType & 1 ){
|
||||
Grid->ColWidths[0] = (Grid->ColWidths[0] * 10) / 8;
|
||||
}
|
||||
m_EditFlag = 0;
|
||||
}
|
||||
|
||||
void __fastcall TQSODlgBox::UpdateBtn(void)
|
||||
{
|
||||
OKBtn->Enabled = m_EditFlag;
|
||||
}
|
||||
|
||||
void __fastcall TQSODlgBox::SetCountry(void)
|
||||
{
|
||||
m_Country = "";
|
||||
|
||||
if( !Cty.IsData() ) return;
|
||||
LPCSTR p = ClipCC(m_fp->GetText());
|
||||
if( !(*p) ) return;
|
||||
|
||||
SYSTEMTIME now;
|
||||
GetUTC(&now);
|
||||
|
||||
WORD tim = WORD((now.wHour * 60 + now.wMinute) * 30 + now.wSecond/2);
|
||||
|
||||
int n;
|
||||
if( (n = Cty.GetNoP(p))!=0 ){
|
||||
CTL *cp = Cty.GetCTL(n-1);
|
||||
char bf[256];
|
||||
char tbf[5];
|
||||
tbf[0] = 0;
|
||||
if( cp->TD != NULL ){
|
||||
tim = AdjustRolTimeUTC(tim, *cp->TD);
|
||||
if( tim ){
|
||||
tim /= WORD(30);
|
||||
sprintf(tbf, "%02u%02u%c", tim / 60, tim % 60, *cp->TD);
|
||||
}
|
||||
}
|
||||
sprintf(bf, " %s/%s %s %s",
|
||||
(cp->Name!=NULL) ? cp->Name : "",
|
||||
(cp->Cont!=NULL) ? cp->Cont : "",
|
||||
tbf,
|
||||
(cp->QTH!=NULL) ? cp->QTH : ""
|
||||
);
|
||||
m_Country = bf;
|
||||
}
|
||||
}
|
||||
|
||||
int __fastcall TQSODlgBox::Execute(CLogFind *fp, SDMMLOG *sp, int n)
|
||||
{
|
||||
m_fp = fp;
|
||||
UpdateTextData(sp, n);
|
||||
Grid->RowCount = fp->GetCount() ? fp->GetCount() + 1 : 2;
|
||||
// Grid->TopRow = 1;
|
||||
Grid->Row = 1;
|
||||
Grid->Enabled = FALSE;
|
||||
for( int i = 0; i < fp->GetCount(); i++ ){
|
||||
if( n == fp->pFindTbl[i] ){
|
||||
Grid->Enabled = TRUE;
|
||||
Grid->Row = i + 1;
|
||||
Grid->TopRow = (i > 4) ? Grid->Row - 4 : 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
SetCountry();
|
||||
char bf[512];
|
||||
strcpy(bf, ( Font->Charset != SHIFTJIS_CHARSET ) ? "Initial Data":"QSOデータ初期値");
|
||||
if( Grid->Enabled == TRUE ){
|
||||
if( sp->btime ){
|
||||
sprintf(bf, "[%s]", fp->GetText());
|
||||
strcat(bf, m_Country.c_str());
|
||||
}
|
||||
else if( *fp->GetText() ){
|
||||
sprintf(bf, "[%s]", fp->GetText());
|
||||
strcat(bf, m_Country.c_str());
|
||||
}
|
||||
}
|
||||
Caption = bf;
|
||||
UpdateStat();
|
||||
m_EditFlag = 0;
|
||||
UpdateBtn();
|
||||
m_CurNo = n;
|
||||
if( !sys.m_QSOGridWidths.IsEmpty() ){
|
||||
SetGridWidths(Grid, sys.m_QSOGridWidths.c_str());
|
||||
}
|
||||
if( ShowModal() == IDOK ){
|
||||
if( m_EditFlag ){
|
||||
UpdateCurData(&m_sd);
|
||||
Log.PutData(&m_sd, m_CurNo);
|
||||
}
|
||||
}
|
||||
GetGridWidths(sys.m_QSOGridWidths, Grid);
|
||||
if( m_CurNo == n ){
|
||||
memcpy(sp, &m_sd, sizeof(SDMMLOG));
|
||||
}
|
||||
else {
|
||||
Log.GetData(sp, n);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
int __fastcall TQSODlgBox::ShowFind(CLogFind *fp)
|
||||
{
|
||||
m_fp = fp;
|
||||
if( fp->GetCount() ){
|
||||
Log.GetData(&m_sd, fp->pFindTbl[0]);
|
||||
m_CurNo = fp->pFindTbl[0];
|
||||
}
|
||||
else {
|
||||
memset(&m_sd, 0, sizeof(SDMMLOG));
|
||||
OKBtn->Enabled = FALSE;
|
||||
}
|
||||
SetCountry();
|
||||
char bf[512];
|
||||
UpdateTextData(&m_sd, fp->pFindTbl[0]);
|
||||
Grid->RowCount = fp->GetCount() ? fp->GetCount() + 1 : 2;
|
||||
Grid->TopRow = 1;
|
||||
Grid->Row = 1;
|
||||
sprintf(bf, "[%s]", fp->GetText());
|
||||
strcat(bf, m_Country.c_str());
|
||||
Caption = bf;
|
||||
UpdateStat();
|
||||
m_EditFlag = 0;
|
||||
UpdateBtn();
|
||||
if( ShowModal() == IDOK ){
|
||||
if( m_EditFlag ){
|
||||
UpdateCurData(&m_sd);
|
||||
Log.PutData(&m_sd, m_CurNo);
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall TQSODlgBox::UpdateTextData(SDMMLOG *sp, int n)
|
||||
{
|
||||
m_CurNo = n;
|
||||
memcpy(&m_sd, sp, sizeof(SDMMLOG));
|
||||
UpdateTextData(&m_sd);
|
||||
}
|
||||
|
||||
void __fastcall TQSODlgBox::UpdateTextData(SDMMLOG *sp)
|
||||
{
|
||||
SDMMLOG sd;
|
||||
memcpy(&sd, sp, sizeof(SDMMLOG));
|
||||
if( Log.m_LogSet.m_TimeZone != 'I' ){
|
||||
JSTtoUTC(&sd);
|
||||
}
|
||||
EditDate->Text = Log.GetDateString(&sd);
|
||||
EditBgn->Text = Log.GetTimeString(sd.btime);
|
||||
EditEnd->Text = Log.GetTimeString(sd.etime);
|
||||
EditCall->Text = sp->call;
|
||||
EditName->Text = sp->name;
|
||||
EditQTH->Text = sp->qth;
|
||||
EditHis->Text = sp->ur;
|
||||
EditMy->Text = sp->my;
|
||||
EditBand->Text = Log.GetFreqString(sp->band, sp->fq);
|
||||
EditMode->Text = Log.GetModeString(sp->mode);
|
||||
EditRem->Text = sp->rem;
|
||||
EditQSL->Text = sp->qsl;
|
||||
if( sp->env ){
|
||||
EditEnv->Text = sp->env;
|
||||
}
|
||||
else {
|
||||
EditEnv->Text = "";
|
||||
}
|
||||
EditOpt1->Text = Log.GetOptStr(0, sp);
|
||||
EditOpt2->Text = Log.GetOptStr(1, sp);
|
||||
EditUsr1->Text = Log.GetOptStr(2, sp);
|
||||
EditUsr2->Text = Log.GetOptStr(3, sp);
|
||||
EditS->Text = sp->send;
|
||||
EditR->Text = sp->recv;
|
||||
EditM->Text = sp->cq;
|
||||
EditPow->Text = sp->pow;
|
||||
m_EditFlag = 0;
|
||||
UpdateBtn();
|
||||
}
|
||||
|
||||
void __fastcall TQSODlgBox::UpdateCurData(SDMMLOG *sp)
|
||||
{
|
||||
int y, m, d, h;
|
||||
|
||||
switch(Log.m_LogSet.m_DateType){
|
||||
case 2: // dd-mm-yy
|
||||
case 3: // dd-mm-yyyy
|
||||
if( sscanf(AnsiString(EditDate->Text).c_str(), "%u.%u.%u", &d, &m, &y) == 3 ){ //JA7UDE 0428
|
||||
sp->year = BYTE(y % 100);
|
||||
sp->date = WORD(m * 100 + d);
|
||||
}
|
||||
break;
|
||||
case 4: // mm-dd-yy
|
||||
case 5: // mm-dd-yyyy
|
||||
if( sscanf(AnsiString(EditDate->Text).c_str(), "%u.%u.%u", &m, &d, &y) == 3 ){ //JA7UDE 0428
|
||||
sp->year = BYTE(y % 100);
|
||||
sp->date = WORD(m * 100 + d);
|
||||
}
|
||||
break;
|
||||
default: // yy-mm-dd, yyyy-mm-dd
|
||||
if( sscanf(AnsiString(EditDate->Text).c_str(), "%u.%u.%u", &y, &m, &d) == 3 ){ //JA7UDE 0428
|
||||
sp->year = BYTE(y % 100);
|
||||
sp->date = WORD(m * 100 + d);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if( !EditBgn->Text.IsEmpty() ){
|
||||
if( sscanf(AnsiString(EditBgn->Text).c_str(), "%u", &d) == 1){ //JA7UDE 0428
|
||||
h = d / 100;
|
||||
m = d % 100;
|
||||
if( (sp->btime / 30) != (h * 60 + m) ){
|
||||
sp->btime = WORD((h * 60 + m) * 30 + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
if( !EditEnd->Text.IsEmpty() ){
|
||||
if( sscanf(AnsiString(EditEnd->Text).c_str(), "%u", &d) == 1){ //JA7UDE 0428
|
||||
h = d / 100;
|
||||
m = d % 100;
|
||||
if( (sp->etime / 30) != (h * 60 + m) ){
|
||||
sp->etime = WORD((h * 60 + m) * 30 + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
StrCopy(sp->call, AnsiString(EditCall->Text).c_str(), MLCALL); //JA7UDE 0428
|
||||
jstrupr(sp->call);
|
||||
StrCopy(sp->name, AnsiString(EditName->Text).c_str(), MLNAME); //JA7UDE 0428
|
||||
if( Log.m_LogSet.m_UpperName ) jstrupr(sp->name);
|
||||
StrCopy(sp->qth, AnsiString(EditQTH->Text).c_str(), MLQTH); //JA7UDE 0428
|
||||
if( Log.m_LogSet.m_UpperQTH ) jstrupr(sp->qth);
|
||||
StrCopy(sp->ur, AnsiString(EditHis->Text).c_str(), MLRST); //JA7UDE 0428
|
||||
jstrupr(sp->ur);
|
||||
StrCopy(sp->my, AnsiString(EditMy->Text).c_str(), MLRST); //JA7UDE 0428
|
||||
jstrupr(sp->my);
|
||||
Log.SetFreq(sp, AnsiString(EditBand->Text).c_str()); //JA7UDE 0428
|
||||
Log.SetMode(sp, AnsiString(EditMode->Text).c_str()); //JA7UDE 0428
|
||||
StrCopy(sp->rem, AnsiString(EditRem->Text).c_str(), MLREM); //JA7UDE 0428
|
||||
if( Log.m_LogSet.m_UpperREM ) jstrupr(sp->rem);
|
||||
StrCopy(sp->qsl, AnsiString(EditQSL->Text).c_str(), MLQSL); //JA7UDE 0428
|
||||
if( Log.m_LogSet.m_UpperQSL ) jstrupr(sp->qsl);
|
||||
if( sscanf(AnsiString(EditEnv->Text).c_str(), "%u", &d) == 1){ //JA7UDE 0428
|
||||
sp->env = WORD(d);
|
||||
}
|
||||
else {
|
||||
sp->env = 0;
|
||||
}
|
||||
Log.SetOptStr(0, sp, AnsiString(EditOpt1->Text).c_str()); //JA7UDE 0428
|
||||
Log.SetOptStr(1, sp, AnsiString(EditOpt2->Text).c_str()); //JA7UDE 0428
|
||||
Log.SetOptStr(2, sp, AnsiString(EditUsr1->Text).c_str()); //JA7UDE 0428
|
||||
Log.SetOptStr(3, sp, AnsiString(EditUsr2->Text).c_str()); //JA7UDE 0428
|
||||
sp->send = *EditS->Text.c_str(); //JA7UDE 0428
|
||||
sp->recv = *EditR->Text.c_str(); //JA7UDE 0428
|
||||
sp->cq = *EditM->Text.c_str(); //JA7UDE 0428
|
||||
sp->cq = char(toupper(sp->cq));
|
||||
StrCopy(sp->pow, AnsiString(EditPow->Text).c_str(), MLPOW); //JA7UDE 0428
|
||||
jstrupr(sp->pow);
|
||||
if( Log.m_LogSet.m_TimeZone != 'I' ){
|
||||
UTCtoJST(sp);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TQSODlgBox::UpdateStat(void)
|
||||
{
|
||||
char bf[256];
|
||||
|
||||
int cmp1max = m_fp->m_FindCmp1Max;
|
||||
int cmp2max = m_fp->m_FindCmp2Max;
|
||||
if( cmp2max && (m_fp->pFindTbl[0] == Log.m_CurNo) ){
|
||||
cmp1max--;
|
||||
cmp2max--;
|
||||
}
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
if( !cmp2max ){
|
||||
strcpy(bf, "No Data");
|
||||
}
|
||||
else if( cmp1max != cmp2max ){
|
||||
sprintf(bf, "Perfect: %u SameCall: %u", cmp1max, cmp2max - cmp1max);
|
||||
}
|
||||
else {
|
||||
sprintf(bf, "Perfect: %u", cmp1max );
|
||||
}
|
||||
}
|
||||
else {
|
||||
if( !cmp2max ){
|
||||
strcpy(bf, "一致なし");
|
||||
}
|
||||
else if( cmp1max != cmp2max ){
|
||||
sprintf(bf, "完全一致: %u件 同一コール: %u件", cmp1max, cmp2max - cmp1max);
|
||||
}
|
||||
else {
|
||||
sprintf(bf, "完全一致: %u件", cmp1max );
|
||||
}
|
||||
}
|
||||
LStat->Caption = bf;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TQSODlgBox::GridDrawCell(TObject *Sender, int Col, int Row,
|
||||
TRect &Rect, TGridDrawState State)
|
||||
{
|
||||
char bf[256];
|
||||
SDMMLOG sd;
|
||||
|
||||
Grid->Canvas->FillRect(Rect);
|
||||
int X = Rect.Left + 4;
|
||||
int Y = Rect.Top + 2;
|
||||
|
||||
if( Row ){
|
||||
Row--;
|
||||
bf[0] = 0;
|
||||
if( Row < m_fp->GetCount() ){
|
||||
Log.GetData(&sd, m_fp->pFindTbl[Row]);
|
||||
if( ((Row+1) != Grid->Row)||(Col != Grid->Col) ){
|
||||
if( m_fp->pFindTbl[Row] == Log.m_CurNo ){
|
||||
Grid->Canvas->Font->Color = clLtGray;
|
||||
}
|
||||
else if( Row < m_fp->m_FindCmp1Max ){
|
||||
Grid->Canvas->Font->Color = clRed;
|
||||
}
|
||||
else if( Row < m_fp->m_FindCmp2Max ){
|
||||
Grid->Canvas->Font->Color = clGreen;
|
||||
}
|
||||
}
|
||||
if( Log.m_LogSet.m_TimeZone != 'I' ){
|
||||
JSTtoUTC(&sd);
|
||||
}
|
||||
}
|
||||
else {
|
||||
memset(&sd, 0, sizeof(SDMMLOG));
|
||||
}
|
||||
switch(Col){
|
||||
case 0: // Date
|
||||
strcpy(bf, Log.GetDateString(&sd));
|
||||
break;
|
||||
case 1: // Time
|
||||
strcpy(bf, Log.GetTimeString(sd.btime));
|
||||
break;
|
||||
case 2: // Call
|
||||
strcpy(bf, sd.call);
|
||||
break;
|
||||
case 3: // M
|
||||
bf[0] = sd.cq;
|
||||
bf[1] = 0;
|
||||
break;
|
||||
case 4: // HisRST
|
||||
strcpy(bf, sd.ur);
|
||||
break;
|
||||
case 5: // MyRST
|
||||
strcpy(bf, sd.my);
|
||||
break;
|
||||
case 6: // Band
|
||||
strcpy(bf, Log.GetFreqString(sd.band, sd.fq));
|
||||
break;
|
||||
case 7: // Mode
|
||||
strcpy(bf, Log.GetModeString(sd.mode));
|
||||
break;
|
||||
case 8: // Pow
|
||||
strcpy(bf, sd.pow);
|
||||
break;
|
||||
case 9: // Name
|
||||
strcpy(bf, sd.name);
|
||||
break;
|
||||
case 10: // QTH
|
||||
strcpy(bf, sd.qth);
|
||||
break;
|
||||
case 11: // S
|
||||
bf[0] = sd.send;
|
||||
bf[1] = 0;
|
||||
break;
|
||||
case 12: // R
|
||||
bf[0] = sd.recv;
|
||||
bf[1] = 0;
|
||||
break;
|
||||
case 13: // REM
|
||||
strcpy(bf, sd.rem);
|
||||
break;
|
||||
case 14: // QSL
|
||||
strcpy(bf, sd.qsl);
|
||||
break;
|
||||
case 15: // etime;
|
||||
strcpy(bf, Log.GetTimeString(sd.etime));
|
||||
break;
|
||||
case 16: // Env
|
||||
if( sd.env ) sprintf(bf, "%u", sd.env);
|
||||
break;
|
||||
case 17: // Opt1
|
||||
strcpy(bf, sd.opt1);
|
||||
break;
|
||||
case 18: // Opt2
|
||||
strcpy(bf, sd.opt2);
|
||||
break;
|
||||
case 19: // Usr1
|
||||
break;
|
||||
case 20: // Usr2
|
||||
break;
|
||||
}
|
||||
Grid->Canvas->TextRect(Rect, X, Y, bf);
|
||||
}
|
||||
else { // タイトル
|
||||
LPCSTR _tt[]={
|
||||
"Date","JST","Call","M", "His","My","Band","Mode","Pow","Name","QTH","S","R",
|
||||
"REM","QSL", "End", "Env", "Opt1", "Opt2", "Usr1", "Usr2",
|
||||
};
|
||||
if( Col == 1 ){
|
||||
Grid->Canvas->TextRect(Rect, X, Y, LTimeZone->Caption);
|
||||
}
|
||||
else {
|
||||
Grid->Canvas->TextRect(Rect, X, Y, _tt[Col]);
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TQSODlgBox::GridSelectCell(TObject *Sender, int Col, int Row,
|
||||
bool &CanSelect)
|
||||
{
|
||||
int n = Row - 1;
|
||||
if( n < m_fp->GetCount() ){
|
||||
if( m_CurNo != m_fp->pFindTbl[n] ){
|
||||
if( m_EditFlag ){
|
||||
UpdateCurData(&m_sd);
|
||||
Log.PutData(&m_sd, m_CurNo);
|
||||
m_EditFlag = 0;
|
||||
}
|
||||
m_CurNo = m_fp->pFindTbl[n];
|
||||
Log.GetData(&m_sd, m_CurNo);
|
||||
UpdateTextData(&m_sd, m_CurNo);
|
||||
Grid->Invalidate();
|
||||
UpdateBtn();
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TQSODlgBox::SBMMCGClick(TObject *Sender)
|
||||
{
|
||||
TMmcgDlgBox *pBox = new TMmcgDlgBox(this);
|
||||
|
||||
AnsiString call = EditCall->Text;
|
||||
AnsiString qth = EditQTH->Text;
|
||||
AnsiString opt = EditOpt1->Text;
|
||||
if( pBox->Execute( call, qth, opt) == TRUE ){ //JA7UDE 0428
|
||||
EditQTH->Text = qth;
|
||||
EditOpt1->Text = opt;
|
||||
}
|
||||
delete pBox;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TQSODlgBox::FormKeyDown(TObject *Sender, WORD &Key,
|
||||
TShiftState Shift)
|
||||
{
|
||||
if( Key == VK_F7 ){
|
||||
Key = 0;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TQSODlgBox::FormKeyUp(TObject *Sender, WORD &Key,
|
||||
TShiftState Shift)
|
||||
{
|
||||
if( Key == VK_F7 ){
|
||||
SBMMCGClick(NULL);
|
||||
Key = 0;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TQSODlgBox::RefBtnClick(TObject *Sender)
|
||||
{
|
||||
AnsiString as;
|
||||
MmttyWd->PrintText.GetString(as);
|
||||
TTextEditDlg *pBox = new TTextEditDlg(this);
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
pBox->Memo->Font->Name = sys.m_BtnFontName;
|
||||
pBox->Memo->Font->Charset = sys.m_BtnFontCharset;
|
||||
pBox->Execute(as, TRUE, "Receive Window");
|
||||
}
|
||||
else {
|
||||
pBox->Execute(as, TRUE, "受信画面記録");
|
||||
}
|
||||
delete pBox;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TQSODlgBox::EditDateChange(TObject *Sender)
|
||||
{
|
||||
m_EditFlag = 1;
|
||||
UpdateBtn();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
QsoDlg.dfm
Normal file
BIN
QsoDlg.dfm
Normal file
Binary file not shown.
128
QsoDlg.h
Normal file
128
QsoDlg.h
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef QsoDlgH
|
||||
#define QsoDlgH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <Grids.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "LogFile.h"
|
||||
//----------------------------------------------------------------------------
|
||||
class TQSODlgBox : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TGroupBox *GroupBox1;
|
||||
TStringGrid *Grid;
|
||||
TLabel *Label1;
|
||||
TEdit *EditDate;
|
||||
TLabel *LTimeZone;
|
||||
TEdit *EditBgn;
|
||||
TLabel *Label3;
|
||||
TEdit *EditEnd;
|
||||
TLabel *Label4;
|
||||
TEdit *EditCall;
|
||||
TLabel *Label5;
|
||||
TEdit *EditName;
|
||||
TLabel *Label6;
|
||||
TEdit *EditQTH;
|
||||
TLabel *Label7;
|
||||
TComboBox *EditMy;
|
||||
TLabel *Label8;
|
||||
TComboBox *EditHis;
|
||||
TLabel *Label9;
|
||||
TComboBox *EditBand;
|
||||
TLabel *Label10;
|
||||
TComboBox *EditMode;
|
||||
TLabel *Label11;
|
||||
TEdit *EditRem;
|
||||
TLabel *Label12;
|
||||
TEdit *EditQSL;
|
||||
TLabel *Label13;
|
||||
TLabel *Label14;
|
||||
TLabel *Label15;
|
||||
TEdit *EditEnv;
|
||||
TLabel *Label16;
|
||||
TEdit *EditOpt1;
|
||||
TLabel *Label17;
|
||||
TEdit *EditOpt2;
|
||||
TLabel *Label18;
|
||||
TComboBox *EditM;
|
||||
TComboBox *EditS;
|
||||
TComboBox *EditR;
|
||||
TLabel *Label19;
|
||||
TComboBox *EditPow;
|
||||
TLabel *LStat;
|
||||
TLabel *Label20;
|
||||
TEdit *EditUsr1;
|
||||
TLabel *Label21;
|
||||
TEdit *EditUsr2;
|
||||
TSpeedButton *SBMMCG;
|
||||
TButton *RefBtn;
|
||||
void __fastcall GridDrawCell(TObject *Sender, int Col, int Row, TRect &Rect,
|
||||
TGridDrawState State);
|
||||
void __fastcall GridSelectCell(TObject *Sender, int Col, int Row,
|
||||
bool &CanSelect);
|
||||
|
||||
|
||||
void __fastcall SBMMCGClick(TObject *Sender);
|
||||
void __fastcall FormKeyDown(TObject *Sender, WORD &Key, TShiftState Shift);
|
||||
void __fastcall FormKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
|
||||
void __fastcall RefBtnClick(TObject *Sender);
|
||||
void __fastcall EditDateChange(TObject *Sender);
|
||||
private:
|
||||
CLogFind *m_fp;
|
||||
int m_EditFlag;
|
||||
|
||||
int m_CurNo;
|
||||
SDMMLOG m_sd;
|
||||
|
||||
AnsiString m_Country;
|
||||
void __fastcall UpdateBtn(void);
|
||||
void __fastcall SetCountry(void);
|
||||
|
||||
// CAlignList AlignList;
|
||||
// void __fastcall EntryAlignControl(void);
|
||||
void __fastcall UpdateStat(void);
|
||||
|
||||
void __fastcall UpdateTextData(SDMMLOG *sp, int n);
|
||||
void __fastcall UpdateTextData(SDMMLOG *sp);
|
||||
void __fastcall UpdateCurData(SDMMLOG *sp);
|
||||
public:
|
||||
virtual __fastcall TQSODlgBox(TComponent* AOwner);
|
||||
int __fastcall Execute(CLogFind *fp, SDMMLOG *sp, int n);
|
||||
int __fastcall ShowFind(CLogFind *fp);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TQSODlgBox *QSODlgBox;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
933
Rtty.h
Normal file
933
Rtty.h
Normal file
|
|
@ -0,0 +1,933 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef RttyH
|
||||
#define RttyH
|
||||
//---------------------------------------------------------------------------
|
||||
#include "Fir.h"
|
||||
#include "CLX.h"
|
||||
|
||||
#define VERFFTDEM 1 // CPhaseX Version
|
||||
#define VERAA6YQ 2 // CAA6YQ Version
|
||||
|
||||
#define BITDEBUG 0 // キャラクタ長の測定
|
||||
#define TXDDEBUG 0 // FSKのキャラクタ長の測定
|
||||
#define FSKDEBUG 0 // FSKのデバッグモード
|
||||
|
||||
#ifndef SampFreq
|
||||
extern double SampFreq;
|
||||
#endif
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Added by JE3HHT on Aug.2010
|
||||
class CFAVG
|
||||
{
|
||||
private:
|
||||
double m_Sum;
|
||||
double m_Avg;
|
||||
double m_Mul;
|
||||
int m_Max;
|
||||
int m_Cnt;
|
||||
public:
|
||||
__fastcall CFAVG();
|
||||
void __fastcall Reset(void);
|
||||
void __fastcall Reset(double d);
|
||||
void __fastcall Create(int max);
|
||||
double __fastcall DoZ(double d);
|
||||
double __fastcall Do(double d);
|
||||
inline double __fastcall GetAvg(void){return m_Avg;};
|
||||
inline BOOL __fastcall IsFull(void){return m_Max == m_Cnt;};
|
||||
inline BOOL __fastcall IsHalf(void){return m_Max <= (m_Cnt*2);};
|
||||
inline int __fastcall GetCount(void){return m_Cnt;};
|
||||
};
|
||||
//--------------------------------------------------------
|
||||
// CAGCクラス
|
||||
// Added by JE3HHT on Aug.2010
|
||||
class CAGCX
|
||||
{
|
||||
private:
|
||||
double m_Max;
|
||||
double m_Min;
|
||||
double m_d;
|
||||
double m_agc;
|
||||
|
||||
double m_fc;
|
||||
double m_Gain;
|
||||
CIIR m_LPF;
|
||||
// CIIR m_Level;
|
||||
int m_Count;
|
||||
int m_TLimit;
|
||||
CFAVG m_AvgOver;
|
||||
public:
|
||||
double m_LimitGain;
|
||||
double m_MonitorFreq;
|
||||
double m_CarrierFreq;
|
||||
double m_SampleFreq;
|
||||
public:
|
||||
__fastcall CAGCX();
|
||||
void __fastcall Create(void);
|
||||
inline void __fastcall SetSampleFreq(double f){m_SampleFreq = f; Create();};
|
||||
void __fastcall SetCarrierFreq(double f);
|
||||
void __fastcall SetFC(double fc);
|
||||
void __fastcall Reset(void);
|
||||
double __fastcall Do(double d);
|
||||
inline void __fastcall ResetOver(void){m_AvgOver.Reset(1.0);};
|
||||
BOOL __fastcall GetOver(void);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
class CSinTable
|
||||
{
|
||||
public:
|
||||
double *m_tSin;
|
||||
int m_Size;
|
||||
public:
|
||||
__fastcall CSinTable();
|
||||
__fastcall ~CSinTable();
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
class CAMPCONT
|
||||
{
|
||||
private:
|
||||
double m_Max;
|
||||
double m_Cnt;
|
||||
double m_ADD;
|
||||
int m_S;
|
||||
int m_iMax;
|
||||
public:
|
||||
__fastcall CAMPCONT();
|
||||
void __fastcall SetMax(int max);
|
||||
void __fastcall Reset(void);
|
||||
double __fastcall Do(int d);
|
||||
|
||||
inline __fastcall IsMax(void){return m_Cnt >= m_Max;};
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
class CTICK
|
||||
{
|
||||
public:
|
||||
int *ptbl[2];
|
||||
int m_wsel;
|
||||
int *m_wp;
|
||||
int m_wcnt;
|
||||
int m_Trig;
|
||||
int m_Samp;
|
||||
public:
|
||||
CTICK();
|
||||
~CTICK();
|
||||
void Init(void);
|
||||
void Write(double d);
|
||||
inline int GetTrig(void){return m_Trig;};
|
||||
int *GetData(void);
|
||||
};
|
||||
|
||||
|
||||
class CVCO
|
||||
{
|
||||
private:
|
||||
double m_c1; // VCOの利得
|
||||
double m_c2; // フリーランニング周波数
|
||||
int m_z;
|
||||
|
||||
int m_TableSize;
|
||||
double *pSinTbl;
|
||||
double m_FreeFreq;
|
||||
double m_SampleFreq;
|
||||
int m_vlock;
|
||||
public:
|
||||
CVCO();
|
||||
~CVCO();
|
||||
void VirtualLock(void);
|
||||
void InitPhase(void);
|
||||
void SetGain(double gain);
|
||||
void SetSampleFreq(double f);
|
||||
void SetFreeFreq(double f);
|
||||
double Do(double d);
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Added by JE3HHT on Aug.2010
|
||||
class CVCOX
|
||||
{
|
||||
private:
|
||||
double m_c1; // VCOの利得
|
||||
double m_c2; // フリーランニング周波数
|
||||
double m_z;
|
||||
|
||||
double m_FreeFreq;
|
||||
double m_SampleFreq;
|
||||
int m_TableSize;
|
||||
double m_TableCOS;
|
||||
public:
|
||||
__fastcall CVCOX();
|
||||
__fastcall ~CVCOX();
|
||||
void __fastcall InitPhase(void);
|
||||
void __fastcall SetGain(double gain);
|
||||
void __fastcall SetSampleFreq(double f);
|
||||
void __fastcall SetFreeFreq(double f);
|
||||
double __fastcall Do(void);
|
||||
double __fastcall Do(double d);
|
||||
double __fastcall DoCos(void);
|
||||
};
|
||||
|
||||
class CSmooz{
|
||||
private:
|
||||
double *bp;
|
||||
int Wp;
|
||||
int Max;
|
||||
int Cnt;
|
||||
inline void IncWp(void){
|
||||
Wp++;
|
||||
if( Wp >= Max ) Wp = 0;
|
||||
};
|
||||
inline double Avg(void){
|
||||
double d = 0.0;
|
||||
int i;
|
||||
for( i = 0; i < Cnt; i++ ){
|
||||
d += bp[i];
|
||||
}
|
||||
if( Cnt ){
|
||||
return d/double(Cnt);
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
public:
|
||||
inline CSmooz(int max = 60){
|
||||
Max = max;
|
||||
bp = new double[max];
|
||||
Cnt = 0;
|
||||
Wp = 0;
|
||||
};
|
||||
inline ~CSmooz(void){
|
||||
delete[] bp;
|
||||
};
|
||||
inline void SetCount(int n){
|
||||
double *np = new double[n];
|
||||
Max = n;
|
||||
Cnt = Wp = 0;
|
||||
double *op = bp;
|
||||
bp = np;
|
||||
delete[] op; //JA7UDE 0428
|
||||
//delete[] np; //JA7UDE 0428
|
||||
};
|
||||
inline double Avg(double d){
|
||||
bp[Wp] = d;
|
||||
IncWp();
|
||||
if( Cnt < Max ){
|
||||
Cnt++;
|
||||
}
|
||||
return Avg();
|
||||
};
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// Added by JE3HHT on Aug.2010
|
||||
class CFIR
|
||||
{
|
||||
private:
|
||||
int m_Tap;
|
||||
double *m_pZ;
|
||||
double *m_pH;
|
||||
public:
|
||||
__fastcall CFIR();
|
||||
__fastcall ~CFIR();
|
||||
void __fastcall Create(int tap, int type, double fs, double fcl, double fch, double att, double gain);
|
||||
double __fastcall Do(double d);
|
||||
void __fastcall SaveCoef(LPCSTR pName);
|
||||
inline double __fastcall GetHD(int n){return m_pH[n];};
|
||||
inline double *__fastcall GetHP(void){return m_pH;};
|
||||
inline int __fastcall GetTap(void){return m_Tap;};
|
||||
};
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
// ダブルバッファによるFIRフィルタ
|
||||
// Added by JE3HHT on Aug.2010
|
||||
class CFIR2
|
||||
{
|
||||
private:
|
||||
int m_Tap;
|
||||
int m_TapHalf;
|
||||
double *m_pZ;
|
||||
double *m_pH;
|
||||
double *m_pZP;
|
||||
|
||||
int m_W;
|
||||
double m_fs;
|
||||
public:
|
||||
__fastcall CFIR2();
|
||||
__fastcall ~CFIR2();
|
||||
void __fastcall Delete(void);
|
||||
void __fastcall Clear(void);
|
||||
void __fastcall Create(int tap, int type, double fs, double fcl, double fch, double att, double gain);
|
||||
void __fastcall Create(int tap, double fs, double fcl, double fch);
|
||||
void __fastcall CreateSamp(int tap, double fs, const double *pSmpFQ);
|
||||
double __fastcall Do(double d);
|
||||
double __fastcall Do(double *hp);
|
||||
void __fastcall Do(CLX &z, double d);
|
||||
|
||||
inline double __fastcall GetHD(int n){return m_pH[n];};
|
||||
inline double *__fastcall GetHP(void){return m_pH;};
|
||||
inline int __fastcall GetTap(void){return m_Tap;};
|
||||
inline double __fastcall GetSampleFreq(void){return m_fs;};
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
// ダブルバッファによるFIRフィルタ(複素数用)
|
||||
// Added by JE3HHT on Aug.2010
|
||||
class CFIRX
|
||||
{
|
||||
private:
|
||||
int m_Tap;
|
||||
int m_TapHalf;
|
||||
CLX *m_pZ;
|
||||
double *m_pH;
|
||||
CLX *m_pZP;
|
||||
|
||||
int m_W;
|
||||
double m_fs;
|
||||
public:
|
||||
__fastcall CFIRX();
|
||||
__fastcall ~CFIRX();
|
||||
void __fastcall Clear(void);
|
||||
void __fastcall Create(int tap, int type, double fs, double fcl, double fch, double att, double gain);
|
||||
void __fastcall Do(CLX &d);
|
||||
|
||||
inline double __fastcall GetHD(int n){return m_pH[n];};
|
||||
inline double *__fastcall GetHP(void){return m_pH;};
|
||||
inline int __fastcall GetTap(void){return m_Tap;};
|
||||
inline double __fastcall GetSampleFreq(void){return m_fs;};
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
// スライディングFFT
|
||||
// Added by JE3HHT on Aug.2010
|
||||
class CSlideFFT
|
||||
{
|
||||
private:
|
||||
int m_Length;
|
||||
int m_Base;
|
||||
int m_Tones;
|
||||
|
||||
CLX m_tData[16];
|
||||
CLX m_tWindow[16];
|
||||
|
||||
CLX *m_pCur;
|
||||
CLX *m_pEnd;
|
||||
CLX *m_pBase;
|
||||
|
||||
double m_kWindow;
|
||||
private:
|
||||
public:
|
||||
__fastcall CSlideFFT();
|
||||
__fastcall ~CSlideFFT();
|
||||
|
||||
void __fastcall Create(int len, int base, int tones);
|
||||
CLX* __fastcall Do(const CLX &zIn);
|
||||
};
|
||||
|
||||
/*=============================================================================
|
||||
CPHASEクラス
|
||||
=============================================================================*/
|
||||
#define CPHASE_BASEFREQ 0.0
|
||||
class CPHASE
|
||||
{
|
||||
private:
|
||||
// CFIRX m_LPF;
|
||||
CVCOX m_VCO;
|
||||
CFIR2 m_Hilbert;
|
||||
CAGCX m_AGC;
|
||||
|
||||
FILE *m_fp;
|
||||
public:
|
||||
CLX m_sig;
|
||||
CSlideFFT m_SlideFFT;
|
||||
|
||||
int m_TONES;
|
||||
double m_SHIFT;
|
||||
double m_fftSHIFT;
|
||||
int m_BASEPOINT;
|
||||
|
||||
double m_MixerFreq;
|
||||
double m_SymbolLen;
|
||||
double m_CarrierFreq;
|
||||
double m_SampleFreq;
|
||||
|
||||
double m_dm;
|
||||
double m_ds;
|
||||
private:
|
||||
public:
|
||||
__fastcall CPHASE();
|
||||
void __fastcall Create(void);
|
||||
void __fastcall SetSampleFreq(double f);
|
||||
void __fastcall SetCarrierFreq(double f);
|
||||
inline void __fastcall AddCarrierFreq(double f){
|
||||
SetCarrierFreq(m_CarrierFreq + f);
|
||||
};
|
||||
CLX* __fastcall Do(double d);
|
||||
inline CFIR2* __fastcall GetFIR(void){return &m_Hilbert;};
|
||||
|
||||
void __fastcall DoFSK(double d);
|
||||
void __fastcall SetShift(double f);
|
||||
void __fastcall ShowPara(void);
|
||||
|
||||
inline void SetTones(int n){
|
||||
m_TONES = n;
|
||||
Create();
|
||||
}
|
||||
};
|
||||
|
||||
class CPLL
|
||||
{
|
||||
private:
|
||||
CIIR loopLPF;
|
||||
CIIR outLPF;
|
||||
|
||||
double m_err;
|
||||
double m_out;
|
||||
double m_vcoout;
|
||||
double m_SampleFreq;
|
||||
double m_FreeFreq;
|
||||
double m_Shift;
|
||||
public:
|
||||
int m_loopOrder;
|
||||
double m_loopFC;
|
||||
int m_outOrder;
|
||||
double m_outFC;
|
||||
double m_vcogain;
|
||||
public:
|
||||
CVCO vco;
|
||||
inline CPLL(){
|
||||
m_err = 0;
|
||||
m_out = 0;
|
||||
m_vcoout = 0;
|
||||
m_vcogain = 3.0;
|
||||
m_SampleFreq = SampFreq * 0.5;
|
||||
m_Shift = 170.0;
|
||||
m_FreeFreq = (2125 + 2295)/2;
|
||||
m_loopOrder = 2;
|
||||
m_outOrder = 4;
|
||||
m_loopFC = 250.0;
|
||||
m_outFC = 200.0;
|
||||
SetFreeFreq(2125, 2295);
|
||||
SetSampleFreq(m_SampleFreq);
|
||||
};
|
||||
inline void SetVcoGain(double g){
|
||||
m_vcogain = g;
|
||||
vco.SetGain(-m_Shift * g);
|
||||
};
|
||||
inline void MakeLoopLPF(void){
|
||||
loopLPF.MakeIIR(m_loopFC, m_SampleFreq, m_loopOrder, 0, 0);
|
||||
}
|
||||
inline void MakeOutLPF(void){
|
||||
outLPF.MakeIIR(m_outFC, m_SampleFreq, m_outOrder, 0, 0);
|
||||
}
|
||||
inline void SetFreeFreq(double f1, double f2){
|
||||
m_FreeFreq = (f1 + f2)/2.0;
|
||||
m_Shift = f2 - f1;
|
||||
vco.SetFreeFreq(m_FreeFreq);
|
||||
vco.SetGain(-m_Shift * m_vcogain);
|
||||
}
|
||||
void SetSampleFreq(double f){
|
||||
m_SampleFreq = f;
|
||||
vco.SetSampleFreq(f);
|
||||
vco.SetFreeFreq(m_FreeFreq);
|
||||
SetVcoGain(3.0);
|
||||
MakeLoopLPF();
|
||||
MakeOutLPF();
|
||||
};
|
||||
double Do(double d){
|
||||
d /= 32768.0;
|
||||
// Loop Filter
|
||||
m_out = loopLPF.Do(m_err);
|
||||
// VCO
|
||||
m_vcoout = vco.Do(m_out);
|
||||
// 位相比較
|
||||
m_err = m_vcoout * d;
|
||||
return outLPF.Do(m_out) * 32768.0;
|
||||
};
|
||||
inline double GetErr(void){return m_err*32768;}; // Phase Det
|
||||
inline double GetOut(void){return m_out*32768;}; // Phase Det
|
||||
inline double GetVco(void){return m_vcoout;};
|
||||
};
|
||||
|
||||
|
||||
#define SCOPESIZE 8192
|
||||
class CScope
|
||||
{
|
||||
private:
|
||||
int m_DataFlag;
|
||||
|
||||
int m_wp;
|
||||
|
||||
public:
|
||||
int m_ScopeSize;
|
||||
double *pScopeData;
|
||||
|
||||
public:
|
||||
CScope();
|
||||
~CScope();
|
||||
void WriteData(double d);
|
||||
void UpdateData(double d);
|
||||
inline int GetFlag(void){m_DataFlag; return 0;}; //JA7UDE 0428
|
||||
void Collect(int size);
|
||||
};
|
||||
|
||||
#define SAMPLEPEAKMAX 16
|
||||
class CSamplePeak
|
||||
{
|
||||
private:
|
||||
double Strage[SAMPLEPEAKMAX];
|
||||
double m_CurPeak;
|
||||
double m_Peak;
|
||||
|
||||
int m_Strage;
|
||||
int m_Count;
|
||||
int m_ReCount;
|
||||
public:
|
||||
CSamplePeak();
|
||||
|
||||
inline int GetStrage(void){ return m_Strage + 1;};
|
||||
inline void SetStrage(int n){
|
||||
if( n > SAMPLEPEAKMAX ) n = SAMPLEPEAKMAX;
|
||||
m_Strage = n ? (n - 1) : 0;
|
||||
};
|
||||
double GetPeak(void){return m_Peak;};
|
||||
void SetBaudRate(double b);
|
||||
void Sync(int Delay);
|
||||
int Sample(double d);
|
||||
};
|
||||
|
||||
class CAGC
|
||||
{
|
||||
private:
|
||||
double m_MarkGain;
|
||||
double m_SpaceGain;
|
||||
public:
|
||||
int m_Sync;
|
||||
double m_StepGain;
|
||||
double m_MaxGain;
|
||||
double m_DeffGain;
|
||||
CSamplePeak Mark;
|
||||
CSamplePeak Space;
|
||||
public:
|
||||
CAGC();
|
||||
void Sync(int Delay);
|
||||
double SampleMark(double d);
|
||||
double SampleSpace(double d);
|
||||
|
||||
};
|
||||
|
||||
#define ATCMAX 17
|
||||
#define ATCC (8192.0)
|
||||
#define ATCW (1024.0)
|
||||
class CATC
|
||||
{
|
||||
private:
|
||||
double m_Low;
|
||||
double m_High;
|
||||
double m_CurLow;
|
||||
double m_CurHigh;
|
||||
double m_LowList[ATCMAX];
|
||||
double m_HighList[ATCMAX];
|
||||
int m_Cnt;
|
||||
CIIR m_iir;
|
||||
public:
|
||||
int m_Max;
|
||||
public:
|
||||
CATC();
|
||||
double Do(double d);
|
||||
};
|
||||
|
||||
/********************************************************
|
||||
CAA6YQ class by JE3HHT on Sep.2010
|
||||
*********************************************************/
|
||||
class CAA6YQ { // Added by JE3HHT on Sep.2010
|
||||
public:
|
||||
BOOL m_fEnabled;
|
||||
int m_bpfTaps;
|
||||
int m_befTaps;
|
||||
double m_bpfFW;
|
||||
double m_befFW;
|
||||
double m_afcERR;
|
||||
|
||||
double m_dblMark;
|
||||
double m_dblSpace;
|
||||
double m_dblMarkAFC;
|
||||
double m_dblSpaceAFC;
|
||||
|
||||
CFIR2 m_BPF;
|
||||
CFIR2 m_BEF;
|
||||
private:
|
||||
public:
|
||||
__fastcall CAA6YQ(void);
|
||||
void __fastcall Create(void);
|
||||
void __fastcall SetMarkFreq(double f);
|
||||
void __fastcall SetSpaceFreq(double f);
|
||||
void __fastcall SetMarkFreqByAFC(double f);
|
||||
void __fastcall SetSpaceFreqByAFC(double f);
|
||||
double __fastcall Do(double d);
|
||||
};
|
||||
|
||||
#define DEMBUFMAX 512
|
||||
#define DEMBPFTAP 36
|
||||
class CFSKDEM
|
||||
{
|
||||
private:
|
||||
double HMark[TAPMAX+1];
|
||||
double ZMark[TAPMAX+1];
|
||||
double HSpace[TAPMAX+1];
|
||||
double ZSpace[TAPMAX+1];
|
||||
|
||||
int Count; // デモジュレータディスパッチ
|
||||
double i2; // デモジュレータ2ndInput
|
||||
|
||||
CDECM2 DECM2; // デモジュレータ
|
||||
|
||||
int m_Smooz;
|
||||
CSmooz avgMark;
|
||||
CSmooz avgSpace;
|
||||
|
||||
double m_BaudRate;
|
||||
int m_Count;
|
||||
int m_ReCount;
|
||||
|
||||
int m_mode;
|
||||
int m_inv;
|
||||
int m_sq;
|
||||
double m_SQLevel;
|
||||
|
||||
int m_Tap;
|
||||
double m_FilWidth;
|
||||
double m_MarkFreq;
|
||||
double m_SpaceFreq;
|
||||
double m_SetMarkFreq;
|
||||
double m_SetSpaceFreq;
|
||||
double m_AFCMarkFreq;
|
||||
double m_AFCSpaceFreq;
|
||||
|
||||
int m_DataCount;
|
||||
BYTE m_Data;
|
||||
|
||||
int m_BufCount;
|
||||
BYTE m_Buff[DEMBUFMAX];
|
||||
int m_wp;
|
||||
int m_rp;
|
||||
|
||||
double m_dMark;
|
||||
double m_dSpace;
|
||||
int m_mark;
|
||||
int m_space;
|
||||
|
||||
double m_SmoozFreq;
|
||||
|
||||
int m_SumParity;
|
||||
|
||||
CIIRTANK m_iirm;
|
||||
CIIRTANK m_iirs;
|
||||
|
||||
int m_sqcount;
|
||||
CSmooz SmoozSQ;
|
||||
|
||||
COVERLIMIT OverLimit;
|
||||
public:
|
||||
int m_type;
|
||||
double m_iirfw;
|
||||
|
||||
int m_OverFlow;
|
||||
// int m_Bit;
|
||||
int m_Scope;
|
||||
int m_XYScope;
|
||||
|
||||
int m_BitLen;
|
||||
int m_StopLen;
|
||||
int m_Parity;
|
||||
|
||||
int m_majority; // 多数決ロジック
|
||||
int m_ignoreFream; // フレーミングエラーの無視
|
||||
|
||||
int m_Limit;
|
||||
int m_LimitAGC;
|
||||
double m_LimitGain;
|
||||
|
||||
double m_limitMax;
|
||||
double m_limitMin;
|
||||
double m_d;
|
||||
double m_limitagc;
|
||||
|
||||
double m_deff;
|
||||
double m_avgdeff;
|
||||
|
||||
CScope m_XYScopeMark;
|
||||
CScope m_XYScopeSpace;
|
||||
CScope m_ScopeMark[4];
|
||||
CScope m_ScopeSpace[4];
|
||||
CScope m_ScopeSync;
|
||||
CScope m_ScopeBit;
|
||||
|
||||
CPLL m_pll;
|
||||
|
||||
int m_lpf;
|
||||
int m_lpfOrder;
|
||||
double m_lpffreq;
|
||||
CIIR LpfMark;
|
||||
CIIR LpfSpace;
|
||||
|
||||
int m_LimitOverSampling;
|
||||
int m_Tick;
|
||||
CTICK Tick;
|
||||
int m_atc;
|
||||
CATC m_atcMark;
|
||||
CATC m_atcSpace;
|
||||
CATC m_atcPLL;
|
||||
|
||||
CPHASE m_Phase;
|
||||
CAA6YQ m_AA6YQ;
|
||||
#if BITDEBUG
|
||||
int m_bitCount;
|
||||
int m_bitCountA;
|
||||
#endif
|
||||
private:
|
||||
void DoFSK(void);
|
||||
|
||||
|
||||
public:
|
||||
CFSKDEM();
|
||||
void Do(double d);
|
||||
|
||||
inline void ClearMode(void){m_mode = 0;};
|
||||
double GetFilWidth(int tap);
|
||||
|
||||
void SetIIR(double b);
|
||||
|
||||
void AFCMarkFreq(double d);
|
||||
void AFCSpaceFreq(double d);
|
||||
void SetMarkFreq(double d);
|
||||
void SetSpaceFreq(double d);
|
||||
inline double GetMarkFreq(void){return m_MarkFreq;};
|
||||
inline double GetSpaceFreq(void){return m_SpaceFreq;};
|
||||
inline double GetSetMarkFreq(void){return m_SetMarkFreq;};
|
||||
inline double GetSetSpaceFreq(void){return m_SetSpaceFreq;};
|
||||
inline double GetAFCMarkFreq(void){return m_AFCMarkFreq;};
|
||||
inline double GetAFCSpaceFreq(void){return m_AFCSpaceFreq;};
|
||||
inline int GetRev(void){ return m_inv; };
|
||||
inline void SetRev(int inv){ m_inv = inv;};
|
||||
void SetBaudRate(double b);
|
||||
inline double GetBaudRate(void){return m_BaudRate;};
|
||||
inline double GetSmoozFreq(void){return m_SmoozFreq;};
|
||||
inline int GetSmoozCount(void){return m_Smooz;};
|
||||
void SetSmoozCount(int n);
|
||||
void SetSmoozFreq(double f);
|
||||
void SetLPFFreq(double f);
|
||||
inline int GetSQ(void){return m_sq;};
|
||||
inline void SetSQ(int sq){m_sq = sq;};
|
||||
inline double GetSQLevel(void){return m_SQLevel;};
|
||||
inline void SetSQLevel(double lvl){m_SQLevel = lvl;};
|
||||
|
||||
inline int GetFilterTap(void){return m_Tap;};
|
||||
void SetFilterTap(int tap);
|
||||
inline int GetCount(void){return m_BufCount;};
|
||||
int GetData();
|
||||
inline void ClearRXBuf(void){
|
||||
m_BufCount = 0;
|
||||
m_rp = m_wp = 0;
|
||||
m_mode = 0;
|
||||
};
|
||||
void WriteData(BYTE d);
|
||||
};
|
||||
|
||||
#define MODBUFMAX 2048
|
||||
class CFSKMOD
|
||||
{
|
||||
private:
|
||||
double HBPF[TAPMAX+1];
|
||||
double ZBPF[TAPMAX+1];
|
||||
|
||||
CSmooz avgLPF;
|
||||
double m_LPFFreq;
|
||||
double m_SampFreq;
|
||||
|
||||
CVCO vco;
|
||||
|
||||
BYTE m_Buff[MODBUFMAX];
|
||||
int m_rp;
|
||||
int m_wp;
|
||||
int m_cnt;
|
||||
|
||||
int m_Count;
|
||||
int m_out;
|
||||
|
||||
int m_inv;
|
||||
|
||||
int m_mode;
|
||||
int m_DataCount;
|
||||
|
||||
double m_BaudRate;
|
||||
double m_MarkFreq;
|
||||
double m_SpaceFreq;
|
||||
|
||||
double m_OutputGain;
|
||||
|
||||
BYTE m_Data;
|
||||
int m_FSKCount;
|
||||
|
||||
int m_SumParity;
|
||||
int m_fig;
|
||||
int m_figout;
|
||||
|
||||
int m_idle;
|
||||
CFSKDEM *pDem;
|
||||
|
||||
private:
|
||||
public:
|
||||
int m_BitLen;
|
||||
int m_StopLen;
|
||||
int m_Parity;
|
||||
int m_diddle;
|
||||
int m_bpf;
|
||||
int m_bpftap;
|
||||
int m_lpf;
|
||||
|
||||
int m_DiddleWait;
|
||||
int m_CharWait;
|
||||
int m_CharWaitDiddle;
|
||||
int m_RandomDiddle;
|
||||
int m_WaitTimer;
|
||||
int m_DisDiddle;
|
||||
int m_CharWaitCount;
|
||||
int m_WaitTimerCount;
|
||||
|
||||
int m_ReCount;
|
||||
|
||||
int m_CoutCount;
|
||||
|
||||
int m_AmpVal;
|
||||
CAMPCONT m_Amp;
|
||||
|
||||
CFSKMOD();
|
||||
inline int IsIdle(void){return m_idle;};
|
||||
inline double GetBaudRate(void){return m_BaudRate;};
|
||||
void SetBaudRate(double b);
|
||||
void CalcBPF(void);
|
||||
void SetMarkFreq(double d);
|
||||
void SetSpaceFreq(double d);
|
||||
void SetSampFreq(double f);
|
||||
inline void InitPhase(void){
|
||||
vco.InitPhase();
|
||||
m_mode = 0;
|
||||
m_CharWaitCount = 0;
|
||||
m_WaitTimerCount = 4;
|
||||
m_Data = 0;
|
||||
memset(ZBPF, 0, (m_bpftap+1) * sizeof(double));
|
||||
};
|
||||
void OutTone(int sw, int bsize);
|
||||
inline int GetMode(void){
|
||||
return m_mode;
|
||||
};
|
||||
inline double GetMarkFreq(void){return m_MarkFreq;};
|
||||
inline double GetSpaceFreq(void){return m_SpaceFreq;};
|
||||
inline int GetRev(void){return m_inv;};
|
||||
inline void SetRev(int inv){m_inv = inv;};
|
||||
inline double GetOutputGain(void){return m_OutputGain;};
|
||||
inline void SetOutputGain(double gain){m_OutputGain = gain;};
|
||||
inline void SetBPF(int sw){m_bpf = sw;};
|
||||
|
||||
inline double GetLPFFreq(void){return m_LPFFreq;};
|
||||
void SetLPFFreq(double f);
|
||||
|
||||
inline void SetCount(int count){
|
||||
m_Count = count;
|
||||
};
|
||||
inline void ClearTXBuf(void){
|
||||
m_out = -1;
|
||||
m_Count = m_ReCount/2;
|
||||
m_cnt = 0;
|
||||
m_rp = m_wp = 0;
|
||||
m_figout = 0;
|
||||
m_DisDiddle = -1;
|
||||
m_Data = 0;
|
||||
m_FSKCount = m_SampFreq * 2;
|
||||
};
|
||||
inline void DeleteTXBuf(void){
|
||||
m_cnt = 0;
|
||||
m_rp = m_wp = 0;
|
||||
m_figout = 0;
|
||||
};
|
||||
inline int SetDiddleTimer(int n){
|
||||
m_DisDiddle = n;
|
||||
return 0; //JA7UDE 0428
|
||||
};
|
||||
inline int GetBufCount(void){return m_cnt;};
|
||||
void PutData(int d);
|
||||
double Do(int echo);
|
||||
inline void SetDem(CFSKDEM *p){pDem = p;};
|
||||
};
|
||||
|
||||
#pragma option -a- // パックの指示
|
||||
typedef struct {
|
||||
BYTE Code;
|
||||
BYTE Fig;
|
||||
}BCODETBL;
|
||||
#pragma option -a. // パック解除の指示
|
||||
|
||||
class CRTTY
|
||||
{
|
||||
private:
|
||||
int m_outfig;
|
||||
BCODETBL m_TBL[24*4];
|
||||
|
||||
public:
|
||||
int m_fig;
|
||||
int m_uos;
|
||||
|
||||
int m_txuos;
|
||||
CRTTY();
|
||||
char ConvAscii(int d);
|
||||
int ConvRTTY(char d);
|
||||
int ConvRTTY(BYTE *t, LPCSTR p);
|
||||
inline int IsChar(int d){
|
||||
d &= 0x000000ff;
|
||||
if( !d ) return 0;
|
||||
if( d == 0x000000ff ) return 0;
|
||||
return 1;
|
||||
};
|
||||
inline void ClearTX(void){m_outfig = 3;};
|
||||
inline void ClearRX(void){m_fig = 0;};
|
||||
|
||||
int GetShift(char d);
|
||||
char InvShift(char c);
|
||||
void SetCodeSet(void);
|
||||
};
|
||||
|
||||
#define NOISEBPFTAP 12
|
||||
class CNoise // M系列ノイズ N=22 (Tap=1)
|
||||
{
|
||||
private:
|
||||
double H[NOISEBPFTAP+1];
|
||||
double Z[NOISEBPFTAP+1];
|
||||
|
||||
DWORD reg;
|
||||
|
||||
public:
|
||||
CNoise();
|
||||
double GetNoise(void);
|
||||
};
|
||||
#endif
|
||||
407
Scope.cpp
Normal file
407
Scope.cpp
Normal file
|
|
@ -0,0 +1,407 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "Scope.h"
|
||||
#include "Option.h"
|
||||
#include "Main.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TTScope *TScope;
|
||||
static int m_SourceSel = 0;
|
||||
static int m_XW = 2048;
|
||||
static int m_XOFF = (8192 - m_XW)/2;
|
||||
static int m_CursorX = m_XOFF+(m_XW/2);
|
||||
static double m_Gain = 2.0;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TTScope::TTScope(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
Caption = "MMTTY Digital Scope";
|
||||
OKBtn->Caption = "Close";
|
||||
SrcSel->Caption = "Source";
|
||||
SrcSel->Items->Strings[1] = "Det.";
|
||||
SrcSel->Items->Strings[2] = "LPF";
|
||||
SBUpDown->Caption = "+-";
|
||||
UpBtn->Caption = "+";
|
||||
DownBtn->Caption = "-";
|
||||
LeftBtn->Caption = "<-";
|
||||
RightBtn->Caption = "->";
|
||||
}
|
||||
|
||||
pBitmap = new Graphics::TBitmap();
|
||||
pBitmap->Width = PaintBox->Width;
|
||||
pBitmap->Height = PaintBox->Height;
|
||||
|
||||
TRect rc;
|
||||
rc.Top = 0;
|
||||
rc.Bottom = pBitmap->Height;
|
||||
rc.Left = 0;
|
||||
rc.Right = pBitmap->Width;
|
||||
pBitmap->Canvas->Brush->Color = clBlack;
|
||||
pBitmap->Canvas->FillRect(rc);
|
||||
|
||||
pDem = NULL;
|
||||
pMod = NULL;
|
||||
|
||||
// m_XW = 2048;
|
||||
// m_Gain = 1.0;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TTScope::~TTScope()
|
||||
{
|
||||
delete pBitmap;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TTScope::Execute(CFSKDEM *pd, CFSKMOD *pm)
|
||||
{
|
||||
pDem = pd;
|
||||
pMod = pm;
|
||||
|
||||
SrcSel->ItemIndex = m_SourceSel;
|
||||
UpdateBtn();
|
||||
ShowModal();
|
||||
}
|
||||
|
||||
void __fastcall TTScope::TrigNext(void)
|
||||
{
|
||||
pDem->m_Scope = 0;
|
||||
for( int i = 0; i < 4; i++ ){
|
||||
pDem->m_ScopeMark[i].Collect(SCOPESIZE);
|
||||
pDem->m_ScopeSpace[i].Collect(SCOPESIZE);
|
||||
}
|
||||
pDem->m_ScopeSync.Collect(SCOPESIZE);
|
||||
pDem->m_ScopeBit.Collect(SCOPESIZE);
|
||||
pDem->m_Scope = 1;
|
||||
}
|
||||
|
||||
#define GAGEWIDTH 5
|
||||
|
||||
void __fastcall TTScope::PaintPosition(void)
|
||||
{
|
||||
TCanvas *pCanvas = pBitmap->Canvas;
|
||||
|
||||
TRect rc;
|
||||
rc.Top = 0;
|
||||
rc.Bottom = GAGEWIDTH;
|
||||
rc.Left = 0;
|
||||
rc.Right = pBitmap->Width;
|
||||
|
||||
pCanvas->Brush->Color = clBlack;
|
||||
pCanvas->FillRect(rc);
|
||||
|
||||
int xw = (m_XW * rc.Right) / pDem->m_ScopeBit.m_ScopeSize;
|
||||
int x = (m_XOFF * rc.Right) / pDem->m_ScopeBit.m_ScopeSize;
|
||||
int xc = (m_CursorX * rc.Right) / pDem->m_ScopeBit.m_ScopeSize;
|
||||
pCanvas->Brush->Color = clGreen;
|
||||
rc.Left = x;
|
||||
rc.Right = x + xw;
|
||||
pCanvas->FillRect(rc);
|
||||
|
||||
pCanvas->Pen->Color = clYellow;
|
||||
pCanvas->Pen->Style = psSolid;
|
||||
pCanvas->MoveTo(xc, rc.Top);
|
||||
pCanvas->LineTo(xc, rc.Bottom);
|
||||
|
||||
pCanvas->Font->Color = clWhite;
|
||||
pCanvas->Font->Size = 8;
|
||||
char bf[32];
|
||||
sprintf(bf, "Gain:%.1lf", m_Gain);
|
||||
::SetBkMode(pCanvas->Handle, TRANSPARENT);
|
||||
pCanvas->TextOut(0, 0, bf);
|
||||
}
|
||||
|
||||
void __fastcall TTScope::PaintScope(CScope *sp, int n)
|
||||
{
|
||||
TRect rc;
|
||||
|
||||
int YW = (pBitmap->Height - GAGEWIDTH) / 4;
|
||||
rc.Top = (YW * n) + GAGEWIDTH;
|
||||
rc.Bottom = rc.Top + YW;
|
||||
rc.Left = 0;
|
||||
rc.Right = pBitmap->Width;
|
||||
|
||||
TCanvas *pCanvas = pBitmap->Canvas;
|
||||
|
||||
pCanvas->Brush->Color = clBlack;
|
||||
pCanvas->FillRect(rc);
|
||||
|
||||
if( !sp->GetFlag() ) return;
|
||||
|
||||
if( n < 2 ){
|
||||
pCanvas->Pen->Color = clWhite;
|
||||
pBitmap->Canvas->Pen->Style = psDot;
|
||||
pCanvas->MoveTo(rc.Left, rc.Top + YW/2);
|
||||
pCanvas->LineTo(rc.Right, rc.Top + YW/2);
|
||||
}
|
||||
|
||||
pCanvas->Pen->Color = clWhite;
|
||||
pBitmap->Canvas->Pen->Style = psSolid;
|
||||
double d;
|
||||
int x, y, xx, xe;
|
||||
double ad = 0;
|
||||
for( x = 0; x < rc.Right; x++ ){
|
||||
xx = (x * m_XW / rc.Right) + m_XOFF;
|
||||
xe = xx + (m_XW / rc.Right);
|
||||
if( xe >= sp->m_ScopeSize ) xe = sp->m_ScopeSize - 1;
|
||||
for( ; xx <= xe; xx++ ){
|
||||
d = sp->pScopeData[xx];
|
||||
if( n >= 2 ){
|
||||
if( d < -8000.0 ){
|
||||
d = 8192.0;
|
||||
pCanvas->Pen->Color = clYellow;
|
||||
}
|
||||
else if( d < -4000 ){
|
||||
d = 8192.0;
|
||||
pCanvas->Pen->Color = clBlue;
|
||||
}
|
||||
else if( d || (ad == 0) ){
|
||||
pCanvas->Pen->Color = clWhite;
|
||||
}
|
||||
ad = d;
|
||||
y = rc.Bottom - int(d * YW/10000.0) - 1;
|
||||
}
|
||||
else if( (m_SourceSel == 1) && (MmttyWd->pSound->FSKDEM.m_type == 2) ){
|
||||
y = rc.Bottom - int(d * YW * m_Gain/32768.0) - YW/2;
|
||||
}
|
||||
else if( m_SourceSel ){
|
||||
y = rc.Bottom - int(d * YW * m_Gain/16384.0) - 1;
|
||||
}
|
||||
else {
|
||||
y = rc.Bottom - int(d * YW * m_Gain/32768.0) - YW/2;
|
||||
}
|
||||
if( y < rc.Top ) y = rc.Top;
|
||||
if( y > rc.Bottom ) y = rc.Bottom;
|
||||
if( x ){
|
||||
pCanvas->LineTo(x, y);
|
||||
}
|
||||
else {
|
||||
pCanvas->MoveTo(x, y);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall TTScope::PaintCursor(void)
|
||||
{
|
||||
int x = (m_CursorX - m_XOFF) * PaintBox->Width / m_XW;
|
||||
if( (x >= 0) && (x < PaintBox->Width) ){
|
||||
PaintBox->Canvas->Pen->Color = clLime;
|
||||
PaintBox->Canvas->Pen->Style = psDot;
|
||||
PaintBox->Canvas->MoveTo(x, 5);
|
||||
PaintBox->Canvas->LineTo(x, pBitmap->Height - GAGEWIDTH - 5);
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall TTScope::PaintBoxPaint(TObject *Sender)
|
||||
{
|
||||
if( pDem == NULL ) return;
|
||||
|
||||
PaintScope(&pDem->m_ScopeMark[m_SourceSel], 0);
|
||||
PaintScope(&pDem->m_ScopeSpace[m_SourceSel], 1);
|
||||
PaintScope(&pDem->m_ScopeBit, 2);
|
||||
PaintScope(&pDem->m_ScopeSync, 3);
|
||||
PaintPosition();
|
||||
PaintBox->Canvas->Draw(0, 0, (TGraphic*)pBitmap);
|
||||
PaintCursor();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::TimerTimer(TObject *Sender)
|
||||
{
|
||||
if( pDem == NULL ) return;
|
||||
|
||||
if( pDem->m_ScopeBit.GetFlag() ){
|
||||
PaintBoxPaint(NULL);
|
||||
if( SBTrig->Down ){
|
||||
SBTrig->Down = FALSE;
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::SBTrigClick(TObject *Sender)
|
||||
{
|
||||
TrigNext();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::UpdateBtn(void)
|
||||
{
|
||||
if( m_XW <= (pDem->m_ScopeBit.m_ScopeSize - 512) ){
|
||||
SBUpW->Enabled = TRUE;
|
||||
}
|
||||
else {
|
||||
SBUpW->Enabled = FALSE;
|
||||
}
|
||||
if( m_XW >= 1024 ){
|
||||
SBDownW->Enabled = TRUE;
|
||||
}
|
||||
else {
|
||||
SBDownW->Enabled = FALSE;
|
||||
}
|
||||
if( m_XOFF ){
|
||||
LeftBtn->Enabled = TRUE;
|
||||
}
|
||||
else {
|
||||
LeftBtn->Enabled = FALSE;
|
||||
}
|
||||
if( (m_XOFF + m_XW) < pDem->m_ScopeBit.m_ScopeSize ){
|
||||
RightBtn->Enabled = TRUE;
|
||||
}
|
||||
else {
|
||||
RightBtn->Enabled = FALSE;
|
||||
}
|
||||
if( pDem->m_atc ){
|
||||
SrcSel->Controls[3]->Enabled = TRUE;
|
||||
}
|
||||
else {
|
||||
SrcSel->Controls[3]->Enabled = FALSE;
|
||||
if( SrcSel->ItemIndex == 3 ){
|
||||
SrcSel->ItemIndex = m_SourceSel = 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::LeftBtnClick(TObject *Sender)
|
||||
{
|
||||
if( m_XOFF ){
|
||||
m_XOFF -= m_XW/4;
|
||||
if( m_XOFF < 0 ) m_XOFF = 0;
|
||||
}
|
||||
UpdateBtn();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::RightBtnClick(TObject *Sender)
|
||||
{
|
||||
m_XOFF += m_XW/4;
|
||||
if( (m_XOFF + m_XW) >= pDem->m_ScopeBit.m_ScopeSize ){
|
||||
m_XOFF = pDem->m_ScopeBit.m_ScopeSize - m_XW;
|
||||
}
|
||||
UpdateBtn();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::AdjXoff(int x)
|
||||
{
|
||||
if( (x >= 0) && (x < PaintBox->Width) ){
|
||||
int xoff = x * m_XW / PaintBox->Width + m_XOFF + 1;
|
||||
m_XOFF += (m_CursorX - xoff);
|
||||
if( m_XOFF < 0 ){
|
||||
m_XOFF = 0;
|
||||
}
|
||||
else if( (m_XOFF + m_XW) > pDem->m_ScopeBit.m_ScopeSize ){
|
||||
m_XOFF = pDem->m_ScopeBit.m_ScopeSize - m_XW;
|
||||
}
|
||||
}
|
||||
else if( (m_XOFF + m_XW) > pDem->m_ScopeBit.m_ScopeSize ){
|
||||
m_XOFF = pDem->m_ScopeBit.m_ScopeSize - m_XW;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::SBDownWClick(TObject *Sender)
|
||||
{
|
||||
int x = (m_CursorX - m_XOFF) * PaintBox->Width / m_XW;
|
||||
if( m_XW >= 1024 ){
|
||||
m_XW -= 512;
|
||||
AdjXoff(x);
|
||||
PaintBoxPaint(NULL);
|
||||
}
|
||||
UpdateBtn();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::SBUpWClick(TObject *Sender)
|
||||
{
|
||||
int x = (m_CursorX - m_XOFF) * PaintBox->Width / m_XW;
|
||||
if( m_XW <= (pDem->m_ScopeBit.m_ScopeSize - 512) ){
|
||||
m_XW += 512;
|
||||
AdjXoff(x);
|
||||
PaintBoxPaint(NULL);
|
||||
}
|
||||
UpdateBtn();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::UpBtnClick(TObject *Sender)
|
||||
{
|
||||
m_Gain *= 1.2;
|
||||
PaintBoxPaint(NULL);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::DownBtnClick(TObject *Sender)
|
||||
{
|
||||
m_Gain /= 1.2;
|
||||
PaintBoxPaint(NULL);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::PaintBoxMouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y)
|
||||
{
|
||||
m_CursorX = (X * m_XW / pBitmap->Width) + m_XOFF;
|
||||
PaintBox->Canvas->Draw(0, 0, (TGraphic*)pBitmap);
|
||||
PaintCursor();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::SBSetClick(TObject *Sender)
|
||||
{
|
||||
TOptionDlg *pBox = new TOptionDlg(this);
|
||||
|
||||
pBox->TabFont->TabVisible = FALSE;
|
||||
pBox->TabMisc->TabVisible = FALSE;
|
||||
pBox->Execute(pDem, pMod);
|
||||
delete pBox;
|
||||
UpdateBtn();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::SrcSelClick(TObject *Sender)
|
||||
{
|
||||
m_SourceSel = SrcSel->ItemIndex;
|
||||
SBUpDownClick(NULL);
|
||||
// PaintBoxPaint(NULL);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::SBUpDownClick(TObject *Sender)
|
||||
{
|
||||
int x;
|
||||
double d, peak;
|
||||
peak = 0;
|
||||
for( x = m_XOFF; x < (m_XOFF + m_XW); x++ ){
|
||||
d = fabs(pDem->m_ScopeMark[SrcSel->ItemIndex].pScopeData[x]);
|
||||
if( peak < d ) peak = d;
|
||||
d = fabs(pDem->m_ScopeSpace[SrcSel->ItemIndex].pScopeData[x]);
|
||||
if( peak < d ) peak = d;
|
||||
}
|
||||
if( peak ){
|
||||
m_Gain = 16384.0 * 0.8 / peak;
|
||||
}
|
||||
PaintBoxPaint(NULL);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTScope::SBPlayClick(TObject *Sender)
|
||||
{
|
||||
if( MmttyWd->pSound->WaveFile.m_mode == 1 ){
|
||||
MmttyWd->KRxPosClick(NULL);
|
||||
}
|
||||
else {
|
||||
MmttyWd->KRxPlayClick(NULL);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
97
Scope.h
Normal file
97
Scope.h
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef ScopeH
|
||||
#define ScopeH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <System.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
#include "rtty.h"
|
||||
class TTScope : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TPanel *Panel1;
|
||||
TPaintBox *PaintBox;
|
||||
TTimer *Timer;
|
||||
TSpeedButton *SBTrig;
|
||||
TButton *LeftBtn;
|
||||
TButton *RightBtn;
|
||||
TButton *UpBtn;
|
||||
TButton *DownBtn;
|
||||
TButton *SBDownW;
|
||||
TButton *SBUpW;
|
||||
TSpeedButton *SBSet;
|
||||
TRadioGroup *SrcSel;
|
||||
TButton *SBUpDown;
|
||||
TSpeedButton *SBPlay;
|
||||
void __fastcall PaintBoxPaint(TObject *Sender);
|
||||
void __fastcall TimerTimer(TObject *Sender);
|
||||
void __fastcall SBTrigClick(TObject *Sender);
|
||||
void __fastcall LeftBtnClick(TObject *Sender);
|
||||
void __fastcall RightBtnClick(TObject *Sender);
|
||||
void __fastcall UpBtnClick(TObject *Sender);
|
||||
void __fastcall DownBtnClick(TObject *Sender);
|
||||
|
||||
|
||||
void __fastcall SBDownWClick(TObject *Sender);
|
||||
void __fastcall SBUpWClick(TObject *Sender);
|
||||
|
||||
void __fastcall PaintBoxMouseDown(TObject *Sender, TMouseButton Button,
|
||||
TShiftState Shift, int X, int Y);
|
||||
|
||||
void __fastcall SBSetClick(TObject *Sender);
|
||||
void __fastcall SrcSelClick(TObject *Sender);
|
||||
void __fastcall SBUpDownClick(TObject *Sender);
|
||||
void __fastcall SBPlayClick(TObject *Sender);
|
||||
private:
|
||||
CFSKDEM *pDem;
|
||||
CFSKMOD *pMod;
|
||||
|
||||
Graphics::TBitmap *pBitmap;
|
||||
|
||||
void __fastcall UpdateBtn(void);
|
||||
void __fastcall TrigNext(void);
|
||||
void __fastcall PaintCursor(void);
|
||||
void __fastcall AdjXoff(int x);
|
||||
|
||||
|
||||
public:
|
||||
virtual __fastcall TTScope(TComponent* AOwner);
|
||||
virtual __fastcall ~TTScope();
|
||||
|
||||
void __fastcall Execute(CFSKDEM *pd, CFSKMOD *pm);
|
||||
void __fastcall PaintPosition(void);
|
||||
void __fastcall PaintScope(CScope *sp, int n);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TTScope *TScope;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
108
SendFile.cpp
Normal file
108
SendFile.cpp
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "SendFile.h"
|
||||
#include "Main.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TSendFileDlg::TSendFileDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
Caption = "Sending file";
|
||||
AbortBtn->Caption = "Abort";
|
||||
Lline->Caption = "Letters per line";
|
||||
}
|
||||
m_fp = NULL;
|
||||
if( sys.m_CharLenFile < 20 ) sys.m_CharLenFile = 20;
|
||||
if( sys.m_CharLenFile > 1024 ) sys.m_CharLenFile = 1024;
|
||||
m_DisEvent = 1;
|
||||
CharLen->Text = sys.m_CharLenFile;
|
||||
m_DisEvent = 0;
|
||||
}
|
||||
__fastcall TSendFileDlg::~TSendFileDlg()
|
||||
{
|
||||
if( m_fp != NULL ){
|
||||
fclose(m_fp);
|
||||
m_fp = NULL;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TSendFileDlg::Start(LPCSTR pName, int Y)
|
||||
{
|
||||
m_FileName = pName;
|
||||
LName->Caption = pName;
|
||||
m_fp = fopen(pName, "rt");
|
||||
if( m_fp != NULL ){
|
||||
Show();
|
||||
Top = Y;
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TSendFileDlg::Timer(int buffcnt)
|
||||
{
|
||||
if( m_fp == NULL ){
|
||||
return 2;
|
||||
}
|
||||
if( feof(m_fp) ){
|
||||
fclose(m_fp);
|
||||
m_fp = NULL;
|
||||
return 1;
|
||||
}
|
||||
if( buffcnt < 10 ){
|
||||
char bf[1025];
|
||||
if( fgets(bf, sys.m_CharLenFile, m_fp) != NULL ){
|
||||
ClipLF(bf);
|
||||
MmttyWd->OutputStr(bf);
|
||||
MmttyWd->OutputStr("\r\n");
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TSendFileDlg::AbortBtnClick(TObject *Sender)
|
||||
{
|
||||
if( m_fp != NULL ){
|
||||
fclose(m_fp);
|
||||
m_fp = NULL;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TSendFileDlg::CharLenChange(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
int dd;
|
||||
sscanf(AnsiString(CharLen->Text).c_str(), "%u", &dd); //JA7UDE 0428
|
||||
if( (dd >= 20) && (dd <= 1024) ){
|
||||
sys.m_CharLenFile = dd;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
SendFile.dfm
Normal file
BIN
SendFile.dfm
Normal file
Binary file not shown.
60
SendFile.h
Normal file
60
SendFile.h
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef SendFileH
|
||||
#define SendFileH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include "ComLib.h"
|
||||
//----------------------------------------------------------------------------
|
||||
class TSendFileDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *AbortBtn;
|
||||
TLabel *LName;
|
||||
TComboBox *CharLen;
|
||||
TLabel *Lline;
|
||||
void __fastcall AbortBtnClick(TObject *Sender);
|
||||
void __fastcall CharLenChange(TObject *Sender);
|
||||
private:
|
||||
int m_DisEvent;
|
||||
AnsiString m_FileName;
|
||||
FILE *m_fp;
|
||||
public:
|
||||
virtual __fastcall TSendFileDlg(TComponent* AOwner);
|
||||
__fastcall ~TSendFileDlg();
|
||||
|
||||
int __fastcall Start(LPCSTR pName, int Y);
|
||||
int __fastcall TSendFileDlg::Timer(int buffcnt);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TSendFileDlg *SendFileDlg;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
193
SetHelp.cpp
Normal file
193
SetHelp.cpp
Normal file
|
|
@ -0,0 +1,193 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "SetHelp.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TSetHelpBox *SetHelpBox;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TSetHelpBox::TSetHelpBox(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
CancelBtn->Caption = "Cancel";
|
||||
NotePad->Caption = "Use NotePad";
|
||||
FontBtn->Caption = "Font";
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TSetHelpBox::Execute(void)
|
||||
{
|
||||
m_HelpFontName = sys.m_HelpFontName;
|
||||
m_HelpFontCharset = sys.m_HelpFontCharset;
|
||||
m_HelpFontSize = sys.m_HelpFontSize;
|
||||
EditHTML->Text = sys.m_HTMLHelp;
|
||||
EditMMTTY->Text = sys.m_Help;
|
||||
EditLog->Text = sys.m_HelpLog;
|
||||
EditDigital->Text = sys.m_HelpDigital;
|
||||
NotePad->Checked = sys.m_HelpNotePad;
|
||||
if( ShowModal() == IDOK ){
|
||||
sys.m_HelpFontName = m_HelpFontName;
|
||||
sys.m_HelpFontCharset = m_HelpFontCharset;
|
||||
sys.m_HelpFontSize = m_HelpFontSize;
|
||||
|
||||
sys.m_HTMLHelp = EditHTML->Text;
|
||||
sys.m_Help = EditMMTTY->Text;
|
||||
sys.m_HelpLog = EditLog->Text;
|
||||
sys.m_HelpDigital = EditDigital->Text;
|
||||
|
||||
sys.m_HelpNotePad = NotePad->Checked;
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TSetHelpBox::JABtnClick(TObject *Sender)
|
||||
{
|
||||
EditHTML->Text = "";
|
||||
EditMMTTY->Text = "Mmtty.txt";
|
||||
EditLog->Text = "Mmttylog.txt";
|
||||
EditDigital->Text = "Digital.txt";
|
||||
m_HelpFontName = "MS ゴシック";
|
||||
m_HelpFontCharset = SHIFTJIS_CHARSET;
|
||||
m_HelpFontSize = 10;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TSetHelpBox::EngBtnClick(TObject *Sender)
|
||||
{
|
||||
EditHTML->Text = "KB2EOQ.htm";
|
||||
EditMMTTY->Text = "MmttyE.txt";
|
||||
EditLog->Text = "LogE.txt";
|
||||
EditDigital->Text = "DigitalE.txt";
|
||||
m_HelpFontName = "Courier";//"Courier New";
|
||||
m_HelpFontCharset = ANSI_CHARSET;
|
||||
m_HelpFontSize = 10;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TSetHelpBox::FontBtnClick(TObject *Sender)
|
||||
{
|
||||
FontDialog->Font->Name = m_HelpFontName;
|
||||
FontDialog->Font->Charset = m_HelpFontCharset;
|
||||
FontDialog->Font->Size = m_HelpFontSize;
|
||||
NormalWindow(this);
|
||||
if( FontDialog->Execute() == TRUE ){
|
||||
m_HelpFontName = FontDialog->Font->Name;
|
||||
m_HelpFontCharset = FontDialog->Font->Charset;
|
||||
m_HelpFontSize = FontDialog->Font->Size;
|
||||
}
|
||||
TopWindow(this);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
int TSetHelpBox::SetFileName(AnsiString &as)
|
||||
{
|
||||
OpenDialog->Options >> ofCreatePrompt;
|
||||
OpenDialog->Options << ofFileMustExist;
|
||||
if(sys.m_WinFontCharset != SHIFTJIS_CHARSET){
|
||||
OpenDialog->Title = "Choose help file";
|
||||
OpenDialog->Filter = "Text files(*.txt)|*.txt|All files(*.*)|*.*|";
|
||||
}
|
||||
else {
|
||||
OpenDialog->Title = "ヘルプファイルの選択";
|
||||
OpenDialog->Filter = "テキストファイル(*.txt)|*.txt|すべてのファイル(*.*)|*.*|";
|
||||
}
|
||||
OpenDialog->FileName = as.c_str();
|
||||
OpenDialog->DefaultExt = "txt";
|
||||
OpenDialog->InitialDir = BgnDir;
|
||||
NormalWindow(this);
|
||||
if( OpenDialog->Execute() == TRUE ){
|
||||
char drive[_MAX_DRIVE];
|
||||
char dir[_MAX_DIR];
|
||||
char name[_MAX_FNAME];
|
||||
char ext[_MAX_EXT];
|
||||
|
||||
::_splitpath(AnsiString(OpenDialog->FileName).c_str(), drive, dir, name, ext ); //JA7UDE 0428
|
||||
as = name;
|
||||
as += ext;
|
||||
TopWindow(this);
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
TopWindow(this);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TSetHelpBox::RefMMTTYClick(TObject *Sender)
|
||||
{
|
||||
AnsiString as = EditMMTTY->Text.c_str();
|
||||
if( SetFileName(as) == TRUE ){
|
||||
EditMMTTY->Text = as.c_str();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TSetHelpBox::RefLogClick(TObject *Sender)
|
||||
{
|
||||
AnsiString as = EditLog->Text.c_str();
|
||||
if( SetFileName(as) == TRUE ){
|
||||
EditLog->Text = as.c_str();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TSetHelpBox::RefDigitalClick(TObject *Sender)
|
||||
{
|
||||
AnsiString as = EditDigital->Text.c_str();
|
||||
if( SetFileName(as) == TRUE ){
|
||||
EditDigital->Text = as.c_str();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TSetHelpBox::RefHTMLClick(TObject *Sender)
|
||||
{
|
||||
OpenDialog->Options >> ofCreatePrompt;
|
||||
OpenDialog->Options << ofFileMustExist;
|
||||
if(sys.m_WinFontCharset != SHIFTJIS_CHARSET){
|
||||
OpenDialog->Title = "Choose HTML/Windows help file";
|
||||
}
|
||||
else {
|
||||
OpenDialog->Title = "HTML/Windowsヘルプファイルの選択";
|
||||
}
|
||||
OpenDialog->Filter = "HTML/Windows help files(*.chm;*.htm;*.html;*.hlp)|*.chm;*.htm;*.html;*.hlp";
|
||||
OpenDialog->FileName = EditHTML->Text.c_str();
|
||||
OpenDialog->DefaultExt = "chm";
|
||||
OpenDialog->InitialDir = BgnDir;
|
||||
NormalWindow(this);
|
||||
if( OpenDialog->Execute() == TRUE ){
|
||||
char drive[_MAX_DRIVE];
|
||||
char dir[_MAX_DIR];
|
||||
char name[_MAX_FNAME];
|
||||
char ext[_MAX_EXT];
|
||||
|
||||
::_splitpath(AnsiString(OpenDialog->FileName).c_str(), drive, dir, name, ext ); //JA7UDE 0428
|
||||
AnsiString as;
|
||||
as = name;
|
||||
as += ext;
|
||||
EditHTML->Text = as.c_str();
|
||||
}
|
||||
TopWindow(this);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
SetHelp.dfm
Normal file
BIN
SetHelp.dfm
Normal file
Binary file not shown.
83
SetHelp.h
Normal file
83
SetHelp.h
Normal file
|
|
@ -0,0 +1,83 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef SetHelpH
|
||||
#define SetHelpH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
|
||||
#include "ComLib.h"
|
||||
#include <Dialogs.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TSetHelpBox : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TGroupBox *GroupBox1;
|
||||
TEdit *EditMMTTY;
|
||||
TButton *RefMMTTY;
|
||||
TGroupBox *GroupBox2;
|
||||
TEdit *EditLog;
|
||||
TButton *RefLog;
|
||||
TGroupBox *GroupBox3;
|
||||
TEdit *EditDigital;
|
||||
TButton *RefDigital;
|
||||
TButton *JABtn;
|
||||
TButton *EngBtn;
|
||||
TButton *FontBtn;
|
||||
TFontDialog *FontDialog;
|
||||
TOpenDialog *OpenDialog;
|
||||
TCheckBox *NotePad;
|
||||
TGroupBox *GroupBox4;
|
||||
TEdit *EditHTML;
|
||||
TButton *RefHTML;
|
||||
void __fastcall JABtnClick(TObject *Sender);
|
||||
void __fastcall EngBtnClick(TObject *Sender);
|
||||
void __fastcall FontBtnClick(TObject *Sender);
|
||||
void __fastcall RefMMTTYClick(TObject *Sender);
|
||||
void __fastcall RefLogClick(TObject *Sender);
|
||||
void __fastcall RefDigitalClick(TObject *Sender);
|
||||
void __fastcall RefHTMLClick(TObject *Sender);
|
||||
private:
|
||||
int SetFileName(AnsiString &as);
|
||||
|
||||
AnsiString m_HelpFontName;
|
||||
BYTE m_HelpFontCharset;
|
||||
int m_HelpFontSize;
|
||||
public:
|
||||
virtual __fastcall TSetHelpBox(TComponent* AOwner);
|
||||
|
||||
int __fastcall Execute(void);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TSetHelpBox *SetHelpBox;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
408
ShortCut.cpp
Normal file
408
ShortCut.cpp
Normal file
|
|
@ -0,0 +1,408 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "ShortCut.h"
|
||||
#include "LogFile.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TShortCutDlg *ShortCutDlg;
|
||||
static int CurRow = 0;
|
||||
static int TopRow = 0;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TShortCutDlg::TShortCutDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
m_DisEvent = 1;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
Caption = "Assign ShortCut";
|
||||
DelBtn->Caption = "Del";
|
||||
CheckBtn->Caption = "Check Dupe";
|
||||
OKBtn->Caption = "Close";
|
||||
}
|
||||
ShortCutName->Clear();
|
||||
int i;
|
||||
for( i = 0; KEYTBL[i].Key; i++ ){
|
||||
ShortCutName->Items->Add(ToDXKey(KEYTBL[i].pName));
|
||||
}
|
||||
m_DisEvent = 0;
|
||||
SBHelp->Visible = !JanHelp.IsEmpty();
|
||||
}
|
||||
|
||||
typedef struct {
|
||||
LPCSTR pSys;
|
||||
LPCSTR pUser;
|
||||
WORD *pKey;
|
||||
}DEFTBL;
|
||||
|
||||
DEFTBL def[]={
|
||||
{"RcvLog","受信記録(日付名)ファイル", &sys.m_SysKey[kkRcvLog]},
|
||||
{"FileOut","テキストファイル送信", &sys.m_SysKey[kkFileOut]},
|
||||
{"SaveRx","受信画面の内容をファイルにセーブ", &sys.m_SysKey[kkSaveRx]},
|
||||
|
||||
{"OpenLog","新しいログファイルのオープン", &sys.m_SysKey[kkOpenLog]},
|
||||
{"Flush","ディスクにフラッシュ", &sys.m_SysKey[kkFlush]},
|
||||
|
||||
{"RecTime","受信サウンドを時刻名のファイルに記録", &sys.m_SysKey[kkRecTime]},
|
||||
{"Rec","受信サウンドをファイルに記録", &sys.m_SysKey[kkRec]},
|
||||
{"Play","受信サウンドをファイルから再生", &sys.m_SysKey[kkPlay]},
|
||||
{"PlayPos","再生位置調整", &sys.m_SysKey[kkPlayPos]},
|
||||
{"PlayStop","記録/再生の終了", &sys.m_SysKey[kkPlayStop]},
|
||||
|
||||
{"Paste","送信画面への貼り付け", &sys.m_SysKey[kkPaste]},
|
||||
{"Panel","Control Panel", &sys.m_SysKey[kkPanel]},
|
||||
{"MacBtn","Macro ボタン", &sys.m_SysKey[kkMac]},
|
||||
{"Scope","オシロスコープ", &sys.m_SysKey[kkScope]},
|
||||
{"ClrRxWindow","受信画面のクリア", &sys.m_SysKey[kkClrRxWindow]},
|
||||
{"LogList","LogList", &sys.m_SysKey[kkLogList]},
|
||||
{"QSOData","QSOData", &sys.m_SysKey[kkQSOData]},
|
||||
{"EntTX","TXボタンで自動改行送信", &sys.m_SysKey[kkEntTX]},
|
||||
{"WordWrap","キーボードのワードラップ", &sys.m_SysKey[kkWordWrap]},
|
||||
{"RUN","ランニングモード", &sys.m_SysKey[kkRun]},
|
||||
{"TNC","TNC模擬モード設定", &sys.m_SysKey[kkTNC]},
|
||||
{"Option","設定画面", &sys.m_SysKey[kkOption]},
|
||||
{"LogOpt","ログ設定画面", &sys.m_SysKey[kkLogOption]},
|
||||
|
||||
{"Profile1","Profile 1", &sys.m_SysKey[kkPro1]},
|
||||
{"Profile2","Profile 2", &sys.m_SysKey[kkPro2]},
|
||||
{"Profile3","Profile 3", &sys.m_SysKey[kkPro3]},
|
||||
{"Profile4","Profile 4", &sys.m_SysKey[kkPro4]},
|
||||
{"Profile5","Profile 5", &sys.m_SysKey[kkPro5]},
|
||||
{"Profile6","Profile 6", &sys.m_SysKey[kkPro6]},
|
||||
{"Profile7","Profile 7", &sys.m_SysKey[kkPro7]},
|
||||
{"Profile8","Profile 8", &sys.m_SysKey[kkPro8]},
|
||||
{"ProfileDef","MMTTY default", &sys.m_SysKey[kkProDef]},
|
||||
{"ProfileRet","Return to the startup", &sys.m_SysKey[kkProRet]},
|
||||
|
||||
{"ExtCmd1","External 1", &sys.m_SysKey[kkExtCmd1]},
|
||||
{"ExtCmd2","External 2", &sys.m_SysKey[kkExtCmd2]},
|
||||
{"ExtCmd3","External 3", &sys.m_SysKey[kkExtCmd3]},
|
||||
{"ExtCmd4","External 4", &sys.m_SysKey[kkExtCmd4]},
|
||||
{"ExtReset","サスペンドの解除", &sys.m_SysKey[kkExtReset]},
|
||||
{"ExtSusp","サスペンド", &sys.m_SysKey[kkExtSusp]},
|
||||
|
||||
{"FIG","FIG Button", &sys.m_SysKey[kkFIG]},
|
||||
{"UOS","UOS Button", &sys.m_SysKey[kkUOS]},
|
||||
{"TX","TX Button", &sys.m_SysKey[kkTX]},
|
||||
{"TXOFF","TXOFF Button", &sys.m_SysKey[kkTXOFF]},
|
||||
{"QSO","QSO Button", &sys.m_SysKey[kkQSO]},
|
||||
{"OnQSO","QSO Button ON", &sys.m_SysKey[kkOnQSO]},
|
||||
{"OffQSO","QSO Button OFF", &sys.m_SysKey[kkOffQSO]},
|
||||
{"Capture","Capture Callsign", &sys.m_SysKey[kkCAPTURE]},
|
||||
{"InitBox","Init Button", &sys.m_SysKey[kkInitBox]},
|
||||
{"CALL","Call Box", &sys.m_SysKey[kkCall]},
|
||||
{"NAME","Name Box", &sys.m_SysKey[kkName]},
|
||||
{"QTH","QTH Box", &sys.m_SysKey[kkQTH]},
|
||||
{"RST","HisRST Box", &sys.m_SysKey[kkRST]},
|
||||
{"MyRST","MyRST Box", &sys.m_SysKey[kkMyRST]},
|
||||
{"Freq","Frequency Box", &sys.m_SysKey[kkFreq]},
|
||||
{"Find","Find Button", &sys.m_SysKey[kkFind]},
|
||||
{"Clear","Clear Button", &sys.m_SysKey[kkClear]},
|
||||
|
||||
{"TxUp","入力画面 ↑", &sys.m_SysKey[kkInUp]},
|
||||
{"TxDown","入力画面 ↓", &sys.m_SysKey[kkInDown]},
|
||||
{"TxPUp","入力画面 ページ↑", &sys.m_SysKey[kkInPUp]},
|
||||
{"TxPDown","入力画面 ページ↓", &sys.m_SysKey[kkInPDown]},
|
||||
{"TxHome","入力画面 先頭", &sys.m_SysKey[kkInHome]},
|
||||
{"TxEnd","入力画面 末尾", &sys.m_SysKey[kkInEnd]},
|
||||
|
||||
{"RxUp","受信画面 ↑", &sys.m_SysKey[kkRxUp]},
|
||||
{"RxDown","受信画面 ↓", &sys.m_SysKey[kkRxDown]},
|
||||
{"RxPUp","受信画面 ページ↑", &sys.m_SysKey[kkRxPUp]},
|
||||
{"RxPDown","受信画面 ページ↓", &sys.m_SysKey[kkRxPDown]},
|
||||
{"RxHome","受信画面 先頭", &sys.m_SysKey[kkRxHome]},
|
||||
{"RxEnd","受信画面 末尾", &sys.m_SysKey[kkRxEnd]},
|
||||
|
||||
{"CharWaitL","文字Wait←", &sys.m_SysKey[kkCharWaitLeft]},
|
||||
{"CharWaitR","文字Wait→", &sys.m_SysKey[kkCharWaitRight]},
|
||||
{"DiddleWaitL","DiddleWait←", &sys.m_SysKey[kkDiddleWaitLeft]},
|
||||
{"DiddleWaitR","DiddleWait→", &sys.m_SysKey[kkDiddleWaitRight]},
|
||||
|
||||
{"TxHeightUp","入力画面拡大", &sys.m_SysKey[kkInHeightUp]},
|
||||
{"TxHeightDown","入力画面縮小", &sys.m_SysKey[kkInHeightDown]},
|
||||
|
||||
{"TxLTR","LTR送信", &sys.m_SysKey[kkTxLTR]},
|
||||
{"TxFIG","FIG送信", &sys.m_SysKey[kkTxFIG]},
|
||||
|
||||
{"DecShift","SHIFT幅 狭める", &sys.m_SysKey[kkDecShift]},
|
||||
{"IncShift","SHIFT幅 広げる", &sys.m_SysKey[kkIncShift]},
|
||||
{"ChangeShift","SHIFT幅変更 (170/200/220/350/450)", &sys.m_SysKey[kkToggleShift]},
|
||||
|
||||
{"CallList","Callsign list", &sys.m_SysKey[kkCList]},
|
||||
};
|
||||
|
||||
void SetMenuName(LPCSTR pkey, LPCSTR p)
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < AN(def); i++ ){
|
||||
if( !strcmp(def[i].pSys, pkey) ){
|
||||
def[i].pUser = p;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetExtMenuName(int n, LPCSTR p)
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < AN(def); i++ ){
|
||||
if( !strcmp(def[i].pSys, "ExtCmd1") ){
|
||||
def[i+n].pUser = p;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void SetProMenuName(int n, LPCSTR p)
|
||||
{
|
||||
int i;
|
||||
for( i = 0; i < AN(def); i++ ){
|
||||
if( !strcmp(def[i].pSys, "Profile1") ){
|
||||
def[i+n].pUser = p;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const DEFTBL *GetDP(int n)
|
||||
{
|
||||
static DEFTBL udef;
|
||||
static char bf[32];
|
||||
static WORD dummy = 0;
|
||||
|
||||
if( n < AN(def) ){
|
||||
return &def[n];
|
||||
}
|
||||
n -= AN(def);
|
||||
if( n < 4 ){
|
||||
sprintf(bf, "IN%u", n + 1);
|
||||
udef.pSys = bf;
|
||||
udef.pUser = sys.m_InBtnName[n].c_str();
|
||||
udef.pKey = &sys.m_InBtnKey[n];
|
||||
return &udef;
|
||||
}
|
||||
n -= 4;
|
||||
if( n < 16 ){
|
||||
sprintf(bf, "M%u", n + 1);
|
||||
udef.pSys = bf;
|
||||
udef.pUser = sys.m_UserName[n].c_str();
|
||||
udef.pKey = &sys.m_UserKey[n];
|
||||
return &udef;
|
||||
}
|
||||
n -= 16;
|
||||
if( n < MSGLISTMAX ){
|
||||
sprintf(bf, "ML%u", n + 1);
|
||||
udef.pSys = bf;
|
||||
udef.pUser = sys.m_MsgName[n].c_str();
|
||||
udef.pKey = &sys.m_MsgKey[n];
|
||||
return &udef;
|
||||
}
|
||||
n -= MSGLISTMAX;
|
||||
if( n < 5 ){
|
||||
sprintf(bf, "QM%u", n + 1);
|
||||
udef.pSys = bf;
|
||||
udef.pUser = (sys.m_WinFontCharset != SHIFTJIS_CHARSET)?"QSO Button Macro":"QSO Button連動マクロ";
|
||||
udef.pKey = &Log.m_LogSet.m_QSOMacroKey[n];
|
||||
return &udef;
|
||||
}
|
||||
n -= 5;
|
||||
if( n < 16 ){
|
||||
sprintf(bf, "MEdit%u", n + 1);
|
||||
udef.pSys = bf;
|
||||
udef.pUser = sys.m_UserName[n].c_str();
|
||||
udef.pKey = &sys.m_UserEditKey[n];
|
||||
return &udef;
|
||||
}
|
||||
udef.pSys = "";
|
||||
udef.pUser = "";
|
||||
udef.pKey = &dummy;
|
||||
return &udef;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TShortCutDlg::UpdateUI(int n)
|
||||
{
|
||||
if( n >= 0 ){
|
||||
const DEFTBL *dp = GetDP(n);
|
||||
m_DisEvent++;
|
||||
ShortCutName->Text = GetKeyName(*dp->pKey);
|
||||
m_DisEvent--;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TShortCutDlg::Execute(void)
|
||||
{
|
||||
Grid->RowCount = AN(def) + 4 + 16 + 64 + 5 + 16 + 1;
|
||||
if( CurRow ){
|
||||
Grid->Row = CurRow;
|
||||
Grid->TopRow = TopRow;
|
||||
}
|
||||
UpdateUI(Grid->Row - 1);
|
||||
ShowModal();
|
||||
CurRow = Grid->Row;
|
||||
TopRow = Grid->TopRow;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// 重複のチェック
|
||||
int __fastcall TShortCutDlg::IsDupe(int n)
|
||||
{
|
||||
#if 0
|
||||
FILE *fp = fopen("F:\\LIST.TXT", "wt");
|
||||
const DEFTBL *dp;
|
||||
for( int j = 0; j < Grid->RowCount-1; j++ ){
|
||||
dp = GetDP(j);
|
||||
fprintf(fp, "%s : %s\n", dp->pSys, dp->pUser);
|
||||
}
|
||||
fclose(fp);
|
||||
#endif
|
||||
|
||||
WORD ks;
|
||||
const DEFTBL *s;
|
||||
const DEFTBL *t;
|
||||
int j;
|
||||
s = GetDP(n);
|
||||
ks = *s->pKey;
|
||||
if( ks ){
|
||||
for( j = 0; j < Grid->RowCount - 1; j++ ){
|
||||
if( n != j ){
|
||||
t = GetDP(j);
|
||||
if( t->pKey ){
|
||||
if( ks == *t->pKey ){
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TShortCutDlg::GridDrawCell(TObject *Sender, int Col,
|
||||
int Row, TRect &Rect, TGridDrawState State)
|
||||
{
|
||||
char bf[256];
|
||||
|
||||
Grid->Canvas->FillRect(Rect);
|
||||
int X = Rect.Left + 4;
|
||||
int Y = Rect.Top + 2;
|
||||
|
||||
if( Row ){
|
||||
Row--;
|
||||
const DEFTBL *dp = GetDP(Row);
|
||||
bf[0] = 0;
|
||||
switch(Col){
|
||||
case 0: // 内部名
|
||||
strcpy(bf, dp->pSys);
|
||||
break;
|
||||
case 1: // ユーザ名
|
||||
strcpy(bf, dp->pUser);
|
||||
break;
|
||||
case 2: // ショートカット
|
||||
strcpy(bf, GetKeyName(*dp->pKey));
|
||||
if( IsDupe(Row) ){
|
||||
Grid->Canvas->Font->Color = clRed;
|
||||
}
|
||||
break;
|
||||
}
|
||||
Grid->Canvas->TextOut(X, Y, bf);
|
||||
}
|
||||
else if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
LPCSTR _tte[]={
|
||||
"Internal","Define Name","Key"
|
||||
};
|
||||
Grid->Canvas->TextOut(X, Y, _tte[Col]);
|
||||
}
|
||||
else { // タイトル
|
||||
LPCSTR _tt[]={
|
||||
"内部名","ユーザー定義名","割り当てキー"
|
||||
};
|
||||
Grid->Canvas->TextOut(X, Y, _tt[Col]);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TShortCutDlg::GridSelectCell(TObject *Sender, int Col,
|
||||
int Row, bool &CanSelect)
|
||||
{
|
||||
if( Row ){
|
||||
UpdateUI(Row - 1);
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TShortCutDlg::ShortCutNameChange(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
m_DisEvent++;
|
||||
int n = Grid->Row - 1;
|
||||
if( n >= 0 ){
|
||||
const DEFTBL *dp = GetDP(n);
|
||||
*dp->pKey = GetKeyCode(AnsiString(ShortCutName->Text).c_str()); //JA7UDE 0428
|
||||
Grid->Invalidate();
|
||||
}
|
||||
m_DisEvent--;
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TShortCutDlg::CheckBtnClick(TObject *Sender)
|
||||
{
|
||||
WORD ks;
|
||||
AnsiString as;
|
||||
const DEFTBL *s;
|
||||
const DEFTBL *t;
|
||||
int i, j;
|
||||
for( i = 0; i < Grid->RowCount - 1; i++ ){
|
||||
s = GetDP(i);
|
||||
ks = *s->pKey;
|
||||
if( ks ){
|
||||
as = s->pSys;
|
||||
for( j = i + 1; j < Grid->RowCount - 1; j++ ){
|
||||
t = GetDP(j);
|
||||
if( t->pKey ){
|
||||
if( ks == *t->pKey ){
|
||||
Grid->Row = j + 1;
|
||||
WarningMB((Font->Charset != SHIFTJIS_CHARSET)?"Duplicated key '%s' and '%s'":"'%s' と '%s' が重複しています.", as.c_str(), t->pSys);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
InfoMB( (Font->Charset != SHIFTJIS_CHARSET)?"No duplicated":"重複するショートカットキーはありません." );
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TShortCutDlg::DelBtnClick(TObject *Sender)
|
||||
{
|
||||
int n = Grid->Row - 1;
|
||||
if( n >= 0 ){
|
||||
const DEFTBL *dp = GetDP(n);
|
||||
*dp->pKey = 0;
|
||||
UpdateUI(n);
|
||||
Grid->Invalidate();
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TShortCutDlg::SBHelpClick(TObject *Sender)
|
||||
{
|
||||
ShowHtmlHelp("keyboardshortcuts.htm");
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
ShortCut.dfm
Normal file
BIN
ShortCut.dfm
Normal file
Binary file not shown.
74
ShortCut.h
Normal file
74
ShortCut.h
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef ShortCutH
|
||||
#define ShortCutH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <Grids.hpp>
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#include "ComLib.h"
|
||||
//----------------------------------------------------------------------------
|
||||
class TShortCutDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TStringGrid *Grid;
|
||||
TComboBox *ShortCutName;
|
||||
TButton *CheckBtn;
|
||||
TButton *DelBtn;
|
||||
TSpeedButton *SBHelp;
|
||||
void __fastcall GridDrawCell(TObject *Sender, int Col, int Row,
|
||||
TRect &Rect, TGridDrawState State);
|
||||
void __fastcall GridSelectCell(TObject *Sender, int Col, int Row,
|
||||
bool &CanSelect);
|
||||
void __fastcall ShortCutNameChange(TObject *Sender);
|
||||
void __fastcall CheckBtnClick(TObject *Sender);
|
||||
void __fastcall DelBtnClick(TObject *Sender);
|
||||
void __fastcall SBHelpClick(TObject *Sender);
|
||||
private:
|
||||
int m_DisEvent;
|
||||
void __fastcall UpdateUI(int n);
|
||||
int __fastcall IsDupe(int n);
|
||||
|
||||
public:
|
||||
virtual __fastcall TShortCutDlg(TComponent* AOwner);
|
||||
|
||||
void __fastcall Execute(void);
|
||||
};
|
||||
|
||||
void SetMenuName(LPCSTR pkey, LPCSTR p);
|
||||
void SetExtMenuName(int n, LPCSTR p);
|
||||
void SetProMenuName(int n, LPCSTR p);
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TShortCutDlg *ShortCutDlg;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
171
Sound.h
Normal file
171
Sound.h
Normal file
|
|
@ -0,0 +1,171 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba, Dave Bernstein
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------------
|
||||
#ifndef FilterH
|
||||
#define FilterH
|
||||
//---------------------------------------------------------------------------
|
||||
#include <Classes.hpp>
|
||||
|
||||
#include "Wave.h"
|
||||
#include "fft.h"
|
||||
#include "rtty.h"
|
||||
//---------------------------------------------------------------------------
|
||||
class CWaveFile
|
||||
{
|
||||
private:
|
||||
HMMIO m_Handle;
|
||||
int m_dis;
|
||||
BYTE m_Head[4];
|
||||
public:
|
||||
long m_length;
|
||||
long m_pos;
|
||||
int m_mode;
|
||||
int m_pause;
|
||||
int m_autopause;
|
||||
AnsiString m_FileName;
|
||||
|
||||
__fastcall CWaveFile();
|
||||
__fastcall ~CWaveFile();
|
||||
void __fastcall FileClose(void);
|
||||
void __fastcall Rec(LPCSTR pName);
|
||||
BOOL __fastcall Play(LPCSTR pName);
|
||||
void __fastcall Rewind(void);
|
||||
void __fastcall ReadWrite(double *s, int size);
|
||||
long __fastcall GetPos(void);
|
||||
void __fastcall Seek(int n);
|
||||
int __fastcall ChangeSampFreq(LPCSTR tName, LPCSTR pName, int sSamp);
|
||||
};
|
||||
|
||||
|
||||
class TSound : public TThread
|
||||
{
|
||||
private:
|
||||
double ZBPF[TAPMAX+1];
|
||||
|
||||
BOOL m_Stop;
|
||||
WAVEFORMATEX m_WFX;
|
||||
|
||||
int m_FFTMax;
|
||||
int m_FFTSumMax;
|
||||
|
||||
int m_WaterMax;
|
||||
int m_WaterSumMax;
|
||||
int m_WaterMin;
|
||||
|
||||
CWave Wave;
|
||||
CNoise Noise;
|
||||
|
||||
int m_ReqFifoSize;
|
||||
|
||||
void __fastcall ErrorMsg(void);
|
||||
double __fastcall GetScopeRange(double &low, double center, double shift);
|
||||
void __fastcall ReadWrite(double *s, int size);
|
||||
int __fastcall UpdateFifoSize(void);
|
||||
BOOL __fastcall ReInitSound(void);
|
||||
void __fastcall JobSuspend(void);
|
||||
|
||||
protected:
|
||||
void __fastcall Execute();
|
||||
|
||||
|
||||
public:
|
||||
__fastcall TSound(bool CreateSuspended);
|
||||
__fastcall ~TSound();
|
||||
|
||||
void __fastcall Stop(void);
|
||||
void __fastcall ReqStop(void);
|
||||
void __fastcall WaitStop(void);
|
||||
void __fastcall TimingWait(void);
|
||||
|
||||
void __fastcall InitSound(void);
|
||||
double __fastcall GetScreenFreq(int x, int XW, int XRD);
|
||||
int __fastcall DrawFFT(Graphics::TBitmap *pBitmap, int sw, int XRD);
|
||||
int __fastcall DrawFFTWater(Graphics::TBitmap *pBitmap, int sw, int XRD);
|
||||
void __fastcall SetTXRX(int sw);
|
||||
int __fastcall DoAFC(void);
|
||||
|
||||
void __fastcall CalcBPF(void);
|
||||
void __fastcall CalcBPF(double fl, double fh, double fw);
|
||||
void __fastcall TaskPriority(void);
|
||||
|
||||
LPCSTR __fastcall GetInputSoundcard(unsigned int ID);
|
||||
LPCSTR __fastcall GetOutputSoundcard(unsigned int ID);
|
||||
|
||||
CFSKDEM FSKDEM;
|
||||
CFSKMOD FSKMOD;
|
||||
|
||||
CWaveFile WaveFile;
|
||||
|
||||
int m_Test;
|
||||
|
||||
void __fastcall FileClose(void);
|
||||
void __fastcall Rec(LPCSTR pName);
|
||||
void __fastcall Play(LPCSTR pName);
|
||||
void __fastcall Rewind(void);
|
||||
|
||||
void __fastcall InitWFX(void);
|
||||
|
||||
UINT m_IDDevice;
|
||||
UINT m_IDOutDevice; //AA6YQ 1.6.6
|
||||
|
||||
int m_playmode;
|
||||
int m_susp;
|
||||
int m_suspack;
|
||||
|
||||
int m_bpf;
|
||||
int m_bpftap;
|
||||
int m_bpfafc;
|
||||
double m_bpffw;
|
||||
int m_lmsbpf;
|
||||
CLMS m_lms;
|
||||
double HBPF[TAPMAX+1];
|
||||
|
||||
int m_Tx;
|
||||
int m_ReqTx;
|
||||
|
||||
CFFT fftIN;
|
||||
|
||||
int m_Err;
|
||||
int m_BuffSize;
|
||||
|
||||
int m_Noise;
|
||||
|
||||
int m_FFTSW;
|
||||
int m_FFTFW;
|
||||
|
||||
int m_FFTWINDOW;
|
||||
|
||||
int m_ReqSpeedTest;
|
||||
DWORD m_SpeedValue;
|
||||
void __fastcall JobSpeedTest();
|
||||
|
||||
inline int __fastcall GetOutCount(int sw){
|
||||
return (sw ? Wave.GetOutBCC() : Wave.GetOutBC()) * m_BuffSize;
|
||||
}
|
||||
inline void __fastcall TrigBCC(void){
|
||||
Wave.SetOutBCC(Wave.GetOutBC());
|
||||
}
|
||||
inline int __fastcall GetBCC(void){
|
||||
return Wave.GetOutBCC();
|
||||
}
|
||||
};
|
||||
//---------------------------------------------------------------------------
|
||||
#endif
|
||||
|
||||
62
TH5Len.cpp
Normal file
62
TH5Len.cpp
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "TH5Len.h"
|
||||
#include "ComLib.h"
|
||||
#include "Hamlog5.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TTH5LenDlg *TH5LenDlg;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TTH5LenDlg::TTH5LenDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
Caption = (sys.m_WinFontCharset != SHIFTJIS_CHARSET) ? "Set fields length" : "ƒtƒB<EFBFBD>[ƒ‹ƒh’·‚Ì<E2809A>Ý’è";
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TTH5LenDlg::Execute(void)
|
||||
{
|
||||
UHis->Position = Log.m_LogSet.m_Hamlog5Len[8];
|
||||
UMy->Position = Log.m_LogSet.m_Hamlog5Len[9];
|
||||
UFreq->Position = Log.m_LogSet.m_Hamlog5Len[10];
|
||||
UMode->Position = Log.m_LogSet.m_Hamlog5Len[11];
|
||||
UName->Position = Log.m_LogSet.m_Hamlog5Len[12];
|
||||
UQTH->Position = Log.m_LogSet.m_Hamlog5Len[13];
|
||||
URem->Position = Log.m_LogSet.m_Hamlog5Len[14];
|
||||
if( ShowModal() == IDOK ){
|
||||
Log.m_LogSet.m_Hamlog5Len[8] = UHis->Position;
|
||||
Log.m_LogSet.m_Hamlog5Len[9] = UMy->Position;
|
||||
Log.m_LogSet.m_Hamlog5Len[10] = UFreq->Position;
|
||||
Log.m_LogSet.m_Hamlog5Len[11] = UMode->Position;
|
||||
Log.m_LogSet.m_Hamlog5Len[12] = UName->Position;
|
||||
Log.m_LogSet.m_Hamlog5Len[13] = UQTH->Position;
|
||||
Log.m_LogSet.m_Hamlog5Len[14] = URem->Position;
|
||||
Log.m_LogSet.m_Hamlog5Len[15] = Log.m_LogSet.m_Hamlog5Len[14];
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
|
||||
BIN
TH5Len.dfm
Normal file
BIN
TH5Len.dfm
Normal file
Binary file not shown.
71
TH5Len.h
Normal file
71
TH5Len.h
Normal file
|
|
@ -0,0 +1,71 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef OCBH
|
||||
#define OCBH
|
||||
//----------------------------------------------------------------------------
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <ComCtrls.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TTH5LenDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TLabel *L1;
|
||||
TLabel *L2;
|
||||
TLabel *L3;
|
||||
TLabel *L4;
|
||||
TLabel *L5;
|
||||
TLabel *L6;
|
||||
TLabel *L7;
|
||||
TEdit *EHis;
|
||||
TEdit *EMy;
|
||||
TEdit *EFreq;
|
||||
TEdit *EMode;
|
||||
TEdit *EName;
|
||||
TEdit *EQTH;
|
||||
TEdit *ERem;
|
||||
TUpDown *UHis;
|
||||
TUpDown *UMy;
|
||||
TUpDown *UFreq;
|
||||
TUpDown *UMode;
|
||||
TUpDown *UName;
|
||||
TUpDown *UQTH;
|
||||
TUpDown *URem;
|
||||
private:
|
||||
public:
|
||||
virtual __fastcall TTH5LenDlg(TComponent* AOwner);
|
||||
|
||||
int __fastcall Execute(void);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern PACKAGE TTH5LenDlg *TH5LenDlg;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
172
TextEdit.cpp
Normal file
172
TextEdit.cpp
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "ComLib.h"
|
||||
#include "TextEdit.h"
|
||||
//---------------------------------------------------------------------------
|
||||
enum TFontPitch { fpDefault, fpVariable, fpFixed };
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TTextEditDlg *TextEditDlg;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TTextEditDlg::TTextEditDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
ap = NULL;
|
||||
Memo->Font->Pitch = fpFixed;
|
||||
EntryAlignControl();
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
// Memo->Font->Name = sys.m_BtnFontName;
|
||||
// Memo->Font->Charset = sys.m_BtnFontCharset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
CancelBtn->Caption = "Cancel";
|
||||
FontBtn->Caption = "Font";
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TTextEditDlg::Execute(AnsiString &as, int flag, LPCSTR pTitle /* = NULL*/)
|
||||
{
|
||||
CWaitCursor tw;
|
||||
ap = as.c_str();
|
||||
if( flag != TRUE ){
|
||||
OKBtn->Visible = FALSE;
|
||||
CancelBtn->Caption = ( Font->Charset != SHIFTJIS_CHARSET ) ? "Close":"閉じる";
|
||||
Memo->ReadOnly = TRUE;
|
||||
}
|
||||
if( pTitle != NULL ){
|
||||
Caption = pTitle;
|
||||
}
|
||||
tw.Delete();
|
||||
int r = ShowModal();
|
||||
if( r == IDOK ){
|
||||
if( Memo->Modified == FALSE ) return FALSE;
|
||||
if( flag == TRUE ){
|
||||
as = Memo->Text;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void __fastcall TTextEditDlg::FontBtnClick(TObject *Sender)
|
||||
{
|
||||
FontDialog->Font->Assign(Memo->Font);
|
||||
NormalWindow(this);
|
||||
if( FontDialog->Execute() == TRUE ){
|
||||
CWaitCursor tw;
|
||||
Memo->Font->Assign(FontDialog->Font);
|
||||
Memo->Update();
|
||||
}
|
||||
TopWindow(this);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// サイズ変更コントロールの登録
|
||||
void __fastcall TTextEditDlg::EntryAlignControl(void)
|
||||
{
|
||||
RECT rc;
|
||||
rc.left = 0;
|
||||
rc.top = 0;
|
||||
rc.right = 792-1;
|
||||
rc.bottom = 572-1;
|
||||
|
||||
AlignList.EntryControl(OKBtn, &rc, OKBtn->Font);
|
||||
AlignList.EntryControl(CancelBtn, &rc, CancelBtn->Font);
|
||||
AlignList.EntryControl(FontBtn, &rc, FontBtn->Font);
|
||||
AlignList.EntryControl(Memo, &rc, Memo->Font);
|
||||
|
||||
int CX = ::GetSystemMetrics(SM_CXFULLSCREEN);
|
||||
int CY = ::GetSystemMetrics(SM_CYFULLSCREEN);
|
||||
// int CX = ::GetSystemMetrics(SM_CXSCREEN);
|
||||
// int CY = ::GetSystemMetrics(SM_CYSCREEN);
|
||||
if( (CX < Width)||(CY < Height) ){
|
||||
Top = 0;
|
||||
Left = 0;
|
||||
Width = CX;
|
||||
Height = CY;
|
||||
}
|
||||
FormCenter(this, CX, CY);
|
||||
if( Owner != NULL ){
|
||||
WindowState = ((TForm *)Owner)->WindowState;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTextEditDlg::FormResize(TObject *Sender)
|
||||
{
|
||||
CWaitCursor tw;
|
||||
AlignList.NewAlign(this);
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTextEditDlg::FormPaint(TObject *Sender)
|
||||
{
|
||||
if( ap == NULL ) return;
|
||||
CWaitCursor tw;
|
||||
Memo->Text = ap;
|
||||
ap = NULL;
|
||||
Memo->Update();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
// テキストヘルプの表示
|
||||
void __fastcall ShowHelp(TForm *pForm, LPCSTR pName)
|
||||
{
|
||||
char bf[2048];
|
||||
char Name[256];
|
||||
AnsiString in;
|
||||
FILE *fp;
|
||||
|
||||
sprintf(Name, "%s%s", BgnDir, pName);
|
||||
CWaitCursor w;
|
||||
if( (fp = fopen(Name, "rt"))!=NULL ){
|
||||
while(!feof(fp)){
|
||||
if( fgets(bf, 2048, fp) != NULL ){
|
||||
ClipLF(bf);
|
||||
in += bf;
|
||||
in += "\r\n";
|
||||
}
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
else {
|
||||
if((sys.m_WinFontCharset != SHIFTJIS_CHARSET )){
|
||||
ErrorMB( "'%s' was not found.\r\n\r\nPlease search in the MMTTY English Web Site.", Name);
|
||||
}
|
||||
else {
|
||||
ErrorMB( "'%s'が見つかりません.\r\n\r\nMMTTY English Web Site からダウンロードして下さい.", Name);
|
||||
}
|
||||
return;
|
||||
}
|
||||
if( sys.m_HelpNotePad ){
|
||||
sprintf( bf, "NOTEPAD.EXE %s", Name);
|
||||
WinExec(bf, SW_SHOWDEFAULT);
|
||||
}
|
||||
else {
|
||||
TTextEditDlg *Box = new TTextEditDlg(pForm);
|
||||
Box->Memo->Font->Name = sys.m_HelpFontName;
|
||||
Box->Memo->Font->Charset = sys.m_HelpFontCharset;
|
||||
Box->Memo->Font->Size = sys.m_HelpFontSize;
|
||||
Box->Execute(in, FALSE, pName);
|
||||
delete Box;
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
BIN
TextEdit.dfm
Normal file
BIN
TextEdit.dfm
Normal file
Binary file not shown.
69
TextEdit.h
Normal file
69
TextEdit.h
Normal file
|
|
@ -0,0 +1,69 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef TextEditH
|
||||
#define TextEditH
|
||||
//----------------------------------------------------------------------------
|
||||
//JA7UDE 0427
|
||||
#include <System.hpp>
|
||||
#include <Windows.hpp>
|
||||
#include <SysUtils.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Graphics.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
#include <Forms.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <Buttons.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <Dialogs.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TTextEditDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TMemo *Memo;
|
||||
TButton *FontBtn;
|
||||
TFontDialog *FontDialog;
|
||||
void __fastcall FontBtnClick(TObject *Sender);
|
||||
void __fastcall FormResize(TObject *Sender);
|
||||
|
||||
|
||||
|
||||
|
||||
void __fastcall FormPaint(TObject *Sender);
|
||||
|
||||
private:
|
||||
int InitFlag;
|
||||
LPCSTR ap;
|
||||
|
||||
CAlignList AlignList;
|
||||
void __fastcall EntryAlignControl(void);
|
||||
public:
|
||||
virtual __fastcall TTextEditDlg(TComponent* AOwner);
|
||||
|
||||
int __fastcall Execute(AnsiString &as, int flag, LPCSTR pTitle = NULL);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TTextEditDlg *TextEditDlg;
|
||||
|
||||
extern void __fastcall ShowHelp(TForm *pForm, LPCSTR pName);
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
125
TncSet.cpp
Normal file
125
TncSet.cpp
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "TncSet.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TTNCSetDlg::TTNCSetDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
m_DisEvent = 1;
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
Caption = "TNC emulation mode";
|
||||
CancelBtn->Caption = "Cancel";
|
||||
LMSG->Caption = "Note: Use a null modem cable for connecting to the other PC.";
|
||||
}
|
||||
SBHelp->Visible = !JanHelp.IsEmpty();
|
||||
m_MMList.QueryList("MMT");
|
||||
for( int i = 0; i < m_MMList.GetCount(); i++ ){
|
||||
PortName->Items->Insert(1, m_MMList.GetItemName(i));
|
||||
}
|
||||
PortName->DropDownCount = m_MMList.GetCount() + 10;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
void __fastcall TTNCSetDlg::UpdateUI(void)
|
||||
{
|
||||
m_DisEvent++;
|
||||
int cf = (m_MMList.IndexOf(AnsiString(PortName->Text).c_str()) < 0);
|
||||
int f;
|
||||
if( TNCType->ItemIndex == 2 ){
|
||||
f = FALSE;
|
||||
}
|
||||
else {
|
||||
f = cf;
|
||||
}
|
||||
for(int i = 0; i < GroupBox1->ControlCount; i++ ){
|
||||
if( (GroupBox1->Controls[i]->Name != "PortName") &&
|
||||
(GroupBox1->Controls[i]->Name != "L1")
|
||||
){
|
||||
GroupBox1->Controls[i]->Enabled = f;
|
||||
}
|
||||
}
|
||||
flwXON->Enabled = f;
|
||||
flwCTS->Enabled = f;
|
||||
Echo->Enabled = !(TNCType->ItemIndex == 2);
|
||||
LMSG->Enabled = cf;
|
||||
m_DisEvent--;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TTNCSetDlg::Execute(void)
|
||||
{
|
||||
PortName->Text = TNC.StrPort;
|
||||
Baud->Text = TNC.BaudRate;
|
||||
BitLen->ItemIndex = TNC.BitLen;
|
||||
Parity->ItemIndex = TNC.Parity;
|
||||
Stop->ItemIndex = TNC.Stop;
|
||||
flwXON->Checked = TNC.flwXON;
|
||||
flwCTS->Checked = TNC.flwCTS;
|
||||
|
||||
Echo->ItemIndex = TNC.Echo;
|
||||
TNCType->ItemIndex = TNC.Type;
|
||||
DisWindow->Checked = sys.m_DisWindow;
|
||||
StayOnTop->Checked = sys.m_StayOnTop;
|
||||
UpdateUI();
|
||||
m_DisEvent = 0;
|
||||
if( ShowModal() == IDOK ){
|
||||
StrCopy(TNC.StrPort, AnsiString(PortName->Text).c_str(), 31);
|
||||
int dd;
|
||||
if( sscanf(AnsiString(Baud->Text).c_str(), "%u", &dd) == 1 ){
|
||||
TNC.BaudRate = dd;
|
||||
}
|
||||
TNC.BitLen = BitLen->ItemIndex;
|
||||
TNC.Parity = Parity->ItemIndex;
|
||||
TNC.Stop = Stop->ItemIndex;
|
||||
TNC.flwXON = flwXON->Checked;
|
||||
TNC.flwCTS = flwCTS->Checked;
|
||||
|
||||
TNC.Echo = Echo->ItemIndex;
|
||||
TNC.Type = TNCType->ItemIndex;
|
||||
sys.m_DisWindow = DisWindow->Checked;
|
||||
sys.m_StayOnTop = StayOnTop->Checked;
|
||||
TNC.change = 1;
|
||||
return TRUE;
|
||||
}
|
||||
else {
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
void __fastcall TTNCSetDlg::TNCTypeClick(TObject *Sender)
|
||||
{
|
||||
if( m_DisEvent ) return;
|
||||
|
||||
UpdateUI();
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
void __fastcall TTNCSetDlg::SBHelpClick(TObject *Sender)
|
||||
{
|
||||
ShowHtmlHelp("usemmttyasamodem.htm");
|
||||
}
|
||||
//---------------------------------------------------------------------------
|
||||
|
||||
BIN
TncSet.dfm
Normal file
BIN
TncSet.dfm
Normal file
Binary file not shown.
81
TncSet.h
Normal file
81
TncSet.h
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef TncSetH
|
||||
#define TncSetH
|
||||
//----------------------------------------------------------------------------
|
||||
/* JA7UDE 0427
|
||||
#include <vcl\System.hpp>
|
||||
#include <vcl\Windows.hpp>
|
||||
#include <vcl\SysUtils.hpp>
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Graphics.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
*/
|
||||
//----------------------------------------------------------------------------
|
||||
#include "Ctnc.h"
|
||||
#include <Buttons.hpp>
|
||||
#include <Classes.hpp>
|
||||
#include <Controls.hpp>
|
||||
#include <ExtCtrls.hpp>
|
||||
#include <StdCtrls.hpp>
|
||||
//----------------------------------------------------------------------------
|
||||
class TTNCSetDlg : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TGroupBox *GroupBox1;
|
||||
TComboBox *PortName;
|
||||
TLabel *L1;
|
||||
TLabel *L2;
|
||||
TComboBox *Baud;
|
||||
TRadioGroup *BitLen;
|
||||
TRadioGroup *Stop;
|
||||
TRadioGroup *Parity;
|
||||
TRadioGroup *TNCType;
|
||||
TLabel *LMSG;
|
||||
TGroupBox *GroupBox3;
|
||||
TCheckBox *flwXON;
|
||||
TCheckBox *flwCTS;
|
||||
TRadioGroup *Echo;
|
||||
TCheckBox *DisWindow;
|
||||
TCheckBox *StayOnTop;
|
||||
TSpeedButton *SBHelp;
|
||||
void __fastcall TNCTypeClick(TObject *Sender);
|
||||
void __fastcall SBHelpClick(TObject *Sender);
|
||||
|
||||
private:
|
||||
int m_DisEvent;
|
||||
CMMList m_MMList;
|
||||
|
||||
void __fastcall UpdateUI(void);
|
||||
|
||||
public:
|
||||
virtual __fastcall TTNCSetDlg(TComponent* AOwner);
|
||||
int __fastcall Execute(void);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
58
TxdDlg.cpp
Normal file
58
TxdDlg.cpp
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "TxdDlg.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TTxdDlgBox *TxdDlgBox;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TTxdDlgBox::TTxdDlgBox(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
CancelBtn->Caption = "Cancel";
|
||||
LMsg->Caption = "Please try to test B, C, D, if you have a trouble in the USB-COM adaptor. (C)Limiting speed seems to be well.";
|
||||
TxdJob->Caption = "Processing method";
|
||||
TxdJob->Items->Strings[0] = "A: Normal";
|
||||
TxdJob->Items->Strings[1] = "B: Polling";
|
||||
TxdJob->Items->Strings[2] = "C: Limiting speed";
|
||||
TxdJob->Items->Strings[3] = "D: Polling and Limiting speed";
|
||||
|
||||
}
|
||||
else {
|
||||
LMsg->Caption = "FSKがUSBシリアルアダプターで正しく動作しない場合はB, C, Dを試して下さい。(C)送信速度の制限が良いようです.";
|
||||
}
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
int __fastcall TTxdDlgBox::Execute(int sel)
|
||||
{
|
||||
TxdJob->ItemIndex = sel;
|
||||
if( ShowModal() == IDOK ){
|
||||
sel = TxdJob->ItemIndex;
|
||||
}
|
||||
return sel;
|
||||
}
|
||||
|
||||
BIN
TxdDlg.dfm
Normal file
BIN
TxdDlg.dfm
Normal file
Binary file not shown.
53
TxdDlg.h
Normal file
53
TxdDlg.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
#ifndef TxdDlgH
|
||||
#define TxdDlgH
|
||||
//----------------------------------------------------------------------------
|
||||
/* JA7UDE 0428
|
||||
#include <vcl\System.hpp>
|
||||
#include <vcl\Windows.hpp>
|
||||
#include <vcl\SysUtils.hpp>
|
||||
#include <vcl\Classes.hpp>
|
||||
#include <vcl\Graphics.hpp>
|
||||
#include <vcl\StdCtrls.hpp>
|
||||
#include <vcl\Forms.hpp>
|
||||
#include <vcl\Controls.hpp>
|
||||
#include <vcl\Buttons.hpp>
|
||||
#include <vcl\ExtCtrls.hpp>
|
||||
*/
|
||||
//----------------------------------------------------------------------------
|
||||
class TTxdDlgBox : public TForm
|
||||
{
|
||||
__published:
|
||||
TButton *OKBtn;
|
||||
TButton *CancelBtn;
|
||||
TRadioGroup *TxdJob;
|
||||
TLabel *LMsg;
|
||||
private:
|
||||
public:
|
||||
virtual __fastcall TTxdDlgBox(TComponent* AOwner);
|
||||
|
||||
int __fastcall Execute(int sel);
|
||||
};
|
||||
//----------------------------------------------------------------------------
|
||||
//extern TTxdDlgBox *TxdDlgBox;
|
||||
//----------------------------------------------------------------------------
|
||||
#endif
|
||||
739
UserPara.ini
Normal file
739
UserPara.ini
Normal file
|
|
@ -0,0 +1,739 @@
|
|||
[Define0]
|
||||
Name=Standard RTTY
|
||||
Enabled=1
|
||||
AFC=1
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
UOS=1
|
||||
TxNet=1
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=0
|
||||
SQ=1
|
||||
SQLevel=6.000000e+02
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
TXECHO=0
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
Rev=0
|
||||
ShiftFreq=1.700000e+02
|
||||
RXBPF=0
|
||||
RXBPFTAP=56
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=1.000000e+02
|
||||
RXlms=0
|
||||
RXlmsDelay=0
|
||||
RXlmsMU2=3.000000e-03
|
||||
RXlmsGM=9.999000e-01
|
||||
RXlmsAGC=0
|
||||
RXlmsInv=0
|
||||
RXlmsTAP=56
|
||||
RXNotchTAP=72
|
||||
RXlmsBPF=1
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2136
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
DEMTYPE=0
|
||||
BaudRate=4.545000e+01
|
||||
TTYBitLen=5
|
||||
TTYStopLen=4
|
||||
TTYParity=0
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.000000e+01
|
||||
Smooz=7.000000e+01
|
||||
Tap=72
|
||||
IIRBW=60
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Diddle=2
|
||||
TxFixShift=0
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
FFTTones=4
|
||||
AA6YQ.Version=2
|
||||
AA6YQ.Enabled=0
|
||||
AA6YQ.TapsBPF=512
|
||||
AA6YQ.WidthBPF=3.500000e+01
|
||||
AA6YQ.TapsBEF=256
|
||||
AA6YQ.WidthBEF=1.500000e+01
|
||||
AA6YQ.afcERR=5.000000e+00
|
||||
|
||||
[Define1]
|
||||
Name=Fluttered signals
|
||||
Enabled=1
|
||||
AFC=1
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
UOS=1
|
||||
TxNet=1
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=0
|
||||
SQ=1
|
||||
SQLevel=6.000000e+02
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
TXECHO=0
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
Rev=0
|
||||
ShiftFreq=1.700000e+02
|
||||
RXBPF=1
|
||||
RXBPFTAP=56
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=1.000000e+02
|
||||
RXlms=0
|
||||
RXlmsDelay=0
|
||||
RXlmsMU2=3.000000e-03
|
||||
RXlmsGM=9.999000e-01
|
||||
RXlmsAGC=0
|
||||
RXlmsInv=0
|
||||
RXlmsTAP=56
|
||||
RXNotchTAP=72
|
||||
RXlmsBPF=1
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2136
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
DEMTYPE=0
|
||||
BaudRate=4.545000e+01
|
||||
TTYBitLen=5
|
||||
TTYStopLen=4
|
||||
TTYParity=0
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.000000e+01
|
||||
Smooz=7.000000e+01
|
||||
Tap=72
|
||||
IIRBW=90
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Diddle=2
|
||||
TxFixShift=0
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
FFTTones=4
|
||||
AA6YQ.Version=2
|
||||
AA6YQ.Enabled=0
|
||||
AA6YQ.TapsBPF=512
|
||||
AA6YQ.WidthBPF=3.500000e+01
|
||||
AA6YQ.TapsBEF=256
|
||||
AA6YQ.WidthBEF=1.500000e+01
|
||||
AA6YQ.afcERR=5.000000e+00
|
||||
|
||||
[Define7]
|
||||
Name=23Hz RTTY (MTTY)
|
||||
Enabled=1
|
||||
AFC=1
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
UOS=1
|
||||
TxNet=1
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=0
|
||||
SQ=1
|
||||
SQLevel=6.000000e+02
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=2.300000e+01
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
TXECHO=0
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
Rev=0
|
||||
ShiftFreq=2.300000e+01
|
||||
RXBPF=1
|
||||
RXBPFTAP=80
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=0.000000e+00
|
||||
RXlms=0
|
||||
RXlmsDelay=0
|
||||
RXlmsMU2=3.000000e-03
|
||||
RXlmsGM=9.999000e-01
|
||||
RXlmsAGC=0
|
||||
RXlmsInv=0
|
||||
RXlmsTAP=56
|
||||
RXNotchTAP=72
|
||||
RXlmsBPF=1
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2210
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
DEMTYPE=2
|
||||
BaudRate=4.545000e+01
|
||||
TTYBitLen=5
|
||||
TTYStopLen=3
|
||||
TTYParity=0
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.000000e+01
|
||||
Smooz=7.000000e+01
|
||||
Tap=72
|
||||
IIRBW=20
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=4.000000e+01
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Diddle=2
|
||||
TxFixShift=0
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
FFTTones=4
|
||||
AA6YQ.Version=2
|
||||
AA6YQ.Enabled=0
|
||||
AA6YQ.TapsBPF=512
|
||||
AA6YQ.WidthBPF=3.500000e+01
|
||||
AA6YQ.TapsBEF=256
|
||||
AA6YQ.WidthBEF=1.500000e+01
|
||||
AA6YQ.afcERR=5.000000e+00
|
||||
|
||||
[Define2]
|
||||
Name=Fluttered signals (FIR)
|
||||
Enabled=1
|
||||
AFC=1
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
UOS=1
|
||||
TxNet=1
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=0
|
||||
SQ=1
|
||||
SQLevel=6.000000e+02
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
TXECHO=0
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
Rev=0
|
||||
ShiftFreq=1.700000e+02
|
||||
RXBPF=1
|
||||
RXBPFTAP=56
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=1.000000e+02
|
||||
RXlms=0
|
||||
RXlmsDelay=0
|
||||
RXlmsMU2=3.000000e-03
|
||||
RXlmsGM=9.999000e-01
|
||||
RXlmsAGC=0
|
||||
RXlmsInv=0
|
||||
RXlmsTAP=56
|
||||
RXNotchTAP=72
|
||||
RXlmsBPF=1
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2096
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
DEMTYPE=1
|
||||
BaudRate=4.545000e+01
|
||||
TTYBitLen=5
|
||||
TTYStopLen=4
|
||||
TTYParity=0
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.000000e+01
|
||||
Smooz=7.000000e+01
|
||||
Tap=72
|
||||
IIRBW=90
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Diddle=2
|
||||
TxFixShift=0
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
FFTTones=4
|
||||
AA6YQ.Version=2
|
||||
AA6YQ.Enabled=0
|
||||
AA6YQ.TapsBPF=512
|
||||
AA6YQ.WidthBPF=3.500000e+01
|
||||
AA6YQ.TapsBEF=256
|
||||
AA6YQ.WidthBEF=1.500000e+01
|
||||
AA6YQ.afcERR=5.000000e+00
|
||||
|
||||
[Define1025]
|
||||
Name=Default
|
||||
Enabled=1
|
||||
AFC=1
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
UOS=0
|
||||
TxNet=1
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=0
|
||||
SQ=0
|
||||
SQLevel=6.000000e+02
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
TXECHO=0
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
Rev=0
|
||||
ShiftFreq=1.700000e+02
|
||||
RXBPF=0
|
||||
RXBPFTAP=56
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=1.000000e+02
|
||||
RXlms=0
|
||||
RXlmsDelay=0
|
||||
RXlmsMU2=3.000000e-03
|
||||
RXlmsGM=9.999000e-01
|
||||
RXlmsAGC=0
|
||||
RXlmsInv=0
|
||||
RXlmsTAP=56
|
||||
RXNotchTAP=72
|
||||
RXlmsBPF=1
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2210
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
DEMTYPE=0
|
||||
BaudRate=4.545000e+01
|
||||
TTYBitLen=5
|
||||
TTYStopLen=4
|
||||
TTYParity=0
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.000000e+01
|
||||
Smooz=7.000000e+01
|
||||
Tap=72
|
||||
IIRBW=60
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Diddle=2
|
||||
TxFixShift=0
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
FFTTones=4
|
||||
LimitAGC=1
|
||||
TXLoop=1
|
||||
AA6YQ.Version=2
|
||||
AA6YQ.Enabled=0
|
||||
AA6YQ.TapsBPF=512
|
||||
AA6YQ.WidthBPF=3.500000e+01
|
||||
AA6YQ.TapsBEF=256
|
||||
AA6YQ.WidthBEF=1.500000e+01
|
||||
AA6YQ.afcERR=5.000000e+00
|
||||
|
||||
[Define1026]
|
||||
Name=Return to the startup
|
||||
Enabled=1
|
||||
AFC=0
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
UOS=1
|
||||
TxNet=0
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=1
|
||||
SQ=1
|
||||
SQLevel=6.000000e+02
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
TXECHO=0
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
Rev=0
|
||||
ShiftFreq=1.700000e+02
|
||||
RXBPF=0
|
||||
RXBPFTAP=64
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=2.500000e+02
|
||||
RXlms=0
|
||||
RXlmsDelay=24
|
||||
RXlmsMU2=1.000000e-03
|
||||
RXlmsGM=9.998000e-01
|
||||
RXlmsAGC=1
|
||||
RXlmsInv=0
|
||||
RXlmsTAP=512
|
||||
RXNotchTAP=192
|
||||
RXlmsBPF=0
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2210
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
DEMTYPE=1
|
||||
BaudRate=4.545000e+01
|
||||
TTYBitLen=5
|
||||
TTYStopLen=3
|
||||
TTYParity=0
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.500000e+01
|
||||
Smooz=3.000000e+02
|
||||
Tap=512
|
||||
IIRBW=60
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Diddle=2
|
||||
TxFixShift=0
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
FFTTones=4
|
||||
LimitAGC=1
|
||||
TXLoop=1
|
||||
AA6YQ.Version=2
|
||||
AA6YQ.Enabled=1
|
||||
AA6YQ.TapsBPF=512
|
||||
AA6YQ.WidthBPF=3.500000e+01
|
||||
AA6YQ.TapsBEF=256
|
||||
AA6YQ.WidthBEF=1.500000e+01
|
||||
AA6YQ.afcERR=5.000000e+00
|
||||
|
||||
[Define3]
|
||||
Name=Multi-path
|
||||
Enabled=1
|
||||
AFC=1
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
UOS=1
|
||||
TxNet=1
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
ATC=1
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=1
|
||||
SQ=1
|
||||
SQLevel=6.000000e+02
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
TXECHO=0
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
Rev=0
|
||||
ShiftFreq=1.700000e+02
|
||||
RXBPF=0
|
||||
RXBPFTAP=56
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=1.000000e+02
|
||||
RXlms=0
|
||||
RXlmsDelay=0
|
||||
RXlmsMU2=3.000000e-03
|
||||
RXlmsGM=9.999000e-01
|
||||
RXlmsAGC=0
|
||||
RXlmsInv=0
|
||||
RXlmsTAP=56
|
||||
RXNotchTAP=72
|
||||
RXlmsBPF=1
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2094
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
DEMTYPE=0
|
||||
BaudRate=4.545000e+01
|
||||
TTYBitLen=5
|
||||
TTYStopLen=3
|
||||
TTYParity=0
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.000000e+01
|
||||
Smooz=7.000000e+01
|
||||
Tap=72
|
||||
IIRBW=90
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Diddle=2
|
||||
TxFixShift=0
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
FFTTones=4
|
||||
AA6YQ.Version=2
|
||||
AA6YQ.Enabled=0
|
||||
AA6YQ.TapsBPF=512
|
||||
AA6YQ.WidthBPF=3.500000e+01
|
||||
AA6YQ.TapsBEF=256
|
||||
AA6YQ.WidthBEF=1.500000e+01
|
||||
AA6YQ.afcERR=5.000000e+00
|
||||
|
||||
[Define4]
|
||||
Name=AA6YQ FIR512
|
||||
Enabled=1
|
||||
AFC=1
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
UOS=1
|
||||
TxNet=0
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
LimitAGC=1
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=1
|
||||
SQ=1
|
||||
SQLevel=6.000000e+02
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
TXLoop=1
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
Rev=0
|
||||
ShiftFreq=1.700000e+02
|
||||
RXBPF=0
|
||||
RXBPFTAP=64
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=2.500000e+02
|
||||
RXlms=0
|
||||
RXlmsDelay=24
|
||||
RXlmsMU2=1.000000e-03
|
||||
RXlmsGM=9.998000e-01
|
||||
RXlmsAGC=1
|
||||
RXlmsInv=0
|
||||
RXlmsTAP=512
|
||||
RXNotchTAP=192
|
||||
RXlmsBPF=0
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2199
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
DEMTYPE=1
|
||||
BaudRate=4.545000e+01
|
||||
TTYBitLen=5
|
||||
TTYStopLen=3
|
||||
TTYParity=0
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.500000e+01
|
||||
Smooz=3.000000e+02
|
||||
Tap=512
|
||||
IIRBW=60
|
||||
FFTTones=4
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Diddle=2
|
||||
TxFixShift=0
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
AA6YQ.Version=2
|
||||
AA6YQ.Enabled=1
|
||||
AA6YQ.TapsBPF=512
|
||||
AA6YQ.WidthBPF=3.500000e+01
|
||||
AA6YQ.TapsBEF=256
|
||||
AA6YQ.WidthBEF=1.500000e+01
|
||||
AA6YQ.afcERR=5.000000e+00
|
||||
|
||||
[Define5]
|
||||
Name=FFT demodulator
|
||||
Enabled=1
|
||||
AFCFixShift=1
|
||||
AFCSQ=32
|
||||
AFCTime=8.000000e+00
|
||||
AFCSweep=1.000000e+00
|
||||
TxNet=1
|
||||
TxDisRev=0
|
||||
LimitDxGain=2.000000e+02
|
||||
LimitOverSampling=0
|
||||
ATC=0
|
||||
ATCTime=4
|
||||
Majority=1
|
||||
IgnoreFreamError=1
|
||||
SQLevel=6.000000e+02
|
||||
DefMarkFreq=2.125000e+03
|
||||
DefShift=1.700000e+02
|
||||
DefStopLen=0
|
||||
OutputGain=2.457600e+04
|
||||
TXECHO=0
|
||||
TXBPFTAP=48
|
||||
TXLPF=0
|
||||
TXLPFFreq=1.000000e+02
|
||||
TXWaitType=0
|
||||
TXCharWait=0
|
||||
TXDiddleWait=0
|
||||
TXCharWaitDiddle=0
|
||||
TXRandomDiddle=0
|
||||
TXWaitTimerDiddle=0
|
||||
Rev=0
|
||||
ShiftFreq=1.700000e+02
|
||||
RXBPF=1
|
||||
RXBPFTAP=64
|
||||
RXBPFAFC=1
|
||||
RXBPFFW=2.500000e+02
|
||||
RXlmsDelay=0
|
||||
RXlmsMU2=3.000000e-03
|
||||
RXlmsGM=9.999000e-01
|
||||
RXlmsAGC=0
|
||||
RXlmsInv=0
|
||||
RXlmsTAP=56
|
||||
RXlmsBPF=1
|
||||
RXlmsType=1
|
||||
RXlmsNotch=2203
|
||||
RXlmsNotch2=0
|
||||
RXlmsTwoNotch=0
|
||||
DEMTYPE=3
|
||||
BaudRate=4.545000e+01
|
||||
SmoozType=0
|
||||
SmoozOrder=5
|
||||
SmoozIIR=4.000000e+01
|
||||
Smooz=7.000000e+01
|
||||
Tap=72
|
||||
IIRBW=60
|
||||
pllVcoGain=3.000000e+00
|
||||
pllLoopOrder=2
|
||||
pllLoopFC=2.500000e+02
|
||||
pllOutOrder=4
|
||||
pllOutFC=2.000000e+02
|
||||
Diddle=2
|
||||
TxFixShift=0
|
||||
InvPTT=0
|
||||
TXUOS=1
|
||||
AFC=1
|
||||
UOS=1
|
||||
LimitAGC=1
|
||||
SQ=1
|
||||
TXLoop=1
|
||||
RXlms=0
|
||||
RXNotchTAP=72
|
||||
TTYBitLen=5
|
||||
TTYStopLen=4
|
||||
TTYParity=0
|
||||
FFTTones=4
|
||||
AA6YQ.Version=2
|
||||
AA6YQ.Enabled=0
|
||||
AA6YQ.TapsBPF=512
|
||||
AA6YQ.WidthBPF=3.500000e+01
|
||||
AA6YQ.TapsBEF=256
|
||||
AA6YQ.WidthBEF=1.500000e+01
|
||||
AA6YQ.afcERR=5.000000e+00
|
||||
|
||||
[Define6]
|
||||
Enabled=0
|
||||
|
||||
67
VerDsp.cpp
Normal file
67
VerDsp.cpp
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
//Copyright+LGPL
|
||||
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// Copyright 2000-2013 Makoto Mori, Nobuyuki Oba
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
// This file is part of MMTTY.
|
||||
|
||||
// MMTTY 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.
|
||||
|
||||
// MMTTY 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 Lesser General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU Lesser General Public License along with MMTTY. If not, see
|
||||
// <http://www.gnu.org/licenses/>.
|
||||
//-----------------------------------------------------------------------------------------------------------------------------------------------
|
||||
|
||||
|
||||
|
||||
//---------------------------------------------------------------------
|
||||
#include <vcl.h>
|
||||
#pragma hdrstop
|
||||
|
||||
#include "VerDsp.h"
|
||||
#include "ComLib.h"
|
||||
//---------------------------------------------------------------------
|
||||
#pragma resource "*.dfm"
|
||||
//TVerDspDlg *VerDspDlg;
|
||||
//---------------------------------------------------------------------
|
||||
__fastcall TVerDspDlg::TVerDspDlg(TComponent* AOwner)
|
||||
: TForm(AOwner)
|
||||
{
|
||||
IconImage->Picture->Assign(Application->Icon);
|
||||
FormStyle = ((TForm *)AOwner)->FormStyle;
|
||||
Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
// Version->Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
// Version->Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
LFree->Font->Name = ((TForm *)AOwner)->Font->Name;
|
||||
LFree->Font->Charset = ((TForm *)AOwner)->Font->Charset;
|
||||
if( Font->Charset != SHIFTJIS_CHARSET ){
|
||||
Caption = "Version Information";
|
||||
LFree->Caption = "Free Software";
|
||||
LTNX->Font->Size = LTNX->Font->Size - 1;
|
||||
}
|
||||
Version->Caption = VERTTL;
|
||||
LTNX->Caption =
|
||||
"------ Programming ------\r\n"
|
||||
"Dave, AA6YQ (updated 1.65D -> 1.66G)\r\n"
|
||||
"------ Help, FAQ and Remote mode, etc... ------\r\n"
|
||||
"Jan, KX2A Ken, VE5KC Bill, KB4IJ Andy, K3UK(KB2EOQ)\r\n"
|
||||
"Bill, K5YG Phil, GU0SUP, Josef, OK2WO Oba, JA7UDE\r\n"
|
||||
"Bill, W7TI Ed, K4SB Eddie, W6/G0AZT Geoff, G3NPA\r\n"
|
||||
"Bob, K4CY Eike, DM3ML Antonio, EA1MV Edoardo, I5PAC\r\n"
|
||||
"Joe, W4TV\r\n"
|
||||
"------ Japanese friends ------\r\n"
|
||||
"Fumio, JA1IQV Nori, JA1WSK Oba, JA7UDE\r\n"
|
||||
"Kaz, 7L1CUH Nobu, JA2BQX Hiro, JH1BIH, Isao JK1IQK\r\n"
|
||||
"------ Reflector and Web sites ------\r\n"
|
||||
"MMTTY User's group http://groups.yahoo.com/group/MMTTY/\r\n"
|
||||
"MMTTY-Web http://mmhamsoft.amateur-radio.ca/\r\n"
|
||||
"JARTS-Web http://jarts.web.fc2.com/\r\n"
|
||||
"\r\nAll friends of Radio Amateurs\r\n"
|
||||
"And my wife Midori, JI3IVL, for her invisible help."
|
||||
;
|
||||
}
|
||||
//---------------------------------------------------------------------
|
||||
BIN
VerDsp.dfm
Normal file
BIN
VerDsp.dfm
Normal file
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue