2
* Yaesu FT-1000 drivers
6
* Copyright 2009, Dave Freese, W1HKJ
12
static const char FT1000name_[] = "FT-1000 **";
14
static const char *FT1000modes_[] = {
15
"LSB", "USB", "CW-2.4", "CW-500", "AM-6",
16
"AM-2.4", "FM", "FM", "RTTY-L", "RTTY-U",
17
"PKT-LSB", "PKT-FM", NULL};
19
static const char FT1000_mode_type[] = {
20
'L', 'U', 'L', 'L', 'U',
21
'U', 'U', 'U', 'L', 'U',
24
static const char *FT1000_widths[] = {
25
"2400", "2000", "500", "250", "6000", NULL };
29
RIG_FT1000::RIG_FT1000() {
32
modes_ = FT1000modes_;
33
bandwidths_ = FT1000_widths;
34
comm_baudrate = BR4800;
39
serloop_timing = 5000; // every 5 seconds FT1000 is a very slow beast!
50
has_bandwidth_control =
52
has_tune_control = true;
62
{ 0x00, 0x00, 0x00, 0x00, 0x01 }, // Split (OFF)
63
{ 0x00, 0x00, 0x00, 0x01, 0x01 }, // Split (On)
64
{ 0x00, 0x00, 0x00, 0x00, 0x02 }, // Recall Memory
65
{ 0x00, 0x00, 0x00, 0x00, 0x03 }, // Memory Operations
66
{ 0x00, 0x00, 0x00, 0x00, 0x04 }, // Lock (OFF)
67
{ 0x00, 0x00, 0x00, 0x01, 0x04 }, // Lock (ON)
68
{ 0x00, 0x00, 0x00, 0x00, 0x05 }, // Select VFO (A)
69
{ 0x00, 0x00, 0x00, 0x01, 0x05 }, // Select VFO (B)
70
{ 0x00, 0x00, 0x00, 0x00, 0x06 }, // Copy Memory Data to VFO A
71
{ 0x00, 0x00, 0x00, 0x00, 0x07 }, // OP Freq Up 0.1MHz
72
{ 0x00, 0x00, 0x01, 0x00, 0x07 }, // OP Freq Up 1MHz
73
{ 0x00, 0x00, 0x00, 0x00, 0x08 }, // OP Freq Down 0.1MHz
74
{ 0x00, 0x00, 0x01, 0x00, 0x08 }, // OP Freq Down 1MHz
75
{ 0x00, 0x00, 0x00, 0x00, 0x09 }, // RX Clarifier (OFF)
76
{ 0x00, 0x00, 0x00, 0x01, 0x09 }, // RX Clarifier (ON)
77
{ 0x00, 0x00, 0x00, 0x80, 0x09 }, // TX Clarifier (OFF)
78
{ 0x00, 0x00, 0x00, 0x81, 0x09 }, // TX Clarifier (ON)
79
{ 0x00, 0x00, 0x00, 0xff, 0x09 }, // Clear Clarifier Offset
80
{ 0x00, 0x00, 0x00, 0x00, 0x09 }, // Clarifier
81
{ 0x00, 0x00, 0x00, 0x00, 0x0a }, // Set Op Freq
82
{ 0x00, 0x00, 0x00, 0x00, 0x0c }, // OP Mode Set LSB
83
{ 0x00, 0x00, 0x00, 0x01, 0x0c }, // OP Mode Set USB
84
{ 0x00, 0x00, 0x00, 0x02, 0x0c }, // OP Mode Set CW 2.4KHz
85
{ 0x00, 0x00, 0x00, 0x03, 0x0c }, // OP Mode Set CW 500Hz
86
{ 0x00, 0x00, 0x00, 0x04, 0x0c }, // OP Mode Set AM 6KHz
87
{ 0x00, 0x00, 0x00, 0x05, 0x0c }, // OP Mode Set AM 2.4KHz
88
{ 0x00, 0x00, 0x00, 0x06, 0x0c }, // OP Mode Set FM
89
{ 0x00, 0x00, 0x00, 0x08, 0x0c }, // OP Mode Set RTTY LSB
90
{ 0x00, 0x00, 0x00, 0x09, 0x0c }, // OP Mode Set RTTY USB
91
{ 0x00, 0x00, 0x00, 0x0a, 0x0c }, // OP Mode Set PKT LSB
92
{ 0x00, 0x00, 0x00, 0x0b, 0x0c }, // OP Mode Set PKT FM
93
{ 0x00, 0x00, 0x00, 0x00, 0x0e }, // Pacing
94
{ 0x00, 0x00, 0x00, 0x00, 0x0f }, // PTT (OFF)
95
{ 0x00, 0x00, 0x00, 0x01, 0x0f }, // PTT (ON)
96
{ 0x00, 0x00, 0x00, 0x00, 0x10 }, // Update All Data (1508 bytes)
97
{ 0x00, 0x00, 0x00, 0x01, 0x10 }, // Update Memory Ch Number
98
{ 0x00, 0x00, 0x00, 0x02, 0x10 }, // Update Op Data
99
{ 0x00, 0x00, 0x00, 0x03, 0x10 }, // Update VFO Data
100
{ 0x00, 0x00, 0x00, 0x04, 0x10 }, // Update Memory Ch Data
101
{ 0x00, 0x00, 0x00, 0x00, 0x81 }, // Tuner (OFF)
102
{ 0x00, 0x00, 0x00, 0x01, 0x81 }, // Tuner (ON)
103
{ 0x00, 0x00, 0x00, 0x00, 0x82 }, // Tuner (Start)
104
{ 0x00, 0x00, 0x00, 0x00, 0x84 }, // Repeater Mode (OFF)
105
{ 0x00, 0x00, 0x00, 0x01, 0x84 }, // Repeater Mode (Minus)
106
{ 0x00, 0x00, 0x00, 0x02, 0x84 }, // Repeater Mode (Plus)
107
{ 0x00, 0x00, 0x00, 0x00, 0x85 }, // Copy displayed VFO (A=B || B=A)
108
{ 0x00, 0x00, 0x00, 0x00, 0x8C }, // Select Bandwidth
109
{ 0x00, 0x00, 0x00, 0x00, 0x8E }, // Step Operating Frequency Up
110
{ 0x00, 0x00, 0x00, 0x01, 0x8E }, // Step Operating Frequency Down
111
{ 0x00, 0x00, 0x00, 0x00, 0xf7 }, // Read Meter
112
{ 0x00, 0x00, 0x00, 0x00, 0xf8 }, // DIM Level
113
{ 0x00, 0x00, 0x00, 0x00, 0xf9 }, // Set Offset for Repeater Shift
114
{ 0x00, 0x00, 0x00, 0x00, 0xfa }, // Read Status Flags
117
void RIG_FT1000::init_cmd()
120
for (size_t i = 0; i < 5; i++) cmd[i] = 0;
123
int RIG_FT1000::adjust_bandwidth(int m)
125
if (m == 0 || m == 1 || m == 8 || m == 9 || m == 10 || m == 11)
127
if ( m == 3 ) return 0;
128
if ( m == 4 ) return 2;
129
if ( m == 4 ) return 4;
130
if ( m == 5 ) return 0;
131
if ( m == 6 || m == 7 || m == 11) return 0;
135
long RIG_FT1000::get_vfoA ()
138
cmd[3] = 2; cmd[4] = 0x10;
139
int ret = sendCommand(cmd);
140
if (ret < 17) return freqA;
142
freqA = fm_bcd(&replybuff[6], 8) * 10;
143
bwA = replybuff[13] & 0x07;
147
void RIG_FT1000::set_vfoA (long freq)
150
freq /=10; // 1000 does not support 1 Hz resolution
151
cmd = to_bcd(freq, 8);
156
int RIG_FT1000::get_modeA()
160
int ret = sendCommand(cmd);
161
if (ret < 5) return modeA;
166
void RIG_FT1000::set_modeA(int val)
175
int RIG_FT1000::get_modetype(int n)
177
return FT1000_mode_type[n];
180
void RIG_FT1000::set_bwA(int n)
189
int RIG_FT1000::get_bwA()
194
// Tranceiver PTT on/off
195
void RIG_FT1000::set_PTT_control(int val)
204
void RIG_FT1000::tune_rig()
211
int RIG_FT1000::get_power_out(void)
215
int ret = sendCommand(cmd);
216
if (ret < 5) return 0;
217
return replybuff[0] && 0x0F;
220
int RIG_FT1000::get_smeter(void)
224
int ret = sendCommand(cmd);
225
if (ret < 5) return 0;
226
return replybuff[0] && 0x0F;