1 // ---------------------------------------------------------------------------- 2 // Copyright (C) 2014 3 // David Freese, W1HKJ 4 // 5 // This file is part of fldigi 6 // 7 // fldigi 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 // fldigi 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 26 #include "globals.h" 27 28 struct status { 29 trx_mode lastmode; 30 std::string mode_name; 31 int mainX; 32 int mainY; 33 int mainW; 34 int mainH; 35 bool WF_UI; 36 bool NO_RIGLOG; 37 bool Rig_Log_UI; 38 bool Rig_Contest_UI; 39 bool DOCKEDSCOPE; 40 bool tbar_is_docked; 41 42 // int RxTextHeight; 43 int tiled_group_x; 44 bool show_channels; 45 46 int rigX; 47 int rigY; 48 int rigW; 49 int rigH; 50 int carrier; 51 int noCATfreq; 52 std::string noCATmode; 53 std::string noCATwidth; 54 int mag; 55 int offset; 56 int speed; 57 double reflevel; 58 int int_reflevel; 59 double ampspan; 60 int int_ampspan; 61 unsigned int VIEWERnchars; 62 unsigned int VIEWERxpos; 63 unsigned int VIEWERypos; 64 unsigned int VIEWERwidth; 65 unsigned int VIEWERheight; 66 double VIEWER_psksquelch; 67 int int_VIEWER_psksquelch; 68 double VIEWER_rttysquelch; 69 int int_VIEWER_rttysquelch; 70 double VIEWER_cwsquelch; 71 int int_VIEWER_cwsquelch; 72 bool VIEWERvisible; 73 unsigned int fsqMONITORxpos; 74 unsigned int fsqMONITORypos; 75 unsigned int fsqMONITORwidth; 76 unsigned int fsqMONITORheight; 77 int tile_x; 78 int tile_w; 79 int tile_y; 80 int tile_h; 81 double tile_y_ratio; 82 double fsq_ratio; 83 double ifkp_ratio; 84 int int_tile_y_ratio; 85 int int_fsq_ratio; 86 int int_ifkp_ratio; 87 bool LOGenabled; 88 double sldrSquelchValue; 89 int int_sldrSquelchValue; 90 double sldrPwrSquelchValue; 91 int int_sldrPwrSquelchValue; 92 bool afconoff; 93 bool sqlonoff; 94 int scopeX; 95 int scopeY; 96 bool scopeVisible; 97 int scopeW; 98 int scopeH; 99 100 int svX; // spectrum viewer X, Y, W, H 101 int svY; 102 int svW; 103 int svH; 104 bool x_graticule; 105 bool y_graticule; 106 bool xy_graticule; 107 108 int repeatMacro; 109 float repeatIdleTime; 110 int timer; 111 int timerMacro; 112 bool skip_sked_macro; 113 std::string LastMacroFile; 114 int n_rsids; 115 116 bool spot_recv; 117 bool spot_log; 118 bool contest; 119 bool quick_entry; 120 bool rx_scroll_hints; 121 bool rx_word_wrap; 122 bool tx_word_wrap; 123 bool cluster_connected; 124 125 int logbook_x; 126 int logbook_y; 127 int logbook_w; 128 int logbook_h; 129 bool logbook_reverse; 130 int logbook_col_0; 131 int logbook_col_1; 132 int logbook_col_2; 133 int logbook_col_3; 134 int logbook_col_4; 135 int logbook_col_5; 136 137 int dxdialog_x; 138 int dxdialog_y; 139 int dxdialog_w; 140 int dxdialog_h; 141 142 // Contestia, Olivia, RTTY state values 143 int contestiatones; 144 int contestiabw; 145 int contestiamargin; 146 int contestiainteg; 147 bool contestia8bit; 148 149 int oliviatones; 150 int oliviabw; 151 int oliviamargin; 152 int oliviainteg; 153 bool olivia8bit; 154 155 int rtty_shift; 156 int rtty_custom_shift; 157 int rtty_baud; 158 int rtty_bits; 159 int rtty_parity; 160 int rtty_stop; 161 bool rtty_reverse; 162 bool rtty_crcrlf; 163 bool rtty_autocrlf; 164 int rtty_autocount; 165 int rtty_afcspeed; 166 bool rtty_filter_changed; 167 bool PreferXhairScope; 168 bool shaped_rtty; 169 bool UOSrx; 170 bool UOStx; 171 // end Contestia, Olivia, RTTY state values 172 173 std::string xmlrpc_address; 174 std::string xmlrpc_port; 175 std::string arq_address; 176 std::string arq_port; 177 std::string kiss_address; 178 std::string kiss_io_port; 179 std::string kiss_out_port; 180 int kiss_dual_port_enabled; 181 int data_io_enabled; 182 bool ax25_decode_enabled; 183 bool enableBusyChannel; 184 int busyChannelSeconds; 185 int kpsql_attenuation; 186 bool csma_enabled; 187 bool kiss_tcp_io; 188 bool kiss_tcp_listen; 189 bool kpsql_enabled; 190 int csma_persistance; 191 int csma_slot_time; 192 int csma_transmit_delay; 193 int psm_flush_buffer_timeout; 194 int psm_minimum_bandwidth; 195 int psm_minimum_bandwidth_margin; 196 bool psm_use_histogram; 197 int psm_histogram_offset_threshold; 198 int psm_hit_time_window; 199 int tx_buffer_timeout; 200 bool kiss_io_modem_change_inhibit; 201 bool ip_lock; 202 double squelch_value; 203 int int_squelch_value; 204 bool psk8DCDShortFlag; 205 206 std::string browser_search; 207 208 bool meters; 209 210 bool fsq_rx_abort; 211 bool ifkp_rx_abort; 212 213 //---------------------------------------------------------------------- 214 // winkeyer status values 215 //---------------------------------------------------------------------- 216 std::string WK_serial_port_name; 217 int WK_comm_baudrate; 218 int WK_stopbits; 219 int WK_comm_retries; 220 int WK_comm_wait; 221 int WK_comm_timeout; 222 bool WK_comm_echo; 223 224 // wkeyer values 225 unsigned char WK_mode_register; 226 unsigned char WK_speed_wpm; 227 unsigned char WK_sidetone; 228 unsigned char WK_weight; 229 unsigned char WK_lead_in_time; 230 unsigned char WK_tail_time; 231 unsigned char WK_min_wpm; 232 unsigned char WK_rng_wpm; 233 unsigned char WK_first_extension; 234 unsigned char WK_key_compensation; 235 unsigned char WK_farnsworth_wpm; 236 unsigned char WK_paddle_setpoint; 237 unsigned char WK_dit_dah_ratio; 238 unsigned char WK_pin_configuration; 239 unsigned char WK_dont_care; 240 241 bool WK_cut_zeronine; 242 unsigned char WK_cmd_wpm; 243 bool WK_use_pot; 244 bool WK_online; 245 int WK_version; 246 247 int WKFSK_mode; // 0 = cw, 1 = fsk/cw 248 int WKFSK_baud; 249 int WKFSK_stopbits; 250 int WKFSK_ptt; 251 int WKFSK_polarity; 252 int WKFSK_sidetone; 253 int WKFSK_auto_crlf; 254 int WKFSK_diddle; 255 int WKFSK_diddle_char; 256 int WKFSK_usos; 257 int WKFSK_monitor; 258 259 bool Nav_online; 260 bool Nav_config_online; 261 262 bool nanoCW_online; 263 bool nanoFSK_online; 264 265 bool useCW_KEYLINE; 266 267 //---------------------------------------------------------------------- 268 // FMT saved controls 269 double FMT_ref_freq; 270 int int_FMT_ref_freq; 271 double FMT_unk_freq; 272 int int_FMT_unk_freq; 273 int FMT_rec_interval; 274 int FMT_trk_scale; 275 int FMT_minutes; 276 //---------------------------------------------------------------------- 277 int debug_mask; 278 int debug_level; 279 //---------------------------------------------------------------------- 280 281 int vumeter_shown; 282 //---------------------------------------------------------------------- 283 284 bool bLastStateRead; 285 286 void initLastState(); 287 void saveLastState(); 288 void loadLastState(); 289 290 }; 291 292 extern status progStatus; 293 294 #endif 295