1 // ---------------------------------------------------------------------------- 2 // Copyright (C) 2014 3 // David Freese, W1HKJ 4 // 5 // This file is part of flrig. 6 // 7 // flrig is free software; you can redistribute it and/or modify 8 // it under the terms of the GNU General Public License as published by 9 // the Free Software Foundation; either version 3 of the License, or 10 // (at your option) any later version. 11 // 12 // flrig is distributed in the hope that it will be useful, 13 // but WITHOUT ANY WARRANTY; without even the implied warranty of 14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 // GNU General Public License for more details. 16 // 17 // You should have received a copy of the GNU General Public License 18 // along with this program. If not, see <http://www.gnu.org/licenses/>. 19 // ---------------------------------------------------------------------------- 20 21 #ifndef _status_H 22 #define _status_H 23 24 #include <string> 25 #include <FL/Fl.H> 26 #include <FL/Enumerations.H> 27 28 #include "rig.h" 29 30 using namespace std; 31 32 #define FPLEN 20 // used in tt550 power sample 33 34 struct status { 35 int mainX; 36 int mainY; 37 int mainW; 38 int mainH; 39 int UIsize; 40 bool UIchanged; 41 42 int memX; 43 int memY; 44 int memW; 45 int memH; 46 47 int ddX; 48 int ddY; 49 50 string xcvr_serial_port; 51 int comm_baudrate; 52 int stopbits; 53 int comm_retries; 54 int comm_wait; 55 int comm_timeout; 56 bool comm_echo; 57 bool comm_catptt; 58 bool comm_rtsptt; 59 bool comm_dtrptt; 60 bool comm_rtscts; 61 bool comm_rtsplus; 62 bool comm_dtrplus; 63 int serloop_timing; 64 int byte_interval; 65 66 string aux_serial_port; 67 bool aux_SCU_17; 68 bool aux_rts; 69 bool aux_dtr; 70 71 string xmlport; 72 73 string sep_serial_port; 74 bool sep_rtsptt; 75 bool sep_dtrptt; 76 bool sep_rtsplus; 77 bool sep_dtrplus; 78 bool sep_SCU_17; 79 80 bool disable_CW_ptt; 81 82 int CIV; 83 bool USBaudio; 84 85 int poll_smeter; 86 int poll_frequency; 87 int poll_mode; 88 int poll_bandwidth; 89 int poll_volume; 90 int poll_auto_notch; 91 int poll_notch; 92 int poll_ifshift; 93 int poll_power_control; 94 int poll_pre_att; 95 int poll_micgain; 96 int poll_squelch; 97 int poll_rfgain; 98 int poll_pout; 99 int poll_swr; 100 int poll_alc; 101 int poll_split; 102 int poll_noise; 103 int poll_nr; 104 int poll_vfoAorB; 105 int poll_meters; 106 int poll_ops; 107 int poll_compression; 108 int poll_tuner; 109 int poll_ptt; 110 int poll_break_in; 111 int poll_all; 112 113 int iBW_A; 114 int imode_A; 115 unsigned long int freq_A; 116 int iBW_B; 117 int imode_B; 118 unsigned long int freq_B; 119 120 std::string filters; 121 std::string bandwidths; 122 123 bool use_rig_data; 124 125 bool spkr_on; 126 int volume; 127 double power_level; 128 int mic_gain; 129 bool notch; 130 int notch_val; 131 bool shift; 132 int shift_val; 133 bool pbt_lock; 134 int pbt_inner; 135 int pbt_outer; 136 int rfgain; 137 int squelch; 138 139 int schema; 140 bool hrd_buttons; 141 int sliders_button; 142 143 int line_out; 144 bool data_port; 145 int agc_level; 146 int cw_wpm; 147 float cw_weight; 148 int cw_vol; 149 int cw_spot; 150 bool spot_onoff; 151 int cw_spot_tone; 152 bool enable_keyer; 153 int break_in; 154 double cw_qsk; 155 double cw_delay; 156 bool vox_onoff; 157 int vox_gain; 158 int vox_anti; 159 int vox_hang; 160 bool vox_on_dataport; 161 int compression; 162 bool compON; 163 164 int noise_reduction; 165 int noise_reduction_val; 166 int nb_level; 167 168 bool noise; 169 int attenuator; 170 int preamp; 171 int auto_notch; 172 173 int split; 174 int no_txqsy; 175 176 int rx_avg; 177 int rx_peak; 178 int pwr_avg; 179 int pwr_peak; 180 int pwr_scale; 181 182 // ic7610 special controls 183 bool digi_sel_on_off; 184 int digi_sel_val; 185 int index_ic7610att; 186 bool dual_watch; 187 188 // ft950 reverse RG0; readings 189 bool ft950_rg_reverse; 190 191 bool restore_frequency; 192 bool restore_mode; 193 bool restore_bandwidth; 194 bool restore_volume; 195 bool restore_mic_gain; 196 bool restore_rf_gain; 197 bool restore_power_control; 198 bool restore_if_shift; 199 bool restore_notch; 200 bool restore_auto_notch; 201 bool restore_noise; 202 bool restore_squelch; 203 bool restore_split; 204 bool restore_pre_att; 205 bool restore_nr; 206 bool restore_comp_on_off; 207 bool restore_comp_level; 208 209 //============= transceiver specific prameters 210 //tt550 controls 211 int tt550_line_out; 212 int tt550_agc_level; 213 214 int tt550_cw_wpm; 215 double tt550_cw_weight; 216 int tt550_cw_vol; 217 int tt550_cw_spot; 218 bool tt550_spot_onoff; 219 int tt550_cw_qsk; 220 bool tt550_enable_keyer; 221 222 bool tt550_vox_onoff; 223 int tt550_vox_gain; 224 int tt550_vox_anti; 225 int tt550_vox_hang; 226 227 int tt550_mon_vol; 228 int tt550_squelch_level; 229 int tt550_compression; 230 int tt550_nb_level; 231 bool tt550_compON; 232 bool tt550_tuner_bypass; 233 234 bool tt550_enable_xmtr; 235 bool tt550_enable_tloop; 236 237 bool tt550_use_line_in; 238 239 int tt550_xmt_bw; 240 bool tt550_use_xmt_bw; 241 242 int tt550_AM_level; 243 244 int tt550_encoder_step; 245 int tt550_encoder_sensitivity; 246 int tt550_keypad_timeout; 247 248 int tt550_F1_func; 249 int tt550_F2_func; 250 int tt550_F3_func; 251 252 int tt550_Nsamples; 253 bool tt550_at11_inline; 254 bool tt550_at11_hiZ; 255 256 // ========================= 257 //and others 258 double vfo_adj; 259 int bfo_freq; 260 int rit_freq; 261 int xit_freq; 262 int bpf_center; 263 bool use_bpf_center; 264 265 // IC706MKIIG filters 266 bool use706filters; 267 string ssb_cw_wide; //FL-103 268 string ssb_cw_normal; //FL-272 269 string ssb_cw_narrow; //FL-232 270 271 // ========================= 272 // User command buttons 273 string label1; 274 string command1; 275 string shftcmd1; 276 string label2; 277 string command2; 278 string shftcmd2; 279 string label3; 280 string command3; 281 string shftcmd3; 282 string label4; 283 string command4; 284 string shftcmd4; 285 string label5; 286 string command5; 287 string shftcmd5; 288 string label6; 289 string command6; 290 string shftcmd6; 291 string label7; 292 string command7; 293 string shftcmd7; 294 string label8; 295 string command8; 296 string shftcmd8; 297 298 string label9; 299 string command9; 300 string shftcmd9; 301 string label10; 302 string command10; 303 string shftcmd10; 304 string label11; 305 string command11; 306 string shftcmd11; 307 string label12; 308 string command12; 309 string shftcmd12; 310 string label13; 311 string command13; 312 string shftcmd13; 313 string label14; 314 string command14; 315 string shftcmd14; 316 string label15; 317 string command15; 318 string shftcmd15; 319 string label16; 320 string command16; 321 string shftcmd16; 322 323 string label17; 324 string command17; 325 string shftcmd17; 326 string label18; 327 string command18; 328 string shftcmd18; 329 string label19; 330 string command19; 331 string shftcmd19; 332 string label20; 333 string command20; 334 string shftcmd20; 335 string label21; 336 string command21; 337 string shftcmd21; 338 string label22; 339 string command22; 340 string shftcmd22; 341 string label23; 342 string command23; 343 string shftcmd23; 344 string label24; 345 string command24; 346 string shftcmd24; 347 348 // ========================= 349 int bg_red; 350 int bg_green; 351 int bg_blue; 352 353 int fg_red; 354 int fg_green; 355 int fg_blue; 356 357 int swrRed; 358 int swrGreen; 359 int swrBlue; 360 361 int pwrRed; 362 int pwrGreen; 363 int pwrBlue; 364 365 int smeterRed; 366 int smeterGreen; 367 int smeterBlue; 368 369 int peakRed; 370 int peakGreen; 371 int peakBlue; 372 373 int fg_sys_red; 374 int fg_sys_green; 375 int fg_sys_blue; 376 377 int bg_sys_red; 378 int bg_sys_green; 379 int bg_sys_blue; 380 381 int bg2_sys_red; 382 int bg2_sys_green; 383 int bg2_sys_blue; 384 385 int slider_red; 386 int slider_green; 387 int slider_blue; 388 389 int slider_btn_red; 390 int slider_btn_green; 391 int slider_btn_blue; 392 393 int lighted_btn_red; 394 int lighted_btn_green; 395 int lighted_btn_blue; 396 397 Fl_Font fontnbr; 398 399 bool tooltips; 400 401 string ui_scheme; 402 403 // string server_port; 404 // string server_addr; 405 406 string tcpip_port; 407 string tcpip_addr; 408 int tcpip_ping_delay; 409 int tcpip_reconnect_after; 410 int tcpip_drops_allowed; 411 bool use_tcpip; 412 413 bool xcvr_auto_on; 414 bool xcvr_auto_off; 415 416 bool external_tuner; 417 418 bool trace; 419 bool rigtrace; 420 bool settrace; 421 bool gettrace; 422 bool debugtrace; 423 bool xmltrace; 424 bool rpctrace; 425 bool start_stop_trace; 426 int rpc_level; 427 428 // bands; defaults for FT857 / FT897 / Xiegu-G90 429 // frequency, mode, txCTCSS, rxCTCSS, offset, offset_freq; 430 int f160, m160, txT_160, rxT_160, offset_160, oF_160; 431 int f80, m80, txT_80, rxT_80, offset_80, oF_80; 432 int f40, m40, txT_40, rxT_40, offset_40, oF_40; 433 int f30, m30, txT_30, rxT_30, offset_30, oF_30; 434 int f20, m20, txT_20, rxT_20, offset_20, oF_20; 435 int f17, m17, txT_17, rxT_17, offset_17, oF_17; 436 int f15, m15, txT_15, rxT_15, offset_15, oF_15; 437 int f12, m12, txT_12, rxT_12, offset_12, oF_12; 438 int f10, m10, txT_10, rxT_10, offset_10, oF_10; 439 int f6, m6, txT_6, rxT_6, offset_6, oF_6; 440 int f2, m2, txT_2, rxT_2, offset_2, oF_2; 441 int f70, m70, txT_70, rxT_70, offset_70, oF_70; 442 int f12G, m12G, txT_12G, rxT_12G, offset_12G, oF_12G; 443 int fgen, mgen, txT_gen, rxT_gen, offset_gen, oF_gen; 444 445 // memory management 446 Fl_Font memfontnbr; 447 int memfontsize; 448 449 // gpio parameters 450 bool gpio_ptt; 451 int enable_gpio; 452 int gpio_on; 453 int gpio_pulse_width; 454 455 // cwio parameters 456 int cwioWPM; 457 int cwioKEYLINE; 458 int cwioSHARED; 459 int cwioPTT; 460 int cwioCONNECTED; 461 double cwio_comp; 462 string cwioPORT; 463 string cwio_msgs[12]; 464 string cwio_labels[12]; 465 466 void saveLastState(); 467 void loadLastState(); 468 bool loadXcvrState(string); 469 void UI_laststate(); 470 471 string info(); 472 }; 473 474 extern status progStatus; 475 extern string xcvr_name; 476 477 extern void ss_trace(bool on); 478 479 #endif 480